From 57b06ee000e319c8c37a25a065e580dedf86e1fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Nov 2020 07:35:02 +0100 Subject: [PATCH 01/45] Bump release-it from 14.2.1 to 14.2.2 (#617) Bumps [release-it](https://github.com/release-it/release-it) from 14.2.1 to 14.2.2. - [Release notes](https://github.com/release-it/release-it/releases) - [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md) - [Commits](https://github.com/release-it/release-it/compare/14.2.1...14.2.2) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 74 ++++++++++++++++++++++++--------------------- package.json | 2 +- yarn.lock | 76 +++++++++++++++++++++++------------------------ 3 files changed, 79 insertions(+), 73 deletions(-) diff --git a/package-lock.json b/package-lock.json index b881511..67cc608 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@adyen/api-library", - "version": "6.0.1", + "version": "6.0.3", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -765,9 +765,9 @@ "dev": true }, "@octokit/plugin-rest-endpoint-methods": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.0.tgz", - "integrity": "sha512-1/qn1q1C1hGz6W/iEDm9DoyNoG/xdFDt78E3eZ5hHeUfJTLJgyAMdj9chL/cNBHjcjd+FH5aO1x0VCqR2RE0mw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.1.tgz", + "integrity": "sha512-QyFr4Bv807Pt1DXZOC5a7L5aFdrwz71UHTYoHVajYV5hsqffWm8FUl9+O7nxRu5PDMtB/IKrhFqTmdBTK5cx+A==", "dev": true, "requires": { "@octokit/types": "^5.5.0", @@ -810,15 +810,15 @@ } }, "@octokit/rest": { - "version": "18.0.7", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.0.7.tgz", - "integrity": "sha512-ctz0cMIb3c6gO2ADto+A1r4JI+2hkUkDcD1JRunkhk1SOUrNGQcQ+9FBqZ6UekS1Z/c3xPvF0OoLtX2cQ118+A==", + "version": "18.0.9", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.0.9.tgz", + "integrity": "sha512-CC5+cIx974Ygx9lQNfUn7/oXDQ9kqGiKUC6j1A9bAVZZ7aoTF8K6yxu0pQhQrLBwSl92J6Z3iVDhGhGFgISCZg==", "dev": true, "requires": { "@octokit/core": "^3.0.0", "@octokit/plugin-paginate-rest": "^2.2.0", "@octokit/plugin-request-log": "^1.0.0", - "@octokit/plugin-rest-endpoint-methods": "4.2.0" + "@octokit/plugin-rest-endpoint-methods": "4.2.1" } }, "@octokit/types": { @@ -5575,9 +5575,9 @@ "dev": true }, "registry-auth-token": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.0.tgz", - "integrity": "sha512-P+lWzPrsgfN+UEpDS3U8AQKg/UjZX6mQSJueZj3EK+vNESoqBSpBUD3gmu4sF9lOsjXWjF11dQKUqemf3veq1w==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", "dev": true, "requires": { "rc": "^1.2.8" @@ -5593,17 +5593,17 @@ } }, "release-it": { - "version": "14.2.1", - "resolved": "https://registry.npmjs.org/release-it/-/release-it-14.2.1.tgz", - "integrity": "sha512-zHXJjU2eOvVcbXTQSfgNC9DcDU7WgTc9qappBFfGRDicK//Bqt1KaOAEhCS6EZ9u4v7YbWBRbUejSrVXOLfCVQ==", + "version": "14.2.2", + "resolved": "https://registry.npmjs.org/release-it/-/release-it-14.2.2.tgz", + "integrity": "sha512-rnJOzDIXErrwCD9cRMtDgmOZlcLQiL0z0dVyN95G2T1FQVBQNr7AD5EiH3U+K6X7s+EVoK90lF96NXe5QuvG1A==", "dev": true, "requires": { "@iarna/toml": "2.2.5", - "@octokit/rest": "18.0.7", + "@octokit/rest": "18.0.9", "async-retry": "1.3.1", "chalk": "4.1.0", "cosmiconfig": "7.0.0", - "debug": "4.2.0", + "debug": "4.3.1", "deprecated-obj": "2.0.0", "execa": "4.1.0", "find-up": "5.0.0", @@ -5621,11 +5621,11 @@ "parse-json": "5.1.0", "semver": "7.3.2", "shelljs": "0.8.4", - "update-notifier": "5.0.0", + "update-notifier": "5.0.1", "url-join": "4.0.1", "uuid": "8.3.1", "yaml": "1.10.0", - "yargs-parser": "20.2.3" + "yargs-parser": "20.2.4" }, "dependencies": { "chalk": { @@ -5650,9 +5650,9 @@ } }, "debug": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -5736,12 +5736,12 @@ } }, "p-limit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.0.2.tgz", - "integrity": "sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { - "p-try": "^2.0.0" + "yocto-queue": "^0.1.0" } }, "p-locate": { @@ -5802,9 +5802,9 @@ } }, "yargs-parser": { - "version": "20.2.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.3.tgz", - "integrity": "sha512-emOFRT9WVHw03QSvN5qor9QQT9+sw5vwxfYweivSMHTcAXPefwVae2FjO7JJjj8hCE4CzPOPeFM83VwT29HCww==", + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true } } @@ -7149,9 +7149,9 @@ } }, "update-notifier": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.0.0.tgz", - "integrity": "sha512-8tqsiVrMv7aZsKNSjqA6DdBLKJpZG1hRpkj1RbOJu1PgyP69OX+EInAnP1EK/ShX5YdPFgwWdk19oquZ0HTM8g==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.0.1.tgz", + "integrity": "sha512-BuVpRdlwxeIOvmc32AGYvO1KVdPlsmqSh8KDDBxS6kDE5VR7R8OMP1d8MdhaVBvxl4H3551k9akXr0Y1iIB2Wg==", "dev": true, "requires": { "boxen": "^4.2.0", @@ -7160,11 +7160,11 @@ "has-yarn": "^2.1.0", "import-lazy": "^2.1.0", "is-ci": "^2.0.0", - "is-installed-globally": "^0.3.1", + "is-installed-globally": "^0.3.2", "is-npm": "^5.0.0", "is-yarn-global": "^0.3.0", - "latest-version": "^5.0.0", - "pupa": "^2.0.1", + "latest-version": "^5.1.0", + "pupa": "^2.1.1", "semver": "^7.3.2", "semver-diff": "^3.1.1", "xdg-basedir": "^4.0.0" @@ -7649,6 +7649,12 @@ "camelcase": "^5.0.0", "decamelize": "^1.2.0" } + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true } } } diff --git a/package.json b/package.json index 5b5249f..80039fc 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "kind-of": "^6.0.3", "minimist": ">=1.2.3", "nock": "13.0.5", - "release-it": "14.2.1", + "release-it": "14.2.2", "ts-auto-mock": "^2.6.5", "ts-jest": "25.5.1", "ts-loader": "8.0.10", diff --git a/yarn.lock b/yarn.lock index 0b39217..efb0552 100644 --- a/yarn.lock +++ b/yarn.lock @@ -550,10 +550,10 @@ resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz#eef87a431300f6148c39a7f75f8cfeb218b2547e" integrity sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw== -"@octokit/plugin-rest-endpoint-methods@4.2.0": - version "4.2.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.0.tgz#c5a0691b3aba5d8b4ef5dffd6af3649608f167ba" - integrity sha512-1/qn1q1C1hGz6W/iEDm9DoyNoG/xdFDt78E3eZ5hHeUfJTLJgyAMdj9chL/cNBHjcjd+FH5aO1x0VCqR2RE0mw== +"@octokit/plugin-rest-endpoint-methods@4.2.1": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.1.tgz#8224833a45c3394836dc6e86f1e6c49269a2c350" + integrity sha512-QyFr4Bv807Pt1DXZOC5a7L5aFdrwz71UHTYoHVajYV5hsqffWm8FUl9+O7nxRu5PDMtB/IKrhFqTmdBTK5cx+A== dependencies: "@octokit/types" "^5.5.0" deprecation "^2.3.1" @@ -581,15 +581,15 @@ once "^1.4.0" universal-user-agent "^6.0.0" -"@octokit/rest@18.0.7": - version "18.0.7" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.7.tgz#236514417084334bc0ef62416a19f6030db3d907" - integrity sha512-ctz0cMIb3c6gO2ADto+A1r4JI+2hkUkDcD1JRunkhk1SOUrNGQcQ+9FBqZ6UekS1Z/c3xPvF0OoLtX2cQ118+A== +"@octokit/rest@18.0.9": + version "18.0.9" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.9.tgz#964d707d914eb34b1787895fdcacff96de47844d" + integrity sha512-CC5+cIx974Ygx9lQNfUn7/oXDQ9kqGiKUC6j1A9bAVZZ7aoTF8K6yxu0pQhQrLBwSl92J6Z3iVDhGhGFgISCZg== dependencies: "@octokit/core" "^3.0.0" "@octokit/plugin-paginate-rest" "^2.2.0" "@octokit/plugin-request-log" "^1.0.0" - "@octokit/plugin-rest-endpoint-methods" "4.2.0" + "@octokit/plugin-rest-endpoint-methods" "4.2.1" "@octokit/types@^5.0.0", "@octokit/types@^5.0.1", "@octokit/types@^5.5.0": version "5.5.0" @@ -1564,10 +1564,10 @@ data-urls@^1.1.0: whatwg-mimetype "^2.2.0" whatwg-url "^7.0.0" -debug@4, debug@4.2.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: - version "4.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1" - integrity sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg== +debug@4, debug@4.3.1, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== dependencies: ms "2.1.2" @@ -2701,7 +2701,7 @@ is-glob@^4.0.0, is-glob@^4.0.1: dependencies: is-extglob "^2.1.1" -is-installed-globally@^0.3.1: +is-installed-globally@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.3.2.tgz#fd3efa79ee670d1187233182d5b0a1dd00313141" integrity sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g== @@ -3406,7 +3406,7 @@ kuler@^2.0.0: resolved "https://registry.yarnpkg.com/kuler/-/kuler-2.0.0.tgz#e2c570a3800388fb44407e851531c1d670b061b3" integrity sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A== -latest-version@^5.0.0: +latest-version@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face" integrity sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA== @@ -4134,10 +4134,10 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -pupa@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pupa/-/pupa-2.0.1.tgz#dbdc9ff48ffbea4a26a069b6f9f7abb051008726" - integrity sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA== +pupa@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/pupa/-/pupa-2.1.1.tgz#f5e8fd4afc2c5d97828faa523549ed8744a20d62" + integrity sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A== dependencies: escape-goat "^2.0.0" @@ -4251,17 +4251,17 @@ registry-url@^5.0.0: dependencies: rc "^1.2.8" -release-it@14.2.1: - version "14.2.1" - resolved "https://registry.yarnpkg.com/release-it/-/release-it-14.2.1.tgz#e3d7b6daee45162a6fe903ef1b1b022a0d25c325" - integrity sha512-zHXJjU2eOvVcbXTQSfgNC9DcDU7WgTc9qappBFfGRDicK//Bqt1KaOAEhCS6EZ9u4v7YbWBRbUejSrVXOLfCVQ== +release-it@14.2.2: + version "14.2.2" + resolved "https://registry.yarnpkg.com/release-it/-/release-it-14.2.2.tgz#ec01be53b04c5aa251a45c7a0b29cceace7827b3" + integrity sha512-rnJOzDIXErrwCD9cRMtDgmOZlcLQiL0z0dVyN95G2T1FQVBQNr7AD5EiH3U+K6X7s+EVoK90lF96NXe5QuvG1A== dependencies: "@iarna/toml" "2.2.5" - "@octokit/rest" "18.0.7" + "@octokit/rest" "18.0.9" async-retry "1.3.1" chalk "4.1.0" cosmiconfig "7.0.0" - debug "4.2.0" + debug "4.3.1" deprecated-obj "2.0.0" execa "4.1.0" find-up "5.0.0" @@ -4279,11 +4279,11 @@ release-it@14.2.1: parse-json "5.1.0" semver "7.3.2" shelljs "0.8.4" - update-notifier "5.0.0" + update-notifier "5.0.1" url-join "4.0.1" uuid "8.3.1" yaml "1.10.0" - yargs-parser "20.2.3" + yargs-parser "20.2.4" remove-trailing-separator@^1.0.1: version "1.1.0" @@ -5141,10 +5141,10 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" -update-notifier@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-5.0.0.tgz#308e0ae772f71d66df0303159a945bc1e1fb819a" - integrity sha512-8tqsiVrMv7aZsKNSjqA6DdBLKJpZG1hRpkj1RbOJu1PgyP69OX+EInAnP1EK/ShX5YdPFgwWdk19oquZ0HTM8g== +update-notifier@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-5.0.1.tgz#1f92d45fb1f70b9e33880a72dd262bc12d22c20d" + integrity sha512-BuVpRdlwxeIOvmc32AGYvO1KVdPlsmqSh8KDDBxS6kDE5VR7R8OMP1d8MdhaVBvxl4H3551k9akXr0Y1iIB2Wg== dependencies: boxen "^4.2.0" chalk "^4.1.0" @@ -5152,11 +5152,11 @@ update-notifier@5.0.0: has-yarn "^2.1.0" import-lazy "^2.1.0" is-ci "^2.0.0" - is-installed-globally "^0.3.1" + is-installed-globally "^0.3.2" is-npm "^5.0.0" is-yarn-global "^0.3.0" - latest-version "^5.0.0" - pupa "^2.0.1" + latest-version "^5.1.0" + pupa "^2.1.1" semver "^7.3.2" semver-diff "^3.1.1" xdg-basedir "^4.0.0" @@ -5422,10 +5422,10 @@ yargs-parser@18.x, yargs-parser@^18.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@20.2.3: - version "20.2.3" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.3.tgz#92419ba867b858c868acf8bae9bf74af0dd0ce26" - integrity sha512-emOFRT9WVHw03QSvN5qor9QQT9+sw5vwxfYweivSMHTcAXPefwVae2FjO7JJjj8hCE4CzPOPeFM83VwT29HCww== +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== yargs@^15.3.1: version "15.4.1" From 1cdc1252635c438d537a86b9022aaccf0541346f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Dec 2020 06:02:54 +0100 Subject: [PATCH 02/45] Bump @types/jest from 26.0.15 to 26.0.16 (#618) Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.15 to 26.0.16. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 44 +++++++++++++++++++++++++------------------- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 30 insertions(+), 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index 67cc608..3531892 100644 --- a/package-lock.json +++ b/package-lock.json @@ -960,9 +960,9 @@ } }, "@types/jest": { - "version": "26.0.15", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.15.tgz", - "integrity": "sha512-s2VMReFXRg9XXxV+CW9e5Nz8fH2K1aEhwgjUqPPbQd7g95T0laAcvLv032EhFHIa5GHsZ8W7iJEQVaJq6k3Gog==", + "version": "26.0.16", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.16.tgz", + "integrity": "sha512-Gp12+7tmKCgv9JjtltxUXokohCAEZfpJaEW5tn871SGRp8I+bRWBonQO7vW5NHwnAHe5dd50+Q4zyKuN35i09g==", "dev": true, "requires": { "jest-diff": "^26.0.0", @@ -970,9 +970,9 @@ }, "dependencies": { "@jest/types": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.0.tgz", - "integrity": "sha512-8pDeq/JVyAYw7jBGU83v8RMYAkdrRxLG3BGnAJuqaQAUd6GWBmND2uyl+awI88+hit48suLoLjNFtR+ZXxWaYg==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", + "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", @@ -1002,21 +1002,21 @@ } }, "diff-sequences": { - "version": "26.5.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.5.0.tgz", - "integrity": "sha512-ZXx86srb/iYy6jG71k++wBN9P9J05UNQ5hQHQd9MtMPvcqXPx/vKU69jfHV637D00Q2gSgPk2D+jSx3l1lDW/Q==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", + "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", "dev": true }, "jest-diff": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.0.tgz", - "integrity": "sha512-IH09rKsdWY8YEY7ii2BHlSq59oXyF2pK3GoK+hOK9eD/x6009eNB5Jv1shLMKgxekodPzLlV7eZP1jPFQYds8w==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz", + "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==", "dev": true, "requires": { "chalk": "^4.0.0", - "diff-sequences": "^26.5.0", + "diff-sequences": "^26.6.2", "jest-get-type": "^26.3.0", - "pretty-format": "^26.6.0" + "pretty-format": "^26.6.2" } }, "jest-get-type": { @@ -1026,16 +1026,22 @@ "dev": true }, "pretty-format": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.0.tgz", - "integrity": "sha512-Uumr9URVB7bm6SbaByXtx+zGlS+0loDkFMHP0kHahMjmfCtmFY03iqd++5v3Ld6iB5TocVXlBN/T+DXMn9d4BA==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", + "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", "dev": true, "requires": { - "@jest/types": "^26.6.0", + "@jest/types": "^26.6.2", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", - "react-is": "^16.12.0" + "react-is": "^17.0.1" } + }, + "react-is": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz", + "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==", + "dev": true } } }, diff --git a/package.json b/package.json index 80039fc..35725f4 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "author": "Ricardo Ambrogi", "license": "MIT", "devDependencies": { - "@types/jest": "26.0.15", + "@types/jest": "26.0.16", "@types/nock": "11.1.0", "@typescript-eslint/eslint-plugin": "2.34.0", "@typescript-eslint/parser": "2.34.0", diff --git a/yarn.lock b/yarn.lock index efb0552..7d337c6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -721,10 +721,10 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@26.0.15": - version "26.0.15" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.15.tgz#12e02c0372ad0548e07b9f4e19132b834cb1effe" - integrity sha512-s2VMReFXRg9XXxV+CW9e5Nz8fH2K1aEhwgjUqPPbQd7g95T0laAcvLv032EhFHIa5GHsZ8W7iJEQVaJq6k3Gog== +"@types/jest@26.0.16": + version "26.0.16" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.16.tgz#b47abd50f6ed0503f589db8e126fc8eb470cf87c" + integrity sha512-Gp12+7tmKCgv9JjtltxUXokohCAEZfpJaEW5tn871SGRp8I+bRWBonQO7vW5NHwnAHe5dd50+Q4zyKuN35i09g== dependencies: jest-diff "^26.0.0" pretty-format "^26.0.0" From 4f5e9ff79957041230d9febc0ca03a6a03634f64 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Dec 2020 08:41:29 +0100 Subject: [PATCH 03/45] Bump ts-auto-mock from 2.6.5 to 2.7.0 (#619) Bumps [ts-auto-mock](https://github.com/Typescript-TDD/ts-auto-mock) from 2.6.5 to 2.7.0. - [Release notes](https://github.com/Typescript-TDD/ts-auto-mock/releases) - [Changelog](https://github.com/Typescript-TDD/ts-auto-mock/blob/master/CHANGELOG.md) - [Commits](https://github.com/Typescript-TDD/ts-auto-mock/compare/2.6.5...2.7.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- yarn.lock | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3531892..1b27606 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6905,9 +6905,9 @@ "dev": true }, "ts-auto-mock": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/ts-auto-mock/-/ts-auto-mock-2.6.5.tgz", - "integrity": "sha512-yLWJgRBbtzI6KcEerFdhfxdtem+gtmj7q2gGrlR/hvnHALLtcgIhcaK/4Gv/XSnSKsaRtnfJmbeA53kzoKSfdQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/ts-auto-mock/-/ts-auto-mock-2.7.0.tgz", + "integrity": "sha512-a+lcoUYsYArnVTBaxcEGOBfqAjgsrGxPOW+0/x4UQtucSZ8BK+2yyoTnKIoyVf21K1GCzXNpsF+/lP1EQa49qA==", "dev": true, "requires": { "lodash-es": "^4.17.15", diff --git a/yarn.lock b/yarn.lock index 7d337c6..8a44c46 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5006,9 +5006,9 @@ triple-beam@^1.2.0, triple-beam@^1.3.0: integrity sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw== ts-auto-mock@^2.6.5: - version "2.6.5" - resolved "https://registry.yarnpkg.com/ts-auto-mock/-/ts-auto-mock-2.6.5.tgz#5fb7becad172514c91ef21f1307317cd17f8e60f" - integrity sha512-yLWJgRBbtzI6KcEerFdhfxdtem+gtmj7q2gGrlR/hvnHALLtcgIhcaK/4Gv/XSnSKsaRtnfJmbeA53kzoKSfdQ== + version "2.7.0" + resolved "https://registry.yarnpkg.com/ts-auto-mock/-/ts-auto-mock-2.7.0.tgz#0ea9e6ceb018bbd8a27ba4a8612f6105230fc040" + integrity sha512-a+lcoUYsYArnVTBaxcEGOBfqAjgsrGxPOW+0/x4UQtucSZ8BK+2yyoTnKIoyVf21K1GCzXNpsF+/lP1EQa49qA== dependencies: lodash-es "^4.17.15" micromatch "^4.0.2" From d01555af690f77519f27d20a29c4af7d04b2615d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Dec 2020 09:02:41 +0100 Subject: [PATCH 04/45] Bump @types/jest from 26.0.16 to 26.0.18 (#620) Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.16 to 26.0.18. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1b27606..22cf4de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -960,9 +960,9 @@ } }, "@types/jest": { - "version": "26.0.16", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.16.tgz", - "integrity": "sha512-Gp12+7tmKCgv9JjtltxUXokohCAEZfpJaEW5tn871SGRp8I+bRWBonQO7vW5NHwnAHe5dd50+Q4zyKuN35i09g==", + "version": "26.0.18", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.18.tgz", + "integrity": "sha512-scDPs+mELZgsFetTgBSsIxKGrlitn9t/d2ecP+S1QSIGD+31fkMBEftLfOAX5k3tU06/0PjreJIQ+gWEbbHqpw==", "dev": true, "requires": { "jest-diff": "^26.0.0", diff --git a/package.json b/package.json index 35725f4..91175db 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "author": "Ricardo Ambrogi", "license": "MIT", "devDependencies": { - "@types/jest": "26.0.16", + "@types/jest": "26.0.18", "@types/nock": "11.1.0", "@typescript-eslint/eslint-plugin": "2.34.0", "@typescript-eslint/parser": "2.34.0", diff --git a/yarn.lock b/yarn.lock index 8a44c46..7c75abd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -721,10 +721,10 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@26.0.16": - version "26.0.16" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.16.tgz#b47abd50f6ed0503f589db8e126fc8eb470cf87c" - integrity sha512-Gp12+7tmKCgv9JjtltxUXokohCAEZfpJaEW5tn871SGRp8I+bRWBonQO7vW5NHwnAHe5dd50+Q4zyKuN35i09g== +"@types/jest@26.0.18": + version "26.0.18" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.18.tgz#3c5f9228e9ac15bd42f903f1acf2ad6ea5ed73d9" + integrity sha512-scDPs+mELZgsFetTgBSsIxKGrlitn9t/d2ecP+S1QSIGD+31fkMBEftLfOAX5k3tU06/0PjreJIQ+gWEbbHqpw== dependencies: jest-diff "^26.0.0" pretty-format "^26.0.0" From 3f1962c5e608331b6599b683a9848cf5eded36cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Dec 2020 08:20:02 +0100 Subject: [PATCH 05/45] Bump @types/jest from 26.0.18 to 26.0.19 (#622) Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.18 to 26.0.19. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 22cf4de..17aadef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -960,9 +960,9 @@ } }, "@types/jest": { - "version": "26.0.18", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.18.tgz", - "integrity": "sha512-scDPs+mELZgsFetTgBSsIxKGrlitn9t/d2ecP+S1QSIGD+31fkMBEftLfOAX5k3tU06/0PjreJIQ+gWEbbHqpw==", + "version": "26.0.19", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.19.tgz", + "integrity": "sha512-jqHoirTG61fee6v6rwbnEuKhpSKih0tuhqeFbCmMmErhtu3BYlOZaXWjffgOstMM4S/3iQD31lI5bGLTrs97yQ==", "dev": true, "requires": { "jest-diff": "^26.0.0", diff --git a/package.json b/package.json index 91175db..73651c7 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "author": "Ricardo Ambrogi", "license": "MIT", "devDependencies": { - "@types/jest": "26.0.18", + "@types/jest": "26.0.19", "@types/nock": "11.1.0", "@typescript-eslint/eslint-plugin": "2.34.0", "@typescript-eslint/parser": "2.34.0", diff --git a/yarn.lock b/yarn.lock index 7c75abd..903167f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -721,10 +721,10 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@26.0.18": - version "26.0.18" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.18.tgz#3c5f9228e9ac15bd42f903f1acf2ad6ea5ed73d9" - integrity sha512-scDPs+mELZgsFetTgBSsIxKGrlitn9t/d2ecP+S1QSIGD+31fkMBEftLfOAX5k3tU06/0PjreJIQ+gWEbbHqpw== +"@types/jest@26.0.19": + version "26.0.19" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.19.tgz#e6fa1e3def5842ec85045bd5210e9bb8289de790" + integrity sha512-jqHoirTG61fee6v6rwbnEuKhpSKih0tuhqeFbCmMmErhtu3BYlOZaXWjffgOstMM4S/3iQD31lI5bGLTrs97yQ== dependencies: jest-diff "^26.0.0" pretty-format "^26.0.0" From 8464c72aa4d4e657d15bcbbb04f079801c0a0fdf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Dec 2020 08:29:54 +0100 Subject: [PATCH 06/45] Bump ini from 1.3.5 to 1.3.7 (#623) Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- yarn.lock | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 17aadef..6fa86b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3363,9 +3363,9 @@ "dev": true }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", + "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==", "dev": true }, "inquirer": { diff --git a/yarn.lock b/yarn.lock index 903167f..953f8be 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2556,9 +2556,9 @@ inherits@2, inherits@^2.0.3, inherits@~2.0.3: integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== ini@^1.3.5, ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + version "1.3.7" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.7.tgz#a09363e1911972ea16d7a8851005d84cf09a9a84" + integrity sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ== inquirer@7.3.3, inquirer@^7.0.0: version "7.3.3" From 450c2c77cb05886a19c37d9a686b81a0811679ca Mon Sep 17 00:00:00 2001 From: Ricardo Ambrogi Date: Fri, 11 Dec 2020 08:35:51 +0100 Subject: [PATCH 07/45] [PW-3583]/http methods (#621) * updates checkout * adds support for different http methods and update existing * rename _request to request. make request private * rename payout o payouts --- src/__tests__/binLookup.spec.ts | 8 +- src/__tests__/checkout.spec.ts | 34 +-- src/__tests__/httpClient.spec.ts | 2 +- src/__tests__/payout.spec.ts | 38 +-- src/__tests__/platforms.spec.ts | 64 ++--- src/__tests__/recurring.spec.ts | 8 +- src/helpers/getJsonResponse.ts | 10 +- src/httpClient/clientInterface.ts | 1 - src/httpClient/httpURLConnectionClient.ts | 10 - src/services/binLookup.ts | 23 +- src/services/checkout.ts | 135 +--------- src/services/index.ts | 2 +- src/services/modification.ts | 96 +------ src/services/payout.ts | 91 ------- src/services/payouts.ts | 48 ++++ src/services/platforms.ts | 245 +++++++++--------- src/services/recurring.ts | 34 +-- src/services/resource.ts | 9 +- .../resource/binLookup/get3dsAvailability.ts | 8 + .../resource/binLookup/getCostEstimate.ts | 8 + src/services/resource/checkout/orders.ts | 14 + .../resource/checkout/ordersCancel.ts | 8 + src/services/resource/checkout/originKeys.ts | 9 + .../resource/checkout/paymentLinks.ts | 26 ++ .../resource/checkout/paymentLinksId.ts | 40 --- .../resource/checkout/paymentMethods.ts | 14 + .../checkout/paymentMethodsBalance.ts | 9 + .../resource/checkout/paymentSession.ts | 13 + src/services/resource/checkout/payments.ts | 20 ++ .../resource/checkout/paymentsDetails.ts | 11 + .../resource/checkout/paymentsResult.ts | 9 + .../modification/adjustAuthorisation.ts | 15 ++ src/services/resource/modification/cancel.ts | 15 ++ .../resource/modification/cancelOrRefund.ts | 16 ++ src/services/resource/modification/capture.ts | 15 ++ src/services/resource/modification/refund.ts | 15 ++ .../resource/modification/technicalCancel.ts | 15 ++ .../resource/payout/confirmThirdParty.ts | 8 + .../resource/payout/declineThirdParty.ts | 8 + src/services/resource/payout/payout.ts | 8 + src/services/resource/payout/storeDetail.ts | 9 + .../payout/storeDetailAndSubmitThirdParty.ts | 9 + .../resource/payout/submitThirdParty.ts | 8 + src/services/resource/recurring/disable.ts | 9 + .../recurring/listRecurringDetails.ts | 9 + .../recurring/scheduleAccountUpdater.ts | 8 + src/services/terminalCloudAPI.ts | 4 +- src/services/terminalLocalAPI.ts | 2 +- src/typings/genericRequest.ts | 4 + 49 files changed, 618 insertions(+), 606 deletions(-) delete mode 100644 src/services/payout.ts create mode 100644 src/services/payouts.ts delete mode 100644 src/services/resource/checkout/paymentLinksId.ts create mode 100644 src/typings/genericRequest.ts diff --git a/src/__tests__/binLookup.spec.ts b/src/__tests__/binLookup.spec.ts index 190e0fd..5d10245 100644 --- a/src/__tests__/binLookup.spec.ts +++ b/src/__tests__/binLookup.spec.ts @@ -60,7 +60,7 @@ describe("Bin Lookup", function (): void { scope.post("/get3dsAvailability") .reply(200, threeDSAvailabilitySuccess); - const response = await binLookup.get3dsAvailability(threeDSAvailabilityRequest); + const response = await binLookup.get3dsAvailability.post(threeDSAvailabilityRequest); expect(response).toEqual(threeDSAvailabilitySuccess); }); @@ -77,7 +77,7 @@ describe("Bin Lookup", function (): void { .reply(403, JSON.stringify({status: 403, message: "fail", errorCode: "171"})); try { - await binLookup.get3dsAvailability(threeDSAvailabilityRequest as unknown as IBinLookup.ThreeDSAvailabilityRequest); + await binLookup.get3dsAvailability.post(threeDSAvailabilityRequest as unknown as IBinLookup.ThreeDSAvailabilityRequest); fail("Expected request to fail"); } catch (e) { expect(e instanceof HttpClientException).toBeTruthy(); @@ -113,8 +113,8 @@ describe("Bin Lookup", function (): void { scope.post("/getCostEstimate") .reply(200, expected); - const response = await binLookup.getCostEstimate(costEstimateRequest); + const response = await binLookup.getCostEstimate.post(costEstimateRequest); expect(response).toEqual(expected); }); -}); \ No newline at end of file +}); diff --git a/src/__tests__/checkout.spec.ts b/src/__tests__/checkout.spec.ts index 5e895b5..a37c446 100644 --- a/src/__tests__/checkout.spec.ts +++ b/src/__tests__/checkout.spec.ts @@ -150,7 +150,7 @@ describe("Checkout", (): void => { .reply(200, paymentsSuccess); const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest(); - const paymentsResponse: ICheckout.PaymentResponse = await checkout.payments(paymentsRequest); + const paymentsResponse: ICheckout.PaymentResponse = await checkout.payments.post(paymentsRequest); expect(paymentsResponse.pspReference).toBeTruthy(); }); @@ -161,7 +161,7 @@ describe("Checkout", (): void => { .reply(401); const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest(); - await checkout.payments(paymentsRequest); + await checkout.payments.post(paymentsRequest); } catch (e) { expect(e instanceof HttpClientException).toBeTruthy(); } @@ -174,7 +174,7 @@ describe("Checkout", (): void => { scope.post("/paymentMethods") .reply(200, paymentMethodsSuccess); - const paymentMethodsResponse = await checkout.paymentMethods(paymentMethodsRequest); + const paymentMethodsResponse = await checkout.paymentMethods.post(paymentMethodsRequest); if (paymentMethodsResponse && paymentMethodsResponse.paymentMethods) { expect(paymentMethodsResponse.paymentMethods.length).toBeGreaterThan(0); } else { @@ -189,7 +189,7 @@ describe("Checkout", (): void => { scope.post("/paymentLinks").reply(200, paymentLinkSuccess); - const paymentSuccessLinkResponse = await checkout.paymentLinks(createPaymentLinkRequest()); + const paymentSuccessLinkResponse = await checkout.paymentLinks.post(createPaymentLinkRequest()); expect(paymentSuccessLinkResponse).toBeTruthy(); }); @@ -200,10 +200,10 @@ describe("Checkout", (): void => { scope.post("/paymentLinks").reply(200, paymentLinkSuccess); - const paymentSuccessLinkResponse = await checkout.paymentLinks(createPaymentLinkRequest()); + const paymentSuccessLinkResponse = await checkout.paymentLinks.post(createPaymentLinkRequest()); scope.get(`/paymentLinks/${paymentSuccessLinkResponse.id}`).reply(200, paymentLinkSuccess); - const paymentLink = await checkout.getPaymentLinks(paymentSuccessLinkResponse.id); + const paymentLink = await checkout.paymentLinks.get(paymentSuccessLinkResponse.id); expect(paymentLink).toBeTruthy(); }); @@ -214,10 +214,10 @@ describe("Checkout", (): void => { scope.post("/paymentLinks").reply(200, paymentLinkSuccess); - const paymentSuccessLinkResponse = await checkout.paymentLinks(createPaymentLinkRequest()); + const paymentSuccessLinkResponse = await checkout.paymentLinks.post(createPaymentLinkRequest()); scope.patch(`/paymentLinks/${paymentSuccessLinkResponse.id}`).reply(200, { ...paymentLinkSuccess, status: "expired" }); - const paymentLink = await checkout.updatePaymentLinks(paymentSuccessLinkResponse.id, "expired"); + const paymentLink = await checkout.paymentLinks.patch(paymentSuccessLinkResponse.id, "expired"); expect(paymentLink.status).toEqual("expired"); }); @@ -226,7 +226,7 @@ describe("Checkout", (): void => { scope.post("/payments/details") .reply(200, paymentDetailsSuccess); - const paymentsResponse = await checkout.paymentsDetails(createPaymentsDetailsRequest()); + const paymentsResponse = await checkout.payments.details.post(createPaymentsDetailsRequest()); expect(paymentsResponse.resultCode).toEqual("Authorised"); }); @@ -235,7 +235,7 @@ describe("Checkout", (): void => { scope.post("/paymentSession") .reply(200, paymentSessionSuccess); const paymentSessionRequest: ICheckout.PaymentSetupRequest = createPaymentSessionRequest(); - const paymentSessionResponse = await checkout.paymentSession(paymentSessionRequest); + const paymentSessionResponse = await checkout.paymentSession.post(paymentSessionRequest); expect(paymentSessionResponse.paymentSession).not.toBeUndefined(); }); @@ -246,7 +246,7 @@ describe("Checkout", (): void => { const paymentResultRequest: ICheckout.PaymentVerificationRequest = { payload: "This is a test payload", }; - const paymentResultResponse = await checkout.paymentResult(paymentResultRequest); + const paymentResultResponse = await checkout.payments.result.post(paymentResultRequest); expect(paymentResultResponse.resultCode).toEqual("Authorised"); }); @@ -268,7 +268,7 @@ describe("Checkout", (): void => { .reply(200, paymentsResultMultibancoSuccess); const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest(); - const paymentsResponse: ICheckout.PaymentResponse = await checkout.payments(paymentsRequest); + const paymentsResponse: ICheckout.PaymentResponse = await checkout.payments.post(paymentsRequest); expect(paymentsResponse.pspReference).toBeTruthy(); expect(paymentsResponse.additionalData).toBeTruthy(); @@ -285,7 +285,7 @@ describe("Checkout", (): void => { .post(`/${Client.CHECKOUT_API_VERSION}/originKeys`) .reply(200, originKeysSuccess); - const originKeysResponse = await checkoutUtility.originKeys(originKeysRequest); + const originKeysResponse = await checkoutUtility.originKeys.post(originKeysRequest); if (originKeysResponse.originKeys) { return expect(originKeysResponse.originKeys["https://www.your-domain.com"].startsWith("pub.v2")).toBeTruthy(); } @@ -306,7 +306,7 @@ describe("Checkout", (): void => { scope.post("/paymentMethods/balance") .reply(200, paymentMethodsBalanceResponse); - const paymentsResponse: ICheckout.CheckoutBalanceCheckResponse = await checkout.paymentMethodsBalance(paymentMethodsRequest); + const paymentsResponse: ICheckout.CheckoutBalanceCheckResponse = await checkout.paymentMethods.balance.post(paymentMethodsRequest); expect(paymentsResponse.balance.value).toEqual(1000); }); @@ -323,7 +323,7 @@ describe("Checkout", (): void => { scope.post("/orders") .reply(200, orderResponse); - const response: ICheckout.CheckoutCreateOrderResponse = await checkout.orders(orderRequest); + const response: ICheckout.CheckoutCreateOrderResponse = await checkout.orders.post(orderRequest); expect(response).toBeTruthy(); }); @@ -340,7 +340,7 @@ describe("Checkout", (): void => { scope.post("/orders") .reply(200, orderResponse); - const createOrderResponse: ICheckout.CheckoutCreateOrderResponse = await checkout.orders(orderRequest); + const createOrderResponse: ICheckout.CheckoutCreateOrderResponse = await checkout.orders.post(orderRequest); const orderCancelResponse: ICheckout.CheckoutCancelOrderResponse = { pspReference: "mocked_psp_ref", @@ -349,7 +349,7 @@ describe("Checkout", (): void => { scope.post("/orders/cancel") .reply(200, orderCancelResponse); - const response: ICheckout.CheckoutCancelOrderResponse = await checkout.ordersCancel({ + const response: ICheckout.CheckoutCancelOrderResponse = await checkout.orders.cancel.post({ order: { orderData: createOrderResponse.orderData, pspReference: createOrderResponse.pspReference! diff --git a/src/__tests__/httpClient.spec.ts b/src/__tests__/httpClient.spec.ts index c399272..fb8f231 100644 --- a/src/__tests__/httpClient.spec.ts +++ b/src/__tests__/httpClient.spec.ts @@ -41,7 +41,7 @@ const getResponse = async ({apiKey , environment }: { apiKey: string; environmen const ErrorException = errorType === "ApiException" ? ApiException : HttpClientException; try { - await checkout.payments(createPaymentsCheckoutRequest()); + await checkout.payments.post(createPaymentsCheckoutRequest()); fail("request should fail"); } catch (e) { expect(e instanceof ErrorException).toBeTruthy(); diff --git a/src/__tests__/payout.spec.ts b/src/__tests__/payout.spec.ts index 072fbba..3a59a7f 100644 --- a/src/__tests__/payout.spec.ts +++ b/src/__tests__/payout.spec.ts @@ -19,7 +19,7 @@ import nock from "nock"; import { createClient } from "../__mocks__/base"; -import Payout from "../services/payout"; +import Payouts from "../services/payouts"; import Client from "../client"; import StoreDetailRequest = IPayouts.StoreDetailRequest; import { ApiConstants } from "../constants/apiConstants"; @@ -102,7 +102,7 @@ const mockPayoutRequest = (merchantAccount: string = process.env.ADYEN_MERCHANT! let client: Client; let clientStore: Client; let clientReview: Client; -let payout: Payout; +let payouts: Payouts; let scope: nock.Scope; beforeEach((): void => { @@ -113,7 +113,7 @@ beforeEach((): void => { clientStore = createClient(process.env.ADYEN_STOREPAYOUT_APIKEY); clientReview = createClient(process.env.ADYEN_REVIEWPAYOUT_APIKEY); scope = nock(`${client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}`); - payout = new Payout(client); + payouts = new Payouts(client); }); afterEach((): void => { @@ -123,21 +123,21 @@ afterEach((): void => { describe("PayoutTest", function (): void { test.each([isCI, true])("should succeed on store detail and submit third party, isMock: %p", async function (isMock): Promise { !isMock && nock.restore(); - payout = new Payout(clientStore); + payouts = new Payouts(clientStore); const request: IPayouts.StoreDetailAndSubmitRequest = mockStoreDetailAndSubmitRequest(); scope.post("/storeDetailAndSubmitThirdParty").reply(200, storeDetailAndSubmitThirdParty); - const result = await payout.storeDetailAndSubmitThirdParty(request); + const result = await payouts.storeDetailAndSubmitThirdParty.post(request); expect(result.resultCode).toEqual("[payout-submit-received]"); expect(result.pspReference).toBeTruthy(); }); test.each([false, true])("should succeed on store detail, isMock: %p", async function (isMock): Promise { !isMock && nock.restore(); - payout = new Payout(clientStore); + payouts = new Payouts(clientStore); scope.post("/storeDetail").reply(200, storeDetail); const request: StoreDetailRequest = mockStoreDetailRequest(); - const result = await payout.storeDetail(request); + const result = await payouts.storeDetail.post(request); expect("Success").toEqual(result.resultCode); expect(result.pspReference).toBeTruthy(); @@ -146,12 +146,12 @@ describe("PayoutTest", function (): void { test.each([isCI, true])("should succeed on confirm third party, isMock: %p", async function (isMock): Promise { !isMock && nock.restore(); - payout = new Payout(clientStore); + payouts = new Payouts(clientStore); scope.post("/storeDetail").reply(200, storeDetail); const storeRequest: StoreDetailRequest = mockStoreDetailRequest(); - const storeResult = await payout.storeDetail(storeRequest); + const storeResult = await payouts.storeDetail.post(storeRequest); - payout = new Payout(clientReview); + payouts = new Payouts(clientReview); scope.post("/confirmThirdParty") .reply(200, { pspReference: "8815131762537886", @@ -162,7 +162,7 @@ describe("PayoutTest", function (): void { merchantAccount: process.env.ADYEN_MERCHANT!, originalReference: storeResult.pspReference }; - const result = await payout.confirmThirdParty(request); + const result = await payouts.confirmThirdParty.post(request); expect(result.response).toEqual("[payout-confirm-received]"); expect(result.pspReference).toBeTruthy(); @@ -170,11 +170,11 @@ describe("PayoutTest", function (): void { test.each([isCI, true])("should succeed on submit third party, isMock: %p", async function (isMock): Promise { !isMock && nock.restore(); - payout = new Payout(clientStore); + payouts = new Payouts(clientStore); scope.post("/submitThirdParty").reply(200, storeDetailAndSubmitThirdParty); const request: IPayouts.SubmitRequest = mockSubmitRequest(); - const result = await payout.submitThirdparty(request); + const result = await payouts.submitThirdParty.post(request); expect(result.resultCode).toEqual("[payout-submit-received]"); expect(result.pspReference).toBeTruthy(); @@ -187,12 +187,12 @@ describe("PayoutTest", function (): void { test.each([false, true])("should succeed on decline third party, isMock: %p", async function (isMock): Promise { !isMock && nock.restore(); - payout = new Payout(clientStore); + payouts = new Payouts(clientStore); scope.post("/storeDetail").reply(200, storeDetail); const storeRequest: StoreDetailRequest = mockStoreDetailRequest(); - const storeResult = await payout.storeDetail(storeRequest); + const storeResult = await payouts.storeDetail.post(storeRequest); - payout = new Payout(clientReview); + payouts = new Payouts(clientReview); const request: IPayouts.ModifyRequest = { merchantAccount: process.env.ADYEN_MERCHANT!, originalReference: storeResult.pspReference @@ -202,7 +202,7 @@ describe("PayoutTest", function (): void { pspReference: "8815131762537886", response: "[payout-decline-received]" }); - const result = await payout.declineThirdParty(request); + const result = await payouts.declineThirdParty.post(request); expect(result.response).toEqual("[payout-decline-received]"); expect(result.pspReference).toBeTruthy(); @@ -216,9 +216,9 @@ describe("PayoutTest", function (): void { }); const request = mockPayoutRequest(); - const result = await payout.payout(request); + const result = await payouts.payout.post(request); expect(result.resultCode).toEqual("Received"); expect(result.pspReference).toBeTruthy(); }); -}); \ No newline at end of file +}); diff --git a/src/__tests__/platforms.spec.ts b/src/__tests__/platforms.spec.ts index c88b23b..7978c39 100644 --- a/src/__tests__/platforms.spec.ts +++ b/src/__tests__/platforms.spec.ts @@ -121,7 +121,7 @@ describe("Platforms Test", function () { async (...args) => { const service = platforms.Account; scope.post(`/Account/${Client.MARKETPAY_ACCOUNT_API_VERSION}//${args[0]}`).reply(200, args[2]); - const result = await service[args[0] as string](args[1] as never); + const result = await service[args[0] as string].post(args[1] as never); expect(result).toMatchObject(args[2]); } ); @@ -144,7 +144,7 @@ describe("Platforms Test", function () { const fund = platforms.Fund; scope.post(`/Fund/${Client.MARKETPAY_FUND_API_VERSION}//${args[0]}`).reply(200, args[2]); - const result = await fund[args[0] as string](args[1] as never); + const result = await fund[args[0] as string].post(args[1] as never); expect(result).toMatchObject(args[2]); } ); @@ -166,7 +166,7 @@ describe("Platforms Test", function () { const notificationConfiguration = platforms.NotificationConfiguration; scope.post(`/Notification/${Client.MARKETPAY_NOTIFICATION_CONFIGURATION_API_VERSION}//${args[0]}`).reply(200, args[2]); - const result = await notificationConfiguration[args[0] as string](args[1] as never); + const result = await notificationConfiguration[args[0] as string].post(args[1] as never); expect(result).toMatchObject(args[2]); } ); @@ -182,7 +182,7 @@ describe("Platforms Test", function () { const hostedOnboardingPage = platforms.HostedOnboardingPage; scope.post(`/Hop/${Client.MARKETPAY_HOP_API_VERSION}//${args[0]}`).reply(200, args[2]); - const result = await hostedOnboardingPage[args[0] as string](args[1] as never); + const result = await hostedOnboardingPage[args[0] as string].post(args[1] as never); expect(result).toMatchObject(args[2]); } ); @@ -191,46 +191,46 @@ describe("Platforms Test", function () { describe.skip("Platforms Test E2E", function(): void { beforeAll(async (done) => { - accountHolder = await platforms.Account.createAccountHolder({ + accountHolder = await platforms.Account.createAccountHolder.post({ accountHolderCode: generateRandomCode(), accountHolderDetails, legalEntity: "Individual", }); - account = await platforms.Account.createAccount({ + account = await platforms.Account.createAccount.post({ accountHolderCode: generateRandomCode(), description: "This is a new account", metadata: {meta: "data"}, payoutSchedule: "WEEKLY" }); - accountHolderToSuspend = await platforms.Account.createAccountHolder({ + accountHolderToSuspend = await platforms.Account.createAccountHolder.post({ accountHolderCode: generateRandomCode(), accountHolderDetails, legalEntity: "Individual" }); - accountToClose = await platforms.Account.createAccount({ + accountToClose = await platforms.Account.createAccount.post({ accountHolderCode: generateRandomCode(), description: "This is a new account", metadata: {meta: "data"}, payoutSchedule: "WEEKLY" }); - accountHolderToUnSuspend = await platforms.Account.createAccountHolder({ + accountHolderToUnSuspend = await platforms.Account.createAccountHolder.post({ accountHolderCode: generateRandomCode(), accountHolderDetails, legalEntity: "Individual" }); - await platforms.Account.suspendAccountHolder({ accountHolderCode: accountHolderToUnSuspend.accountHolderCode}); + await platforms.Account.suspendAccountHolder.post({ accountHolderCode: accountHolderToUnSuspend.accountHolderCode}); - accountHolderToClose = await platforms.Account.createAccountHolder({ + accountHolderToClose = await platforms.Account.createAccountHolder.post({ accountHolderCode: generateRandomCode(), accountHolderDetails, legalEntity: "Individual" }); - notificationConfigurationToRetrieve = await platforms.NotificationConfiguration.createNotificationConfiguration({ + notificationConfigurationToRetrieve = await platforms.NotificationConfiguration.createNotificationConfiguration.post({ configurationDetails: { ...notificationConfigurationDetails, description: `${generateRandomCode()}` @@ -252,7 +252,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should get account holder", async function() { nock.restore(); try { - const result = await platforms.Account.getAccountHolder({ + const result = await platforms.Account.getAccountHolder.post({ accountHolderCode: accountHolder.accountHolderCode, }); expect(result.accountHolderDetails.email).toEqual("random_email@example.com"); @@ -264,7 +264,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should update account holder", async function() { nock.restore(); try { - const result = await platforms.Account.updateAccountHolder({ + const result = await platforms.Account.updateAccountHolder.post({ accountHolderCode: accountHolder.accountHolderCode, accountHolderDetails: { ...accountHolderDetails, @@ -282,7 +282,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should check account holder", async function() { nock.restore(); try { - const result = await platforms.Account.checkAccountHolder({ + const result = await platforms.Account.checkAccountHolder.post({ accountHolderCode: accountHolder.accountHolderCode, accountStateType: "Processing", tier: 2 @@ -305,7 +305,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should upload verification document", async function() { nock.restore(); try { - const result = await platforms.Account.uploadDocument({ + const result = await platforms.Account.uploadDocument.post({ documentContent, documentDetail: { accountHolderCode: account.accountHolderCode, @@ -323,7 +323,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should get uploaded verification documents", async function() { nock.restore(); try { - await platforms.Account.uploadDocument({ + await platforms.Account.uploadDocument.post({ documentContent, documentDetail: { accountHolderCode: account.accountHolderCode, @@ -332,7 +332,7 @@ describe.skip("Platforms Test E2E", function(): void { filename: "IDCardFront.png" } }); - const result = await platforms.Account.getUploadedDocuments({ + const result = await platforms.Account.getUploadedDocuments.post({ accountHolderCode: account.accountHolderCode, }); expect(result.documentDetails![0].filename).toEqual("IDCardFront.png"); @@ -344,7 +344,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should close account", async function() { nock.restore(); try { - const result = await platforms.Account.closeAccount({ + const result = await platforms.Account.closeAccount.post({ accountCode: accountToClose.accountCode }); expect(result.status).toEqual("Closed"); @@ -356,7 +356,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should suspend account holder", async function() { nock.restore(); try { - const result = await platforms.Account.suspendAccountHolder({ + const result = await platforms.Account.suspendAccountHolder.post({ accountHolderCode: accountHolderToSuspend.accountHolderCode, }); expect(result.pspReference).toBeDefined(); @@ -368,7 +368,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should unsuspend account holder", async function() { nock.restore(); try { - const result = await platforms.Account.unSuspendAccountHolder({ accountHolderCode: accountHolderToUnSuspend.accountHolderCode }); + const result = await platforms.Account.unSuspendAccountHolder.post({ accountHolderCode: accountHolderToUnSuspend.accountHolderCode }); expect(result.pspReference).toBeDefined(); } catch (e) { assertError(e); @@ -378,7 +378,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should update account holder state", async function() { nock.restore(); try { - const result = await platforms.Account.updateAccountHolderState({ + const result = await platforms.Account.updateAccountHolderState.post({ accountHolderCode: accountHolder.accountHolderCode, disable: false, stateType: "Payout" @@ -392,7 +392,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should close account holder", async function() { nock.restore(); try { - const result = await platforms.Account.closeAccountHolder({ + const result = await platforms.Account.closeAccountHolder.post({ accountHolderCode: accountHolderToClose.accountHolderCode }); expect(result.pspReference).toBeDefined(); @@ -408,7 +408,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should retrieve the balance of an account holder", async function() { nock.restore(); try { - const result = await platforms.Fund.accountHolderBalance({ + const result = await platforms.Fund.accountHolderBalance.post({ accountHolderCode: generateRandomCode() }); expect(result.balancePerAccount![0].detailBalance).toBeDefined(); @@ -420,7 +420,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should retrieve a list of transaction for an account holder's accounts", async function() { nock.restore(); try { - const result = await platforms.Fund.accountHolderTransactionList({ + const result = await platforms.Fund.accountHolderTransactionList.post({ accountHolderCode: generateRandomCode() }); expect(result.accountTransactionLists![0].transactions).toBeDefined(); @@ -432,7 +432,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should transfer funds between two accounts", async function() { nock.restore(); try { - const result = await platforms.Fund.transferFunds({ + const result = await platforms.Fund.transferFunds.post({ sourceAccountCode: "8515883280985939", destinationAccountCode: "8815883278206345", amount: { @@ -454,7 +454,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should retrieve all Notification Configurations", async function() { nock.restore(); try { - const result = await platforms.NotificationConfiguration.getNotificationConfigurationList({}); + const result = await platforms.NotificationConfiguration.getNotificationConfigurationList.post({}); const resultStr = JSON.stringify(result); expect(resultStr.includes("pspReference")).toBeTruthy(); } catch (e) { @@ -465,7 +465,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should create a Notification Configuration", async function() { nock.restore(); try { - const result = await platforms.NotificationConfiguration.createNotificationConfiguration({ + const result = await platforms.NotificationConfiguration.createNotificationConfiguration.post({ configurationDetails: { ...notificationConfigurationDetails, description: `${generateRandomCode()}` @@ -481,7 +481,7 @@ describe.skip("Platforms Test E2E", function(): void { nock.restore(); try { configurationID = notificationConfigurationToRetrieve.configurationDetails.notificationId!; - const result = await platforms.NotificationConfiguration.getNotificationConfiguration({ + const result = await platforms.NotificationConfiguration.getNotificationConfiguration.post({ notificationId: configurationID }); expect(result.configurationDetails.notifyURL).toEqual("https://www.adyen.com/notification-handler"); @@ -493,7 +493,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should update a Notification Configuration", async function() { nock.restore(); try { - const result = await platforms.NotificationConfiguration.updateNotificationConfiguration({ + const result = await platforms.NotificationConfiguration.updateNotificationConfiguration.post({ configurationDetails: { eventConfigs: [ { @@ -521,7 +521,7 @@ describe.skip("Platforms Test E2E", function(): void { const notificationIds = []; notificationIds.push(configurationID); try { - const result = await platforms.NotificationConfiguration.deleteNotificationConfigurations({notificationIds}); + const result = await platforms.NotificationConfiguration.deleteNotificationConfigurations.post({notificationIds}); expect(result.pspReference).toBeDefined(); } catch (e) { assertError(e); @@ -529,4 +529,4 @@ describe.skip("Platforms Test E2E", function(): void { }); }); -}); \ No newline at end of file +}); diff --git a/src/__tests__/recurring.spec.ts b/src/__tests__/recurring.spec.ts index 5803cbe..0da8144 100644 --- a/src/__tests__/recurring.spec.ts +++ b/src/__tests__/recurring.spec.ts @@ -63,7 +63,7 @@ describe("Recurring", (): void => { const request = createRecurringDetailsRequest(); try { - const result = await recurring.listRecurringDetails(request); + const result = await recurring.listRecurringDetails.post(request); expect(result).toBeTruthy(); } catch (e) { fail(e.message); @@ -76,7 +76,7 @@ describe("Recurring", (): void => { .reply(200, paymentsSuccess); const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest(); - const res = await checkout.payments(paymentsRequest); + const res = await checkout.payments.post(paymentsRequest); scope.post("/disable") .reply(200, disableSuccess); @@ -88,7 +88,7 @@ describe("Recurring", (): void => { }; try { - const result = await recurring.disable(request); + const result = await recurring.disable.post(request); expect(result).toBeTruthy(); } catch (e) { fail(e.message); @@ -119,7 +119,7 @@ describe("Recurring", (): void => { }; try { - const result = await recurring.scheduleAccountUpdater(request); + const result = await recurring.scheduleAccountUpdater.post(request); expect(result).toBeTruthy(); } catch (e) { fail(e.message); diff --git a/src/helpers/getJsonResponse.ts b/src/helpers/getJsonResponse.ts index c8e8ca6..eecbe48 100644 --- a/src/helpers/getJsonResponse.ts +++ b/src/helpers/getJsonResponse.ts @@ -22,16 +22,16 @@ import HttpClientException from "../httpClient/httpClientException"; import ApiException from "../services/exception/apiException"; import { IRequest } from "../typings/requestOptions"; -async function getJsonResponse(resource: Resource, jsonRequest: T | string, requestOptions?: IRequest.Options): Promise; -async function getJsonResponse(resource: Resource, jsonRequest: T | string, requestOptions?: IRequest.Options): Promise; +async function getJsonResponse(this: Resource, jsonRequest: T | string, requestOptions?: IRequest.Options): Promise; +async function getJsonResponse(this: Resource, jsonRequest: T | string, requestOptions?: IRequest.Options): Promise; -async function getJsonResponse( - resource: Resource, +async function getJsonResponse ( + this: Resource, jsonRequest: T | string, requestOptions: IRequest.Options = {}, ): Promise { const request = typeof jsonRequest === "string" ? jsonRequest : JSON.stringify(jsonRequest); - const response = await resource.request(request, requestOptions); + const response = await this.request(request, requestOptions); try { return typeof response === "string" ? JSON.parse(response) : response; } catch (e) { diff --git a/src/httpClient/clientInterface.ts b/src/httpClient/clientInterface.ts index 0bf05d4..275a4e9 100644 --- a/src/httpClient/clientInterface.ts +++ b/src/httpClient/clientInterface.ts @@ -26,7 +26,6 @@ interface ClientInterface { request( endpoint: string, json: string, config: Config, isApiKeyRequired: boolean, requestOptions?: IRequest.Options, ): Promise; - post(endpoint: string, postParameters: [string, string][], config: Config): Promise; proxy?: AgentOptions; } diff --git a/src/httpClient/httpURLConnectionClient.ts b/src/httpClient/httpURLConnectionClient.ts index efa7b84..8d91092 100644 --- a/src/httpClient/httpURLConnectionClient.ts +++ b/src/httpClient/httpURLConnectionClient.ts @@ -70,12 +70,6 @@ class HttpURLConnectionClient implements ClientInterface { return this.doPostRequest(httpConnection, json); } - public post(endpoint: string, postParameters: [string, string][], config: Config): Promise { - const postQuery: string = this.getQuery(postParameters); - const connectionRequest: ClientRequest = this.createRequest(endpoint, {}, config.applicationName); - return this.doPostRequest(connectionRequest, postQuery); - } - private createRequest(endpoint: string, requestOptions: IRequest.Options, applicationName?: string): ClientRequest { if (!requestOptions.headers) { requestOptions.headers = {}; @@ -111,10 +105,6 @@ class HttpURLConnectionClient implements ClientInterface { return httpsRequest(requestOptions); } - private getQuery(params: [string, string][]): string { - return params.map(([key, value]): string => `${key}=${value}`).join("&"); - } - private doPostRequest(connectionRequest: ClientRequest, json: string): Promise { return new Promise((resolve, reject): void => { connectionRequest.flushHeaders(); diff --git a/src/services/binLookup.ts b/src/services/binLookup.ts index 438b640..1e97a12 100644 --- a/src/services/binLookup.ts +++ b/src/services/binLookup.ts @@ -20,30 +20,15 @@ import ApiKeyAuthenticatedService from "../apiKeyAuthenticatedService"; import Client from "../client"; import GetCostEstimate from "./resource/binLookup/getCostEstimate"; import Get3dsAvailability from "./resource/binLookup/get3dsAvailability"; -import getJsonResponse from "../helpers/getJsonResponse"; class BinLookup extends ApiKeyAuthenticatedService { - private readonly _get3dsAvailability: Get3dsAvailability; - private readonly _getCostEstimate: GetCostEstimate; + public readonly get3dsAvailability: Get3dsAvailability; + public readonly getCostEstimate: GetCostEstimate; public constructor(client: Client) { super(client); - this._get3dsAvailability = new Get3dsAvailability(this); - this._getCostEstimate = new GetCostEstimate(this); - } - - public get3dsAvailability(request: IBinLookup.ThreeDSAvailabilityRequest): Promise { - return getJsonResponse( - this._get3dsAvailability, - request - ); - } - - public getCostEstimate(request: IBinLookup.CostEstimateRequest): Promise { - return getJsonResponse( - this._getCostEstimate, - request - ); + this.get3dsAvailability = new Get3dsAvailability(this); + this.getCostEstimate = new GetCostEstimate(this); } } diff --git a/src/services/checkout.ts b/src/services/checkout.ts index 9ce2219..7a97d5e 100644 --- a/src/services/checkout.ts +++ b/src/services/checkout.ts @@ -19,142 +19,31 @@ import ApiKeyAuthenticatedService from "../apiKeyAuthenticatedService"; import Client from "../client"; -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"; import PaymentLinks from "./resource/checkout/paymentLinks"; import OriginKeys from "./resource/checkout/originKeys"; -import setApplicationInfo from "../helpers/setApplicationInfo"; -import { IRequest } from "../typings/requestOptions"; -import PaymentLinksId from "./resource/checkout/paymentLinksId"; -import PaymentMethodsBalance from "./resource/checkout/paymentMethodsBalance"; import Orders from "./resource/checkout/orders"; -import OrdersCancel from "./resource/checkout/ordersCancel"; class Checkout extends ApiKeyAuthenticatedService { - private readonly _payments: Payments; - private readonly _paymentMethods: PaymentMethods; - private readonly _paymentsDetails: PaymentsDetails; - private readonly _paymentSession: PaymentSession; - private readonly _paymentsResult: PaymentsResult; - private readonly _paymentLinks: PaymentLinks; - private readonly _paymentLinksId: PaymentLinksId; - private readonly _originKeys: OriginKeys; - private readonly _paymentMethodsBalance: PaymentMethodsBalance; - private readonly _orders: Orders; - private readonly _ordersCancel: OrdersCancel; + public readonly payments: Payments; + public readonly paymentMethods: PaymentMethods; + public readonly paymentSession: PaymentSession; + public readonly paymentLinks: PaymentLinks; + public readonly originKeys: OriginKeys; + public readonly orders: Orders; public constructor(client: Client) { super(client); - 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); - this._paymentLinks = new PaymentLinks(this); - this._paymentLinksId = new PaymentLinksId(this); - this._originKeys = new OriginKeys(this); - this._paymentMethodsBalance = new PaymentMethodsBalance(this); - this._orders = new Orders(this); - this._ordersCancel = new OrdersCancel(this); + this.payments = new Payments(this); + this.paymentMethods = new PaymentMethods(this); + this.paymentSession = new PaymentSession(this); + this.paymentLinks = new PaymentLinks(this); + this.originKeys = new OriginKeys(this); + this.orders = new Orders(this); } - public payments(paymentsRequest: ICheckout.PaymentRequest, requestOptions?: IRequest.Options): Promise { - return getJsonResponse( - this._payments, - setApplicationInfo(paymentsRequest), - requestOptions, - ); - } - - public paymentMethods(paymentMethodsRequest: ICheckout.PaymentMethodsRequest): Promise { - return getJsonResponse( - this._paymentMethods, - paymentMethodsRequest, - ); - } - - public paymentLinks(paymentLinkRequest: ICheckout.CreatePaymentLinkRequest): Promise { - return getJsonResponse( - this._paymentLinks, - paymentLinkRequest - ); - } - - public getPaymentLinks(linkId: string): Promise { - this._paymentLinksId.id = linkId; - return getJsonResponse<{}, ICheckout.PaymentLinkResource>( - this._paymentLinksId, - {}, - { method: "GET" } - ); - } - - public updatePaymentLinks(linkId: string, status: "expired"): Promise { - this._paymentLinksId.id = linkId; - return getJsonResponse<{}, ICheckout.PaymentLinkResource>( - this._paymentLinksId, - { status }, - { method: "PATCH" } - ); - } - - public paymentsDetails(paymentsDetailsRequest: ICheckout.DetailsRequest, requestOptions?: IRequest.Options): Promise { - return getJsonResponse( - this._paymentsDetails, - paymentsDetailsRequest, - requestOptions - ); - } - - public paymentSession( - paymentSessionRequest: ICheckout.PaymentSetupRequest, - requestOptions?: IRequest.Options, - ): Promise { - return getJsonResponse( - this._paymentSession, - paymentSessionRequest, - requestOptions, - ); - } - - public paymentResult(paymentResultRequest: ICheckout.PaymentVerificationRequest): Promise { - return getJsonResponse( - this._paymentsResult, - paymentResultRequest, - ); - } - - public originKeys(originKeysRequest: ICheckout.CheckoutUtilityRequest): Promise { - return getJsonResponse( - this._originKeys, - originKeysRequest, - ); - } - - public paymentMethodsBalance(paymentMethodsBalanceRequest: ICheckout.CheckoutBalanceCheckRequest): Promise { - return getJsonResponse( - this._paymentMethodsBalance, - paymentMethodsBalanceRequest, - ); - } - - public orders(ordersRequest: ICheckout.CheckoutCreateOrderRequest): Promise { - return getJsonResponse( - this._orders, - ordersRequest, - ); - } - - public ordersCancel(ordersCancelRequest: ICheckout.CheckoutCancelOrderRequest): Promise { - return getJsonResponse( - this._ordersCancel, - ordersCancelRequest, - ); - } } export default Checkout; diff --git a/src/services/index.ts b/src/services/index.ts index 808ae33..0a38055 100644 --- a/src/services/index.ts +++ b/src/services/index.ts @@ -23,5 +23,5 @@ export { default as CheckoutAPI } from "./checkout"; export { default as Recurring } from "./recurring"; export { default as Modification } from "./modification"; export { default as BinLookup } from "./binLookup"; -export { default as Payout } from "./payout"; +export { default as Payouts } from "./payouts"; export { default as Platforms } from "./platforms"; diff --git a/src/services/modification.ts b/src/services/modification.ts index fb6c8f4..357f5a5 100644 --- a/src/services/modification.ts +++ b/src/services/modification.ts @@ -17,7 +17,6 @@ * See the LICENSE file for more info. */ import Client from "../client"; -import getJsonResponse from "../helpers/getJsonResponse"; import Service from "../service"; import AdjustAuthorisation from "./resource/modification/adjustAuthorisation"; import Cancel from "./resource/modification/cancel"; @@ -25,96 +24,25 @@ import CancelOrRefund from "./resource/modification/cancelOrRefund"; import Capture from "./resource/modification/capture"; import Refund from "./resource/modification/refund"; import TechnicalCancel from "./resource/modification/technicalCancel"; -import setApplicationInfo from "../helpers/setApplicationInfo"; -import { ApplicationInfo } from "../typings/applicationInfo"; -import { IRequest } from "../typings/requestOptions"; - -interface AppInfo { applicationInfo?: ApplicationInfo } -type GenericRequest = T & AppInfo; class Modification extends Service { - private readonly _cancelOrRefund: CancelOrRefund; - private readonly _cancel: Cancel; - private readonly _capture: Capture; - private readonly _refund: Refund; - private readonly _adjustAuthorisation: AdjustAuthorisation; - private readonly _technicalCancel: TechnicalCancel; + public readonly cancelOrRefund: CancelOrRefund; + public readonly cancel: Cancel; + public readonly capture: Capture; + public readonly refund: Refund; + public readonly adjustAuthorisation: AdjustAuthorisation; + public readonly technicalCancel: TechnicalCancel; public constructor(client: Client) { super(client); - 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); + 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); } - public capture( - captureRequest: GenericRequest, - requestOptions?: IRequest.Options, - ): Promise { - return getJsonResponse( - this._capture, - setApplicationInfo(captureRequest), - requestOptions, - ); - } - - public cancelOrRefund( - cancelOrRefundRequest: GenericRequest, - requestOptions?: IRequest.Options, - ): Promise { - return getJsonResponse( - this._cancelOrRefund, - setApplicationInfo(cancelOrRefundRequest), - requestOptions, - ); - } - - public refund( - refundRequest: GenericRequest, - requestOptions?: IRequest.Options, - ): Promise { - return getJsonResponse( - this._refund, - setApplicationInfo(refundRequest), - requestOptions, - ); - } - - public cancel( - cancelRequest: GenericRequest, - requestOptions?: IRequest.Options, - ): Promise { - return getJsonResponse( - this._cancel, - setApplicationInfo(cancelRequest), - requestOptions, - ); - } - - public technicalCancel( - technicalCancelRequest: GenericRequest, - requestOptions?: IRequest.Options, - ): Promise { - return getJsonResponse( - this._technicalCancel, - setApplicationInfo(technicalCancelRequest), - requestOptions, - ); - } - - public adjustAuthorisation( - adjustAuthorisationRequest: GenericRequest, - requestOptions?: IRequest.Options, - ): Promise { - return getJsonResponse( - this._adjustAuthorisation, - setApplicationInfo(adjustAuthorisationRequest), - requestOptions, - ); - } } export default Modification; diff --git a/src/services/payout.ts b/src/services/payout.ts deleted file mode 100644 index 0ea7024..0000000 --- a/src/services/payout.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* - * ###### - * ###### - * ############ ####( ###### #####. ###### ############ ############ - * ############# #####( ###### #####. ###### ############# ############# - * ###### #####( ###### #####. ###### ##### ###### ##### ###### - * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### - * ###### ###### #####( ###### #####. ###### ##### ##### ###### - * ############# ############# ############# ############# ##### ###### - * ############ ############ ############# ############ ##### ###### - * ###### - * ############# - * ############ - * Adyen NodeJS API Library - * Copyright (c) 2020 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 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 PayoutResource from "./resource/payout/payout"; -import StoreDetailAndSubmitThirdParty from "./resource/payout/storeDetailAndSubmitThirdParty"; -import getJsonResponse from "../helpers/getJsonResponse"; - -class Payout extends Service { - private readonly _storeDetailAndSubmitThirdParty: StoreDetailAndSubmitThirdParty; - private readonly _confirmThirdParty: ConfirmThirdParty; - private readonly _declineThirdParty: DeclineThirdParty; - private readonly _storeDetail: StoreDetail; - private readonly _submitThirdParty: SubmitThirdParty; - private readonly _payout: PayoutResource; - - public constructor(client: Client) { - super(client); - - 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); - this._payout = new PayoutResource(this); - } - - public storeDetailAndSubmitThirdParty(request: IPayouts.StoreDetailAndSubmitRequest): Promise { - return getJsonResponse( - this._storeDetailAndSubmitThirdParty, - request - ); - } - - public confirmThirdParty(request: IPayouts.ModifyRequest): Promise { - return getJsonResponse( - this._confirmThirdParty, - request - ); - } - - public declineThirdParty(request: IPayouts.ModifyRequest): Promise { - return getJsonResponse( - this._declineThirdParty, - request - ); - } - - public storeDetail(request: IPayouts.StoreDetailRequest): Promise { - return getJsonResponse( - this._storeDetail, - request - ); - } - - public submitThirdparty(request: IPayouts.SubmitRequest): Promise { - return getJsonResponse( - this._submitThirdParty, - request - ); - } - - public payout(request: IPayouts.PayoutRequest): Promise { - return getJsonResponse( - this._payout, - request - ); - } -} - -export default Payout; \ No newline at end of file diff --git a/src/services/payouts.ts b/src/services/payouts.ts new file mode 100644 index 0000000..f4a44e3 --- /dev/null +++ b/src/services/payouts.ts @@ -0,0 +1,48 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2020 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 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 PayoutResource from "./resource/payout/payout"; +import StoreDetailAndSubmitThirdParty from "./resource/payout/storeDetailAndSubmitThirdParty"; + +class Payouts extends Service { + public readonly storeDetailAndSubmitThirdParty: StoreDetailAndSubmitThirdParty; + public readonly confirmThirdParty: ConfirmThirdParty; + public readonly declineThirdParty: DeclineThirdParty; + public readonly storeDetail: StoreDetail; + public readonly submitThirdParty: SubmitThirdParty; + public readonly payout: PayoutResource; + + public constructor(client: Client) { + super(client); + + 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); + this.payout = new PayoutResource(this); + } +} + +export default Payouts; diff --git a/src/services/platforms.ts b/src/services/platforms.ts index e564fd1..06ec3ea 100644 --- a/src/services/platforms.ts +++ b/src/services/platforms.ts @@ -34,132 +34,133 @@ type AccountsAccount = PlatformsAccount; type AccountsVerification = PlatformsAccount; type AccountsAccountHolders = PlatformsAccount; type PlatformsTypes = AccountsAccount | AccountsVerification | AccountsAccountHolders | PlatformsFund | PlatformsHostedOnboardingPage; +type PostRequest = { post: (request: T) => Promise }; class Platforms extends Service { /* PlatformsAccount */ // Accounts - private readonly _closeAccount: PlatformsAccount; - private readonly _updateAccount: PlatformsAccount; - private readonly _createAccount: PlatformsAccount; + public readonly closeAccount: PlatformsAccount; + public readonly updateAccount: PlatformsAccount; + public readonly createAccount: PlatformsAccount; // Verification - private readonly _uploadDocument: PlatformsAccount; - private readonly _getUploadedDocuments: PlatformsAccount; - private readonly _deleteBankAccounts: PlatformsAccount; - private readonly _deletePayoutMethods: PlatformsAccount; - private readonly _deleteShareholders: PlatformsAccount; - private readonly _checkAccountHolder: PlatformsAccount; + public readonly uploadDocument: PlatformsAccount; + public readonly getUploadedDocuments: PlatformsAccount; + public readonly deleteBankAccounts: PlatformsAccount; + public readonly deletePayoutMethods: PlatformsAccount; + public readonly deleteShareholders: PlatformsAccount; + public readonly checkAccountHolder: PlatformsAccount; // Account Holders - private readonly _createAccountHolder: PlatformsAccount; - private readonly _getAccountHolder: PlatformsAccount; - private readonly _updateAccountHolder: PlatformsAccount; - private readonly _updateAccountHolderState: PlatformsAccount; - private readonly _suspendAccountHolder: PlatformsAccount; - private readonly _unSuspendAccountHolder: PlatformsAccount; - private readonly _closeAccountHolder: PlatformsAccount; + public readonly createAccountHolder: PlatformsAccount; + public readonly getAccountHolder: PlatformsAccount; + public readonly updateAccountHolder: PlatformsAccount; + public readonly updateAccountHolderState: PlatformsAccount; + public readonly suspendAccountHolder: PlatformsAccount; + public readonly unSuspendAccountHolder: PlatformsAccount; + public readonly closeAccountHolder: PlatformsAccount; /* PlatformsFund */ - private readonly _accountHolderBalance: PlatformsFund; - private readonly _accountHolderTransactionList: PlatformsFund; - private readonly _payoutAccountHolder: PlatformsFund; - private readonly _transferFunds: PlatformsFund; - private readonly _refundFundsTransfer: PlatformsFund; - private readonly _setupBeneficiary: PlatformsFund; - private readonly _refundNotPaidOutTransfers: PlatformsFund; + public readonly accountHolderBalance: PlatformsFund; + public readonly accountHolderTransactionList: PlatformsFund; + public readonly payoutAccountHolder: PlatformsFund; + public readonly transferFunds: PlatformsFund; + public readonly refundFundsTransfer: PlatformsFund; + public readonly setupBeneficiary: PlatformsFund; + public readonly refundNotPaidOutTransfers: PlatformsFund; /* HOP */ - private readonly _getOnboardingUrl: PlatformsHostedOnboardingPage; + public readonly getOnboardingUrl: PlatformsHostedOnboardingPage; /* Notification Configuration */ - private readonly _createNotificationConfiguration: PlatformsNotificationConfiguration; - private readonly _getNotificationConfiguration: PlatformsNotificationConfiguration; - private readonly _getNotificationConfigurationList: PlatformsNotificationConfiguration; - private readonly _testNotificationConfiguration: PlatformsNotificationConfiguration; - private readonly _updateNotificationConfiguration: PlatformsNotificationConfiguration; - private readonly _deleteNotificationConfiguration: PlatformsNotificationConfiguration; + public readonly createNotificationConfiguration: PlatformsNotificationConfiguration; + public readonly getNotificationConfiguration: PlatformsNotificationConfiguration; + public readonly getNotificationConfigurationList: PlatformsNotificationConfiguration; + public readonly testNotificationConfiguration: PlatformsNotificationConfiguration; + public readonly updateNotificationConfiguration: PlatformsNotificationConfiguration; + public readonly deleteNotificationConfiguration: PlatformsNotificationConfiguration; public constructor(client: Client) { super(client); // Account - this._closeAccount = new PlatformsAccount(this, "/closeAccount"); - this._updateAccount = new PlatformsAccount(this, "/updateAccount"); - this._createAccount = new PlatformsAccount(this, "/createAccount"); - this._uploadDocument = new PlatformsAccount(this, "/uploadDocument"); - this._getUploadedDocuments = new PlatformsAccount(this, "/getUploadedDocuments"); - this._deleteBankAccounts = new PlatformsAccount(this, "/deleteBankAccounts"); - this._deletePayoutMethods = new PlatformsAccount(this, "/deletePayoutMethods"); - this._deleteShareholders = new PlatformsAccount(this, "/deleteShareholders"); - this._checkAccountHolder = new PlatformsAccount(this, "/checkAccountHolder"); - this._createAccountHolder = new PlatformsAccount(this, "/createAccountHolder"); - this._getAccountHolder = new PlatformsAccount(this, "/getAccountHolder"); - this._updateAccountHolder = new PlatformsAccount(this, "/updateAccountHolder"); - this._updateAccountHolderState = new PlatformsAccount(this, "/updateAccountHolderState"); - this._suspendAccountHolder = new PlatformsAccount(this, "/suspendAccountHolder"); - this._unSuspendAccountHolder = new PlatformsAccount(this, "/unSuspendAccountHolder"); - this._closeAccountHolder = new PlatformsAccount(this, "/closeAccountHolder"); + this.closeAccount = new PlatformsAccount(this, "/closeAccount"); + this.updateAccount = new PlatformsAccount(this, "/updateAccount"); + this.createAccount = new PlatformsAccount(this, "/createAccount"); + this.uploadDocument = new PlatformsAccount(this, "/uploadDocument"); + this.getUploadedDocuments = new PlatformsAccount(this, "/getUploadedDocuments"); + this.deleteBankAccounts = new PlatformsAccount(this, "/deleteBankAccounts"); + this.deletePayoutMethods = new PlatformsAccount(this, "/deletePayoutMethods"); + this.deleteShareholders = new PlatformsAccount(this, "/deleteShareholders"); + this.checkAccountHolder = new PlatformsAccount(this, "/checkAccountHolder"); + this.createAccountHolder = new PlatformsAccount(this, "/createAccountHolder"); + this.getAccountHolder = new PlatformsAccount(this, "/getAccountHolder"); + this.updateAccountHolder = new PlatformsAccount(this, "/updateAccountHolder"); + this.updateAccountHolderState = new PlatformsAccount(this, "/updateAccountHolderState"); + this.suspendAccountHolder = new PlatformsAccount(this, "/suspendAccountHolder"); + this.unSuspendAccountHolder = new PlatformsAccount(this, "/unSuspendAccountHolder"); + this.closeAccountHolder = new PlatformsAccount(this, "/closeAccountHolder"); // Fund - this._accountHolderBalance = new PlatformsFund(this, "/accountHolderBalance"); - this._accountHolderTransactionList = new PlatformsFund(this, "/accountHolderTransactionList"); - this._payoutAccountHolder = new PlatformsFund(this, "/payoutAccountHolder"); - this._transferFunds = new PlatformsFund(this, "/transferFunds"); - this._refundFundsTransfer = new PlatformsFund(this, "/refundFundsTransfer"); - this._setupBeneficiary = new PlatformsFund(this, "/setupBeneficiary"); - this._refundNotPaidOutTransfers = new PlatformsFund(this, "/refundNotPaidOutTransfers"); + this.accountHolderBalance = new PlatformsFund(this, "/accountHolderBalance"); + this.accountHolderTransactionList = new PlatformsFund(this, "/accountHolderTransactionList"); + this.payoutAccountHolder = new PlatformsFund(this, "/payoutAccountHolder"); + this.transferFunds = new PlatformsFund(this, "/transferFunds"); + this.refundFundsTransfer = new PlatformsFund(this, "/refundFundsTransfer"); + this.setupBeneficiary = new PlatformsFund(this, "/setupBeneficiary"); + this.refundNotPaidOutTransfers = new PlatformsFund(this, "/refundNotPaidOutTransfers"); // HOP - this._getOnboardingUrl = new PlatformsHostedOnboardingPage(this, "/getOnboardingUrl"); + this.getOnboardingUrl = new PlatformsHostedOnboardingPage(this, "/getOnboardingUrl"); // Notification Configuration - this._createNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/createNotificationConfiguration"); - this._getNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/getNotificationConfiguration"); - this._getNotificationConfigurationList = new PlatformsNotificationConfiguration(this, "/getNotificationConfigurationList"); - this._testNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/testNotificationConfiguration"); - this._updateNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/updateNotificationConfiguration"); - this._deleteNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/deleteNotificationConfigurations"); + this.createNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/createNotificationConfiguration"); + this.getNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/getNotificationConfiguration"); + this.getNotificationConfigurationList = new PlatformsNotificationConfiguration(this, "/getNotificationConfigurationList"); + this.testNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/testNotificationConfiguration"); + this.updateNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/updateNotificationConfiguration"); + this.deleteNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/deleteNotificationConfigurations"); } - createRequest = (service: T) => { - return (request: U): Promise => getJsonResponse(service, request); + createPostRequest = (service: T): PostRequest => { + return { post: (request: U): Promise => getJsonResponse.call>(service, request) }; } public get Account(): { - getAccountHolder: (request: IPlatformsAccount.GetAccountHolderRequest) => Promise; - getUploadedDocuments: (request: IPlatformsAccount.GetUploadedDocumentsRequest) => Promise; - createAccountHolder: (request: IPlatformsAccount.CreateAccountHolderRequest) => Promise; - closeAccountHolder: (request: IPlatformsAccount.CloseAccountHolderRequest) => Promise; - createAccount: (request: IPlatformsAccount.CreateAccountRequest) => Promise; - deleteBankAccounts: (request: IPlatformsAccount.DeleteBankAccountRequest) => Promise; - deletePayoutMethods: (request: IPlatformsAccount.DeletePayoutMethodRequest) => Promise; - updateAccount: (request: IPlatformsAccount.UpdateAccountRequest) => Promise; - uploadDocument: (request: IPlatformsAccount.UploadDocumentRequest) => Promise; - unSuspendAccountHolder: (request: IPlatformsAccount.UnSuspendAccountHolderRequest) => Promise; - closeAccount: (request: IPlatformsAccount.CloseAccountRequest) => Promise; - suspendAccountHolder: (request: IPlatformsAccount.SuspendAccountHolderRequest) => Promise; - updateAccountHolder: (request: IPlatformsAccount.UpdateAccountHolderRequest) => Promise; - deleteShareholders: (request: IPlatformsAccount.DeleteShareholderRequest) => Promise; - checkAccountHolder: (request: IPlatformsAccount.PerformVerificationRequest) => Promise; - updateAccountHolderState: (request: IPlatformsAccount.UpdateAccountHolderStateRequest) => Promise; + getAccountHolder: PostRequest; + getUploadedDocuments: PostRequest; + createAccountHolder: PostRequest; + closeAccountHolder: PostRequest; + createAccount: PostRequest; + deleteBankAccounts: PostRequest; + deletePayoutMethods: PostRequest; + updateAccount: PostRequest; + uploadDocument: PostRequest; + unSuspendAccountHolder: PostRequest; + closeAccount: PostRequest; + suspendAccountHolder: PostRequest; + updateAccountHolder: PostRequest; + deleteShareholders: PostRequest; + checkAccountHolder: PostRequest; + updateAccountHolderState: PostRequest; } { - const closeAccount = this.createRequest(this._closeAccount); - const updateAccount = this.createRequest(this._updateAccount); - const createAccount = this.createRequest(this._createAccount); + const closeAccount = this.createPostRequest(this.closeAccount); + const updateAccount = this.createPostRequest(this.updateAccount); + const createAccount = this.createPostRequest(this.createAccount); - const uploadDocument = this.createRequest(this._uploadDocument); - const getUploadedDocuments = this.createRequest(this._getUploadedDocuments); - const deleteBankAccounts = this.createRequest(this._deleteBankAccounts); - const deletePayoutMethods = this.createRequest(this._deletePayoutMethods); - const deleteShareholders = this.createRequest(this._deleteShareholders); + const uploadDocument = this.createPostRequest(this.uploadDocument); + const getUploadedDocuments = this.createPostRequest(this.getUploadedDocuments); + const deleteBankAccounts = this.createPostRequest(this.deleteBankAccounts); + const deletePayoutMethods = this.createPostRequest(this.deletePayoutMethods); + const deleteShareholders = this.createPostRequest(this.deleteShareholders); - const createAccountHolder = this.createRequest(this._createAccountHolder); - const getAccountHolder = this.createRequest(this._getAccountHolder); - const updateAccountHolder = this.createRequest(this._updateAccountHolder); - const updateAccountHolderState = this.createRequest(this._updateAccountHolderState); - const suspendAccountHolder = this.createRequest(this._suspendAccountHolder); - const unSuspendAccountHolder = this.createRequest(this._unSuspendAccountHolder); - const closeAccountHolder = this.createRequest(this._closeAccountHolder); - const checkAccountHolder = this.createRequest(this._checkAccountHolder); + const createAccountHolder = this.createPostRequest(this.createAccountHolder); + const getAccountHolder = this.createPostRequest(this.getAccountHolder); + const updateAccountHolder = this.createPostRequest(this.updateAccountHolder); + const updateAccountHolderState = this.createPostRequest(this.updateAccountHolderState); + const suspendAccountHolder = this.createPostRequest(this.suspendAccountHolder); + const unSuspendAccountHolder = this.createPostRequest(this.unSuspendAccountHolder); + const closeAccountHolder = this.createPostRequest(this.closeAccountHolder); + const checkAccountHolder = this.createPostRequest(this.checkAccountHolder); const accounts = { closeAccount, updateAccount, createAccount }; const verification = { uploadDocument, getUploadedDocuments, deleteBankAccounts, deletePayoutMethods, deleteShareholders, checkAccountHolder }; @@ -169,45 +170,45 @@ class Platforms extends Service { } public get Fund(): { - refundNotPaidOutTransfers: (request: IPlatformsFund.RefundNotPaidOutTransfersRequest) => Promise; - accountHolderTransactionList: (request: IPlatformsFund.AccountHolderTransactionListRequest) => Promise; - setupBeneficiary: (request: IPlatformsFund.SetupBeneficiaryRequest) => Promise; - transferFunds: (request: IPlatformsFund.TransferFundsRequest) => Promise; - refundFundsTransfer: (request: IPlatformsFund.RefundFundsTransferRequest) => Promise; - payoutAccountHolder: (request: IPlatformsFund.PayoutAccountHolderRequest) => Promise; - accountHolderBalance: (request: IPlatformsFund.AccountHolderBalanceRequest) => Promise; + refundNotPaidOutTransfers: PostRequest; + accountHolderTransactionList: PostRequest; + setupBeneficiary: PostRequest; + transferFunds: PostRequest; + refundFundsTransfer: PostRequest; + payoutAccountHolder: PostRequest; + accountHolderBalance: PostRequest; } { - const accountHolderBalance = this.createRequest(this._accountHolderBalance); - const accountHolderTransactionList = this.createRequest(this._accountHolderTransactionList); - const payoutAccountHolder = this.createRequest(this._payoutAccountHolder); - const transferFunds = this.createRequest(this._transferFunds); - const refundFundsTransfer = this.createRequest(this._refundFundsTransfer); - const setupBeneficiary = this.createRequest(this._setupBeneficiary); - const refundNotPaidOutTransfers = this.createRequest(this._refundNotPaidOutTransfers); + const accountHolderBalance = this.createPostRequest(this.accountHolderBalance); + const accountHolderTransactionList = this.createPostRequest(this.accountHolderTransactionList); + const payoutAccountHolder = this.createPostRequest(this.payoutAccountHolder); + const transferFunds = this.createPostRequest(this.transferFunds); + const refundFundsTransfer = this.createPostRequest(this.refundFundsTransfer); + const setupBeneficiary = this.createPostRequest(this.setupBeneficiary); + const refundNotPaidOutTransfers = this.createPostRequest(this.refundNotPaidOutTransfers); return { accountHolderBalance, accountHolderTransactionList, payoutAccountHolder, refundFundsTransfer, transferFunds, setupBeneficiary, refundNotPaidOutTransfers }; } - public get HostedOnboardingPage(): { getOnboardingUrl: (request: IPlatformsHostedOnboardingPage.GetOnboardingUrlRequest) => Promise } { - const getOnboardingUrl = this.createRequest(this._getOnboardingUrl); + public get HostedOnboardingPage(): { getOnboardingUrl: PostRequest } { + const getOnboardingUrl = this.createPostRequest(this.getOnboardingUrl); return { getOnboardingUrl }; } public get NotificationConfiguration(): { - createNotificationConfiguration: (request: IPlatformsNotificationConfiguration.CreateNotificationConfigurationRequest) => Promise; - updateNotificationConfiguration: (request: IPlatformsNotificationConfiguration.UpdateNotificationConfigurationRequest) => Promise; - getNotificationConfiguration: (request: IPlatformsNotificationConfiguration.GetNotificationConfigurationRequest) => Promise; - testNotificationConfiguration: (request: IPlatformsNotificationConfiguration.TestNotificationConfigurationRequest) => Promise; - getNotificationConfigurationList: (request: {}) => Promise; - deleteNotificationConfigurations: (request: IPlatformsNotificationConfiguration.DeleteNotificationConfigurationRequest) => Promise; + createNotificationConfiguration: PostRequest; + updateNotificationConfiguration: PostRequest; + getNotificationConfiguration: PostRequest; + testNotificationConfiguration: PostRequest; + getNotificationConfigurationList: PostRequest<{}, IPlatformsNotificationConfiguration.GetNotificationConfigurationListResponse>; + deleteNotificationConfigurations: PostRequest; } { - const createNotificationConfiguration = this.createRequest(this._createNotificationConfiguration); - const getNotificationConfiguration = this.createRequest(this._getNotificationConfiguration); - const getNotificationConfigurationList = this.createRequest(this._getNotificationConfigurationList); - const testNotificationConfiguration = this.createRequest(this._testNotificationConfiguration); - const updateNotificationConfiguration = this.createRequest(this._updateNotificationConfiguration); - const deleteNotificationConfigurations = this.createRequest(this._deleteNotificationConfiguration); + const createNotificationConfiguration = this.createPostRequest(this.createNotificationConfiguration); + const getNotificationConfiguration = this.createPostRequest(this.getNotificationConfiguration); + const getNotificationConfigurationList = this.createPostRequest(this.getNotificationConfigurationList); + const testNotificationConfiguration = this.createPostRequest(this.testNotificationConfiguration); + const updateNotificationConfiguration = this.createPostRequest(this.updateNotificationConfiguration); + const deleteNotificationConfigurations = this.createPostRequest(this.deleteNotificationConfiguration); return { createNotificationConfiguration, getNotificationConfiguration, getNotificationConfigurationList, testNotificationConfiguration, updateNotificationConfiguration, deleteNotificationConfigurations }; } diff --git a/src/services/recurring.ts b/src/services/recurring.ts index 9671922..08136c5 100644 --- a/src/services/recurring.ts +++ b/src/services/recurring.ts @@ -18,43 +18,21 @@ */ import Client from "../client"; -import getJsonResponse from "../helpers/getJsonResponse"; import Service from "../service"; import Disable from "./resource/recurring/disable"; import ListRecurringDetails from "./resource/recurring/listRecurringDetails"; import ScheduleAccountUpdater from "./resource/recurring/scheduleAccountUpdater"; class Recurring extends Service { - private readonly _listRecurringDetails: ListRecurringDetails; - private readonly _disable: Disable; - private readonly _scheduleAccountUpdater: ScheduleAccountUpdater; + public readonly listRecurringDetails: ListRecurringDetails; + public readonly disable: Disable; + public readonly scheduleAccountUpdater: ScheduleAccountUpdater; public constructor(client: Client) { super(client); - this._listRecurringDetails = new ListRecurringDetails(this); - this._disable = new Disable(this); - this._scheduleAccountUpdater = new ScheduleAccountUpdater(this); - } - - public listRecurringDetails(request: IRecurring.RecurringDetailsRequest): Promise { - return getJsonResponse( - this._listRecurringDetails, - request, - ); - } - - public disable(request: IRecurring.DisableRequest): Promise { - return getJsonResponse( - this._disable, - request, - ); - } - - public scheduleAccountUpdater(request: IRecurring.ScheduleAccountUpdaterRequest): Promise { - return getJsonResponse( - this._scheduleAccountUpdater, - request, - ); + this.listRecurringDetails = new ListRecurringDetails(this); + this.disable = new Disable(this); + this.scheduleAccountUpdater = new ScheduleAccountUpdater(this); } } diff --git a/src/services/resource.ts b/src/services/resource.ts index 97505cb..aa24c06 100644 --- a/src/services/resource.ts +++ b/src/services/resource.ts @@ -26,6 +26,7 @@ import { IRequest } from "../typings/requestOptions"; abstract class Resource { protected endpoint: string; + protected _params: string = ''; private service: Service; protected constructor(service: Service, endpoint: string) { @@ -33,12 +34,16 @@ abstract class Resource { this.endpoint = endpoint; } - public request(json: string, requestOptions?: IRequest.Options): Promise { + protected set params(par: string) { + this._params = par; + } + + protected request(json: string, requestOptions?: IRequest.Options): Promise { const clientInterface: ClientInterface = this.service.client.httpClient; const config: Config = this.service.client.config; return clientInterface.request( - this.endpoint, + `${this.endpoint}${this._params}`, json, config, this.service.apiKeyRequired, requestOptions, diff --git a/src/services/resource/binLookup/get3dsAvailability.ts b/src/services/resource/binLookup/get3dsAvailability.ts index de5400f..1d0c47a 100644 --- a/src/services/resource/binLookup/get3dsAvailability.ts +++ b/src/services/resource/binLookup/get3dsAvailability.ts @@ -20,6 +20,7 @@ import Resource from "../../resource"; import Service from "../../../service"; import Client from "../../../client"; +import getJsonResponse from "../../../helpers/getJsonResponse"; class Get3dsAvailability extends Resource { public constructor(service: Service) { @@ -28,6 +29,13 @@ class Get3dsAvailability extends Resource { `${service.client.config.endpoint}${Client.BIN_LOOKUP_PAL_SUFFIX}${Client.BIN_LOOKUP_API_VERSION}/get3dsAvailability` ); } + + public post(request: IBinLookup.ThreeDSAvailabilityRequest): Promise { + return getJsonResponse.call>( + this, + request + ); + } } export default Get3dsAvailability; diff --git a/src/services/resource/binLookup/getCostEstimate.ts b/src/services/resource/binLookup/getCostEstimate.ts index c64f568..4dbb3c6 100644 --- a/src/services/resource/binLookup/getCostEstimate.ts +++ b/src/services/resource/binLookup/getCostEstimate.ts @@ -20,6 +20,7 @@ import Resource from "../../resource"; import Service from "../../../service"; import Client from "../../../client"; +import getJsonResponse from "../../../helpers/getJsonResponse"; class GetCostEstimate extends Resource { public constructor(service: Service) { @@ -28,6 +29,13 @@ class GetCostEstimate extends Resource { `${service.client.config.endpoint}${Client.BIN_LOOKUP_PAL_SUFFIX}${Client.BIN_LOOKUP_API_VERSION}/getCostEstimate` ); } + + public post(request: IBinLookup.CostEstimateRequest): Promise { + return getJsonResponse.call>( + this, + request + ); + } } export default GetCostEstimate; diff --git a/src/services/resource/checkout/orders.ts b/src/services/resource/checkout/orders.ts index 090790a..30ae0f0 100644 --- a/src/services/resource/checkout/orders.ts +++ b/src/services/resource/checkout/orders.ts @@ -18,16 +18,30 @@ */ import Client from "../../../client"; +import getJsonResponse from "../../../helpers/getJsonResponse"; import Service from "../../../service"; import Resource from "../../resource"; +import OrdersCancel from "./ordersCancel"; class Orders extends Resource { + public readonly cancel: OrdersCancel; + public constructor(service: Service) { super( service, `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/orders`, ); + + this.cancel = new OrdersCancel(service); } + + public post(ordersRequest: ICheckout.CheckoutCreateOrderRequest): Promise { + return getJsonResponse.call>( + this, + ordersRequest, + ); + } + } export default Orders; diff --git a/src/services/resource/checkout/ordersCancel.ts b/src/services/resource/checkout/ordersCancel.ts index 83bc809..6f9013d 100644 --- a/src/services/resource/checkout/ordersCancel.ts +++ b/src/services/resource/checkout/ordersCancel.ts @@ -18,6 +18,7 @@ */ import Client from "../../../client"; +import getJsonResponse from "../../../helpers/getJsonResponse"; import Service from "../../../service"; import Resource from "../../resource"; @@ -28,6 +29,13 @@ class OrdersCancel extends Resource { `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/orders/cancel`, ); } + + public post(ordersCancelRequest: ICheckout.CheckoutCancelOrderRequest): Promise { + return getJsonResponse.call>( + this, + ordersCancelRequest, + ); + } } export default OrdersCancel; diff --git a/src/services/resource/checkout/originKeys.ts b/src/services/resource/checkout/originKeys.ts index 8426a46..347d826 100644 --- a/src/services/resource/checkout/originKeys.ts +++ b/src/services/resource/checkout/originKeys.ts @@ -18,6 +18,7 @@ */ import Client from "../../../client"; +import getJsonResponse from "../../../helpers/getJsonResponse"; import Service from "../../../service"; import Resource from "../../resource"; @@ -28,6 +29,14 @@ class OriginKeys extends Resource { `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/originKeys`, ); } + + public post(originKeysRequest: ICheckout.CheckoutUtilityRequest): Promise { + return getJsonResponse.call>( + this, + originKeysRequest, + ); + } + } export default OriginKeys; diff --git a/src/services/resource/checkout/paymentLinks.ts b/src/services/resource/checkout/paymentLinks.ts index e460cfd..9f8a7d4 100644 --- a/src/services/resource/checkout/paymentLinks.ts +++ b/src/services/resource/checkout/paymentLinks.ts @@ -18,6 +18,7 @@ */ import Client from "../../../client"; +import getJsonResponse from "../../../helpers/getJsonResponse"; import Service from "../../../service"; import Resource from "../../resource"; @@ -28,6 +29,31 @@ class PaymentLinks extends Resource { `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/paymentLinks`, ); } + + public post(paymentLinkRequest: ICheckout.CreatePaymentLinkRequest): Promise { + return getJsonResponse.call>( + this, + paymentLinkRequest + ); + } + + public get(linkId: string): Promise { + this.params = `/${linkId}`; + return getJsonResponse.call>( + this, + {}, + { method: "GET" } + ); + } + + public patch(linkId: string, status: "expired"): Promise { + this.params = `/${linkId}`; + return getJsonResponse.call>( + this, + { status }, + { method: "PATCH" } + ); + } } export default PaymentLinks; diff --git a/src/services/resource/checkout/paymentLinksId.ts b/src/services/resource/checkout/paymentLinksId.ts deleted file mode 100644 index eb644de..0000000 --- a/src/services/resource/checkout/paymentLinksId.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * ###### - * ###### - * ############ ####( ###### #####. ###### ############ ############ - * ############# #####( ###### #####. ###### ############# ############# - * ###### #####( ###### #####. ###### ##### ###### ##### ###### - * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### - * ###### ###### #####( ###### #####. ###### ##### ##### ###### - * ############# ############# ############# ############# ##### ###### - * ############ ############ ############# ############ ##### ###### - * ###### - * ############# - * ############ - * Adyen NodeJS API Library - * Copyright (c) 2020 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 Service from "../../../service"; -import Resource from "../../resource"; - -class PaymentLinksId extends Resource { - static _id: string; - - public constructor(service: Service) { - super( - service, - `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/paymentLinks`, - ); - } - - public set id(id: string) { - PaymentLinksId._id = id; - this.endpoint = `${this.endpoint}/${PaymentLinksId._id}`; - } -} - -export default PaymentLinksId; diff --git a/src/services/resource/checkout/paymentMethods.ts b/src/services/resource/checkout/paymentMethods.ts index a45fa02..07e1fd7 100644 --- a/src/services/resource/checkout/paymentMethods.ts +++ b/src/services/resource/checkout/paymentMethods.ts @@ -18,16 +18,30 @@ */ import Client from "../../../client"; +import getJsonResponse from "../../../helpers/getJsonResponse"; import Service from "../../../service"; import Resource from "../../resource"; +import PaymentMethodsBalance from "./paymentMethodsBalance"; class PaymentMethods extends Resource { + public readonly balance: PaymentMethodsBalance; + public constructor(service: Service) { super( service, `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/paymentMethods`, ); + + this.balance = new PaymentMethodsBalance(service); } + + public post(paymentMethodsRequest: ICheckout.PaymentMethodsRequest): Promise { + return getJsonResponse.call>( + this, + paymentMethodsRequest, + ); + } + } export default PaymentMethods; diff --git a/src/services/resource/checkout/paymentMethodsBalance.ts b/src/services/resource/checkout/paymentMethodsBalance.ts index 8996c25..d58b65b 100644 --- a/src/services/resource/checkout/paymentMethodsBalance.ts +++ b/src/services/resource/checkout/paymentMethodsBalance.ts @@ -18,6 +18,7 @@ */ import Client from "../../../client"; +import getJsonResponse from "../../../helpers/getJsonResponse"; import Service from "../../../service"; import Resource from "../../resource"; @@ -28,6 +29,14 @@ class PaymentMethodsBalance extends Resource { `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/paymentMethods/balance`, ); } + + public post(paymentMethodsBalanceRequest: ICheckout.CheckoutBalanceCheckRequest): Promise { + return getJsonResponse.call>( + this, + paymentMethodsBalanceRequest, + ); + } + } export default PaymentMethodsBalance; diff --git a/src/services/resource/checkout/paymentSession.ts b/src/services/resource/checkout/paymentSession.ts index f4f4093..9689ec6 100644 --- a/src/services/resource/checkout/paymentSession.ts +++ b/src/services/resource/checkout/paymentSession.ts @@ -18,7 +18,9 @@ */ import Client from "../../../client"; +import getJsonResponse from "../../../helpers/getJsonResponse"; import Service from "../../../service"; +import { IRequest } from "../../../typings/requestOptions"; import Resource from "../../resource"; class PaymentSession extends Resource { @@ -28,6 +30,17 @@ class PaymentSession extends Resource { `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/paymentSession`, ); } + + public post( + paymentSessionRequest: ICheckout.PaymentSetupRequest, + requestOptions?: IRequest.Options, + ): Promise { + return getJsonResponse.call>( + this, + paymentSessionRequest, + requestOptions, + ); + } } export default PaymentSession; diff --git a/src/services/resource/checkout/payments.ts b/src/services/resource/checkout/payments.ts index 2243cf8..df37479 100644 --- a/src/services/resource/checkout/payments.ts +++ b/src/services/resource/checkout/payments.ts @@ -18,16 +18,36 @@ */ import Client from "../../../client"; +import getJsonResponse from "../../../helpers/getJsonResponse"; +import setApplicationInfo from "../../../helpers/setApplicationInfo"; import Service from "../../../service"; +import { IRequest } from "../../../typings/requestOptions"; import Resource from "../../resource"; +import PaymentsDetails from "./paymentsDetails"; +import PaymentsResult from "./paymentsResult"; class Payments extends Resource { + public readonly details: PaymentsDetails; + public readonly result: PaymentsResult; + public constructor(service: Service) { super( service, `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/payments`, ); + + this.details = new PaymentsDetails(service); + this.result = new PaymentsResult(service); } + + public post(paymentsRequest: ICheckout.PaymentRequest, requestOptions?: IRequest.Options): Promise { + return getJsonResponse.call>( + this, + setApplicationInfo(paymentsRequest), + requestOptions, + ); + } + } export default Payments; diff --git a/src/services/resource/checkout/paymentsDetails.ts b/src/services/resource/checkout/paymentsDetails.ts index 46f29bd..fab1ebe 100644 --- a/src/services/resource/checkout/paymentsDetails.ts +++ b/src/services/resource/checkout/paymentsDetails.ts @@ -18,7 +18,9 @@ */ import Client from "../../../client"; +import getJsonResponse from "../../../helpers/getJsonResponse"; import Service from "../../../service"; +import { IRequest } from "../../../typings/requestOptions"; import Resource from "../../resource"; class PaymentsDetails extends Resource { @@ -28,6 +30,15 @@ class PaymentsDetails extends Resource { `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/payments/details`, ); } + + public post(paymentsDetailsRequest: ICheckout.DetailsRequest, requestOptions?: IRequest.Options): Promise { + return getJsonResponse.call>( + this, + paymentsDetailsRequest, + requestOptions + ); + } + } export default PaymentsDetails; diff --git a/src/services/resource/checkout/paymentsResult.ts b/src/services/resource/checkout/paymentsResult.ts index f3bb007..fbb8c2c 100644 --- a/src/services/resource/checkout/paymentsResult.ts +++ b/src/services/resource/checkout/paymentsResult.ts @@ -18,6 +18,7 @@ */ import Client from "../../../client"; +import getJsonResponse from "../../../helpers/getJsonResponse"; import Service from "../../../service"; import Resource from "../../resource"; @@ -28,6 +29,14 @@ class PaymentsResult extends Resource { `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/payments/result`, ); } + + public post(paymentResultRequest: ICheckout.PaymentVerificationRequest): Promise { + return getJsonResponse.call>( + this, + paymentResultRequest, + ); + } + } export default PaymentsResult; diff --git a/src/services/resource/modification/adjustAuthorisation.ts b/src/services/resource/modification/adjustAuthorisation.ts index 5037b6c..0bb2f7d 100644 --- a/src/services/resource/modification/adjustAuthorisation.ts +++ b/src/services/resource/modification/adjustAuthorisation.ts @@ -19,6 +19,10 @@ import Client from "../../../client"; import Service from "../../../service"; import Resource from "../../resource"; +import { GenericRequest } from "../../../typings/genericRequest"; +import { IRequest } from "../../../typings/requestOptions"; +import getJsonResponse from "../../../helpers/getJsonResponse"; +import setApplicationInfo from "../../../helpers/setApplicationInfo"; class AdjustAuthorisation extends Resource { public constructor(service: Service) { @@ -27,6 +31,17 @@ class AdjustAuthorisation extends Resource { `${service.client.config.endpoint}/pal/servlet/Payment/${Client.API_VERSION}/adjustAuthorisation`, ); } + + public post( + adjustAuthorisationRequest: GenericRequest, + requestOptions?: IRequest.Options, + ): Promise { + return getJsonResponse.call>( + this, + setApplicationInfo(adjustAuthorisationRequest), + requestOptions, + ); + } } export default AdjustAuthorisation; diff --git a/src/services/resource/modification/cancel.ts b/src/services/resource/modification/cancel.ts index c91e5ac..2453d4b 100644 --- a/src/services/resource/modification/cancel.ts +++ b/src/services/resource/modification/cancel.ts @@ -19,6 +19,10 @@ import Client from "../../../client"; import Service from "../../../service"; import Resource from "../../resource"; +import { GenericRequest } from "../../../typings/genericRequest"; +import { IRequest } from "../../../typings/requestOptions"; +import getJsonResponse from "../../../helpers/getJsonResponse"; +import setApplicationInfo from "../../../helpers/setApplicationInfo"; class Cancel extends Resource { public constructor(service: Service) { @@ -27,6 +31,17 @@ class Cancel extends Resource { `${service.client.config.endpoint}/pal/servlet/Payment/${Client.API_VERSION}/cancel`, ); } + + public post( + cancelRequest: GenericRequest, + requestOptions?: IRequest.Options, + ): Promise { + return getJsonResponse.call>( + this, + setApplicationInfo(cancelRequest), + requestOptions, + ); + } } export default Cancel; diff --git a/src/services/resource/modification/cancelOrRefund.ts b/src/services/resource/modification/cancelOrRefund.ts index 7197182..87eac9a 100644 --- a/src/services/resource/modification/cancelOrRefund.ts +++ b/src/services/resource/modification/cancelOrRefund.ts @@ -19,6 +19,10 @@ import Client from "../../../client"; import Service from "../../../service"; import Resource from "../../resource"; +import getJsonResponse from "../../../helpers/getJsonResponse"; +import { IRequest } from "../../../typings/requestOptions"; +import { GenericRequest } from "../../../typings/genericRequest"; +import setApplicationInfo from "../../../helpers/setApplicationInfo"; class CancelOrRefund extends Resource { public constructor(service: Service) { @@ -27,6 +31,18 @@ class CancelOrRefund extends Resource { `${service.client.config.endpoint}/pal/servlet/Payment/${Client.API_VERSION}/cancelOrRefund`, ); } + + public post( + cancelOrRefundRequest: GenericRequest, + requestOptions?: IRequest.Options, + ): Promise { + return getJsonResponse.call>( + this, + setApplicationInfo(cancelOrRefundRequest), + requestOptions, + ); + } + } export default CancelOrRefund; diff --git a/src/services/resource/modification/capture.ts b/src/services/resource/modification/capture.ts index 03afe8a..c3ef513 100644 --- a/src/services/resource/modification/capture.ts +++ b/src/services/resource/modification/capture.ts @@ -19,6 +19,10 @@ import Client from "../../../client"; import Service from "../../../service"; import Resource from "../../resource"; +import { GenericRequest } from "../../../typings/genericRequest"; +import { IRequest } from "../../../typings/requestOptions"; +import getJsonResponse from "../../../helpers/getJsonResponse"; +import setApplicationInfo from "../../../helpers/setApplicationInfo"; class Capture extends Resource { public constructor(service: Service) { @@ -27,6 +31,17 @@ class Capture extends Resource { `${service.client.config.endpoint}/pal/servlet/Payment/${Client.API_VERSION}/capture`, ); } + + public post( + captureRequest: GenericRequest, + requestOptions?: IRequest.Options, + ): Promise { + return getJsonResponse.call>( + this, + setApplicationInfo(captureRequest), + requestOptions, + ); + } } export default Capture; diff --git a/src/services/resource/modification/refund.ts b/src/services/resource/modification/refund.ts index bb22c43..16a61b1 100644 --- a/src/services/resource/modification/refund.ts +++ b/src/services/resource/modification/refund.ts @@ -19,6 +19,10 @@ import Client from "../../../client"; import Service from "../../../service"; import Resource from "../../resource"; +import { GenericRequest } from "../../../typings/genericRequest"; +import { IRequest } from "../../../typings/requestOptions"; +import getJsonResponse from "../../../helpers/getJsonResponse"; +import setApplicationInfo from "../../../helpers/setApplicationInfo"; class Refund extends Resource { public constructor(service: Service) { @@ -27,6 +31,17 @@ class Refund extends Resource { `${service.client.config.endpoint}/pal/servlet/Payment/${Client.API_VERSION}/refund`, ); } + + public post( + refundRequest: GenericRequest, + requestOptions?: IRequest.Options, + ): Promise { + return getJsonResponse.call>( + this, + setApplicationInfo(refundRequest), + requestOptions, + ); + } } export default Refund; diff --git a/src/services/resource/modification/technicalCancel.ts b/src/services/resource/modification/technicalCancel.ts index e276ae7..01e2fa1 100644 --- a/src/services/resource/modification/technicalCancel.ts +++ b/src/services/resource/modification/technicalCancel.ts @@ -19,6 +19,10 @@ import Resource from "../../resource"; import Client from "../../../client"; import Service from "../../../service"; +import { GenericRequest } from "../../../typings/genericRequest"; +import { IRequest } from "../../../typings/requestOptions"; +import getJsonResponse from "../../../helpers/getJsonResponse"; +import setApplicationInfo from "../../../helpers/setApplicationInfo"; class TechnicalCancel extends Resource { public constructor(service: Service) { @@ -27,6 +31,17 @@ class TechnicalCancel extends Resource { `${service.client.config.endpoint}/pal/servlet/Payment/${Client.API_VERSION}/technicalCancel`, ); } + + public post( + technicalCancelRequest: GenericRequest, + requestOptions?: IRequest.Options, + ): Promise { + return getJsonResponse.call>( + this, + setApplicationInfo(technicalCancelRequest), + requestOptions, + ); + } } export default TechnicalCancel; diff --git a/src/services/resource/payout/confirmThirdParty.ts b/src/services/resource/payout/confirmThirdParty.ts index 9084d36..d6f9589 100644 --- a/src/services/resource/payout/confirmThirdParty.ts +++ b/src/services/resource/payout/confirmThirdParty.ts @@ -19,6 +19,7 @@ import Resource from "../../resource"; import Service from "../../../service"; import Client from "../../../client"; +import getJsonResponse from "../../../helpers/getJsonResponse"; class ConfirmThirdParty extends Resource { public constructor(service: Service) { @@ -27,6 +28,13 @@ class ConfirmThirdParty extends Resource { `${service.client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}/confirmThirdParty` ); } + + public post(request: IPayouts.ModifyRequest): Promise { + return getJsonResponse.call>( + this, + request + ); + } } export default ConfirmThirdParty; diff --git a/src/services/resource/payout/declineThirdParty.ts b/src/services/resource/payout/declineThirdParty.ts index 3e2a81b..89e3c1a 100644 --- a/src/services/resource/payout/declineThirdParty.ts +++ b/src/services/resource/payout/declineThirdParty.ts @@ -19,6 +19,7 @@ import Resource from "../../resource"; import Service from "../../../service"; import Client from "../../../client"; +import getJsonResponse from "../../../helpers/getJsonResponse"; class DeclineThirdParty extends Resource { public constructor(service: Service) { @@ -27,6 +28,13 @@ class DeclineThirdParty extends Resource { `${service.client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}/declineThirdParty` ); } + + public post(request: IPayouts.ModifyRequest): Promise { + return getJsonResponse.call>( + this, + request + ); + } } export default DeclineThirdParty; diff --git a/src/services/resource/payout/payout.ts b/src/services/resource/payout/payout.ts index e3893f0..097ab68 100644 --- a/src/services/resource/payout/payout.ts +++ b/src/services/resource/payout/payout.ts @@ -19,6 +19,7 @@ import Resource from "../../resource"; import Service from "../../../service"; import Client from "../../../client"; +import getJsonResponse from "../../../helpers/getJsonResponse"; class Payout extends Resource { public constructor(service: Service) { @@ -27,6 +28,13 @@ class Payout extends Resource { `${service.client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}/payout` ); } + + public post(request: IPayouts.PayoutRequest): Promise { + return getJsonResponse.call>( + this, + request + ); + } } export default Payout; diff --git a/src/services/resource/payout/storeDetail.ts b/src/services/resource/payout/storeDetail.ts index 3f90df2..c729df2 100644 --- a/src/services/resource/payout/storeDetail.ts +++ b/src/services/resource/payout/storeDetail.ts @@ -19,6 +19,7 @@ import Resource from "../../resource"; import Service from "../../../service"; import Client from "../../../client"; +import getJsonResponse from "../../../helpers/getJsonResponse"; class StoreDetail extends Resource { public constructor(service: Service) { @@ -27,6 +28,14 @@ class StoreDetail extends Resource { `${service.client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}/storeDetail` ); } + + public post(request: IPayouts.StoreDetailRequest): Promise { + return getJsonResponse.call>( + this, + request + ); + } + } export default StoreDetail; diff --git a/src/services/resource/payout/storeDetailAndSubmitThirdParty.ts b/src/services/resource/payout/storeDetailAndSubmitThirdParty.ts index 8d2a01c..bf7c695 100644 --- a/src/services/resource/payout/storeDetailAndSubmitThirdParty.ts +++ b/src/services/resource/payout/storeDetailAndSubmitThirdParty.ts @@ -19,6 +19,7 @@ import Resource from "../../resource"; import Service from "../../../service"; import Client from "../../../client"; +import getJsonResponse from "../../../helpers/getJsonResponse"; class StoreDetailAndSubmitThirdParty extends Resource { public constructor(service: Service) { @@ -27,6 +28,14 @@ class StoreDetailAndSubmitThirdParty extends Resource { `${service.client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}/storeDetailAndSubmitThirdParty` ); } + + public post(request: IPayouts.StoreDetailAndSubmitRequest): Promise { + return getJsonResponse.call>( + this, + request + ); + } + } export default StoreDetailAndSubmitThirdParty; diff --git a/src/services/resource/payout/submitThirdParty.ts b/src/services/resource/payout/submitThirdParty.ts index b011621..4ae0d07 100644 --- a/src/services/resource/payout/submitThirdParty.ts +++ b/src/services/resource/payout/submitThirdParty.ts @@ -19,6 +19,7 @@ import Resource from "../../resource"; import Service from "../../../service"; import Client from "../../../client"; +import getJsonResponse from "../../../helpers/getJsonResponse"; class SubmitThirdParty extends Resource { public constructor(service: Service) { @@ -27,6 +28,13 @@ class SubmitThirdParty extends Resource { `${service.client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}/submitThirdParty` ); } + + public post(request: IPayouts.SubmitRequest): Promise { + return getJsonResponse.call>( + this, + request + ); + } } export default SubmitThirdParty; diff --git a/src/services/resource/recurring/disable.ts b/src/services/resource/recurring/disable.ts index 0f49705..2fe2ad2 100644 --- a/src/services/resource/recurring/disable.ts +++ b/src/services/resource/recurring/disable.ts @@ -20,6 +20,7 @@ import Client from "../../../client"; import Service from "../../../service"; import Resource from "../../resource"; +import getJsonResponse from "../../../helpers/getJsonResponse"; class Disable extends Resource { public constructor(service: Service) { @@ -28,6 +29,14 @@ class Disable extends Resource { `${service.client.config.endpoint}/pal/servlet/Recurring/${Client.RECURRING_API_VERSION}/disable`, ); } + + public post(request: IRecurring.DisableRequest): Promise { + return getJsonResponse.call>( + this, + request, + ); + } + } export default Disable; diff --git a/src/services/resource/recurring/listRecurringDetails.ts b/src/services/resource/recurring/listRecurringDetails.ts index d7aaac4..2c79f64 100644 --- a/src/services/resource/recurring/listRecurringDetails.ts +++ b/src/services/resource/recurring/listRecurringDetails.ts @@ -20,6 +20,7 @@ import Client from "../../../client"; import Service from "../../../service"; import Resource from "../../resource"; +import getJsonResponse from "../../../helpers/getJsonResponse"; class ListRecurringDetails extends Resource { public constructor(service: Service) { @@ -28,6 +29,14 @@ class ListRecurringDetails extends Resource { `${service.client.config.endpoint}/pal/servlet/Recurring/${Client.RECURRING_API_VERSION}/listRecurringDetails`, ); } + + public post(request: IRecurring.RecurringDetailsRequest): Promise { + return getJsonResponse.call>( + this, + request, + ); + } + } export default ListRecurringDetails; diff --git a/src/services/resource/recurring/scheduleAccountUpdater.ts b/src/services/resource/recurring/scheduleAccountUpdater.ts index 11fa87a..9972810 100644 --- a/src/services/resource/recurring/scheduleAccountUpdater.ts +++ b/src/services/resource/recurring/scheduleAccountUpdater.ts @@ -20,6 +20,7 @@ import Client from "../../../client"; import Service from "../../../service"; import Resource from "../../resource"; +import getJsonResponse from "../../../helpers/getJsonResponse"; class ScheduleAccountUpdater extends Resource { public constructor(service: Service) { @@ -28,6 +29,13 @@ class ScheduleAccountUpdater extends Resource { `${service.client.config.endpoint}/pal/servlet/Recurring/${Client.RECURRING_API_VERSION}/scheduleAccountUpdater`, ); } + + public post(request: IRecurring.ScheduleAccountUpdaterRequest): Promise { + return getJsonResponse.call>( + this, + request, + ); + } } export default ScheduleAccountUpdater; diff --git a/src/services/terminalCloudAPI.ts b/src/services/terminalCloudAPI.ts index 08c55fa..845ed88 100644 --- a/src/services/terminalCloudAPI.ts +++ b/src/services/terminalCloudAPI.ts @@ -61,12 +61,12 @@ class TerminalCloudAPI extends ApiKeyAuthenticatedService { public async(terminalApiRequest: TerminalApiRequest): Promise { const request = TerminalCloudAPI.setApplicationInfo(terminalApiRequest); - return getJsonResponse(this.terminalApiAsync, request); + return getJsonResponse.call>(this.terminalApiAsync, request); } public async sync(terminalApiRequest: TerminalApiRequest): Promise { const request = TerminalCloudAPI.setApplicationInfo(terminalApiRequest); - const response = await getJsonResponse( + const response = await getJsonResponse.call>( this.terminalApiSync, request, ); diff --git a/src/services/terminalLocalAPI.ts b/src/services/terminalLocalAPI.ts index b13e45b..86481cc 100644 --- a/src/services/terminalLocalAPI.ts +++ b/src/services/terminalLocalAPI.ts @@ -63,7 +63,7 @@ class TerminalLocalAPI extends ApiKeyAuthenticatedService { saleToPOIRequest: saleToPoiSecuredMessage, }, "TerminalApiSecuredRequest"); - const jsonResponse = await getJsonResponse( + const jsonResponse = await getJsonResponse.call>( this.localRequest, securedPaymentRequest ); diff --git a/src/typings/genericRequest.ts b/src/typings/genericRequest.ts new file mode 100644 index 0000000..e0afee6 --- /dev/null +++ b/src/typings/genericRequest.ts @@ -0,0 +1,4 @@ +import { ApplicationInfo } from "./applicationInfo"; + +interface AppInfo { applicationInfo?: ApplicationInfo } +export type GenericRequest = T & AppInfo; From 28b52ecbb0a453ec8b79383661b3066c65a92f94 Mon Sep 17 00:00:00 2001 From: Ricardo Ambrogi Date: Mon, 4 Jan 2021 08:37:29 +0100 Subject: [PATCH 08/45] Pw 3583/http methods (#625) * updates checkout * adds support for different http methods and update existing * rename _request to request. make request private * rename payout o payouts * improve how http methods are handled --- src/__tests__/checkout.spec.ts | 4 +- src/httpClient/httpURLConnectionClient.ts | 4 +- src/services/resource.ts | 14 ++--- .../resource/checkout/paymentLinks.ts | 16 +++--- src/services/resource/checkout/payments.ts | 1 - src/typings/HTTPMethod.ts | 53 +++++++++++++++++++ src/typings/requestOptions.ts | 1 + 7 files changed, 75 insertions(+), 18 deletions(-) create mode 100644 src/typings/HTTPMethod.ts diff --git a/src/__tests__/checkout.spec.ts b/src/__tests__/checkout.spec.ts index a37c446..74056cb 100644 --- a/src/__tests__/checkout.spec.ts +++ b/src/__tests__/checkout.spec.ts @@ -203,7 +203,7 @@ describe("Checkout", (): void => { const paymentSuccessLinkResponse = await checkout.paymentLinks.post(createPaymentLinkRequest()); scope.get(`/paymentLinks/${paymentSuccessLinkResponse.id}`).reply(200, paymentLinkSuccess); - const paymentLink = await checkout.paymentLinks.get(paymentSuccessLinkResponse.id); + const paymentLink = await checkout.paymentLinks.get({ id: paymentSuccessLinkResponse.id }); expect(paymentLink).toBeTruthy(); }); @@ -217,7 +217,7 @@ describe("Checkout", (): void => { const paymentSuccessLinkResponse = await checkout.paymentLinks.post(createPaymentLinkRequest()); scope.patch(`/paymentLinks/${paymentSuccessLinkResponse.id}`).reply(200, { ...paymentLinkSuccess, status: "expired" }); - const paymentLink = await checkout.paymentLinks.patch(paymentSuccessLinkResponse.id, "expired"); + const paymentLink = await checkout.paymentLinks.patch({ id: paymentSuccessLinkResponse.id, status: "expired" }); expect(paymentLink.status).toEqual("expired"); }); diff --git a/src/httpClient/httpURLConnectionClient.ts b/src/httpClient/httpURLConnectionClient.ts index 8d91092..9cdbefd 100644 --- a/src/httpClient/httpURLConnectionClient.ts +++ b/src/httpClient/httpURLConnectionClient.ts @@ -76,10 +76,12 @@ class HttpURLConnectionClient implements ClientInterface { } const url = new URL(endpoint); + const additionalPathname = requestOptions.id ? `/${requestOptions.id}` : ""; + const pathname = `${url.pathname}${additionalPathname}` requestOptions.hostname = url.hostname; requestOptions.protocol = url.protocol; requestOptions.port = url.port; - requestOptions.path = url.pathname; + requestOptions.path = pathname; if (requestOptions && requestOptions.idempotencyKey) { requestOptions.headers[ApiConstants.IDEMPOTENCY_KEY] = requestOptions.idempotencyKey; diff --git a/src/services/resource.ts b/src/services/resource.ts index aa24c06..8e1fbd1 100644 --- a/src/services/resource.ts +++ b/src/services/resource.ts @@ -24,9 +24,15 @@ import ApiException from "./exception/apiException"; import ClientInterface from "../httpClient/clientInterface"; import { IRequest } from "../typings/requestOptions"; +type Req = { [key: string]: any }; +type ReqWithId = { id?: string } & Req; + abstract class Resource { protected endpoint: string; - protected _params: string = ''; + protected post?(req: Req, requestOptions?: IRequest.Options): Promise<{}>; + protected patch?(req?: ReqWithId, requestOptions?: IRequest.Options): Promise<{}>; + protected get?(req?: ReqWithId, requestOptions?: IRequest.Options): Promise<{}>; + protected delete?(req?: ReqWithId, requestOptions?: IRequest.Options): Promise<{}>; private service: Service; protected constructor(service: Service, endpoint: string) { @@ -34,16 +40,12 @@ abstract class Resource { this.endpoint = endpoint; } - protected set params(par: string) { - this._params = par; - } - protected request(json: string, requestOptions?: IRequest.Options): Promise { const clientInterface: ClientInterface = this.service.client.httpClient; const config: Config = this.service.client.config; return clientInterface.request( - `${this.endpoint}${this._params}`, + this.endpoint, json, config, this.service.apiKeyRequired, requestOptions, diff --git a/src/services/resource/checkout/paymentLinks.ts b/src/services/resource/checkout/paymentLinks.ts index 9f8a7d4..899b0a4 100644 --- a/src/services/resource/checkout/paymentLinks.ts +++ b/src/services/resource/checkout/paymentLinks.ts @@ -21,6 +21,8 @@ import Client from "../../../client"; import getJsonResponse from "../../../helpers/getJsonResponse"; import Service from "../../../service"; import Resource from "../../resource"; +import { HTTPMethod } from "../../../typings/HTTPMethod"; +import { IRequest } from "../../../typings/requestOptions"; class PaymentLinks extends Resource { public constructor(service: Service) { @@ -37,21 +39,19 @@ class PaymentLinks extends Resource { ); } - public get(linkId: string): Promise { - this.params = `/${linkId}`; - return getJsonResponse.call>( + public get({ id }: { id: string }): Promise { + return getJsonResponse.call>( this, {}, - { method: "GET" } + { id, method: HTTPMethod.GET } ); } - public patch(linkId: string, status: "expired"): Promise { - this.params = `/${linkId}`; - return getJsonResponse.call>( + public patch({ id, status }: { id: string, status: "expired" }): Promise { + return getJsonResponse.call>( this, { status }, - { method: "PATCH" } + { id, method: HTTPMethod.PATCH } ); } } diff --git a/src/services/resource/checkout/payments.ts b/src/services/resource/checkout/payments.ts index df37479..920f54f 100644 --- a/src/services/resource/checkout/payments.ts +++ b/src/services/resource/checkout/payments.ts @@ -47,7 +47,6 @@ class Payments extends Resource { requestOptions, ); } - } export default Payments; diff --git a/src/typings/HTTPMethod.ts b/src/typings/HTTPMethod.ts new file mode 100644 index 0000000..5f6eb44 --- /dev/null +++ b/src/typings/HTTPMethod.ts @@ -0,0 +1,53 @@ +export enum HTTPMethod { + /** + * The `CONNECT` method establishes a tunnel to the server identified by the + * target resource. + */ + CONNECT = 'CONNECT', + + /** + * The `DELETE` method deletes the specified resource. + */ + DELETE = 'DELETE', + + /** + * The `GET` method requests a representation of the specified resource. + * Requests using GET should only retrieve data. + */ + GET = 'GET', + + /** + * The `HEAD` method asks for a response identical to that of a GET request, + * but without the response body. + */ + HEAD = 'HEAD', + + /** + * The `OPTIONS` method is used to describe the communication options for the + * target resource. + */ + OPTIONS = 'OPTIONS', + + /** + * The PATCH method is used to apply partial modifications to a resource. + */ + PATCH = 'PATCH', + + /** + * The `POST` method is used to submit an entity to the specified resource, + * often causing a change in state or side effects on the server. + */ + POST = 'POST', + + /** + * The `PUT` method replaces all current representations of the target + * resource with the request payload. + */ + PUT = 'PUT', + + /** + * The `TRACE` method performs a message loop-back test along the path to the + * target resource. + */ + TRACE = 'TRACE' +} diff --git a/src/typings/requestOptions.ts b/src/typings/requestOptions.ts index 69b2550..300a88c 100644 --- a/src/typings/requestOptions.ts +++ b/src/typings/requestOptions.ts @@ -25,6 +25,7 @@ import * as https from "https"; export namespace IRequest { export type Options = https.RequestOptions & { + id?: string; idempotencyKey?: string; }; } From d63d9fc8c6a1901127b6d0ded72d5018333f1f22 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Jan 2021 10:33:42 +0100 Subject: [PATCH 09/45] Bump jest-ts-auto-mock from 1.0.11 to 1.0.12 (#624) Bumps [jest-ts-auto-mock](https://github.com/Typescript-TDD/jest-ts-auto-mock) from 1.0.11 to 1.0.12. - [Release notes](https://github.com/Typescript-TDD/jest-ts-auto-mock/releases) - [Commits](https://github.com/Typescript-TDD/jest-ts-auto-mock/commits) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- yarn.lock | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6fa86b5..568413b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4202,9 +4202,9 @@ } }, "jest-ts-auto-mock": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/jest-ts-auto-mock/-/jest-ts-auto-mock-1.0.11.tgz", - "integrity": "sha512-HJ5UKgPLyHxWNpTQ0lguHO7dYx/rtxa1hk1/fzZZwJmB5f4b2s1Lx7N5QjRpza2UIlKDODo2Wv1mP7nv9Dk6bQ==", + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/jest-ts-auto-mock/-/jest-ts-auto-mock-1.0.12.tgz", + "integrity": "sha512-Hotcti3+dy+MUi5+lxtRF6sPvvo3d+94UHc0l/iDhw1/Mk+LAuDUgvY45TW5V3VmGbYxQsNE3oyABVYEHP7Gzw==", "dev": true }, "jest-util": { diff --git a/yarn.lock b/yarn.lock index 953f8be..a4a2f7d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3188,9 +3188,9 @@ jest-snapshot@^25.5.1: semver "^6.3.0" jest-ts-auto-mock@^1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/jest-ts-auto-mock/-/jest-ts-auto-mock-1.0.11.tgz#4a9824026013b55f118262262dce1b0d9449b396" - integrity sha512-HJ5UKgPLyHxWNpTQ0lguHO7dYx/rtxa1hk1/fzZZwJmB5f4b2s1Lx7N5QjRpza2UIlKDODo2Wv1mP7nv9Dk6bQ== + version "1.0.12" + resolved "https://registry.yarnpkg.com/jest-ts-auto-mock/-/jest-ts-auto-mock-1.0.12.tgz#c913935cbf049379a0dd7280bcef5fe5ad90565e" + integrity sha512-Hotcti3+dy+MUi5+lxtRF6sPvvo3d+94UHc0l/iDhw1/Mk+LAuDUgvY45TW5V3VmGbYxQsNE3oyABVYEHP7Gzw== jest-util@^25.5.0: version "25.5.0" From a43473da45f2c5bb4dfc5798bbd00cdc72b53db6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Jan 2021 06:08:38 +0100 Subject: [PATCH 10/45] Bump @types/jest from 26.0.19 to 26.0.20 (#628) Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.19 to 26.0.20. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 568413b..dd85269 100644 --- a/package-lock.json +++ b/package-lock.json @@ -960,9 +960,9 @@ } }, "@types/jest": { - "version": "26.0.19", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.19.tgz", - "integrity": "sha512-jqHoirTG61fee6v6rwbnEuKhpSKih0tuhqeFbCmMmErhtu3BYlOZaXWjffgOstMM4S/3iQD31lI5bGLTrs97yQ==", + "version": "26.0.20", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.20.tgz", + "integrity": "sha512-9zi2Y+5USJRxd0FsahERhBwlcvFh6D2GLQnY2FH2BzK8J9s9omvNHIbvABwIluXa0fD8XVKMLTO0aOEuUfACAA==", "dev": true, "requires": { "jest-diff": "^26.0.0", diff --git a/package.json b/package.json index 73651c7..9f3da9a 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "author": "Ricardo Ambrogi", "license": "MIT", "devDependencies": { - "@types/jest": "26.0.19", + "@types/jest": "26.0.20", "@types/nock": "11.1.0", "@typescript-eslint/eslint-plugin": "2.34.0", "@typescript-eslint/parser": "2.34.0", diff --git a/yarn.lock b/yarn.lock index a4a2f7d..1ffad62 100644 --- a/yarn.lock +++ b/yarn.lock @@ -721,10 +721,10 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@26.0.19": - version "26.0.19" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.19.tgz#e6fa1e3def5842ec85045bd5210e9bb8289de790" - integrity sha512-jqHoirTG61fee6v6rwbnEuKhpSKih0tuhqeFbCmMmErhtu3BYlOZaXWjffgOstMM4S/3iQD31lI5bGLTrs97yQ== +"@types/jest@26.0.20": + version "26.0.20" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.20.tgz#cd2f2702ecf69e86b586e1f5223a60e454056307" + integrity sha512-9zi2Y+5USJRxd0FsahERhBwlcvFh6D2GLQnY2FH2BzK8J9s9omvNHIbvABwIluXa0fD8XVKMLTO0aOEuUfACAA== dependencies: jest-diff "^26.0.0" pretty-format "^26.0.0" From 760807d978e71606fdc49e6ae389354767ed3462 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Jan 2021 11:46:39 +0100 Subject: [PATCH 11/45] Bump nock from 13.0.5 to 13.0.6 (#630) Bumps [nock](https://github.com/nock/nock) from 13.0.5 to 13.0.6. - [Release notes](https://github.com/nock/nock/releases) - [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md) - [Commits](https://github.com/nock/nock/compare/v13.0.5...v13.0.6) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index dd85269..d4e25b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4814,9 +4814,9 @@ "dev": true }, "nock": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.0.5.tgz", - "integrity": "sha512-1ILZl0zfFm2G4TIeJFW0iHknxr2NyA+aGCMTjDVUsBY4CkMRispF1pfIYkTRdAR/3Bg+UzdEuK0B6HczMQZcCg==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.0.6.tgz", + "integrity": "sha512-W81UZ1Tv21SWDZcA8Lu9LXYVl2gO9ADY5GadC6gFV9690h4TXz0oCkEoMckN/sPMHkDA79Ka9dXga9Mt1+j+Sg==", "dev": true, "requires": { "debug": "^4.1.0", diff --git a/package.json b/package.json index 9f3da9a..8fcfbd8 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "jest-ts-auto-mock": "^1.0.11", "kind-of": "^6.0.3", "minimist": ">=1.2.3", - "nock": "13.0.5", + "nock": "13.0.6", "release-it": "14.2.2", "ts-auto-mock": "^2.6.5", "ts-jest": "25.5.1", diff --git a/yarn.lock b/yarn.lock index 1ffad62..ec6df9a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3701,10 +3701,10 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nock@*, nock@13.0.5: - version "13.0.5" - resolved "https://registry.yarnpkg.com/nock/-/nock-13.0.5.tgz#a618c6f86372cb79fac04ca9a2d1e4baccdb2414" - integrity sha512-1ILZl0zfFm2G4TIeJFW0iHknxr2NyA+aGCMTjDVUsBY4CkMRispF1pfIYkTRdAR/3Bg+UzdEuK0B6HczMQZcCg== +nock@*, nock@13.0.6: + version "13.0.6" + resolved "https://registry.yarnpkg.com/nock/-/nock-13.0.6.tgz#9f90573ea6e84883b94eeac374d1c73460afed56" + integrity sha512-W81UZ1Tv21SWDZcA8Lu9LXYVl2gO9ADY5GadC6gFV9690h4TXz0oCkEoMckN/sPMHkDA79Ka9dXga9Mt1+j+Sg== dependencies: debug "^4.1.0" json-stringify-safe "^5.0.1" From 95f0c56564f761eed0c5334aa9540a57330051f3 Mon Sep 17 00:00:00 2001 From: Ricardo Ambrogi Date: Mon, 25 Jan 2021 13:38:53 +0100 Subject: [PATCH 12/45] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 81e3111..4433ac8 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,9 @@ client.httpClient = httpClient; ... ``` +## Testing +`$ npm run test` + ## Support If you have a feature request, or spotted a bug or a technical problem, create a GitHub issue. For other questions, contact our [support team](https://support.adyen.com/hc/en-us/requests/new?ticket_form_id=360000705420). From 71701895606377b54148fac41d620a91ad734381 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Jan 2021 09:16:34 +0100 Subject: [PATCH 13/45] Bump acorn from 8.0.4 to 8.0.5 (#631) Bumps [acorn](https://github.com/acornjs/acorn) from 8.0.4 to 8.0.5. - [Release notes](https://github.com/acornjs/acorn/releases) - [Commits](https://github.com/acornjs/acorn/compare/8.0.4...8.0.5) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- yarn.lock | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index d4e25b9..010a6ae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1180,9 +1180,9 @@ "dev": true }, "acorn": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.0.4.tgz", - "integrity": "sha512-XNP0PqF1XD19ZlLKvB7cMmnZswW4C/03pRHgirB30uSJTaS3A3V1/P4sS3HPvFmjoriPCJQs+JDSbm4bL1TxGQ==", + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.0.5.tgz", + "integrity": "sha512-v+DieK/HJkJOpFBETDJioequtc3PfxsWMaxIdIwujtF7FEV/MAyDQLlm6/zPvr7Mix07mLh6ccVwIsloceodlg==", "dev": true }, "acorn-globals": { diff --git a/yarn.lock b/yarn.lock index ec6df9a..f40b1ef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -874,9 +874,9 @@ acorn@^7.1.0, acorn@^7.1.1: integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w== acorn@^8.0.1: - version "8.0.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.0.4.tgz#7a3ae4191466a6984eee0fe3407a4f3aa9db8354" - integrity sha512-XNP0PqF1XD19ZlLKvB7cMmnZswW4C/03pRHgirB30uSJTaS3A3V1/P4sS3HPvFmjoriPCJQs+JDSbm4bL1TxGQ== + version "8.0.5" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.0.5.tgz#a3bfb872a74a6a7f661bc81b9849d9cac12601b7" + integrity sha512-v+DieK/HJkJOpFBETDJioequtc3PfxsWMaxIdIwujtF7FEV/MAyDQLlm6/zPvr7Mix07mLh6ccVwIsloceodlg== agent-base@6: version "6.0.1" From b671d126ac1a212d3c1fcccd7454481efff82caf Mon Sep 17 00:00:00 2001 From: Peter Ojo Date: Wed, 10 Feb 2021 16:25:34 +0100 Subject: [PATCH 14/45] [PW-3895] update checkout API version (#638) * [PW-3895] update checkout API version * add peterojo to code owners * [PW-3895] fix broken test --- .github/CODEOWNERS | 2 +- package.json | 2 +- src/__tests__/checkout.spec.ts | 2 -- src/client.ts | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 222da37..4c54f91 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @KadoBOT @zaiddreakh @maassenbas @msilvagarcia @AlexandrosMor +* @zaiddreakh @maassenbas @msilvagarcia @AlexandrosMor @peterojo diff --git a/package.json b/package.json index 8fcfbd8..5ee95b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@adyen/api-library", - "version": "6.0.3", + "version": "7.0.0", "description": "The Adyen API Library for NodeJS enables you to work with Adyen APIs.", "main": "lib/src/index.js", "types": "lib/src/index.d.ts", diff --git a/src/__tests__/checkout.spec.ts b/src/__tests__/checkout.spec.ts index 74056cb..e5bf7ea 100644 --- a/src/__tests__/checkout.spec.ts +++ b/src/__tests__/checkout.spec.ts @@ -67,8 +67,6 @@ export function createPaymentsCheckoutRequest(): ICheckout.PaymentRequest { paymentMethod: paymentMethodDetails, reference, returnUrl: "https://your-company.com/...", - enableRecurring: true, - enableOneClick: true, shopperReference: "shopperReference", storePaymentMethod: true }; diff --git a/src/client.ts b/src/client.ts index 27513be..240ab0b 100644 --- a/src/client.ts +++ b/src/client.ts @@ -52,6 +52,7 @@ class Client { public static HPP_LIVE = "https://live.adyen.com/hpp"; public static MARKETPAY_ENDPOINT_TEST = "https://cal-test.adyen.com/cal/services"; public static MARKETPAY_ENDPOINT_LIVE = "https://cal-live.adyen.com/cal/services"; + public static CHECKOUT_API_VERSION = "v66"; public static API_VERSION = "v64"; public static RECURRING_API_VERSION = "v49"; public static MARKETPAY_ACCOUNT_API_VERSION = "v6"; @@ -63,7 +64,6 @@ class Client { public static LIB_VERSION: string = version; public static CHECKOUT_ENDPOINT_TEST = "https://checkout-test.adyen.com/checkout"; public static CHECKOUT_ENDPOINT_LIVE_SUFFIX = "-checkout-live.adyenpayments.com/checkout"; - public static CHECKOUT_API_VERSION = "v64"; public static BIN_LOOKUP_PAL_SUFFIX = "/pal/servlet/BinLookup/"; public static BIN_LOOKUP_API_VERSION = "v50"; public static TERMINAL_API_ENDPOINT_TEST = "https://terminal-api-test.adyen.com"; From 66bfceceec455482903f581be08e3382ec2f0d64 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Feb 2021 10:45:13 +0100 Subject: [PATCH 15/45] Bump nock from 13.0.6 to 13.0.7 (#632) Bumps [nock](https://github.com/nock/nock) from 13.0.6 to 13.0.7. - [Release notes](https://github.com/nock/nock/releases) - [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md) - [Commits](https://github.com/nock/nock/compare/v13.0.6...v13.0.7) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marcos Garcia --- package-lock.json | 8 ++++---- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 010a6ae..57b9424 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@adyen/api-library", - "version": "6.0.3", + "version": "7.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -4814,9 +4814,9 @@ "dev": true }, "nock": { - "version": "13.0.6", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.0.6.tgz", - "integrity": "sha512-W81UZ1Tv21SWDZcA8Lu9LXYVl2gO9ADY5GadC6gFV9690h4TXz0oCkEoMckN/sPMHkDA79Ka9dXga9Mt1+j+Sg==", + "version": "13.0.7", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.0.7.tgz", + "integrity": "sha512-WBz73VYIjdbO6BwmXODRQLtn7B5tldA9pNpWJe5QTtTEscQlY5KXU4srnGzBOK2fWakkXj69gfTnXGzmrsaRWw==", "dev": true, "requires": { "debug": "^4.1.0", diff --git a/package.json b/package.json index 5ee95b0..38617f8 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "jest-ts-auto-mock": "^1.0.11", "kind-of": "^6.0.3", "minimist": ">=1.2.3", - "nock": "13.0.6", + "nock": "13.0.7", "release-it": "14.2.2", "ts-auto-mock": "^2.6.5", "ts-jest": "25.5.1", diff --git a/yarn.lock b/yarn.lock index f40b1ef..b60955d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3701,10 +3701,10 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nock@*, nock@13.0.6: - version "13.0.6" - resolved "https://registry.yarnpkg.com/nock/-/nock-13.0.6.tgz#9f90573ea6e84883b94eeac374d1c73460afed56" - integrity sha512-W81UZ1Tv21SWDZcA8Lu9LXYVl2gO9ADY5GadC6gFV9690h4TXz0oCkEoMckN/sPMHkDA79Ka9dXga9Mt1+j+Sg== +nock@*, nock@13.0.7: + version "13.0.7" + resolved "https://registry.yarnpkg.com/nock/-/nock-13.0.7.tgz#9bc718c66bd0862dfa14601a9ba678a406127910" + integrity sha512-WBz73VYIjdbO6BwmXODRQLtn7B5tldA9pNpWJe5QTtTEscQlY5KXU4srnGzBOK2fWakkXj69gfTnXGzmrsaRWw== dependencies: debug "^4.1.0" json-stringify-safe "^5.0.1" From a201f7e59ae137caca6bed8d1b96daf1aaba5151 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Feb 2021 15:12:15 +0100 Subject: [PATCH 16/45] Bump typescript from 3.9.7 to 3.9.9 (#641) Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.7 to 3.9.9. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v3.9.7...v3.9.9) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 57b9424..294cca7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7082,9 +7082,9 @@ } }, "typescript": { - "version": "3.9.7", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", - "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", "dev": true }, "union-value": { diff --git a/package.json b/package.json index 38617f8..1b96065 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "ts-jest": "25.5.1", "ts-loader": "8.0.10", "ttypescript": "^1.5.10", - "typescript": "3.9.7" + "typescript": "3.9.9" }, "dependencies": { "https-proxy-agent": "5.0.0" diff --git a/yarn.lock b/yarn.lock index b60955d..83d3df0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5106,10 +5106,10 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript@3.9.7: - version "3.9.7" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" - integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== +typescript@3.9.9: + version "3.9.9" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.9.tgz#e69905c54bc0681d0518bd4d587cc6f2d0b1a674" + integrity sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w== union-value@^1.0.0: version "1.0.1" From 31437be75d48d83088e25fe3615095a35a21b7cc Mon Sep 17 00:00:00 2001 From: Ricardo Ambrogi Date: Thu, 25 Feb 2021 08:04:13 +0100 Subject: [PATCH 17/45] Update dependabot.yml --- .github/dependabot.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7921071..7f7f7e6 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,4 +7,9 @@ updates: time: "04:00" open-pull-requests-limit: 10 reviewers: - - KadoBOT + - zaiddreakh + maassenbas + msilvagarcia + AlexandrosMor + peterojo + From 033b5628f1dd47738688ff7f6ae177c093c6fbb6 Mon Sep 17 00:00:00 2001 From: Ricardo Ambrogi Date: Sat, 13 Mar 2021 08:16:33 +0100 Subject: [PATCH 18/45] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index cfc7dbf..5479569 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -3,7 +3,7 @@ name: Bug report about: Create a report to help us improve title: '[BUG]' labels: 'bug' -assignees: 'KadoBOT' +assignees: '' --- From 54edffa5e3f426c3c536dca9fe2de34829087e48 Mon Sep 17 00:00:00 2001 From: Ricardo Ambrogi Date: Thu, 25 Mar 2021 09:36:36 +0100 Subject: [PATCH 19/45] Update feature_request.md --- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index c22638d..a7e03ba 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -3,7 +3,7 @@ name: Feature request about: Suggest an idea for this project title: '[FEATURE]' labels: 'feature' -assignees: 'KadoBOT' +assignees: '' --- From 4a3fb1b2bb0e13e451e913c5be75e8eb65d9d20b Mon Sep 17 00:00:00 2001 From: wouterboe Date: Mon, 19 Apr 2021 17:13:41 +0200 Subject: [PATCH 20/45] implemented timing safe hmac comparison --- src/security/nexoCrypto.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/security/nexoCrypto.ts b/src/security/nexoCrypto.ts index 730c6ed..f24d843 100644 --- a/src/security/nexoCrypto.ts +++ b/src/security/nexoCrypto.ts @@ -17,7 +17,7 @@ * See the LICENSE file for more info. */ -import { Cipher, createCipheriv, createDecipheriv, createHmac, randomBytes } from "crypto"; +import { Cipher, createCipheriv, createDecipheriv, createHmac, randomBytes, timingSafeEqual } from "crypto"; import NexoCryptoException from "../services/exception/nexoCryptoException"; import { MessageHeader, @@ -115,9 +115,7 @@ class NexoCrypto { private validateHmac(receivedHmac: Buffer, decryptedMessage: Buffer, derivedKey: NexoDerivedKey): void { const hmac = NexoCrypto.hmac(decryptedMessage, derivedKey); - const isValid = hmac.every((item, index): boolean => item === receivedHmac[index]); - - if (!isValid) { + if (!timingSafeEqual(hmac, receivedHmac)) { throw new NexoCryptoException("Hmac validation failed"); } } From b61624b392a52532f9180b5ed511dfd0e032f501 Mon Sep 17 00:00:00 2001 From: wouterboe Date: Tue, 20 Apr 2021 13:23:17 +0200 Subject: [PATCH 21/45] overwritten develop with current master source --- src/__tests__/binLookup.spec.ts | 8 +- src/__tests__/checkout.spec.ts | 34 +-- src/__tests__/httpClient.spec.ts | 2 +- src/__tests__/payout.spec.ts | 38 +-- src/__tests__/platforms.spec.ts | 64 ++--- src/__tests__/recurring.spec.ts | 8 +- src/helpers/getJsonResponse.ts | 10 +- src/httpClient/clientInterface.ts | 1 + src/httpClient/httpURLConnectionClient.ts | 14 +- src/services/binLookup.ts | 23 +- src/services/checkout.ts | 135 +++++++++- src/services/index.ts | 2 +- src/services/modification.ts | 96 ++++++- src/services/payout.ts | 91 +++++++ src/services/payouts.ts | 48 ---- src/services/platforms.ts | 245 +++++++++--------- src/services/recurring.ts | 34 ++- src/services/resource.ts | 9 +- .../resource/binLookup/get3dsAvailability.ts | 8 - .../resource/binLookup/getCostEstimate.ts | 8 - src/services/resource/checkout/orders.ts | 14 - .../resource/checkout/ordersCancel.ts | 8 - src/services/resource/checkout/originKeys.ts | 9 - .../resource/checkout/paymentLinks.ts | 26 -- .../resource/checkout/paymentLinksId.ts | 40 +++ .../resource/checkout/paymentMethods.ts | 14 - .../checkout/paymentMethodsBalance.ts | 9 - .../resource/checkout/paymentSession.ts | 13 - src/services/resource/checkout/payments.ts | 19 -- .../resource/checkout/paymentsDetails.ts | 11 - .../resource/checkout/paymentsResult.ts | 9 - .../modification/adjustAuthorisation.ts | 15 -- src/services/resource/modification/cancel.ts | 15 -- .../resource/modification/cancelOrRefund.ts | 16 -- src/services/resource/modification/capture.ts | 15 -- src/services/resource/modification/refund.ts | 15 -- .../resource/modification/technicalCancel.ts | 15 -- .../resource/payout/confirmThirdParty.ts | 8 - .../resource/payout/declineThirdParty.ts | 8 - src/services/resource/payout/payout.ts | 8 - src/services/resource/payout/storeDetail.ts | 9 - .../payout/storeDetailAndSubmitThirdParty.ts | 9 - .../resource/payout/submitThirdParty.ts | 8 - src/services/resource/recurring/disable.ts | 9 - .../recurring/listRecurringDetails.ts | 9 - .../recurring/scheduleAccountUpdater.ts | 8 - src/services/terminalCloudAPI.ts | 4 +- src/services/terminalLocalAPI.ts | 2 +- src/typings/HTTPMethod.ts | 53 ---- src/typings/genericRequest.ts | 4 - src/typings/requestOptions.ts | 1 - 51 files changed, 606 insertions(+), 675 deletions(-) create mode 100644 src/services/payout.ts delete mode 100644 src/services/payouts.ts create mode 100644 src/services/resource/checkout/paymentLinksId.ts delete mode 100644 src/typings/HTTPMethod.ts delete mode 100644 src/typings/genericRequest.ts diff --git a/src/__tests__/binLookup.spec.ts b/src/__tests__/binLookup.spec.ts index 5d10245..190e0fd 100644 --- a/src/__tests__/binLookup.spec.ts +++ b/src/__tests__/binLookup.spec.ts @@ -60,7 +60,7 @@ describe("Bin Lookup", function (): void { scope.post("/get3dsAvailability") .reply(200, threeDSAvailabilitySuccess); - const response = await binLookup.get3dsAvailability.post(threeDSAvailabilityRequest); + const response = await binLookup.get3dsAvailability(threeDSAvailabilityRequest); expect(response).toEqual(threeDSAvailabilitySuccess); }); @@ -77,7 +77,7 @@ describe("Bin Lookup", function (): void { .reply(403, JSON.stringify({status: 403, message: "fail", errorCode: "171"})); try { - await binLookup.get3dsAvailability.post(threeDSAvailabilityRequest as unknown as IBinLookup.ThreeDSAvailabilityRequest); + await binLookup.get3dsAvailability(threeDSAvailabilityRequest as unknown as IBinLookup.ThreeDSAvailabilityRequest); fail("Expected request to fail"); } catch (e) { expect(e instanceof HttpClientException).toBeTruthy(); @@ -113,8 +113,8 @@ describe("Bin Lookup", function (): void { scope.post("/getCostEstimate") .reply(200, expected); - const response = await binLookup.getCostEstimate.post(costEstimateRequest); + const response = await binLookup.getCostEstimate(costEstimateRequest); expect(response).toEqual(expected); }); -}); +}); \ No newline at end of file diff --git a/src/__tests__/checkout.spec.ts b/src/__tests__/checkout.spec.ts index e5bf7ea..c4c7960 100644 --- a/src/__tests__/checkout.spec.ts +++ b/src/__tests__/checkout.spec.ts @@ -148,7 +148,7 @@ describe("Checkout", (): void => { .reply(200, paymentsSuccess); const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest(); - const paymentsResponse: ICheckout.PaymentResponse = await checkout.payments.post(paymentsRequest); + const paymentsResponse: ICheckout.PaymentResponse = await checkout.payments(paymentsRequest); expect(paymentsResponse.pspReference).toBeTruthy(); }); @@ -159,7 +159,7 @@ describe("Checkout", (): void => { .reply(401); const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest(); - await checkout.payments.post(paymentsRequest); + await checkout.payments(paymentsRequest); } catch (e) { expect(e instanceof HttpClientException).toBeTruthy(); } @@ -172,7 +172,7 @@ describe("Checkout", (): void => { scope.post("/paymentMethods") .reply(200, paymentMethodsSuccess); - const paymentMethodsResponse = await checkout.paymentMethods.post(paymentMethodsRequest); + const paymentMethodsResponse = await checkout.paymentMethods(paymentMethodsRequest); if (paymentMethodsResponse && paymentMethodsResponse.paymentMethods) { expect(paymentMethodsResponse.paymentMethods.length).toBeGreaterThan(0); } else { @@ -187,7 +187,7 @@ describe("Checkout", (): void => { scope.post("/paymentLinks").reply(200, paymentLinkSuccess); - const paymentSuccessLinkResponse = await checkout.paymentLinks.post(createPaymentLinkRequest()); + const paymentSuccessLinkResponse = await checkout.paymentLinks(createPaymentLinkRequest()); expect(paymentSuccessLinkResponse).toBeTruthy(); }); @@ -198,10 +198,10 @@ describe("Checkout", (): void => { scope.post("/paymentLinks").reply(200, paymentLinkSuccess); - const paymentSuccessLinkResponse = await checkout.paymentLinks.post(createPaymentLinkRequest()); + const paymentSuccessLinkResponse = await checkout.paymentLinks(createPaymentLinkRequest()); scope.get(`/paymentLinks/${paymentSuccessLinkResponse.id}`).reply(200, paymentLinkSuccess); - const paymentLink = await checkout.paymentLinks.get({ id: paymentSuccessLinkResponse.id }); + const paymentLink = await checkout.getPaymentLinks(paymentSuccessLinkResponse.id); expect(paymentLink).toBeTruthy(); }); @@ -212,10 +212,10 @@ describe("Checkout", (): void => { scope.post("/paymentLinks").reply(200, paymentLinkSuccess); - const paymentSuccessLinkResponse = await checkout.paymentLinks.post(createPaymentLinkRequest()); + const paymentSuccessLinkResponse = await checkout.paymentLinks(createPaymentLinkRequest()); scope.patch(`/paymentLinks/${paymentSuccessLinkResponse.id}`).reply(200, { ...paymentLinkSuccess, status: "expired" }); - const paymentLink = await checkout.paymentLinks.patch({ id: paymentSuccessLinkResponse.id, status: "expired" }); + const paymentLink = await checkout.updatePaymentLinks(paymentSuccessLinkResponse.id, "expired"); expect(paymentLink.status).toEqual("expired"); }); @@ -224,7 +224,7 @@ describe("Checkout", (): void => { scope.post("/payments/details") .reply(200, paymentDetailsSuccess); - const paymentsResponse = await checkout.payments.details.post(createPaymentsDetailsRequest()); + const paymentsResponse = await checkout.paymentsDetails(createPaymentsDetailsRequest()); expect(paymentsResponse.resultCode).toEqual("Authorised"); }); @@ -233,7 +233,7 @@ describe("Checkout", (): void => { scope.post("/paymentSession") .reply(200, paymentSessionSuccess); const paymentSessionRequest: ICheckout.PaymentSetupRequest = createPaymentSessionRequest(); - const paymentSessionResponse = await checkout.paymentSession.post(paymentSessionRequest); + const paymentSessionResponse = await checkout.paymentSession(paymentSessionRequest); expect(paymentSessionResponse.paymentSession).not.toBeUndefined(); }); @@ -244,7 +244,7 @@ describe("Checkout", (): void => { const paymentResultRequest: ICheckout.PaymentVerificationRequest = { payload: "This is a test payload", }; - const paymentResultResponse = await checkout.payments.result.post(paymentResultRequest); + const paymentResultResponse = await checkout.paymentResult(paymentResultRequest); expect(paymentResultResponse.resultCode).toEqual("Authorised"); }); @@ -266,7 +266,7 @@ describe("Checkout", (): void => { .reply(200, paymentsResultMultibancoSuccess); const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest(); - const paymentsResponse: ICheckout.PaymentResponse = await checkout.payments.post(paymentsRequest); + const paymentsResponse: ICheckout.PaymentResponse = await checkout.payments(paymentsRequest); expect(paymentsResponse.pspReference).toBeTruthy(); expect(paymentsResponse.additionalData).toBeTruthy(); @@ -283,7 +283,7 @@ describe("Checkout", (): void => { .post(`/${Client.CHECKOUT_API_VERSION}/originKeys`) .reply(200, originKeysSuccess); - const originKeysResponse = await checkoutUtility.originKeys.post(originKeysRequest); + const originKeysResponse = await checkoutUtility.originKeys(originKeysRequest); if (originKeysResponse.originKeys) { return expect(originKeysResponse.originKeys["https://www.your-domain.com"].startsWith("pub.v2")).toBeTruthy(); } @@ -304,7 +304,7 @@ describe("Checkout", (): void => { scope.post("/paymentMethods/balance") .reply(200, paymentMethodsBalanceResponse); - const paymentsResponse: ICheckout.CheckoutBalanceCheckResponse = await checkout.paymentMethods.balance.post(paymentMethodsRequest); + const paymentsResponse: ICheckout.CheckoutBalanceCheckResponse = await checkout.paymentMethodsBalance(paymentMethodsRequest); expect(paymentsResponse.balance.value).toEqual(1000); }); @@ -321,7 +321,7 @@ describe("Checkout", (): void => { scope.post("/orders") .reply(200, orderResponse); - const response: ICheckout.CheckoutCreateOrderResponse = await checkout.orders.post(orderRequest); + const response: ICheckout.CheckoutCreateOrderResponse = await checkout.orders(orderRequest); expect(response).toBeTruthy(); }); @@ -338,7 +338,7 @@ describe("Checkout", (): void => { scope.post("/orders") .reply(200, orderResponse); - const createOrderResponse: ICheckout.CheckoutCreateOrderResponse = await checkout.orders.post(orderRequest); + const createOrderResponse: ICheckout.CheckoutCreateOrderResponse = await checkout.orders(orderRequest); const orderCancelResponse: ICheckout.CheckoutCancelOrderResponse = { pspReference: "mocked_psp_ref", @@ -347,7 +347,7 @@ describe("Checkout", (): void => { scope.post("/orders/cancel") .reply(200, orderCancelResponse); - const response: ICheckout.CheckoutCancelOrderResponse = await checkout.orders.cancel.post({ + const response: ICheckout.CheckoutCancelOrderResponse = await checkout.ordersCancel({ order: { orderData: createOrderResponse.orderData, pspReference: createOrderResponse.pspReference! diff --git a/src/__tests__/httpClient.spec.ts b/src/__tests__/httpClient.spec.ts index fb8f231..c399272 100644 --- a/src/__tests__/httpClient.spec.ts +++ b/src/__tests__/httpClient.spec.ts @@ -41,7 +41,7 @@ const getResponse = async ({apiKey , environment }: { apiKey: string; environmen const ErrorException = errorType === "ApiException" ? ApiException : HttpClientException; try { - await checkout.payments.post(createPaymentsCheckoutRequest()); + await checkout.payments(createPaymentsCheckoutRequest()); fail("request should fail"); } catch (e) { expect(e instanceof ErrorException).toBeTruthy(); diff --git a/src/__tests__/payout.spec.ts b/src/__tests__/payout.spec.ts index 3a59a7f..072fbba 100644 --- a/src/__tests__/payout.spec.ts +++ b/src/__tests__/payout.spec.ts @@ -19,7 +19,7 @@ import nock from "nock"; import { createClient } from "../__mocks__/base"; -import Payouts from "../services/payouts"; +import Payout from "../services/payout"; import Client from "../client"; import StoreDetailRequest = IPayouts.StoreDetailRequest; import { ApiConstants } from "../constants/apiConstants"; @@ -102,7 +102,7 @@ const mockPayoutRequest = (merchantAccount: string = process.env.ADYEN_MERCHANT! let client: Client; let clientStore: Client; let clientReview: Client; -let payouts: Payouts; +let payout: Payout; let scope: nock.Scope; beforeEach((): void => { @@ -113,7 +113,7 @@ beforeEach((): void => { clientStore = createClient(process.env.ADYEN_STOREPAYOUT_APIKEY); clientReview = createClient(process.env.ADYEN_REVIEWPAYOUT_APIKEY); scope = nock(`${client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}`); - payouts = new Payouts(client); + payout = new Payout(client); }); afterEach((): void => { @@ -123,21 +123,21 @@ afterEach((): void => { describe("PayoutTest", function (): void { test.each([isCI, true])("should succeed on store detail and submit third party, isMock: %p", async function (isMock): Promise { !isMock && nock.restore(); - payouts = new Payouts(clientStore); + payout = new Payout(clientStore); const request: IPayouts.StoreDetailAndSubmitRequest = mockStoreDetailAndSubmitRequest(); scope.post("/storeDetailAndSubmitThirdParty").reply(200, storeDetailAndSubmitThirdParty); - const result = await payouts.storeDetailAndSubmitThirdParty.post(request); + const result = await payout.storeDetailAndSubmitThirdParty(request); expect(result.resultCode).toEqual("[payout-submit-received]"); expect(result.pspReference).toBeTruthy(); }); test.each([false, true])("should succeed on store detail, isMock: %p", async function (isMock): Promise { !isMock && nock.restore(); - payouts = new Payouts(clientStore); + payout = new Payout(clientStore); scope.post("/storeDetail").reply(200, storeDetail); const request: StoreDetailRequest = mockStoreDetailRequest(); - const result = await payouts.storeDetail.post(request); + const result = await payout.storeDetail(request); expect("Success").toEqual(result.resultCode); expect(result.pspReference).toBeTruthy(); @@ -146,12 +146,12 @@ describe("PayoutTest", function (): void { test.each([isCI, true])("should succeed on confirm third party, isMock: %p", async function (isMock): Promise { !isMock && nock.restore(); - payouts = new Payouts(clientStore); + payout = new Payout(clientStore); scope.post("/storeDetail").reply(200, storeDetail); const storeRequest: StoreDetailRequest = mockStoreDetailRequest(); - const storeResult = await payouts.storeDetail.post(storeRequest); + const storeResult = await payout.storeDetail(storeRequest); - payouts = new Payouts(clientReview); + payout = new Payout(clientReview); scope.post("/confirmThirdParty") .reply(200, { pspReference: "8815131762537886", @@ -162,7 +162,7 @@ describe("PayoutTest", function (): void { merchantAccount: process.env.ADYEN_MERCHANT!, originalReference: storeResult.pspReference }; - const result = await payouts.confirmThirdParty.post(request); + const result = await payout.confirmThirdParty(request); expect(result.response).toEqual("[payout-confirm-received]"); expect(result.pspReference).toBeTruthy(); @@ -170,11 +170,11 @@ describe("PayoutTest", function (): void { test.each([isCI, true])("should succeed on submit third party, isMock: %p", async function (isMock): Promise { !isMock && nock.restore(); - payouts = new Payouts(clientStore); + payout = new Payout(clientStore); scope.post("/submitThirdParty").reply(200, storeDetailAndSubmitThirdParty); const request: IPayouts.SubmitRequest = mockSubmitRequest(); - const result = await payouts.submitThirdParty.post(request); + const result = await payout.submitThirdparty(request); expect(result.resultCode).toEqual("[payout-submit-received]"); expect(result.pspReference).toBeTruthy(); @@ -187,12 +187,12 @@ describe("PayoutTest", function (): void { test.each([false, true])("should succeed on decline third party, isMock: %p", async function (isMock): Promise { !isMock && nock.restore(); - payouts = new Payouts(clientStore); + payout = new Payout(clientStore); scope.post("/storeDetail").reply(200, storeDetail); const storeRequest: StoreDetailRequest = mockStoreDetailRequest(); - const storeResult = await payouts.storeDetail.post(storeRequest); + const storeResult = await payout.storeDetail(storeRequest); - payouts = new Payouts(clientReview); + payout = new Payout(clientReview); const request: IPayouts.ModifyRequest = { merchantAccount: process.env.ADYEN_MERCHANT!, originalReference: storeResult.pspReference @@ -202,7 +202,7 @@ describe("PayoutTest", function (): void { pspReference: "8815131762537886", response: "[payout-decline-received]" }); - const result = await payouts.declineThirdParty.post(request); + const result = await payout.declineThirdParty(request); expect(result.response).toEqual("[payout-decline-received]"); expect(result.pspReference).toBeTruthy(); @@ -216,9 +216,9 @@ describe("PayoutTest", function (): void { }); const request = mockPayoutRequest(); - const result = await payouts.payout.post(request); + const result = await payout.payout(request); expect(result.resultCode).toEqual("Received"); expect(result.pspReference).toBeTruthy(); }); -}); +}); \ No newline at end of file diff --git a/src/__tests__/platforms.spec.ts b/src/__tests__/platforms.spec.ts index 7978c39..c88b23b 100644 --- a/src/__tests__/platforms.spec.ts +++ b/src/__tests__/platforms.spec.ts @@ -121,7 +121,7 @@ describe("Platforms Test", function () { async (...args) => { const service = platforms.Account; scope.post(`/Account/${Client.MARKETPAY_ACCOUNT_API_VERSION}//${args[0]}`).reply(200, args[2]); - const result = await service[args[0] as string].post(args[1] as never); + const result = await service[args[0] as string](args[1] as never); expect(result).toMatchObject(args[2]); } ); @@ -144,7 +144,7 @@ describe("Platforms Test", function () { const fund = platforms.Fund; scope.post(`/Fund/${Client.MARKETPAY_FUND_API_VERSION}//${args[0]}`).reply(200, args[2]); - const result = await fund[args[0] as string].post(args[1] as never); + const result = await fund[args[0] as string](args[1] as never); expect(result).toMatchObject(args[2]); } ); @@ -166,7 +166,7 @@ describe("Platforms Test", function () { const notificationConfiguration = platforms.NotificationConfiguration; scope.post(`/Notification/${Client.MARKETPAY_NOTIFICATION_CONFIGURATION_API_VERSION}//${args[0]}`).reply(200, args[2]); - const result = await notificationConfiguration[args[0] as string].post(args[1] as never); + const result = await notificationConfiguration[args[0] as string](args[1] as never); expect(result).toMatchObject(args[2]); } ); @@ -182,7 +182,7 @@ describe("Platforms Test", function () { const hostedOnboardingPage = platforms.HostedOnboardingPage; scope.post(`/Hop/${Client.MARKETPAY_HOP_API_VERSION}//${args[0]}`).reply(200, args[2]); - const result = await hostedOnboardingPage[args[0] as string].post(args[1] as never); + const result = await hostedOnboardingPage[args[0] as string](args[1] as never); expect(result).toMatchObject(args[2]); } ); @@ -191,46 +191,46 @@ describe("Platforms Test", function () { describe.skip("Platforms Test E2E", function(): void { beforeAll(async (done) => { - accountHolder = await platforms.Account.createAccountHolder.post({ + accountHolder = await platforms.Account.createAccountHolder({ accountHolderCode: generateRandomCode(), accountHolderDetails, legalEntity: "Individual", }); - account = await platforms.Account.createAccount.post({ + account = await platforms.Account.createAccount({ accountHolderCode: generateRandomCode(), description: "This is a new account", metadata: {meta: "data"}, payoutSchedule: "WEEKLY" }); - accountHolderToSuspend = await platforms.Account.createAccountHolder.post({ + accountHolderToSuspend = await platforms.Account.createAccountHolder({ accountHolderCode: generateRandomCode(), accountHolderDetails, legalEntity: "Individual" }); - accountToClose = await platforms.Account.createAccount.post({ + accountToClose = await platforms.Account.createAccount({ accountHolderCode: generateRandomCode(), description: "This is a new account", metadata: {meta: "data"}, payoutSchedule: "WEEKLY" }); - accountHolderToUnSuspend = await platforms.Account.createAccountHolder.post({ + accountHolderToUnSuspend = await platforms.Account.createAccountHolder({ accountHolderCode: generateRandomCode(), accountHolderDetails, legalEntity: "Individual" }); - await platforms.Account.suspendAccountHolder.post({ accountHolderCode: accountHolderToUnSuspend.accountHolderCode}); + await platforms.Account.suspendAccountHolder({ accountHolderCode: accountHolderToUnSuspend.accountHolderCode}); - accountHolderToClose = await platforms.Account.createAccountHolder.post({ + accountHolderToClose = await platforms.Account.createAccountHolder({ accountHolderCode: generateRandomCode(), accountHolderDetails, legalEntity: "Individual" }); - notificationConfigurationToRetrieve = await platforms.NotificationConfiguration.createNotificationConfiguration.post({ + notificationConfigurationToRetrieve = await platforms.NotificationConfiguration.createNotificationConfiguration({ configurationDetails: { ...notificationConfigurationDetails, description: `${generateRandomCode()}` @@ -252,7 +252,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should get account holder", async function() { nock.restore(); try { - const result = await platforms.Account.getAccountHolder.post({ + const result = await platforms.Account.getAccountHolder({ accountHolderCode: accountHolder.accountHolderCode, }); expect(result.accountHolderDetails.email).toEqual("random_email@example.com"); @@ -264,7 +264,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should update account holder", async function() { nock.restore(); try { - const result = await platforms.Account.updateAccountHolder.post({ + const result = await platforms.Account.updateAccountHolder({ accountHolderCode: accountHolder.accountHolderCode, accountHolderDetails: { ...accountHolderDetails, @@ -282,7 +282,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should check account holder", async function() { nock.restore(); try { - const result = await platforms.Account.checkAccountHolder.post({ + const result = await platforms.Account.checkAccountHolder({ accountHolderCode: accountHolder.accountHolderCode, accountStateType: "Processing", tier: 2 @@ -305,7 +305,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should upload verification document", async function() { nock.restore(); try { - const result = await platforms.Account.uploadDocument.post({ + const result = await platforms.Account.uploadDocument({ documentContent, documentDetail: { accountHolderCode: account.accountHolderCode, @@ -323,7 +323,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should get uploaded verification documents", async function() { nock.restore(); try { - await platforms.Account.uploadDocument.post({ + await platforms.Account.uploadDocument({ documentContent, documentDetail: { accountHolderCode: account.accountHolderCode, @@ -332,7 +332,7 @@ describe.skip("Platforms Test E2E", function(): void { filename: "IDCardFront.png" } }); - const result = await platforms.Account.getUploadedDocuments.post({ + const result = await platforms.Account.getUploadedDocuments({ accountHolderCode: account.accountHolderCode, }); expect(result.documentDetails![0].filename).toEqual("IDCardFront.png"); @@ -344,7 +344,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should close account", async function() { nock.restore(); try { - const result = await platforms.Account.closeAccount.post({ + const result = await platforms.Account.closeAccount({ accountCode: accountToClose.accountCode }); expect(result.status).toEqual("Closed"); @@ -356,7 +356,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should suspend account holder", async function() { nock.restore(); try { - const result = await platforms.Account.suspendAccountHolder.post({ + const result = await platforms.Account.suspendAccountHolder({ accountHolderCode: accountHolderToSuspend.accountHolderCode, }); expect(result.pspReference).toBeDefined(); @@ -368,7 +368,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should unsuspend account holder", async function() { nock.restore(); try { - const result = await platforms.Account.unSuspendAccountHolder.post({ accountHolderCode: accountHolderToUnSuspend.accountHolderCode }); + const result = await platforms.Account.unSuspendAccountHolder({ accountHolderCode: accountHolderToUnSuspend.accountHolderCode }); expect(result.pspReference).toBeDefined(); } catch (e) { assertError(e); @@ -378,7 +378,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should update account holder state", async function() { nock.restore(); try { - const result = await platforms.Account.updateAccountHolderState.post({ + const result = await platforms.Account.updateAccountHolderState({ accountHolderCode: accountHolder.accountHolderCode, disable: false, stateType: "Payout" @@ -392,7 +392,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should close account holder", async function() { nock.restore(); try { - const result = await platforms.Account.closeAccountHolder.post({ + const result = await platforms.Account.closeAccountHolder({ accountHolderCode: accountHolderToClose.accountHolderCode }); expect(result.pspReference).toBeDefined(); @@ -408,7 +408,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should retrieve the balance of an account holder", async function() { nock.restore(); try { - const result = await platforms.Fund.accountHolderBalance.post({ + const result = await platforms.Fund.accountHolderBalance({ accountHolderCode: generateRandomCode() }); expect(result.balancePerAccount![0].detailBalance).toBeDefined(); @@ -420,7 +420,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should retrieve a list of transaction for an account holder's accounts", async function() { nock.restore(); try { - const result = await platforms.Fund.accountHolderTransactionList.post({ + const result = await platforms.Fund.accountHolderTransactionList({ accountHolderCode: generateRandomCode() }); expect(result.accountTransactionLists![0].transactions).toBeDefined(); @@ -432,7 +432,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should transfer funds between two accounts", async function() { nock.restore(); try { - const result = await platforms.Fund.transferFunds.post({ + const result = await platforms.Fund.transferFunds({ sourceAccountCode: "8515883280985939", destinationAccountCode: "8815883278206345", amount: { @@ -454,7 +454,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should retrieve all Notification Configurations", async function() { nock.restore(); try { - const result = await platforms.NotificationConfiguration.getNotificationConfigurationList.post({}); + const result = await platforms.NotificationConfiguration.getNotificationConfigurationList({}); const resultStr = JSON.stringify(result); expect(resultStr.includes("pspReference")).toBeTruthy(); } catch (e) { @@ -465,7 +465,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should create a Notification Configuration", async function() { nock.restore(); try { - const result = await platforms.NotificationConfiguration.createNotificationConfiguration.post({ + const result = await platforms.NotificationConfiguration.createNotificationConfiguration({ configurationDetails: { ...notificationConfigurationDetails, description: `${generateRandomCode()}` @@ -481,7 +481,7 @@ describe.skip("Platforms Test E2E", function(): void { nock.restore(); try { configurationID = notificationConfigurationToRetrieve.configurationDetails.notificationId!; - const result = await platforms.NotificationConfiguration.getNotificationConfiguration.post({ + const result = await platforms.NotificationConfiguration.getNotificationConfiguration({ notificationId: configurationID }); expect(result.configurationDetails.notifyURL).toEqual("https://www.adyen.com/notification-handler"); @@ -493,7 +493,7 @@ describe.skip("Platforms Test E2E", function(): void { it("should update a Notification Configuration", async function() { nock.restore(); try { - const result = await platforms.NotificationConfiguration.updateNotificationConfiguration.post({ + const result = await platforms.NotificationConfiguration.updateNotificationConfiguration({ configurationDetails: { eventConfigs: [ { @@ -521,7 +521,7 @@ describe.skip("Platforms Test E2E", function(): void { const notificationIds = []; notificationIds.push(configurationID); try { - const result = await platforms.NotificationConfiguration.deleteNotificationConfigurations.post({notificationIds}); + const result = await platforms.NotificationConfiguration.deleteNotificationConfigurations({notificationIds}); expect(result.pspReference).toBeDefined(); } catch (e) { assertError(e); @@ -529,4 +529,4 @@ describe.skip("Platforms Test E2E", function(): void { }); }); -}); +}); \ No newline at end of file diff --git a/src/__tests__/recurring.spec.ts b/src/__tests__/recurring.spec.ts index 0da8144..5803cbe 100644 --- a/src/__tests__/recurring.spec.ts +++ b/src/__tests__/recurring.spec.ts @@ -63,7 +63,7 @@ describe("Recurring", (): void => { const request = createRecurringDetailsRequest(); try { - const result = await recurring.listRecurringDetails.post(request); + const result = await recurring.listRecurringDetails(request); expect(result).toBeTruthy(); } catch (e) { fail(e.message); @@ -76,7 +76,7 @@ describe("Recurring", (): void => { .reply(200, paymentsSuccess); const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest(); - const res = await checkout.payments.post(paymentsRequest); + const res = await checkout.payments(paymentsRequest); scope.post("/disable") .reply(200, disableSuccess); @@ -88,7 +88,7 @@ describe("Recurring", (): void => { }; try { - const result = await recurring.disable.post(request); + const result = await recurring.disable(request); expect(result).toBeTruthy(); } catch (e) { fail(e.message); @@ -119,7 +119,7 @@ describe("Recurring", (): void => { }; try { - const result = await recurring.scheduleAccountUpdater.post(request); + const result = await recurring.scheduleAccountUpdater(request); expect(result).toBeTruthy(); } catch (e) { fail(e.message); diff --git a/src/helpers/getJsonResponse.ts b/src/helpers/getJsonResponse.ts index eecbe48..c8e8ca6 100644 --- a/src/helpers/getJsonResponse.ts +++ b/src/helpers/getJsonResponse.ts @@ -22,16 +22,16 @@ import HttpClientException from "../httpClient/httpClientException"; import ApiException from "../services/exception/apiException"; import { IRequest } from "../typings/requestOptions"; -async function getJsonResponse(this: Resource, jsonRequest: T | string, requestOptions?: IRequest.Options): Promise; -async function getJsonResponse(this: Resource, jsonRequest: T | string, requestOptions?: IRequest.Options): Promise; +async function getJsonResponse(resource: Resource, jsonRequest: T | string, requestOptions?: IRequest.Options): Promise; +async function getJsonResponse(resource: Resource, jsonRequest: T | string, requestOptions?: IRequest.Options): Promise; -async function getJsonResponse ( - this: Resource, +async function getJsonResponse( + resource: Resource, jsonRequest: T | string, requestOptions: IRequest.Options = {}, ): Promise { const request = typeof jsonRequest === "string" ? jsonRequest : JSON.stringify(jsonRequest); - const response = await this.request(request, requestOptions); + const response = await resource.request(request, requestOptions); try { return typeof response === "string" ? JSON.parse(response) : response; } catch (e) { diff --git a/src/httpClient/clientInterface.ts b/src/httpClient/clientInterface.ts index 275a4e9..0bf05d4 100644 --- a/src/httpClient/clientInterface.ts +++ b/src/httpClient/clientInterface.ts @@ -26,6 +26,7 @@ interface ClientInterface { request( endpoint: string, json: string, config: Config, isApiKeyRequired: boolean, requestOptions?: IRequest.Options, ): Promise; + post(endpoint: string, postParameters: [string, string][], config: Config): Promise; proxy?: AgentOptions; } diff --git a/src/httpClient/httpURLConnectionClient.ts b/src/httpClient/httpURLConnectionClient.ts index 9cdbefd..efa7b84 100644 --- a/src/httpClient/httpURLConnectionClient.ts +++ b/src/httpClient/httpURLConnectionClient.ts @@ -70,18 +70,22 @@ class HttpURLConnectionClient implements ClientInterface { return this.doPostRequest(httpConnection, json); } + public post(endpoint: string, postParameters: [string, string][], config: Config): Promise { + const postQuery: string = this.getQuery(postParameters); + const connectionRequest: ClientRequest = this.createRequest(endpoint, {}, config.applicationName); + return this.doPostRequest(connectionRequest, postQuery); + } + private createRequest(endpoint: string, requestOptions: IRequest.Options, applicationName?: string): ClientRequest { if (!requestOptions.headers) { requestOptions.headers = {}; } const url = new URL(endpoint); - const additionalPathname = requestOptions.id ? `/${requestOptions.id}` : ""; - const pathname = `${url.pathname}${additionalPathname}` requestOptions.hostname = url.hostname; requestOptions.protocol = url.protocol; requestOptions.port = url.port; - requestOptions.path = pathname; + requestOptions.path = url.pathname; if (requestOptions && requestOptions.idempotencyKey) { requestOptions.headers[ApiConstants.IDEMPOTENCY_KEY] = requestOptions.idempotencyKey; @@ -107,6 +111,10 @@ class HttpURLConnectionClient implements ClientInterface { return httpsRequest(requestOptions); } + private getQuery(params: [string, string][]): string { + return params.map(([key, value]): string => `${key}=${value}`).join("&"); + } + private doPostRequest(connectionRequest: ClientRequest, json: string): Promise { return new Promise((resolve, reject): void => { connectionRequest.flushHeaders(); diff --git a/src/services/binLookup.ts b/src/services/binLookup.ts index 1e97a12..438b640 100644 --- a/src/services/binLookup.ts +++ b/src/services/binLookup.ts @@ -20,15 +20,30 @@ import ApiKeyAuthenticatedService from "../apiKeyAuthenticatedService"; import Client from "../client"; import GetCostEstimate from "./resource/binLookup/getCostEstimate"; import Get3dsAvailability from "./resource/binLookup/get3dsAvailability"; +import getJsonResponse from "../helpers/getJsonResponse"; class BinLookup extends ApiKeyAuthenticatedService { - public readonly get3dsAvailability: Get3dsAvailability; - public readonly getCostEstimate: GetCostEstimate; + private readonly _get3dsAvailability: Get3dsAvailability; + private readonly _getCostEstimate: GetCostEstimate; public constructor(client: Client) { super(client); - this.get3dsAvailability = new Get3dsAvailability(this); - this.getCostEstimate = new GetCostEstimate(this); + this._get3dsAvailability = new Get3dsAvailability(this); + this._getCostEstimate = new GetCostEstimate(this); + } + + public get3dsAvailability(request: IBinLookup.ThreeDSAvailabilityRequest): Promise { + return getJsonResponse( + this._get3dsAvailability, + request + ); + } + + public getCostEstimate(request: IBinLookup.CostEstimateRequest): Promise { + return getJsonResponse( + this._getCostEstimate, + request + ); } } diff --git a/src/services/checkout.ts b/src/services/checkout.ts index 7a97d5e..9ce2219 100644 --- a/src/services/checkout.ts +++ b/src/services/checkout.ts @@ -19,31 +19,142 @@ import ApiKeyAuthenticatedService from "../apiKeyAuthenticatedService"; import Client from "../client"; +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"; import PaymentLinks from "./resource/checkout/paymentLinks"; import OriginKeys from "./resource/checkout/originKeys"; +import setApplicationInfo from "../helpers/setApplicationInfo"; +import { IRequest } from "../typings/requestOptions"; +import PaymentLinksId from "./resource/checkout/paymentLinksId"; +import PaymentMethodsBalance from "./resource/checkout/paymentMethodsBalance"; import Orders from "./resource/checkout/orders"; +import OrdersCancel from "./resource/checkout/ordersCancel"; class Checkout extends ApiKeyAuthenticatedService { - public readonly payments: Payments; - public readonly paymentMethods: PaymentMethods; - public readonly paymentSession: PaymentSession; - public readonly paymentLinks: PaymentLinks; - public readonly originKeys: OriginKeys; - public readonly orders: Orders; + private readonly _payments: Payments; + private readonly _paymentMethods: PaymentMethods; + private readonly _paymentsDetails: PaymentsDetails; + private readonly _paymentSession: PaymentSession; + private readonly _paymentsResult: PaymentsResult; + private readonly _paymentLinks: PaymentLinks; + private readonly _paymentLinksId: PaymentLinksId; + private readonly _originKeys: OriginKeys; + private readonly _paymentMethodsBalance: PaymentMethodsBalance; + private readonly _orders: Orders; + private readonly _ordersCancel: OrdersCancel; public constructor(client: Client) { super(client); - this.payments = new Payments(this); - this.paymentMethods = new PaymentMethods(this); - this.paymentSession = new PaymentSession(this); - this.paymentLinks = new PaymentLinks(this); - this.originKeys = new OriginKeys(this); - this.orders = new Orders(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); + this._paymentLinks = new PaymentLinks(this); + this._paymentLinksId = new PaymentLinksId(this); + this._originKeys = new OriginKeys(this); + this._paymentMethodsBalance = new PaymentMethodsBalance(this); + this._orders = new Orders(this); + this._ordersCancel = new OrdersCancel(this); } + public payments(paymentsRequest: ICheckout.PaymentRequest, requestOptions?: IRequest.Options): Promise { + return getJsonResponse( + this._payments, + setApplicationInfo(paymentsRequest), + requestOptions, + ); + } + + public paymentMethods(paymentMethodsRequest: ICheckout.PaymentMethodsRequest): Promise { + return getJsonResponse( + this._paymentMethods, + paymentMethodsRequest, + ); + } + + public paymentLinks(paymentLinkRequest: ICheckout.CreatePaymentLinkRequest): Promise { + return getJsonResponse( + this._paymentLinks, + paymentLinkRequest + ); + } + + public getPaymentLinks(linkId: string): Promise { + this._paymentLinksId.id = linkId; + return getJsonResponse<{}, ICheckout.PaymentLinkResource>( + this._paymentLinksId, + {}, + { method: "GET" } + ); + } + + public updatePaymentLinks(linkId: string, status: "expired"): Promise { + this._paymentLinksId.id = linkId; + return getJsonResponse<{}, ICheckout.PaymentLinkResource>( + this._paymentLinksId, + { status }, + { method: "PATCH" } + ); + } + + public paymentsDetails(paymentsDetailsRequest: ICheckout.DetailsRequest, requestOptions?: IRequest.Options): Promise { + return getJsonResponse( + this._paymentsDetails, + paymentsDetailsRequest, + requestOptions + ); + } + + public paymentSession( + paymentSessionRequest: ICheckout.PaymentSetupRequest, + requestOptions?: IRequest.Options, + ): Promise { + return getJsonResponse( + this._paymentSession, + paymentSessionRequest, + requestOptions, + ); + } + + public paymentResult(paymentResultRequest: ICheckout.PaymentVerificationRequest): Promise { + return getJsonResponse( + this._paymentsResult, + paymentResultRequest, + ); + } + + public originKeys(originKeysRequest: ICheckout.CheckoutUtilityRequest): Promise { + return getJsonResponse( + this._originKeys, + originKeysRequest, + ); + } + + public paymentMethodsBalance(paymentMethodsBalanceRequest: ICheckout.CheckoutBalanceCheckRequest): Promise { + return getJsonResponse( + this._paymentMethodsBalance, + paymentMethodsBalanceRequest, + ); + } + + public orders(ordersRequest: ICheckout.CheckoutCreateOrderRequest): Promise { + return getJsonResponse( + this._orders, + ordersRequest, + ); + } + + public ordersCancel(ordersCancelRequest: ICheckout.CheckoutCancelOrderRequest): Promise { + return getJsonResponse( + this._ordersCancel, + ordersCancelRequest, + ); + } } export default Checkout; diff --git a/src/services/index.ts b/src/services/index.ts index 0a38055..808ae33 100644 --- a/src/services/index.ts +++ b/src/services/index.ts @@ -23,5 +23,5 @@ export { default as CheckoutAPI } from "./checkout"; export { default as Recurring } from "./recurring"; export { default as Modification } from "./modification"; export { default as BinLookup } from "./binLookup"; -export { default as Payouts } from "./payouts"; +export { default as Payout } from "./payout"; export { default as Platforms } from "./platforms"; diff --git a/src/services/modification.ts b/src/services/modification.ts index 357f5a5..fb6c8f4 100644 --- a/src/services/modification.ts +++ b/src/services/modification.ts @@ -17,6 +17,7 @@ * See the LICENSE file for more info. */ import Client from "../client"; +import getJsonResponse from "../helpers/getJsonResponse"; import Service from "../service"; import AdjustAuthorisation from "./resource/modification/adjustAuthorisation"; import Cancel from "./resource/modification/cancel"; @@ -24,25 +25,96 @@ import CancelOrRefund from "./resource/modification/cancelOrRefund"; import Capture from "./resource/modification/capture"; import Refund from "./resource/modification/refund"; import TechnicalCancel from "./resource/modification/technicalCancel"; +import setApplicationInfo from "../helpers/setApplicationInfo"; +import { ApplicationInfo } from "../typings/applicationInfo"; +import { IRequest } from "../typings/requestOptions"; + +interface AppInfo { applicationInfo?: ApplicationInfo } +type GenericRequest = T & AppInfo; class Modification extends Service { - public readonly cancelOrRefund: CancelOrRefund; - public readonly cancel: Cancel; - public readonly capture: Capture; - public readonly refund: Refund; - public readonly adjustAuthorisation: AdjustAuthorisation; - public readonly technicalCancel: TechnicalCancel; + private readonly _cancelOrRefund: CancelOrRefund; + private readonly _cancel: Cancel; + private readonly _capture: Capture; + private readonly _refund: Refund; + private readonly _adjustAuthorisation: AdjustAuthorisation; + private readonly _technicalCancel: TechnicalCancel; public constructor(client: Client) { super(client); - 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); + 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); } + public capture( + captureRequest: GenericRequest, + requestOptions?: IRequest.Options, + ): Promise { + return getJsonResponse( + this._capture, + setApplicationInfo(captureRequest), + requestOptions, + ); + } + + public cancelOrRefund( + cancelOrRefundRequest: GenericRequest, + requestOptions?: IRequest.Options, + ): Promise { + return getJsonResponse( + this._cancelOrRefund, + setApplicationInfo(cancelOrRefundRequest), + requestOptions, + ); + } + + public refund( + refundRequest: GenericRequest, + requestOptions?: IRequest.Options, + ): Promise { + return getJsonResponse( + this._refund, + setApplicationInfo(refundRequest), + requestOptions, + ); + } + + public cancel( + cancelRequest: GenericRequest, + requestOptions?: IRequest.Options, + ): Promise { + return getJsonResponse( + this._cancel, + setApplicationInfo(cancelRequest), + requestOptions, + ); + } + + public technicalCancel( + technicalCancelRequest: GenericRequest, + requestOptions?: IRequest.Options, + ): Promise { + return getJsonResponse( + this._technicalCancel, + setApplicationInfo(technicalCancelRequest), + requestOptions, + ); + } + + public adjustAuthorisation( + adjustAuthorisationRequest: GenericRequest, + requestOptions?: IRequest.Options, + ): Promise { + return getJsonResponse( + this._adjustAuthorisation, + setApplicationInfo(adjustAuthorisationRequest), + requestOptions, + ); + } } export default Modification; diff --git a/src/services/payout.ts b/src/services/payout.ts new file mode 100644 index 0000000..0ea7024 --- /dev/null +++ b/src/services/payout.ts @@ -0,0 +1,91 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2020 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 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 PayoutResource from "./resource/payout/payout"; +import StoreDetailAndSubmitThirdParty from "./resource/payout/storeDetailAndSubmitThirdParty"; +import getJsonResponse from "../helpers/getJsonResponse"; + +class Payout extends Service { + private readonly _storeDetailAndSubmitThirdParty: StoreDetailAndSubmitThirdParty; + private readonly _confirmThirdParty: ConfirmThirdParty; + private readonly _declineThirdParty: DeclineThirdParty; + private readonly _storeDetail: StoreDetail; + private readonly _submitThirdParty: SubmitThirdParty; + private readonly _payout: PayoutResource; + + public constructor(client: Client) { + super(client); + + 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); + this._payout = new PayoutResource(this); + } + + public storeDetailAndSubmitThirdParty(request: IPayouts.StoreDetailAndSubmitRequest): Promise { + return getJsonResponse( + this._storeDetailAndSubmitThirdParty, + request + ); + } + + public confirmThirdParty(request: IPayouts.ModifyRequest): Promise { + return getJsonResponse( + this._confirmThirdParty, + request + ); + } + + public declineThirdParty(request: IPayouts.ModifyRequest): Promise { + return getJsonResponse( + this._declineThirdParty, + request + ); + } + + public storeDetail(request: IPayouts.StoreDetailRequest): Promise { + return getJsonResponse( + this._storeDetail, + request + ); + } + + public submitThirdparty(request: IPayouts.SubmitRequest): Promise { + return getJsonResponse( + this._submitThirdParty, + request + ); + } + + public payout(request: IPayouts.PayoutRequest): Promise { + return getJsonResponse( + this._payout, + request + ); + } +} + +export default Payout; \ No newline at end of file diff --git a/src/services/payouts.ts b/src/services/payouts.ts deleted file mode 100644 index f4a44e3..0000000 --- a/src/services/payouts.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * ###### - * ###### - * ############ ####( ###### #####. ###### ############ ############ - * ############# #####( ###### #####. ###### ############# ############# - * ###### #####( ###### #####. ###### ##### ###### ##### ###### - * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### - * ###### ###### #####( ###### #####. ###### ##### ##### ###### - * ############# ############# ############# ############# ##### ###### - * ############ ############ ############# ############ ##### ###### - * ###### - * ############# - * ############ - * Adyen NodeJS API Library - * Copyright (c) 2020 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 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 PayoutResource from "./resource/payout/payout"; -import StoreDetailAndSubmitThirdParty from "./resource/payout/storeDetailAndSubmitThirdParty"; - -class Payouts extends Service { - public readonly storeDetailAndSubmitThirdParty: StoreDetailAndSubmitThirdParty; - public readonly confirmThirdParty: ConfirmThirdParty; - public readonly declineThirdParty: DeclineThirdParty; - public readonly storeDetail: StoreDetail; - public readonly submitThirdParty: SubmitThirdParty; - public readonly payout: PayoutResource; - - public constructor(client: Client) { - super(client); - - 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); - this.payout = new PayoutResource(this); - } -} - -export default Payouts; diff --git a/src/services/platforms.ts b/src/services/platforms.ts index 06ec3ea..e564fd1 100644 --- a/src/services/platforms.ts +++ b/src/services/platforms.ts @@ -34,133 +34,132 @@ type AccountsAccount = PlatformsAccount; type AccountsVerification = PlatformsAccount; type AccountsAccountHolders = PlatformsAccount; type PlatformsTypes = AccountsAccount | AccountsVerification | AccountsAccountHolders | PlatformsFund | PlatformsHostedOnboardingPage; -type PostRequest = { post: (request: T) => Promise }; class Platforms extends Service { /* PlatformsAccount */ // Accounts - public readonly closeAccount: PlatformsAccount; - public readonly updateAccount: PlatformsAccount; - public readonly createAccount: PlatformsAccount; + private readonly _closeAccount: PlatformsAccount; + private readonly _updateAccount: PlatformsAccount; + private readonly _createAccount: PlatformsAccount; // Verification - public readonly uploadDocument: PlatformsAccount; - public readonly getUploadedDocuments: PlatformsAccount; - public readonly deleteBankAccounts: PlatformsAccount; - public readonly deletePayoutMethods: PlatformsAccount; - public readonly deleteShareholders: PlatformsAccount; - public readonly checkAccountHolder: PlatformsAccount; + private readonly _uploadDocument: PlatformsAccount; + private readonly _getUploadedDocuments: PlatformsAccount; + private readonly _deleteBankAccounts: PlatformsAccount; + private readonly _deletePayoutMethods: PlatformsAccount; + private readonly _deleteShareholders: PlatformsAccount; + private readonly _checkAccountHolder: PlatformsAccount; // Account Holders - public readonly createAccountHolder: PlatformsAccount; - public readonly getAccountHolder: PlatformsAccount; - public readonly updateAccountHolder: PlatformsAccount; - public readonly updateAccountHolderState: PlatformsAccount; - public readonly suspendAccountHolder: PlatformsAccount; - public readonly unSuspendAccountHolder: PlatformsAccount; - public readonly closeAccountHolder: PlatformsAccount; + private readonly _createAccountHolder: PlatformsAccount; + private readonly _getAccountHolder: PlatformsAccount; + private readonly _updateAccountHolder: PlatformsAccount; + private readonly _updateAccountHolderState: PlatformsAccount; + private readonly _suspendAccountHolder: PlatformsAccount; + private readonly _unSuspendAccountHolder: PlatformsAccount; + private readonly _closeAccountHolder: PlatformsAccount; /* PlatformsFund */ - public readonly accountHolderBalance: PlatformsFund; - public readonly accountHolderTransactionList: PlatformsFund; - public readonly payoutAccountHolder: PlatformsFund; - public readonly transferFunds: PlatformsFund; - public readonly refundFundsTransfer: PlatformsFund; - public readonly setupBeneficiary: PlatformsFund; - public readonly refundNotPaidOutTransfers: PlatformsFund; + private readonly _accountHolderBalance: PlatformsFund; + private readonly _accountHolderTransactionList: PlatformsFund; + private readonly _payoutAccountHolder: PlatformsFund; + private readonly _transferFunds: PlatformsFund; + private readonly _refundFundsTransfer: PlatformsFund; + private readonly _setupBeneficiary: PlatformsFund; + private readonly _refundNotPaidOutTransfers: PlatformsFund; /* HOP */ - public readonly getOnboardingUrl: PlatformsHostedOnboardingPage; + private readonly _getOnboardingUrl: PlatformsHostedOnboardingPage; /* Notification Configuration */ - public readonly createNotificationConfiguration: PlatformsNotificationConfiguration; - public readonly getNotificationConfiguration: PlatformsNotificationConfiguration; - public readonly getNotificationConfigurationList: PlatformsNotificationConfiguration; - public readonly testNotificationConfiguration: PlatformsNotificationConfiguration; - public readonly updateNotificationConfiguration: PlatformsNotificationConfiguration; - public readonly deleteNotificationConfiguration: PlatformsNotificationConfiguration; + private readonly _createNotificationConfiguration: PlatformsNotificationConfiguration; + private readonly _getNotificationConfiguration: PlatformsNotificationConfiguration; + private readonly _getNotificationConfigurationList: PlatformsNotificationConfiguration; + private readonly _testNotificationConfiguration: PlatformsNotificationConfiguration; + private readonly _updateNotificationConfiguration: PlatformsNotificationConfiguration; + private readonly _deleteNotificationConfiguration: PlatformsNotificationConfiguration; public constructor(client: Client) { super(client); // Account - this.closeAccount = new PlatformsAccount(this, "/closeAccount"); - this.updateAccount = new PlatformsAccount(this, "/updateAccount"); - this.createAccount = new PlatformsAccount(this, "/createAccount"); - this.uploadDocument = new PlatformsAccount(this, "/uploadDocument"); - this.getUploadedDocuments = new PlatformsAccount(this, "/getUploadedDocuments"); - this.deleteBankAccounts = new PlatformsAccount(this, "/deleteBankAccounts"); - this.deletePayoutMethods = new PlatformsAccount(this, "/deletePayoutMethods"); - this.deleteShareholders = new PlatformsAccount(this, "/deleteShareholders"); - this.checkAccountHolder = new PlatformsAccount(this, "/checkAccountHolder"); - this.createAccountHolder = new PlatformsAccount(this, "/createAccountHolder"); - this.getAccountHolder = new PlatformsAccount(this, "/getAccountHolder"); - this.updateAccountHolder = new PlatformsAccount(this, "/updateAccountHolder"); - this.updateAccountHolderState = new PlatformsAccount(this, "/updateAccountHolderState"); - this.suspendAccountHolder = new PlatformsAccount(this, "/suspendAccountHolder"); - this.unSuspendAccountHolder = new PlatformsAccount(this, "/unSuspendAccountHolder"); - this.closeAccountHolder = new PlatformsAccount(this, "/closeAccountHolder"); + this._closeAccount = new PlatformsAccount(this, "/closeAccount"); + this._updateAccount = new PlatformsAccount(this, "/updateAccount"); + this._createAccount = new PlatformsAccount(this, "/createAccount"); + this._uploadDocument = new PlatformsAccount(this, "/uploadDocument"); + this._getUploadedDocuments = new PlatformsAccount(this, "/getUploadedDocuments"); + this._deleteBankAccounts = new PlatformsAccount(this, "/deleteBankAccounts"); + this._deletePayoutMethods = new PlatformsAccount(this, "/deletePayoutMethods"); + this._deleteShareholders = new PlatformsAccount(this, "/deleteShareholders"); + this._checkAccountHolder = new PlatformsAccount(this, "/checkAccountHolder"); + this._createAccountHolder = new PlatformsAccount(this, "/createAccountHolder"); + this._getAccountHolder = new PlatformsAccount(this, "/getAccountHolder"); + this._updateAccountHolder = new PlatformsAccount(this, "/updateAccountHolder"); + this._updateAccountHolderState = new PlatformsAccount(this, "/updateAccountHolderState"); + this._suspendAccountHolder = new PlatformsAccount(this, "/suspendAccountHolder"); + this._unSuspendAccountHolder = new PlatformsAccount(this, "/unSuspendAccountHolder"); + this._closeAccountHolder = new PlatformsAccount(this, "/closeAccountHolder"); // Fund - this.accountHolderBalance = new PlatformsFund(this, "/accountHolderBalance"); - this.accountHolderTransactionList = new PlatformsFund(this, "/accountHolderTransactionList"); - this.payoutAccountHolder = new PlatformsFund(this, "/payoutAccountHolder"); - this.transferFunds = new PlatformsFund(this, "/transferFunds"); - this.refundFundsTransfer = new PlatformsFund(this, "/refundFundsTransfer"); - this.setupBeneficiary = new PlatformsFund(this, "/setupBeneficiary"); - this.refundNotPaidOutTransfers = new PlatformsFund(this, "/refundNotPaidOutTransfers"); + this._accountHolderBalance = new PlatformsFund(this, "/accountHolderBalance"); + this._accountHolderTransactionList = new PlatformsFund(this, "/accountHolderTransactionList"); + this._payoutAccountHolder = new PlatformsFund(this, "/payoutAccountHolder"); + this._transferFunds = new PlatformsFund(this, "/transferFunds"); + this._refundFundsTransfer = new PlatformsFund(this, "/refundFundsTransfer"); + this._setupBeneficiary = new PlatformsFund(this, "/setupBeneficiary"); + this._refundNotPaidOutTransfers = new PlatformsFund(this, "/refundNotPaidOutTransfers"); // HOP - this.getOnboardingUrl = new PlatformsHostedOnboardingPage(this, "/getOnboardingUrl"); + this._getOnboardingUrl = new PlatformsHostedOnboardingPage(this, "/getOnboardingUrl"); // Notification Configuration - this.createNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/createNotificationConfiguration"); - this.getNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/getNotificationConfiguration"); - this.getNotificationConfigurationList = new PlatformsNotificationConfiguration(this, "/getNotificationConfigurationList"); - this.testNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/testNotificationConfiguration"); - this.updateNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/updateNotificationConfiguration"); - this.deleteNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/deleteNotificationConfigurations"); + this._createNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/createNotificationConfiguration"); + this._getNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/getNotificationConfiguration"); + this._getNotificationConfigurationList = new PlatformsNotificationConfiguration(this, "/getNotificationConfigurationList"); + this._testNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/testNotificationConfiguration"); + this._updateNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/updateNotificationConfiguration"); + this._deleteNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/deleteNotificationConfigurations"); } - createPostRequest = (service: T): PostRequest => { - return { post: (request: U): Promise => getJsonResponse.call>(service, request) }; + createRequest = (service: T) => { + return (request: U): Promise => getJsonResponse(service, request); } public get Account(): { - getAccountHolder: PostRequest; - getUploadedDocuments: PostRequest; - createAccountHolder: PostRequest; - closeAccountHolder: PostRequest; - createAccount: PostRequest; - deleteBankAccounts: PostRequest; - deletePayoutMethods: PostRequest; - updateAccount: PostRequest; - uploadDocument: PostRequest; - unSuspendAccountHolder: PostRequest; - closeAccount: PostRequest; - suspendAccountHolder: PostRequest; - updateAccountHolder: PostRequest; - deleteShareholders: PostRequest; - checkAccountHolder: PostRequest; - updateAccountHolderState: PostRequest; + getAccountHolder: (request: IPlatformsAccount.GetAccountHolderRequest) => Promise; + getUploadedDocuments: (request: IPlatformsAccount.GetUploadedDocumentsRequest) => Promise; + createAccountHolder: (request: IPlatformsAccount.CreateAccountHolderRequest) => Promise; + closeAccountHolder: (request: IPlatformsAccount.CloseAccountHolderRequest) => Promise; + createAccount: (request: IPlatformsAccount.CreateAccountRequest) => Promise; + deleteBankAccounts: (request: IPlatformsAccount.DeleteBankAccountRequest) => Promise; + deletePayoutMethods: (request: IPlatformsAccount.DeletePayoutMethodRequest) => Promise; + updateAccount: (request: IPlatformsAccount.UpdateAccountRequest) => Promise; + uploadDocument: (request: IPlatformsAccount.UploadDocumentRequest) => Promise; + unSuspendAccountHolder: (request: IPlatformsAccount.UnSuspendAccountHolderRequest) => Promise; + closeAccount: (request: IPlatformsAccount.CloseAccountRequest) => Promise; + suspendAccountHolder: (request: IPlatformsAccount.SuspendAccountHolderRequest) => Promise; + updateAccountHolder: (request: IPlatformsAccount.UpdateAccountHolderRequest) => Promise; + deleteShareholders: (request: IPlatformsAccount.DeleteShareholderRequest) => Promise; + checkAccountHolder: (request: IPlatformsAccount.PerformVerificationRequest) => Promise; + updateAccountHolderState: (request: IPlatformsAccount.UpdateAccountHolderStateRequest) => Promise; } { - const closeAccount = this.createPostRequest(this.closeAccount); - const updateAccount = this.createPostRequest(this.updateAccount); - const createAccount = this.createPostRequest(this.createAccount); + const closeAccount = this.createRequest(this._closeAccount); + const updateAccount = this.createRequest(this._updateAccount); + const createAccount = this.createRequest(this._createAccount); - const uploadDocument = this.createPostRequest(this.uploadDocument); - const getUploadedDocuments = this.createPostRequest(this.getUploadedDocuments); - const deleteBankAccounts = this.createPostRequest(this.deleteBankAccounts); - const deletePayoutMethods = this.createPostRequest(this.deletePayoutMethods); - const deleteShareholders = this.createPostRequest(this.deleteShareholders); + const uploadDocument = this.createRequest(this._uploadDocument); + const getUploadedDocuments = this.createRequest(this._getUploadedDocuments); + const deleteBankAccounts = this.createRequest(this._deleteBankAccounts); + const deletePayoutMethods = this.createRequest(this._deletePayoutMethods); + const deleteShareholders = this.createRequest(this._deleteShareholders); - const createAccountHolder = this.createPostRequest(this.createAccountHolder); - const getAccountHolder = this.createPostRequest(this.getAccountHolder); - const updateAccountHolder = this.createPostRequest(this.updateAccountHolder); - const updateAccountHolderState = this.createPostRequest(this.updateAccountHolderState); - const suspendAccountHolder = this.createPostRequest(this.suspendAccountHolder); - const unSuspendAccountHolder = this.createPostRequest(this.unSuspendAccountHolder); - const closeAccountHolder = this.createPostRequest(this.closeAccountHolder); - const checkAccountHolder = this.createPostRequest(this.checkAccountHolder); + const createAccountHolder = this.createRequest(this._createAccountHolder); + const getAccountHolder = this.createRequest(this._getAccountHolder); + const updateAccountHolder = this.createRequest(this._updateAccountHolder); + const updateAccountHolderState = this.createRequest(this._updateAccountHolderState); + const suspendAccountHolder = this.createRequest(this._suspendAccountHolder); + const unSuspendAccountHolder = this.createRequest(this._unSuspendAccountHolder); + const closeAccountHolder = this.createRequest(this._closeAccountHolder); + const checkAccountHolder = this.createRequest(this._checkAccountHolder); const accounts = { closeAccount, updateAccount, createAccount }; const verification = { uploadDocument, getUploadedDocuments, deleteBankAccounts, deletePayoutMethods, deleteShareholders, checkAccountHolder }; @@ -170,45 +169,45 @@ class Platforms extends Service { } public get Fund(): { - refundNotPaidOutTransfers: PostRequest; - accountHolderTransactionList: PostRequest; - setupBeneficiary: PostRequest; - transferFunds: PostRequest; - refundFundsTransfer: PostRequest; - payoutAccountHolder: PostRequest; - accountHolderBalance: PostRequest; + refundNotPaidOutTransfers: (request: IPlatformsFund.RefundNotPaidOutTransfersRequest) => Promise; + accountHolderTransactionList: (request: IPlatformsFund.AccountHolderTransactionListRequest) => Promise; + setupBeneficiary: (request: IPlatformsFund.SetupBeneficiaryRequest) => Promise; + transferFunds: (request: IPlatformsFund.TransferFundsRequest) => Promise; + refundFundsTransfer: (request: IPlatformsFund.RefundFundsTransferRequest) => Promise; + payoutAccountHolder: (request: IPlatformsFund.PayoutAccountHolderRequest) => Promise; + accountHolderBalance: (request: IPlatformsFund.AccountHolderBalanceRequest) => Promise; } { - const accountHolderBalance = this.createPostRequest(this.accountHolderBalance); - const accountHolderTransactionList = this.createPostRequest(this.accountHolderTransactionList); - const payoutAccountHolder = this.createPostRequest(this.payoutAccountHolder); - const transferFunds = this.createPostRequest(this.transferFunds); - const refundFundsTransfer = this.createPostRequest(this.refundFundsTransfer); - const setupBeneficiary = this.createPostRequest(this.setupBeneficiary); - const refundNotPaidOutTransfers = this.createPostRequest(this.refundNotPaidOutTransfers); + const accountHolderBalance = this.createRequest(this._accountHolderBalance); + const accountHolderTransactionList = this.createRequest(this._accountHolderTransactionList); + const payoutAccountHolder = this.createRequest(this._payoutAccountHolder); + const transferFunds = this.createRequest(this._transferFunds); + const refundFundsTransfer = this.createRequest(this._refundFundsTransfer); + const setupBeneficiary = this.createRequest(this._setupBeneficiary); + const refundNotPaidOutTransfers = this.createRequest(this._refundNotPaidOutTransfers); return { accountHolderBalance, accountHolderTransactionList, payoutAccountHolder, refundFundsTransfer, transferFunds, setupBeneficiary, refundNotPaidOutTransfers }; } - public get HostedOnboardingPage(): { getOnboardingUrl: PostRequest } { - const getOnboardingUrl = this.createPostRequest(this.getOnboardingUrl); + public get HostedOnboardingPage(): { getOnboardingUrl: (request: IPlatformsHostedOnboardingPage.GetOnboardingUrlRequest) => Promise } { + const getOnboardingUrl = this.createRequest(this._getOnboardingUrl); return { getOnboardingUrl }; } public get NotificationConfiguration(): { - createNotificationConfiguration: PostRequest; - updateNotificationConfiguration: PostRequest; - getNotificationConfiguration: PostRequest; - testNotificationConfiguration: PostRequest; - getNotificationConfigurationList: PostRequest<{}, IPlatformsNotificationConfiguration.GetNotificationConfigurationListResponse>; - deleteNotificationConfigurations: PostRequest; + createNotificationConfiguration: (request: IPlatformsNotificationConfiguration.CreateNotificationConfigurationRequest) => Promise; + updateNotificationConfiguration: (request: IPlatformsNotificationConfiguration.UpdateNotificationConfigurationRequest) => Promise; + getNotificationConfiguration: (request: IPlatformsNotificationConfiguration.GetNotificationConfigurationRequest) => Promise; + testNotificationConfiguration: (request: IPlatformsNotificationConfiguration.TestNotificationConfigurationRequest) => Promise; + getNotificationConfigurationList: (request: {}) => Promise; + deleteNotificationConfigurations: (request: IPlatformsNotificationConfiguration.DeleteNotificationConfigurationRequest) => Promise; } { - const createNotificationConfiguration = this.createPostRequest(this.createNotificationConfiguration); - const getNotificationConfiguration = this.createPostRequest(this.getNotificationConfiguration); - const getNotificationConfigurationList = this.createPostRequest(this.getNotificationConfigurationList); - const testNotificationConfiguration = this.createPostRequest(this.testNotificationConfiguration); - const updateNotificationConfiguration = this.createPostRequest(this.updateNotificationConfiguration); - const deleteNotificationConfigurations = this.createPostRequest(this.deleteNotificationConfiguration); + const createNotificationConfiguration = this.createRequest(this._createNotificationConfiguration); + const getNotificationConfiguration = this.createRequest(this._getNotificationConfiguration); + const getNotificationConfigurationList = this.createRequest(this._getNotificationConfigurationList); + const testNotificationConfiguration = this.createRequest(this._testNotificationConfiguration); + const updateNotificationConfiguration = this.createRequest(this._updateNotificationConfiguration); + const deleteNotificationConfigurations = this.createRequest(this._deleteNotificationConfiguration); return { createNotificationConfiguration, getNotificationConfiguration, getNotificationConfigurationList, testNotificationConfiguration, updateNotificationConfiguration, deleteNotificationConfigurations }; } diff --git a/src/services/recurring.ts b/src/services/recurring.ts index 08136c5..9671922 100644 --- a/src/services/recurring.ts +++ b/src/services/recurring.ts @@ -18,21 +18,43 @@ */ import Client from "../client"; +import getJsonResponse from "../helpers/getJsonResponse"; import Service from "../service"; import Disable from "./resource/recurring/disable"; import ListRecurringDetails from "./resource/recurring/listRecurringDetails"; import ScheduleAccountUpdater from "./resource/recurring/scheduleAccountUpdater"; class Recurring extends Service { - public readonly listRecurringDetails: ListRecurringDetails; - public readonly disable: Disable; - public readonly scheduleAccountUpdater: ScheduleAccountUpdater; + private readonly _listRecurringDetails: ListRecurringDetails; + private readonly _disable: Disable; + private readonly _scheduleAccountUpdater: ScheduleAccountUpdater; public constructor(client: Client) { super(client); - this.listRecurringDetails = new ListRecurringDetails(this); - this.disable = new Disable(this); - this.scheduleAccountUpdater = new ScheduleAccountUpdater(this); + this._listRecurringDetails = new ListRecurringDetails(this); + this._disable = new Disable(this); + this._scheduleAccountUpdater = new ScheduleAccountUpdater(this); + } + + public listRecurringDetails(request: IRecurring.RecurringDetailsRequest): Promise { + return getJsonResponse( + this._listRecurringDetails, + request, + ); + } + + public disable(request: IRecurring.DisableRequest): Promise { + return getJsonResponse( + this._disable, + request, + ); + } + + public scheduleAccountUpdater(request: IRecurring.ScheduleAccountUpdaterRequest): Promise { + return getJsonResponse( + this._scheduleAccountUpdater, + request, + ); } } diff --git a/src/services/resource.ts b/src/services/resource.ts index 8e1fbd1..97505cb 100644 --- a/src/services/resource.ts +++ b/src/services/resource.ts @@ -24,15 +24,8 @@ import ApiException from "./exception/apiException"; import ClientInterface from "../httpClient/clientInterface"; import { IRequest } from "../typings/requestOptions"; -type Req = { [key: string]: any }; -type ReqWithId = { id?: string } & Req; - abstract class Resource { protected endpoint: string; - protected post?(req: Req, requestOptions?: IRequest.Options): Promise<{}>; - protected patch?(req?: ReqWithId, requestOptions?: IRequest.Options): Promise<{}>; - protected get?(req?: ReqWithId, requestOptions?: IRequest.Options): Promise<{}>; - protected delete?(req?: ReqWithId, requestOptions?: IRequest.Options): Promise<{}>; private service: Service; protected constructor(service: Service, endpoint: string) { @@ -40,7 +33,7 @@ abstract class Resource { this.endpoint = endpoint; } - protected request(json: string, requestOptions?: IRequest.Options): Promise { + public request(json: string, requestOptions?: IRequest.Options): Promise { const clientInterface: ClientInterface = this.service.client.httpClient; const config: Config = this.service.client.config; diff --git a/src/services/resource/binLookup/get3dsAvailability.ts b/src/services/resource/binLookup/get3dsAvailability.ts index 1d0c47a..de5400f 100644 --- a/src/services/resource/binLookup/get3dsAvailability.ts +++ b/src/services/resource/binLookup/get3dsAvailability.ts @@ -20,7 +20,6 @@ import Resource from "../../resource"; import Service from "../../../service"; import Client from "../../../client"; -import getJsonResponse from "../../../helpers/getJsonResponse"; class Get3dsAvailability extends Resource { public constructor(service: Service) { @@ -29,13 +28,6 @@ class Get3dsAvailability extends Resource { `${service.client.config.endpoint}${Client.BIN_LOOKUP_PAL_SUFFIX}${Client.BIN_LOOKUP_API_VERSION}/get3dsAvailability` ); } - - public post(request: IBinLookup.ThreeDSAvailabilityRequest): Promise { - return getJsonResponse.call>( - this, - request - ); - } } export default Get3dsAvailability; diff --git a/src/services/resource/binLookup/getCostEstimate.ts b/src/services/resource/binLookup/getCostEstimate.ts index 4dbb3c6..c64f568 100644 --- a/src/services/resource/binLookup/getCostEstimate.ts +++ b/src/services/resource/binLookup/getCostEstimate.ts @@ -20,7 +20,6 @@ import Resource from "../../resource"; import Service from "../../../service"; import Client from "../../../client"; -import getJsonResponse from "../../../helpers/getJsonResponse"; class GetCostEstimate extends Resource { public constructor(service: Service) { @@ -29,13 +28,6 @@ class GetCostEstimate extends Resource { `${service.client.config.endpoint}${Client.BIN_LOOKUP_PAL_SUFFIX}${Client.BIN_LOOKUP_API_VERSION}/getCostEstimate` ); } - - public post(request: IBinLookup.CostEstimateRequest): Promise { - return getJsonResponse.call>( - this, - request - ); - } } export default GetCostEstimate; diff --git a/src/services/resource/checkout/orders.ts b/src/services/resource/checkout/orders.ts index 30ae0f0..090790a 100644 --- a/src/services/resource/checkout/orders.ts +++ b/src/services/resource/checkout/orders.ts @@ -18,30 +18,16 @@ */ import Client from "../../../client"; -import getJsonResponse from "../../../helpers/getJsonResponse"; import Service from "../../../service"; import Resource from "../../resource"; -import OrdersCancel from "./ordersCancel"; class Orders extends Resource { - public readonly cancel: OrdersCancel; - public constructor(service: Service) { super( service, `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/orders`, ); - - this.cancel = new OrdersCancel(service); } - - public post(ordersRequest: ICheckout.CheckoutCreateOrderRequest): Promise { - return getJsonResponse.call>( - this, - ordersRequest, - ); - } - } export default Orders; diff --git a/src/services/resource/checkout/ordersCancel.ts b/src/services/resource/checkout/ordersCancel.ts index 6f9013d..83bc809 100644 --- a/src/services/resource/checkout/ordersCancel.ts +++ b/src/services/resource/checkout/ordersCancel.ts @@ -18,7 +18,6 @@ */ import Client from "../../../client"; -import getJsonResponse from "../../../helpers/getJsonResponse"; import Service from "../../../service"; import Resource from "../../resource"; @@ -29,13 +28,6 @@ class OrdersCancel extends Resource { `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/orders/cancel`, ); } - - public post(ordersCancelRequest: ICheckout.CheckoutCancelOrderRequest): Promise { - return getJsonResponse.call>( - this, - ordersCancelRequest, - ); - } } export default OrdersCancel; diff --git a/src/services/resource/checkout/originKeys.ts b/src/services/resource/checkout/originKeys.ts index 347d826..8426a46 100644 --- a/src/services/resource/checkout/originKeys.ts +++ b/src/services/resource/checkout/originKeys.ts @@ -18,7 +18,6 @@ */ import Client from "../../../client"; -import getJsonResponse from "../../../helpers/getJsonResponse"; import Service from "../../../service"; import Resource from "../../resource"; @@ -29,14 +28,6 @@ class OriginKeys extends Resource { `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/originKeys`, ); } - - public post(originKeysRequest: ICheckout.CheckoutUtilityRequest): Promise { - return getJsonResponse.call>( - this, - originKeysRequest, - ); - } - } export default OriginKeys; diff --git a/src/services/resource/checkout/paymentLinks.ts b/src/services/resource/checkout/paymentLinks.ts index 899b0a4..e460cfd 100644 --- a/src/services/resource/checkout/paymentLinks.ts +++ b/src/services/resource/checkout/paymentLinks.ts @@ -18,11 +18,8 @@ */ import Client from "../../../client"; -import getJsonResponse from "../../../helpers/getJsonResponse"; import Service from "../../../service"; import Resource from "../../resource"; -import { HTTPMethod } from "../../../typings/HTTPMethod"; -import { IRequest } from "../../../typings/requestOptions"; class PaymentLinks extends Resource { public constructor(service: Service) { @@ -31,29 +28,6 @@ class PaymentLinks extends Resource { `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/paymentLinks`, ); } - - public post(paymentLinkRequest: ICheckout.CreatePaymentLinkRequest): Promise { - return getJsonResponse.call>( - this, - paymentLinkRequest - ); - } - - public get({ id }: { id: string }): Promise { - return getJsonResponse.call>( - this, - {}, - { id, method: HTTPMethod.GET } - ); - } - - public patch({ id, status }: { id: string, status: "expired" }): Promise { - return getJsonResponse.call>( - this, - { status }, - { id, method: HTTPMethod.PATCH } - ); - } } export default PaymentLinks; diff --git a/src/services/resource/checkout/paymentLinksId.ts b/src/services/resource/checkout/paymentLinksId.ts new file mode 100644 index 0000000..eb644de --- /dev/null +++ b/src/services/resource/checkout/paymentLinksId.ts @@ -0,0 +1,40 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2020 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 Service from "../../../service"; +import Resource from "../../resource"; + +class PaymentLinksId extends Resource { + static _id: string; + + public constructor(service: Service) { + super( + service, + `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/paymentLinks`, + ); + } + + public set id(id: string) { + PaymentLinksId._id = id; + this.endpoint = `${this.endpoint}/${PaymentLinksId._id}`; + } +} + +export default PaymentLinksId; diff --git a/src/services/resource/checkout/paymentMethods.ts b/src/services/resource/checkout/paymentMethods.ts index 07e1fd7..a45fa02 100644 --- a/src/services/resource/checkout/paymentMethods.ts +++ b/src/services/resource/checkout/paymentMethods.ts @@ -18,30 +18,16 @@ */ import Client from "../../../client"; -import getJsonResponse from "../../../helpers/getJsonResponse"; import Service from "../../../service"; import Resource from "../../resource"; -import PaymentMethodsBalance from "./paymentMethodsBalance"; class PaymentMethods extends Resource { - public readonly balance: PaymentMethodsBalance; - public constructor(service: Service) { super( service, `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/paymentMethods`, ); - - this.balance = new PaymentMethodsBalance(service); } - - public post(paymentMethodsRequest: ICheckout.PaymentMethodsRequest): Promise { - return getJsonResponse.call>( - this, - paymentMethodsRequest, - ); - } - } export default PaymentMethods; diff --git a/src/services/resource/checkout/paymentMethodsBalance.ts b/src/services/resource/checkout/paymentMethodsBalance.ts index d58b65b..8996c25 100644 --- a/src/services/resource/checkout/paymentMethodsBalance.ts +++ b/src/services/resource/checkout/paymentMethodsBalance.ts @@ -18,7 +18,6 @@ */ import Client from "../../../client"; -import getJsonResponse from "../../../helpers/getJsonResponse"; import Service from "../../../service"; import Resource from "../../resource"; @@ -29,14 +28,6 @@ class PaymentMethodsBalance extends Resource { `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/paymentMethods/balance`, ); } - - public post(paymentMethodsBalanceRequest: ICheckout.CheckoutBalanceCheckRequest): Promise { - return getJsonResponse.call>( - this, - paymentMethodsBalanceRequest, - ); - } - } export default PaymentMethodsBalance; diff --git a/src/services/resource/checkout/paymentSession.ts b/src/services/resource/checkout/paymentSession.ts index 9689ec6..f4f4093 100644 --- a/src/services/resource/checkout/paymentSession.ts +++ b/src/services/resource/checkout/paymentSession.ts @@ -18,9 +18,7 @@ */ import Client from "../../../client"; -import getJsonResponse from "../../../helpers/getJsonResponse"; import Service from "../../../service"; -import { IRequest } from "../../../typings/requestOptions"; import Resource from "../../resource"; class PaymentSession extends Resource { @@ -30,17 +28,6 @@ class PaymentSession extends Resource { `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/paymentSession`, ); } - - public post( - paymentSessionRequest: ICheckout.PaymentSetupRequest, - requestOptions?: IRequest.Options, - ): Promise { - return getJsonResponse.call>( - this, - paymentSessionRequest, - requestOptions, - ); - } } export default PaymentSession; diff --git a/src/services/resource/checkout/payments.ts b/src/services/resource/checkout/payments.ts index 920f54f..2243cf8 100644 --- a/src/services/resource/checkout/payments.ts +++ b/src/services/resource/checkout/payments.ts @@ -18,34 +18,15 @@ */ import Client from "../../../client"; -import getJsonResponse from "../../../helpers/getJsonResponse"; -import setApplicationInfo from "../../../helpers/setApplicationInfo"; import Service from "../../../service"; -import { IRequest } from "../../../typings/requestOptions"; import Resource from "../../resource"; -import PaymentsDetails from "./paymentsDetails"; -import PaymentsResult from "./paymentsResult"; class Payments extends Resource { - public readonly details: PaymentsDetails; - public readonly result: PaymentsResult; - public constructor(service: Service) { super( service, `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/payments`, ); - - this.details = new PaymentsDetails(service); - this.result = new PaymentsResult(service); - } - - public post(paymentsRequest: ICheckout.PaymentRequest, requestOptions?: IRequest.Options): Promise { - return getJsonResponse.call>( - this, - setApplicationInfo(paymentsRequest), - requestOptions, - ); } } diff --git a/src/services/resource/checkout/paymentsDetails.ts b/src/services/resource/checkout/paymentsDetails.ts index fab1ebe..46f29bd 100644 --- a/src/services/resource/checkout/paymentsDetails.ts +++ b/src/services/resource/checkout/paymentsDetails.ts @@ -18,9 +18,7 @@ */ import Client from "../../../client"; -import getJsonResponse from "../../../helpers/getJsonResponse"; import Service from "../../../service"; -import { IRequest } from "../../../typings/requestOptions"; import Resource from "../../resource"; class PaymentsDetails extends Resource { @@ -30,15 +28,6 @@ class PaymentsDetails extends Resource { `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/payments/details`, ); } - - public post(paymentsDetailsRequest: ICheckout.DetailsRequest, requestOptions?: IRequest.Options): Promise { - return getJsonResponse.call>( - this, - paymentsDetailsRequest, - requestOptions - ); - } - } export default PaymentsDetails; diff --git a/src/services/resource/checkout/paymentsResult.ts b/src/services/resource/checkout/paymentsResult.ts index fbb8c2c..f3bb007 100644 --- a/src/services/resource/checkout/paymentsResult.ts +++ b/src/services/resource/checkout/paymentsResult.ts @@ -18,7 +18,6 @@ */ import Client from "../../../client"; -import getJsonResponse from "../../../helpers/getJsonResponse"; import Service from "../../../service"; import Resource from "../../resource"; @@ -29,14 +28,6 @@ class PaymentsResult extends Resource { `${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/payments/result`, ); } - - public post(paymentResultRequest: ICheckout.PaymentVerificationRequest): Promise { - return getJsonResponse.call>( - this, - paymentResultRequest, - ); - } - } export default PaymentsResult; diff --git a/src/services/resource/modification/adjustAuthorisation.ts b/src/services/resource/modification/adjustAuthorisation.ts index 0bb2f7d..5037b6c 100644 --- a/src/services/resource/modification/adjustAuthorisation.ts +++ b/src/services/resource/modification/adjustAuthorisation.ts @@ -19,10 +19,6 @@ import Client from "../../../client"; import Service from "../../../service"; import Resource from "../../resource"; -import { GenericRequest } from "../../../typings/genericRequest"; -import { IRequest } from "../../../typings/requestOptions"; -import getJsonResponse from "../../../helpers/getJsonResponse"; -import setApplicationInfo from "../../../helpers/setApplicationInfo"; class AdjustAuthorisation extends Resource { public constructor(service: Service) { @@ -31,17 +27,6 @@ class AdjustAuthorisation extends Resource { `${service.client.config.endpoint}/pal/servlet/Payment/${Client.API_VERSION}/adjustAuthorisation`, ); } - - public post( - adjustAuthorisationRequest: GenericRequest, - requestOptions?: IRequest.Options, - ): Promise { - return getJsonResponse.call>( - this, - setApplicationInfo(adjustAuthorisationRequest), - requestOptions, - ); - } } export default AdjustAuthorisation; diff --git a/src/services/resource/modification/cancel.ts b/src/services/resource/modification/cancel.ts index 2453d4b..c91e5ac 100644 --- a/src/services/resource/modification/cancel.ts +++ b/src/services/resource/modification/cancel.ts @@ -19,10 +19,6 @@ import Client from "../../../client"; import Service from "../../../service"; import Resource from "../../resource"; -import { GenericRequest } from "../../../typings/genericRequest"; -import { IRequest } from "../../../typings/requestOptions"; -import getJsonResponse from "../../../helpers/getJsonResponse"; -import setApplicationInfo from "../../../helpers/setApplicationInfo"; class Cancel extends Resource { public constructor(service: Service) { @@ -31,17 +27,6 @@ class Cancel extends Resource { `${service.client.config.endpoint}/pal/servlet/Payment/${Client.API_VERSION}/cancel`, ); } - - public post( - cancelRequest: GenericRequest, - requestOptions?: IRequest.Options, - ): Promise { - return getJsonResponse.call>( - this, - setApplicationInfo(cancelRequest), - requestOptions, - ); - } } export default Cancel; diff --git a/src/services/resource/modification/cancelOrRefund.ts b/src/services/resource/modification/cancelOrRefund.ts index 87eac9a..7197182 100644 --- a/src/services/resource/modification/cancelOrRefund.ts +++ b/src/services/resource/modification/cancelOrRefund.ts @@ -19,10 +19,6 @@ import Client from "../../../client"; import Service from "../../../service"; import Resource from "../../resource"; -import getJsonResponse from "../../../helpers/getJsonResponse"; -import { IRequest } from "../../../typings/requestOptions"; -import { GenericRequest } from "../../../typings/genericRequest"; -import setApplicationInfo from "../../../helpers/setApplicationInfo"; class CancelOrRefund extends Resource { public constructor(service: Service) { @@ -31,18 +27,6 @@ class CancelOrRefund extends Resource { `${service.client.config.endpoint}/pal/servlet/Payment/${Client.API_VERSION}/cancelOrRefund`, ); } - - public post( - cancelOrRefundRequest: GenericRequest, - requestOptions?: IRequest.Options, - ): Promise { - return getJsonResponse.call>( - this, - setApplicationInfo(cancelOrRefundRequest), - requestOptions, - ); - } - } export default CancelOrRefund; diff --git a/src/services/resource/modification/capture.ts b/src/services/resource/modification/capture.ts index c3ef513..03afe8a 100644 --- a/src/services/resource/modification/capture.ts +++ b/src/services/resource/modification/capture.ts @@ -19,10 +19,6 @@ import Client from "../../../client"; import Service from "../../../service"; import Resource from "../../resource"; -import { GenericRequest } from "../../../typings/genericRequest"; -import { IRequest } from "../../../typings/requestOptions"; -import getJsonResponse from "../../../helpers/getJsonResponse"; -import setApplicationInfo from "../../../helpers/setApplicationInfo"; class Capture extends Resource { public constructor(service: Service) { @@ -31,17 +27,6 @@ class Capture extends Resource { `${service.client.config.endpoint}/pal/servlet/Payment/${Client.API_VERSION}/capture`, ); } - - public post( - captureRequest: GenericRequest, - requestOptions?: IRequest.Options, - ): Promise { - return getJsonResponse.call>( - this, - setApplicationInfo(captureRequest), - requestOptions, - ); - } } export default Capture; diff --git a/src/services/resource/modification/refund.ts b/src/services/resource/modification/refund.ts index 16a61b1..bb22c43 100644 --- a/src/services/resource/modification/refund.ts +++ b/src/services/resource/modification/refund.ts @@ -19,10 +19,6 @@ import Client from "../../../client"; import Service from "../../../service"; import Resource from "../../resource"; -import { GenericRequest } from "../../../typings/genericRequest"; -import { IRequest } from "../../../typings/requestOptions"; -import getJsonResponse from "../../../helpers/getJsonResponse"; -import setApplicationInfo from "../../../helpers/setApplicationInfo"; class Refund extends Resource { public constructor(service: Service) { @@ -31,17 +27,6 @@ class Refund extends Resource { `${service.client.config.endpoint}/pal/servlet/Payment/${Client.API_VERSION}/refund`, ); } - - public post( - refundRequest: GenericRequest, - requestOptions?: IRequest.Options, - ): Promise { - return getJsonResponse.call>( - this, - setApplicationInfo(refundRequest), - requestOptions, - ); - } } export default Refund; diff --git a/src/services/resource/modification/technicalCancel.ts b/src/services/resource/modification/technicalCancel.ts index 01e2fa1..e276ae7 100644 --- a/src/services/resource/modification/technicalCancel.ts +++ b/src/services/resource/modification/technicalCancel.ts @@ -19,10 +19,6 @@ import Resource from "../../resource"; import Client from "../../../client"; import Service from "../../../service"; -import { GenericRequest } from "../../../typings/genericRequest"; -import { IRequest } from "../../../typings/requestOptions"; -import getJsonResponse from "../../../helpers/getJsonResponse"; -import setApplicationInfo from "../../../helpers/setApplicationInfo"; class TechnicalCancel extends Resource { public constructor(service: Service) { @@ -31,17 +27,6 @@ class TechnicalCancel extends Resource { `${service.client.config.endpoint}/pal/servlet/Payment/${Client.API_VERSION}/technicalCancel`, ); } - - public post( - technicalCancelRequest: GenericRequest, - requestOptions?: IRequest.Options, - ): Promise { - return getJsonResponse.call>( - this, - setApplicationInfo(technicalCancelRequest), - requestOptions, - ); - } } export default TechnicalCancel; diff --git a/src/services/resource/payout/confirmThirdParty.ts b/src/services/resource/payout/confirmThirdParty.ts index d6f9589..9084d36 100644 --- a/src/services/resource/payout/confirmThirdParty.ts +++ b/src/services/resource/payout/confirmThirdParty.ts @@ -19,7 +19,6 @@ import Resource from "../../resource"; import Service from "../../../service"; import Client from "../../../client"; -import getJsonResponse from "../../../helpers/getJsonResponse"; class ConfirmThirdParty extends Resource { public constructor(service: Service) { @@ -28,13 +27,6 @@ class ConfirmThirdParty extends Resource { `${service.client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}/confirmThirdParty` ); } - - public post(request: IPayouts.ModifyRequest): Promise { - return getJsonResponse.call>( - this, - request - ); - } } export default ConfirmThirdParty; diff --git a/src/services/resource/payout/declineThirdParty.ts b/src/services/resource/payout/declineThirdParty.ts index 89e3c1a..3e2a81b 100644 --- a/src/services/resource/payout/declineThirdParty.ts +++ b/src/services/resource/payout/declineThirdParty.ts @@ -19,7 +19,6 @@ import Resource from "../../resource"; import Service from "../../../service"; import Client from "../../../client"; -import getJsonResponse from "../../../helpers/getJsonResponse"; class DeclineThirdParty extends Resource { public constructor(service: Service) { @@ -28,13 +27,6 @@ class DeclineThirdParty extends Resource { `${service.client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}/declineThirdParty` ); } - - public post(request: IPayouts.ModifyRequest): Promise { - return getJsonResponse.call>( - this, - request - ); - } } export default DeclineThirdParty; diff --git a/src/services/resource/payout/payout.ts b/src/services/resource/payout/payout.ts index 097ab68..e3893f0 100644 --- a/src/services/resource/payout/payout.ts +++ b/src/services/resource/payout/payout.ts @@ -19,7 +19,6 @@ import Resource from "../../resource"; import Service from "../../../service"; import Client from "../../../client"; -import getJsonResponse from "../../../helpers/getJsonResponse"; class Payout extends Resource { public constructor(service: Service) { @@ -28,13 +27,6 @@ class Payout extends Resource { `${service.client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}/payout` ); } - - public post(request: IPayouts.PayoutRequest): Promise { - return getJsonResponse.call>( - this, - request - ); - } } export default Payout; diff --git a/src/services/resource/payout/storeDetail.ts b/src/services/resource/payout/storeDetail.ts index c729df2..3f90df2 100644 --- a/src/services/resource/payout/storeDetail.ts +++ b/src/services/resource/payout/storeDetail.ts @@ -19,7 +19,6 @@ import Resource from "../../resource"; import Service from "../../../service"; import Client from "../../../client"; -import getJsonResponse from "../../../helpers/getJsonResponse"; class StoreDetail extends Resource { public constructor(service: Service) { @@ -28,14 +27,6 @@ class StoreDetail extends Resource { `${service.client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}/storeDetail` ); } - - public post(request: IPayouts.StoreDetailRequest): Promise { - return getJsonResponse.call>( - this, - request - ); - } - } export default StoreDetail; diff --git a/src/services/resource/payout/storeDetailAndSubmitThirdParty.ts b/src/services/resource/payout/storeDetailAndSubmitThirdParty.ts index bf7c695..8d2a01c 100644 --- a/src/services/resource/payout/storeDetailAndSubmitThirdParty.ts +++ b/src/services/resource/payout/storeDetailAndSubmitThirdParty.ts @@ -19,7 +19,6 @@ import Resource from "../../resource"; import Service from "../../../service"; import Client from "../../../client"; -import getJsonResponse from "../../../helpers/getJsonResponse"; class StoreDetailAndSubmitThirdParty extends Resource { public constructor(service: Service) { @@ -28,14 +27,6 @@ class StoreDetailAndSubmitThirdParty extends Resource { `${service.client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}/storeDetailAndSubmitThirdParty` ); } - - public post(request: IPayouts.StoreDetailAndSubmitRequest): Promise { - return getJsonResponse.call>( - this, - request - ); - } - } export default StoreDetailAndSubmitThirdParty; diff --git a/src/services/resource/payout/submitThirdParty.ts b/src/services/resource/payout/submitThirdParty.ts index 4ae0d07..b011621 100644 --- a/src/services/resource/payout/submitThirdParty.ts +++ b/src/services/resource/payout/submitThirdParty.ts @@ -19,7 +19,6 @@ import Resource from "../../resource"; import Service from "../../../service"; import Client from "../../../client"; -import getJsonResponse from "../../../helpers/getJsonResponse"; class SubmitThirdParty extends Resource { public constructor(service: Service) { @@ -28,13 +27,6 @@ class SubmitThirdParty extends Resource { `${service.client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}/submitThirdParty` ); } - - public post(request: IPayouts.SubmitRequest): Promise { - return getJsonResponse.call>( - this, - request - ); - } } export default SubmitThirdParty; diff --git a/src/services/resource/recurring/disable.ts b/src/services/resource/recurring/disable.ts index 2fe2ad2..0f49705 100644 --- a/src/services/resource/recurring/disable.ts +++ b/src/services/resource/recurring/disable.ts @@ -20,7 +20,6 @@ import Client from "../../../client"; import Service from "../../../service"; import Resource from "../../resource"; -import getJsonResponse from "../../../helpers/getJsonResponse"; class Disable extends Resource { public constructor(service: Service) { @@ -29,14 +28,6 @@ class Disable extends Resource { `${service.client.config.endpoint}/pal/servlet/Recurring/${Client.RECURRING_API_VERSION}/disable`, ); } - - public post(request: IRecurring.DisableRequest): Promise { - return getJsonResponse.call>( - this, - request, - ); - } - } export default Disable; diff --git a/src/services/resource/recurring/listRecurringDetails.ts b/src/services/resource/recurring/listRecurringDetails.ts index 2c79f64..d7aaac4 100644 --- a/src/services/resource/recurring/listRecurringDetails.ts +++ b/src/services/resource/recurring/listRecurringDetails.ts @@ -20,7 +20,6 @@ import Client from "../../../client"; import Service from "../../../service"; import Resource from "../../resource"; -import getJsonResponse from "../../../helpers/getJsonResponse"; class ListRecurringDetails extends Resource { public constructor(service: Service) { @@ -29,14 +28,6 @@ class ListRecurringDetails extends Resource { `${service.client.config.endpoint}/pal/servlet/Recurring/${Client.RECURRING_API_VERSION}/listRecurringDetails`, ); } - - public post(request: IRecurring.RecurringDetailsRequest): Promise { - return getJsonResponse.call>( - this, - request, - ); - } - } export default ListRecurringDetails; diff --git a/src/services/resource/recurring/scheduleAccountUpdater.ts b/src/services/resource/recurring/scheduleAccountUpdater.ts index 9972810..11fa87a 100644 --- a/src/services/resource/recurring/scheduleAccountUpdater.ts +++ b/src/services/resource/recurring/scheduleAccountUpdater.ts @@ -20,7 +20,6 @@ import Client from "../../../client"; import Service from "../../../service"; import Resource from "../../resource"; -import getJsonResponse from "../../../helpers/getJsonResponse"; class ScheduleAccountUpdater extends Resource { public constructor(service: Service) { @@ -29,13 +28,6 @@ class ScheduleAccountUpdater extends Resource { `${service.client.config.endpoint}/pal/servlet/Recurring/${Client.RECURRING_API_VERSION}/scheduleAccountUpdater`, ); } - - public post(request: IRecurring.ScheduleAccountUpdaterRequest): Promise { - return getJsonResponse.call>( - this, - request, - ); - } } export default ScheduleAccountUpdater; diff --git a/src/services/terminalCloudAPI.ts b/src/services/terminalCloudAPI.ts index 845ed88..08c55fa 100644 --- a/src/services/terminalCloudAPI.ts +++ b/src/services/terminalCloudAPI.ts @@ -61,12 +61,12 @@ class TerminalCloudAPI extends ApiKeyAuthenticatedService { public async(terminalApiRequest: TerminalApiRequest): Promise { const request = TerminalCloudAPI.setApplicationInfo(terminalApiRequest); - return getJsonResponse.call>(this.terminalApiAsync, request); + return getJsonResponse(this.terminalApiAsync, request); } public async sync(terminalApiRequest: TerminalApiRequest): Promise { const request = TerminalCloudAPI.setApplicationInfo(terminalApiRequest); - const response = await getJsonResponse.call>( + const response = await getJsonResponse( this.terminalApiSync, request, ); diff --git a/src/services/terminalLocalAPI.ts b/src/services/terminalLocalAPI.ts index 86481cc..b13e45b 100644 --- a/src/services/terminalLocalAPI.ts +++ b/src/services/terminalLocalAPI.ts @@ -63,7 +63,7 @@ class TerminalLocalAPI extends ApiKeyAuthenticatedService { saleToPOIRequest: saleToPoiSecuredMessage, }, "TerminalApiSecuredRequest"); - const jsonResponse = await getJsonResponse.call>( + const jsonResponse = await getJsonResponse( this.localRequest, securedPaymentRequest ); diff --git a/src/typings/HTTPMethod.ts b/src/typings/HTTPMethod.ts deleted file mode 100644 index 5f6eb44..0000000 --- a/src/typings/HTTPMethod.ts +++ /dev/null @@ -1,53 +0,0 @@ -export enum HTTPMethod { - /** - * The `CONNECT` method establishes a tunnel to the server identified by the - * target resource. - */ - CONNECT = 'CONNECT', - - /** - * The `DELETE` method deletes the specified resource. - */ - DELETE = 'DELETE', - - /** - * The `GET` method requests a representation of the specified resource. - * Requests using GET should only retrieve data. - */ - GET = 'GET', - - /** - * The `HEAD` method asks for a response identical to that of a GET request, - * but without the response body. - */ - HEAD = 'HEAD', - - /** - * The `OPTIONS` method is used to describe the communication options for the - * target resource. - */ - OPTIONS = 'OPTIONS', - - /** - * The PATCH method is used to apply partial modifications to a resource. - */ - PATCH = 'PATCH', - - /** - * The `POST` method is used to submit an entity to the specified resource, - * often causing a change in state or side effects on the server. - */ - POST = 'POST', - - /** - * The `PUT` method replaces all current representations of the target - * resource with the request payload. - */ - PUT = 'PUT', - - /** - * The `TRACE` method performs a message loop-back test along the path to the - * target resource. - */ - TRACE = 'TRACE' -} diff --git a/src/typings/genericRequest.ts b/src/typings/genericRequest.ts deleted file mode 100644 index e0afee6..0000000 --- a/src/typings/genericRequest.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { ApplicationInfo } from "./applicationInfo"; - -interface AppInfo { applicationInfo?: ApplicationInfo } -export type GenericRequest = T & AppInfo; diff --git a/src/typings/requestOptions.ts b/src/typings/requestOptions.ts index 300a88c..69b2550 100644 --- a/src/typings/requestOptions.ts +++ b/src/typings/requestOptions.ts @@ -25,7 +25,6 @@ import * as https from "https"; export namespace IRequest { export type Options = https.RequestOptions & { - id?: string; idempotencyKey?: string; }; } From c5d4a200c875f88aeb15015931b25bfa47724810 Mon Sep 17 00:00:00 2001 From: wouterboe Date: Tue, 20 Apr 2021 15:36:43 +0200 Subject: [PATCH 22/45] updated github checkout action to v2 to fix coveralls parallel action --- .github/workflows/coveralls.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml index abb0aef..f205237 100644 --- a/.github/workflows/coveralls.yml +++ b/.github/workflows/coveralls.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Use Node.js 12.x uses: actions/setup-node@v1 From a11a62eb10d87e9f9bdda324283f426a8fe90415 Mon Sep 17 00:00:00 2001 From: wouterboe Date: Mon, 19 Apr 2021 17:13:41 +0200 Subject: [PATCH 23/45] implemented timing safe hmac comparison --- src/security/nexoCrypto.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/security/nexoCrypto.ts b/src/security/nexoCrypto.ts index 730c6ed..f24d843 100644 --- a/src/security/nexoCrypto.ts +++ b/src/security/nexoCrypto.ts @@ -17,7 +17,7 @@ * See the LICENSE file for more info. */ -import { Cipher, createCipheriv, createDecipheriv, createHmac, randomBytes } from "crypto"; +import { Cipher, createCipheriv, createDecipheriv, createHmac, randomBytes, timingSafeEqual } from "crypto"; import NexoCryptoException from "../services/exception/nexoCryptoException"; import { MessageHeader, @@ -115,9 +115,7 @@ class NexoCrypto { private validateHmac(receivedHmac: Buffer, decryptedMessage: Buffer, derivedKey: NexoDerivedKey): void { const hmac = NexoCrypto.hmac(decryptedMessage, derivedKey); - const isValid = hmac.every((item, index): boolean => item === receivedHmac[index]); - - if (!isValid) { + if (!timingSafeEqual(hmac, receivedHmac)) { throw new NexoCryptoException("Hmac validation failed"); } } From da147aafa55c1adc9aca7e5d59c626fe41c3935d Mon Sep 17 00:00:00 2001 From: wouterboe Date: Wed, 21 Apr 2021 15:16:26 +0200 Subject: [PATCH 24/45] added time-safe hmac validation to the hmacValidator utils class --- src/utils/hmacValidator.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/utils/hmacValidator.ts b/src/utils/hmacValidator.ts index 0230869..9184db1 100644 --- a/src/utils/hmacValidator.ts +++ b/src/utils/hmacValidator.ts @@ -17,7 +17,7 @@ * See the LICENSE file for more info. */ -import { createHmac } from "crypto"; +import { createHmac, timingSafeEqual } from "crypto"; import { NotificationRequestItem } from "../typings/notification/models"; import { ApiConstants } from "../constants/apiConstants"; @@ -37,7 +37,14 @@ class HmacValidator { if (notificationRequestItem.additionalData?.[ApiConstants.HMAC_SIGNATURE]) { const expectedSign = this.calculateHmac(notificationRequestItem, key); const merchantSign = notificationRequestItem.additionalData?.[ApiConstants.HMAC_SIGNATURE]; - return expectedSign === merchantSign; + if(typeof merchantSign !== "undefined" && expectedSign.length === merchantSign.length) { + return timingSafeEqual( + Buffer.from(expectedSign, "base64"), + Buffer.from(merchantSign, "base64") + ); + } + return false; + } throw Error(`Missing ${ApiConstants.HMAC_SIGNATURE}`); } From 0d36b0c14005ad3b59e6f38162912577e5014e63 Mon Sep 17 00:00:00 2001 From: wouterboe Date: Wed, 21 Apr 2021 16:16:59 +0200 Subject: [PATCH 25/45] test added for missing hmac signature --- src/__tests__/hmacValidator.spec.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/__tests__/hmacValidator.spec.ts b/src/__tests__/hmacValidator.spec.ts index d3a23ec..37e5fff 100644 --- a/src/__tests__/hmacValidator.spec.ts +++ b/src/__tests__/hmacValidator.spec.ts @@ -84,6 +84,28 @@ describe("HMAC Validator", function (): void { expect(result).toBeFalsy(); }); + it("should throw error with missing hmac signature", function(): void { + expect.assertions(1); + const notificationRequestItemNoAdditionalData: NotificationRequestItem = { + pspReference: "pspReference", + originalReference: "originalReference", + merchantAccountCode: "merchantAccount", + merchantReference: "reference", + amount: {currency: "EUR", value: 1000}, + eventCode: NotificationRequestItem.EventCodeEnum.REPORTAVAILABLE, + eventDate: "2019-09-21T11:45:24.637Z", + paymentMethod: "VISA", + reason: "reason", + success: NotificationRequestItem.SuccessEnum.True, + additionalData: { }, + }; + try { + hmacValidator.validateHMAC(notificationRequestItemNoAdditionalData, key); + } catch(error) { + expect(error.message).toEqual(`Missing ${ApiConstants.HMAC_SIGNATURE}`); + } + }); + it("should test hmac", function () { const data = "countryCode:currencyCode:merchantAccount:merchantReference:paymentAmount:sessionValidity:skinCode:NL:EUR:MagentoMerchantTest2:TEST-PAYMENT-2017-02-01-14\\:02\\:05:199:2017-02-02T14\\:02\\:05+01\\:00:PKz2KML1"; const key = "DFB1EB5485895CFA84146406857104ABB4CBCABDC8AAF103A624C8F6A3EAAB00"; From 92b9f346b75de6080e33183df82a4107149e806d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Apr 2021 14:33:27 +0000 Subject: [PATCH 26/45] Bump acorn from 8.0.5 to 8.1.1 Bumps [acorn](https://github.com/acornjs/acorn) from 8.0.5 to 8.1.1. - [Release notes](https://github.com/acornjs/acorn/releases) - [Commits](https://github.com/acornjs/acorn/compare/8.0.5...8.1.1) Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- yarn.lock | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 294cca7..bc947f9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1180,9 +1180,9 @@ "dev": true }, "acorn": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.0.5.tgz", - "integrity": "sha512-v+DieK/HJkJOpFBETDJioequtc3PfxsWMaxIdIwujtF7FEV/MAyDQLlm6/zPvr7Mix07mLh6ccVwIsloceodlg==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.1.1.tgz", + "integrity": "sha512-xYiIVjNuqtKXMxlRMDc6mZUhXehod4a3gbZ1qRlM7icK4EbxUFNLhWoPblCvFtB2Y9CIqHP3CF/rdxLItaQv8g==", "dev": true }, "acorn-globals": { diff --git a/yarn.lock b/yarn.lock index 83d3df0..5a290dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -874,9 +874,9 @@ acorn@^7.1.0, acorn@^7.1.1: integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w== acorn@^8.0.1: - version "8.0.5" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.0.5.tgz#a3bfb872a74a6a7f661bc81b9849d9cac12601b7" - integrity sha512-v+DieK/HJkJOpFBETDJioequtc3PfxsWMaxIdIwujtF7FEV/MAyDQLlm6/zPvr7Mix07mLh6ccVwIsloceodlg== + version "8.1.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.1.1.tgz#fb0026885b9ac9f48bac1e185e4af472971149ff" + integrity sha512-xYiIVjNuqtKXMxlRMDc6mZUhXehod4a3gbZ1qRlM7icK4EbxUFNLhWoPblCvFtB2Y9CIqHP3CF/rdxLItaQv8g== agent-base@6: version "6.0.1" From fda407dc93ec9fa64d9b13fdbf5e54aa24e19306 Mon Sep 17 00:00:00 2001 From: wouterboe Date: Wed, 21 Apr 2021 16:37:09 +0200 Subject: [PATCH 27/45] removed checkout head^2 from codeQL build --- .github/workflows/codeql-analysis.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index aa525ec..ac78636 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -18,11 +18,6 @@ jobs: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. fetch-depth: 2 - - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL From 1908978e035ef65eb348f0f1b005d531c16ad4d8 Mon Sep 17 00:00:00 2001 From: wouterboe Date: Wed, 21 Apr 2021 17:13:24 +0200 Subject: [PATCH 28/45] increased readability of hmac comparison input conditions --- src/utils/hmacValidator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/hmacValidator.ts b/src/utils/hmacValidator.ts index 9184db1..a9396fd 100644 --- a/src/utils/hmacValidator.ts +++ b/src/utils/hmacValidator.ts @@ -37,7 +37,7 @@ class HmacValidator { if (notificationRequestItem.additionalData?.[ApiConstants.HMAC_SIGNATURE]) { const expectedSign = this.calculateHmac(notificationRequestItem, key); const merchantSign = notificationRequestItem.additionalData?.[ApiConstants.HMAC_SIGNATURE]; - if(typeof merchantSign !== "undefined" && expectedSign.length === merchantSign.length) { + if(merchantSign && expectedSign.length === merchantSign.length) { return timingSafeEqual( Buffer.from(expectedSign, "base64"), Buffer.from(merchantSign, "base64") From 8c7e045c17583c2875a798e50186d4c2556cdd83 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Apr 2021 10:59:07 +0000 Subject: [PATCH 29/45] Bump y18n from 4.0.0 to 4.0.3 Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.3. - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/y18n-v4.0.3/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/compare/v4.0.0...y18n-v4.0.3) Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- yarn.lock | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index bc947f9..d3308cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7616,9 +7616,9 @@ "dev": true }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true }, "yaml": { diff --git a/yarn.lock b/yarn.lock index 5a290dc..b9ccef6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5405,9 +5405,9 @@ xmlchars@^2.1.1: integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== y18n@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" - integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + version "4.0.3" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" + integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== yaml@1.10.0, yaml@^1.10.0: version "1.10.0" From ea80034a46f6a552d099477416ecbdf6856e7d25 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Apr 2021 11:23:01 +0000 Subject: [PATCH 30/45] Bump release-it from 14.2.2 to 14.6.1 Bumps [release-it](https://github.com/release-it/release-it) from 14.2.2 to 14.6.1. - [Release notes](https://github.com/release-it/release-it/releases) - [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md) - [Commits](https://github.com/release-it/release-it/compare/14.2.2...14.6.1) Signed-off-by: dependabot[bot] --- package-lock.json | 755 ++++++++++++++++++++++++++++++++-------------- package.json | 2 +- yarn.lock | 546 +++++++++++++++++++++------------ 3 files changed, 891 insertions(+), 412 deletions(-) diff --git a/package-lock.json b/package-lock.json index d3308cd..b72474d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -671,61 +671,62 @@ } }, "@nodelib/fs.scandir": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", - "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", + "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", "dev": true, "requires": { - "@nodelib/fs.stat": "2.0.3", + "@nodelib/fs.stat": "2.0.4", "run-parallel": "^1.1.9" } }, "@nodelib/fs.stat": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz", - "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", + "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==", "dev": true }, "@nodelib/fs.walk": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz", - "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", + "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", "dev": true, "requires": { - "@nodelib/fs.scandir": "2.1.3", + "@nodelib/fs.scandir": "2.1.4", "fastq": "^1.6.0" } }, "@octokit/auth-token": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.3.tgz", - "integrity": "sha512-fdGoOQ3kQJh+hrilc0Plg50xSfaCKOeYN9t6dpJKXN9BxhhfquL0OzoQXg3spLYymL5rm29uPeI3KEXRaZQ9zg==", + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.5.tgz", + "integrity": "sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA==", "dev": true, "requires": { - "@octokit/types": "^5.0.0" + "@octokit/types": "^6.0.3" } }, "@octokit/core": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.2.1.tgz", - "integrity": "sha512-XfFSDDwv6tclUenS0EmB6iA7u+4aOHBT1Lz4PtQNQQg3hBbNaR/+Uv5URU+egeIuuGAiMRiDyY92G4GBOWOqDA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.4.0.tgz", + "integrity": "sha512-6/vlKPP8NF17cgYXqucdshWqmMZGXkuvtcrWCgU5NOI0Pl2GjlmZyWgBMrU8zJ3v2MJlM6++CiB45VKYmhiWWg==", "dev": true, "requires": { - "@octokit/auth-token": "^2.4.0", - "@octokit/graphql": "^4.3.1", - "@octokit/request": "^5.4.0", - "@octokit/types": "^5.0.0", - "before-after-hook": "^2.1.0", + "@octokit/auth-token": "^2.4.4", + "@octokit/graphql": "^4.5.8", + "@octokit/request": "^5.4.12", + "@octokit/request-error": "^2.0.5", + "@octokit/types": "^6.0.3", + "before-after-hook": "^2.2.0", "universal-user-agent": "^6.0.0" } }, "@octokit/endpoint": { - "version": "6.0.9", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.9.tgz", - "integrity": "sha512-3VPLbcCuqji4IFTclNUtGdp9v7g+nspWdiCUbK3+iPMjJCZ6LEhn1ts626bWLOn0GiDb6j+uqGvPpqLnY7pBgw==", + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.11.tgz", + "integrity": "sha512-fUIPpx+pZyoLW4GCs3yMnlj2LfoXTWDUVPTC4V3MUEKZm48W+XYpeWSZCv+vYF1ZABUm2CqnDVf1sFtIYrj7KQ==", "dev": true, "requires": { - "@octokit/types": "^5.0.0", + "@octokit/types": "^6.0.3", "is-plain-object": "^5.0.0", "universal-user-agent": "^6.0.0" }, @@ -739,54 +740,58 @@ } }, "@octokit/graphql": { - "version": "4.5.7", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.5.7.tgz", - "integrity": "sha512-Gk0AR+DcwIK/lK/GX+OQ99UqtenQhcbrhHHfOYlrCQe17ADnX3EKAOKRsAZ9qZvpi5MuwWm/Nm+9aO2kTDSdyA==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.6.1.tgz", + "integrity": "sha512-2lYlvf4YTDgZCTXTW4+OX+9WTLFtEUc6hGm4qM1nlZjzxj+arizM4aHWzBVBCxY9glh7GIs0WEuiSgbVzv8cmA==", "dev": true, "requires": { "@octokit/request": "^5.3.0", - "@octokit/types": "^5.0.0", + "@octokit/types": "^6.0.3", "universal-user-agent": "^6.0.0" } }, + "@octokit/openapi-types": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-6.1.0.tgz", + "integrity": "sha512-Z9fDZVbGj4dFLErEoXUSuZhk3wJ8KVGnbrUwoPijsQ9EyNwOeQ+U2jSqaHUz8WtgIWf0aeO59oJyhMpWCKaabg==", + "dev": true + }, "@octokit/plugin-paginate-rest": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.6.0.tgz", - "integrity": "sha512-o+O8c1PqsC5++BHXfMZabRRsBIVb34tXPWyQLyp2IXq5MmkxdipS7TXM4Y9ldL1PzY9CTrCsn/lzFFJGM3oRRA==", + "version": "2.13.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.13.3.tgz", + "integrity": "sha512-46lptzM9lTeSmIBt/sVP/FLSTPGx6DCzAdSX3PfeJ3mTf4h9sGC26WpaQzMEq/Z44cOcmx8VsOhO+uEgE3cjYg==", "dev": true, "requires": { - "@octokit/types": "^5.5.0" + "@octokit/types": "^6.11.0" } }, "@octokit/plugin-request-log": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.2.tgz", - "integrity": "sha512-oTJSNAmBqyDR41uSMunLQKMX0jmEXbwD1fpz8FG27lScV3RhtGfBa1/BBLym+PxcC16IBlF7KH9vP1BUYxA+Eg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.3.tgz", + "integrity": "sha512-4RFU4li238jMJAzLgAwkBAw+4Loile5haQMQr+uhFq27BmyJXcXSKvoQKqh0agsZEiUlW6iSv3FAgvmGkur7OQ==", "dev": true }, "@octokit/plugin-rest-endpoint-methods": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.1.tgz", - "integrity": "sha512-QyFr4Bv807Pt1DXZOC5a7L5aFdrwz71UHTYoHVajYV5hsqffWm8FUl9+O7nxRu5PDMtB/IKrhFqTmdBTK5cx+A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.0.0.tgz", + "integrity": "sha512-Jc7CLNUueIshXT+HWt6T+M0sySPjF32mSFQAK7UfAg8qGeRI6OM1GSBxDLwbXjkqy2NVdnqCedJcP1nC785JYg==", "dev": true, "requires": { - "@octokit/types": "^5.5.0", + "@octokit/types": "^6.13.0", "deprecation": "^2.3.1" } }, "@octokit/request": { - "version": "5.4.10", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.10.tgz", - "integrity": "sha512-egA49HkqEORVGDZGav1mh+VD+7uLgOxtn5oODj6guJk0HCy+YBSYapFkSLFgeYj3Fr18ZULKGURkjyhkAChylw==", + "version": "5.4.15", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.15.tgz", + "integrity": "sha512-6UnZfZzLwNhdLRreOtTkT9n57ZwulCve8q3IT/Z477vThu6snfdkBuhxnChpOKNGxcQ71ow561Qoa6uqLdPtag==", "dev": true, "requires": { "@octokit/endpoint": "^6.0.1", "@octokit/request-error": "^2.0.0", - "@octokit/types": "^5.0.0", - "deprecation": "^2.0.0", + "@octokit/types": "^6.7.1", "is-plain-object": "^5.0.0", "node-fetch": "^2.6.1", - "once": "^1.4.0", "universal-user-agent": "^6.0.0" }, "dependencies": { @@ -799,41 +804,41 @@ } }, "@octokit/request-error": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.3.tgz", - "integrity": "sha512-GgD5z8Btm301i2zfvJLk/mkhvGCdjQ7wT8xF9ov5noQY8WbKZDH9cOBqXzoeKd1mLr1xH2FwbtGso135zGBgTA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.5.tgz", + "integrity": "sha512-T/2wcCFyM7SkXzNoyVNWjyVlUwBvW3igM3Btr/eKYiPmucXTtkxt2RBsf6gn3LTzaLSLTQtNmvg+dGsOxQrjZg==", "dev": true, "requires": { - "@octokit/types": "^5.0.1", + "@octokit/types": "^6.0.3", "deprecation": "^2.0.0", "once": "^1.4.0" } }, "@octokit/rest": { - "version": "18.0.9", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.0.9.tgz", - "integrity": "sha512-CC5+cIx974Ygx9lQNfUn7/oXDQ9kqGiKUC6j1A9bAVZZ7aoTF8K6yxu0pQhQrLBwSl92J6Z3iVDhGhGFgISCZg==", + "version": "18.5.2", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.5.2.tgz", + "integrity": "sha512-Kz03XYfKS0yYdi61BkL9/aJ0pP2A/WK5vF/syhu9/kY30J8He3P68hv9GRpn8bULFx2K0A9MEErn4v3QEdbZcw==", "dev": true, "requires": { - "@octokit/core": "^3.0.0", - "@octokit/plugin-paginate-rest": "^2.2.0", - "@octokit/plugin-request-log": "^1.0.0", - "@octokit/plugin-rest-endpoint-methods": "4.2.1" + "@octokit/core": "^3.2.3", + "@octokit/plugin-paginate-rest": "^2.6.2", + "@octokit/plugin-request-log": "^1.0.2", + "@octokit/plugin-rest-endpoint-methods": "5.0.0" } }, "@octokit/types": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-5.5.0.tgz", - "integrity": "sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ==", + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.13.1.tgz", + "integrity": "sha512-UF/PL0y4SKGx/p1azFf7e6j9lB78tVwAFvnHtslzOJ6VipshYks74qm9jjTEDlCyaTmbhbk2h3Run5l0CtCF6A==", "dev": true, "requires": { - "@types/node": ">= 8" + "@octokit/openapi-types": "^6.0.0" } }, "@sindresorhus/is": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.0.tgz", - "integrity": "sha512-FyD2meJpDPjyNQejSjvnhpgI/azsQkA4lGbuu5BQZfjvJ9cbRZXzeWL2HceCekW4lixO9JPesIIQkSoLjeJHNQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz", + "integrity": "sha512-Qm9hBEBu18wt1PO2flE7LPb30BHMQt1eQgbV76YntdNk73XZGpn3izvGTYxbGgzXKgbCjiia0uxTd3aTNQrY/g==", "dev": true }, "@sinonjs/commons": { @@ -1553,6 +1558,12 @@ } } }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, "bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -1563,9 +1574,9 @@ } }, "before-after-hook": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz", - "integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.1.tgz", + "integrity": "sha512-/6FKxSTWoJdbsLDF8tdIjaRiFXiE6UHsEHE3OPI/cwPURCVi1ukP0gmLn7XWEiFk5TcwQjjY5PWsU+j+tgXgmw==", "dev": true }, "big.js": { @@ -1574,20 +1585,75 @@ "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", "dev": true }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "boxen": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", - "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.0.1.tgz", + "integrity": "sha512-49VBlw+PrWEF51aCmy7QIteYPIFZxSpvqBdP/2itCPPlJ49kj9zg/XPRFrdkne2W+CfwXUls8exMvu1RysZpKA==", "dev": true, "requires": { "ansi-align": "^3.0.0", - "camelcase": "^5.3.1", - "chalk": "^3.0.0", - "cli-boxes": "^2.2.0", - "string-width": "^4.1.0", - "term-size": "^2.1.0", - "type-fest": "^0.8.1", - "widest-line": "^3.1.0" + "camelcase": "^6.2.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.1", + "string-width": "^4.2.0", + "type-fest": "^0.20.2", + "widest-line": "^3.1.0", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "dev": true + }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } } }, "brace-expansion": { @@ -1650,6 +1716,16 @@ "node-int64": "^0.4.0" } }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", @@ -1674,9 +1750,9 @@ } }, "cacheable-lookup": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.3.tgz", - "integrity": "sha512-W+JBqF9SWe18A72XFzN/V/CULFzPm7sBXzzR6ekkE+3tLG72wFZrBiBZhrZuDoYexop4PHJVdFAKb/Nj9+tm9w==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", "dev": true }, "cacheable-request": { @@ -1711,6 +1787,16 @@ } } }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1799,9 +1885,9 @@ } }, "cli-spinners": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.5.0.tgz", - "integrity": "sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.0.tgz", + "integrity": "sha512-t+4/y50K/+4xcCRosKkA7W4gTr1MySvLV0q+PxmG7FJ5g+66ChKurYjxBCjHggHH3HA5Hh9cy+lcUGWDqVH+4Q==", "dev": true }, "cli-width": { @@ -2162,9 +2248,9 @@ } }, "defer-to-connect": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.0.tgz", - "integrity": "sha512-bYL2d05vOSf1JEZNx5vSAtPuBMkX8K9EUutg7zlKvTqKXHt7RhWJFbmd7qakVuf13i+IkGmp6FwSsONOf6VYIg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", "dev": true }, "define-property": { @@ -2225,9 +2311,9 @@ }, "dependencies": { "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true } } @@ -2802,9 +2888,9 @@ "dev": true }, "fast-glob": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz", - "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", + "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", @@ -2834,9 +2920,9 @@ "dev": true }, "fastq": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.9.0.tgz", - "integrity": "sha512-i7FVWL8HhVY+CTkwFxkN2mk3h+787ixS5S63eb78diVRc1MCssarHq3W5cj0av7YDSwmaV928RNag+U1etRQ7w==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", + "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -2884,6 +2970,12 @@ "to-regex-range": "^5.0.1" } }, + "filter-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", + "integrity": "sha1-mzERErxsYSehbgFsbF1/GeCAXFs=", + "dev": true + }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -2968,6 +3060,12 @@ "dev": true, "optional": true }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", @@ -2986,6 +3084,17 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, "get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", @@ -3027,9 +3136,9 @@ } }, "git-url-parse": { - "version": "11.4.0", - "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-11.4.0.tgz", - "integrity": "sha512-KlIa5jvMYLjXMQXkqpFzobsyD/V2K5DRHl5OAf+6oDFPlPLxrGDVQlIdI63c4/Kt6kai4kALENSALlzTGST3GQ==", + "version": "11.4.4", + "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-11.4.4.tgz", + "integrity": "sha512-Y4o9o7vQngQDIU9IjyCmRJBin5iYjI5u9ZITnddRZpD7dcCFQj2sL2XuMNbLRE4b4B/4ENPsp2Q8P44fjAZ0Pw==", "dev": true, "requires": { "git-up": "^4.0.0" @@ -3059,12 +3168,12 @@ } }, "global-dirs": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz", - "integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", + "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", "dev": true, "requires": { - "ini": "^1.3.5" + "ini": "2.0.0" } }, "globals": { @@ -3077,9 +3186,9 @@ } }, "globby": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz", - "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==", + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.3.tgz", + "integrity": "sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg==", "dev": true, "requires": { "array-union": "^2.1.0", @@ -3099,9 +3208,9 @@ } }, "got": { - "version": "11.8.0", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.0.tgz", - "integrity": "sha512-k9noyoIIY9EejuhaBNLyZ31D5328LeqnyPNXJQb2XlJZcKakLqN5m6O/ikhq/0lw56kUYS54fVm+D1x57YC9oQ==", + "version": "11.8.2", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.2.tgz", + "integrity": "sha512-D0QywKgIe30ODs+fm8wMZiAcZjypcCodPNuMz5H9Mny7RJ+IjJ10BdmGW7OM7fHXP+O7r6ZwapQ/YQmMSvB0UQ==", "dev": true, "requires": { "@sindresorhus/is": "^4.0.0", @@ -3146,12 +3255,27 @@ "har-schema": "^2.0.0" } }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -3249,9 +3373,9 @@ } }, "http2-wrapper": { - "version": "1.0.0-beta.5.2", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.0-beta.5.2.tgz", - "integrity": "sha512-xYz9goEyBnC8XwXDTuC/MZ6t+MrKVQZOk4s7+PaDkwIsQd8IwqvM+0M6bA/2lvG8GHXcPdf+MejTUeO2LCPCeQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", + "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", "dev": true, "requires": { "quick-lru": "^5.1.1", @@ -3282,6 +3406,12 @@ "safer-buffer": ">= 2.1.2 < 3" } }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true + }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -3363,9 +3493,9 @@ "dev": true }, "ini": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", - "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", "dev": true }, "inquirer": { @@ -3543,13 +3673,13 @@ } }, "is-installed-globally": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", - "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", "dev": true, "requires": { - "global-dirs": "^2.0.1", - "is-path-inside": "^3.0.1" + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" } }, "is-interactive": { @@ -3577,9 +3707,9 @@ "dev": true }, "is-path-inside": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz", - "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true }, "is-plain-object": { @@ -3612,6 +3742,12 @@ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true + }, "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -4534,18 +4670,19 @@ "dev": true }, "log-symbols": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", - "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "requires": { - "chalk": "^4.0.0" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" }, "dependencies": { "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -4582,6 +4719,15 @@ "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", "dev": true }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "macos-release": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.4.1.tgz", @@ -4950,6 +5096,12 @@ } } }, + "object-inspect": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.2.tgz", + "integrity": "sha512-gz58rdPpadwztRrPjZE9DZLOABUpTGdcANUgOwBFO1C+HZZhePoP83M65WGDmbpwFYJSWqavbl4SgDn4k8RYTA==", + "dev": true + }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", @@ -5010,25 +5162,26 @@ } }, "ora": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.1.0.tgz", - "integrity": "sha512-9tXIMPvjZ7hPTbk8DFq1f7Kow/HU/pQYB60JbNq+QnGwcyhWVZaQ4hM9zQDEsPxw/muLpgiHSaumUZxCAmod/w==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.0.tgz", + "integrity": "sha512-1StwyXQGoU6gdjYkyVcqOLnVlbKj+6yPNNOxJVgpt9t4eksKjiriiHuxktLYkgllwk+D6MbC4ihH84L1udRXPg==", "dev": true, "requires": { + "bl": "^4.1.0", "chalk": "^4.1.0", "cli-cursor": "^3.1.0", - "cli-spinners": "^2.4.0", + "cli-spinners": "^2.5.0", "is-interactive": "^1.0.0", - "log-symbols": "^4.0.0", - "mute-stream": "0.0.8", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", "strip-ansi": "^6.0.0", "wcwidth": "^1.0.1" }, "dependencies": { "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -5063,9 +5216,9 @@ "dev": true }, "p-cancelable": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.0.0.tgz", - "integrity": "sha512-wvPXDmbMmu2ksjkB4Z3nZWTSkJEb9lqVdMaCKpZUGJG9TMiNp9XcbG3fn9fPKjem04fJMJnXoyFPk2FmgiaiNg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.0.tgz", + "integrity": "sha512-HAZyB3ZodPo+BDpb4/Iu7Jv4P6cSazBz9ZM0ChhEXp70scx834aWCEjQRwgt41UzzejUAPdbqqONfRWTPYrPAQ==", "dev": true }, "p-each-series": { @@ -5269,13 +5422,26 @@ } }, "parse-path": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/parse-path/-/parse-path-4.0.2.tgz", - "integrity": "sha512-HSqVz6iuXSiL8C1ku5Gl1Z5cwDd9Wo0q8CoffdAghP6bz8pJa1tcMC+m4N+z6VAS8QdksnIGq1TB6EgR4vPR6w==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/parse-path/-/parse-path-4.0.3.tgz", + "integrity": "sha512-9Cepbp2asKnWTJ9x2kpw6Fe8y9JDbqwahGCTvklzd/cEq5C5JC59x2Xb0Kx+x0QZ8bvNquGO8/BWP0cwBHzSAA==", "dev": true, "requires": { "is-ssh": "^1.3.0", - "protocols": "^1.4.0" + "protocols": "^1.4.0", + "qs": "^6.9.4", + "query-string": "^6.13.8" + }, + "dependencies": { + "qs": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz", + "integrity": "sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==", + "dev": true, + "requires": { + "side-channel": "^1.0.4" + } + } } }, "parse-url": { @@ -5475,6 +5641,24 @@ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", "dev": true }, + "query-string": { + "version": "6.14.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.14.1.tgz", + "integrity": "sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw==", + "dev": true, + "requires": { + "decode-uri-component": "^0.2.0", + "filter-obj": "^1.1.0", + "split-on-first": "^1.0.0", + "strict-uri-encode": "^2.0.0" + } + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, "quick-lru": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", @@ -5493,6 +5677,12 @@ "strip-json-comments": "~2.0.1" }, "dependencies": { + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -5599,39 +5789,39 @@ } }, "release-it": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/release-it/-/release-it-14.2.2.tgz", - "integrity": "sha512-rnJOzDIXErrwCD9cRMtDgmOZlcLQiL0z0dVyN95G2T1FQVBQNr7AD5EiH3U+K6X7s+EVoK90lF96NXe5QuvG1A==", + "version": "14.6.1", + "resolved": "https://registry.npmjs.org/release-it/-/release-it-14.6.1.tgz", + "integrity": "sha512-noBho2997G3yrm6YvdLJj4Ua2SCFOU7ajCqtvteI3DZtpM1IhiyXSgcn2Q5irq8lTNK0it4eiNq9TSrAWNYDkA==", "dev": true, "requires": { "@iarna/toml": "2.2.5", - "@octokit/rest": "18.0.9", + "@octokit/rest": "18.5.2", "async-retry": "1.3.1", "chalk": "4.1.0", "cosmiconfig": "7.0.0", "debug": "4.3.1", "deprecated-obj": "2.0.0", - "execa": "4.1.0", + "execa": "5.0.0", "find-up": "5.0.0", - "form-data": "3.0.0", - "git-url-parse": "11.4.0", - "globby": "11.0.1", - "got": "11.8.0", + "form-data": "4.0.0", + "git-url-parse": "11.4.4", + "globby": "11.0.3", + "got": "11.8.2", "import-cwd": "3.0.0", - "inquirer": "7.3.3", - "is-ci": "2.0.0", - "lodash": "4.17.20", - "mime-types": "2.1.27", - "ora": "5.1.0", + "inquirer": "8.0.0", + "is-ci": "3.0.0", + "lodash": "4.17.21", + "mime-types": "2.1.30", + "ora": "5.4.0", "os-name": "4.0.0", - "parse-json": "5.1.0", - "semver": "7.3.2", + "parse-json": "5.2.0", + "semver": "7.3.5", "shelljs": "0.8.4", - "update-notifier": "5.0.1", + "update-notifier": "5.1.0", "url-join": "4.0.1", - "uuid": "8.3.1", - "yaml": "1.10.0", - "yargs-parser": "20.2.4" + "uuid": "8.3.2", + "yaml": "1.10.2", + "yargs-parser": "20.2.7" }, "dependencies": { "chalk": { @@ -5644,6 +5834,12 @@ "supports-color": "^7.1.0" } }, + "ci-info": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.1.1.tgz", + "integrity": "sha512-kdRWLBIJwdsYJWYJFtAFFYxybguqeF91qpZaggjG5Nf8QKdizFG2hjqvaTXbxFIcYbSaD74KpAXv6BSm17DHEQ==", + "dev": true + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -5665,19 +5861,19 @@ } }, "execa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", - "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.0.0.tgz", + "integrity": "sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==", "dev": true, "requires": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", "is-stream": "^2.0.0", "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "signal-exit": "^3.0.2", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", "strip-final-newline": "^2.0.0" } }, @@ -5692,9 +5888,9 @@ } }, "form-data": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", - "integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dev": true, "requires": { "asynckit": "^0.4.0", @@ -5703,12 +5899,45 @@ } }, "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + }, + "inquirer": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.0.0.tgz", + "integrity": "sha512-ON8pEJPPCdyjxj+cxsYRe6XfCJepTxANdNnTebsTuQgXpRyZRRT9t4dJwjRubgmvn20CLSEnozRUayXyM9VTXA==", "dev": true, "requires": { - "pump": "^3.0.0" + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.6.6", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + } + }, + "is-ci": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.0.tgz", + "integrity": "sha512-kDXyttuLeslKAHYL/K28F2YkM3x5jvFPEw3yXbRptXydjD9rpLEz+C5K5iutY9ZiUu6AP41JdvRQwF4Iqs4ZCQ==", + "dev": true, + "requires": { + "ci-info": "^3.1.1" } }, "is-stream": { @@ -5727,11 +5956,26 @@ } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "mime-db": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", + "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==", + "dev": true + }, + "mime-types": { + "version": "2.1.30", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", + "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", + "dev": true, + "requires": { + "mime-db": "1.47.0" + } + }, "npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -5741,6 +5985,15 @@ "path-key": "^3.0.0" } }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, "p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -5760,9 +6013,9 @@ } }, "parse-json": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz", - "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -5777,6 +6030,24 @@ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -5792,10 +6063,19 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, "uuid": { - "version": "8.3.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", - "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true }, "which": { @@ -5808,9 +6088,9 @@ } }, "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "20.2.7", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz", + "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==", "dev": true } } @@ -5903,9 +6183,9 @@ } }, "resolve-alpn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.0.0.tgz", - "integrity": "sha512-rTuiIEqFmGxne4IovivKSDzld2lWW9QCjqv80SYjPgf+gS35eaCAjaP54CCwGAwBtnCsvNLYtqxe1Nw+i6JEmA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.1.2.tgz", + "integrity": "sha512-8OyfzhAtA32LVUsJSke3auIyINcwdh5l3cvYKdKO0nvsYSKuiLfTM5i78PJswFPT8y6cPW+L1v6/hE95chcpDA==", "dev": true }, "resolve-cwd": { @@ -5996,10 +6276,13 @@ "dev": true }, "run-parallel": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.10.tgz", - "integrity": "sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw==", - "dev": true + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } }, "rxjs": { "version": "6.6.2", @@ -6266,6 +6549,17 @@ "dev": true, "optional": true }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", @@ -6539,6 +6833,12 @@ "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", "dev": true }, + "split-on-first": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", + "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==", + "dev": true + }, "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", @@ -6610,6 +6910,12 @@ "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", "dev": true }, + "strict-uri-encode": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", + "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=", + "dev": true + }, "string-length": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-length/-/string-length-3.1.0.tgz", @@ -6760,12 +7066,6 @@ "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", "dev": true }, - "term-size": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", - "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", - "dev": true - }, "terminal-link": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", @@ -7155,36 +7455,45 @@ } }, "update-notifier": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.0.1.tgz", - "integrity": "sha512-BuVpRdlwxeIOvmc32AGYvO1KVdPlsmqSh8KDDBxS6kDE5VR7R8OMP1d8MdhaVBvxl4H3551k9akXr0Y1iIB2Wg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", + "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", "dev": true, "requires": { - "boxen": "^4.2.0", + "boxen": "^5.0.0", "chalk": "^4.1.0", "configstore": "^5.0.1", "has-yarn": "^2.1.0", "import-lazy": "^2.1.0", "is-ci": "^2.0.0", - "is-installed-globally": "^0.3.2", + "is-installed-globally": "^0.4.0", "is-npm": "^5.0.0", "is-yarn-global": "^0.3.0", "latest-version": "^5.1.0", "pupa": "^2.1.1", - "semver": "^7.3.2", + "semver": "^7.3.4", "semver-diff": "^3.1.1", "xdg-basedir": "^4.0.0" }, "dependencies": { "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", "dev": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } } } }, @@ -7621,10 +7930,16 @@ "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "yaml": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", - "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true }, "yargs": { diff --git a/package.json b/package.json index 1b96065..7969dc4 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "kind-of": "^6.0.3", "minimist": ">=1.2.3", "nock": "13.0.7", - "release-it": "14.2.2", + "release-it": "14.6.1", "ts-auto-mock": "^2.6.5", "ts-jest": "25.5.1", "ts-loader": "8.0.10", diff --git a/yarn.lock b/yarn.lock index b9ccef6..3f927f5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -501,23 +501,24 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@octokit/auth-token@^2.4.0": - version "2.4.2" - resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.2.tgz#10d0ae979b100fa6b72fa0e8e63e27e6d0dbff8a" - integrity sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ== +"@octokit/auth-token@^2.4.4": + version "2.4.5" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.5.tgz#568ccfb8cb46f36441fac094ce34f7a875b197f3" + integrity sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA== dependencies: - "@octokit/types" "^5.0.0" + "@octokit/types" "^6.0.3" -"@octokit/core@^3.0.0": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.1.2.tgz#c937d5f9621b764573068fcd2e5defcc872fd9cc" - integrity sha512-AInOFULmwOa7+NFi9F8DlDkm5qtZVmDQayi7TUgChE3yeIGPq0Y+6cAEXPexQ3Ea+uZy66hKEazR7DJyU+4wfw== +"@octokit/core@^3.2.3": + version "3.4.0" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.4.0.tgz#b48aa27d755b339fe7550548b340dcc2b513b742" + integrity sha512-6/vlKPP8NF17cgYXqucdshWqmMZGXkuvtcrWCgU5NOI0Pl2GjlmZyWgBMrU8zJ3v2MJlM6++CiB45VKYmhiWWg== dependencies: - "@octokit/auth-token" "^2.4.0" - "@octokit/graphql" "^4.3.1" - "@octokit/request" "^5.4.0" - "@octokit/types" "^5.0.0" - before-after-hook "^2.1.0" + "@octokit/auth-token" "^2.4.4" + "@octokit/graphql" "^4.5.8" + "@octokit/request" "^5.4.12" + "@octokit/request-error" "^2.0.5" + "@octokit/types" "^6.0.3" + before-after-hook "^2.2.0" universal-user-agent "^6.0.0" "@octokit/endpoint@^6.0.1": @@ -529,33 +530,38 @@ is-plain-object "^5.0.0" universal-user-agent "^6.0.0" -"@octokit/graphql@^4.3.1": - version "4.5.6" - resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.5.6.tgz#708143ba15cf7c1879ed6188266e7f270be805d4" - integrity sha512-Rry+unqKTa3svswT2ZAuqenpLrzJd+JTv89LTeVa5UM/5OX8o4KTkPL7/1ABq4f/ZkELb0XEK/2IEoYwykcLXg== +"@octokit/graphql@^4.5.8": + version "4.6.1" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.6.1.tgz#f975486a46c94b7dbe58a0ca751935edc7e32cc9" + integrity sha512-2lYlvf4YTDgZCTXTW4+OX+9WTLFtEUc6hGm4qM1nlZjzxj+arizM4aHWzBVBCxY9glh7GIs0WEuiSgbVzv8cmA== dependencies: "@octokit/request" "^5.3.0" - "@octokit/types" "^5.0.0" + "@octokit/types" "^6.0.3" universal-user-agent "^6.0.0" -"@octokit/plugin-paginate-rest@^2.2.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.4.0.tgz#92f951ddc8a1cd505353fa07650752ca25ed7e93" - integrity sha512-YT6Klz3LLH6/nNgi0pheJnUmTFW4kVnxGft+v8Itc41IIcjl7y1C8TatmKQBbCSuTSNFXO5pCENnqg6sjwpJhg== - dependencies: - "@octokit/types" "^5.5.0" +"@octokit/openapi-types@^6.0.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-6.1.0.tgz#cf0f859f9a4833b7fa5141b53e1d62d5d1cbc78f" + integrity sha512-Z9fDZVbGj4dFLErEoXUSuZhk3wJ8KVGnbrUwoPijsQ9EyNwOeQ+U2jSqaHUz8WtgIWf0aeO59oJyhMpWCKaabg== -"@octokit/plugin-request-log@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz#eef87a431300f6148c39a7f75f8cfeb218b2547e" - integrity sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw== - -"@octokit/plugin-rest-endpoint-methods@4.2.1": - version "4.2.1" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.1.tgz#8224833a45c3394836dc6e86f1e6c49269a2c350" - integrity sha512-QyFr4Bv807Pt1DXZOC5a7L5aFdrwz71UHTYoHVajYV5hsqffWm8FUl9+O7nxRu5PDMtB/IKrhFqTmdBTK5cx+A== +"@octokit/plugin-paginate-rest@^2.6.2": + version "2.13.3" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.13.3.tgz#f0f1792230805108762d87906fb02d573b9e070a" + integrity sha512-46lptzM9lTeSmIBt/sVP/FLSTPGx6DCzAdSX3PfeJ3mTf4h9sGC26WpaQzMEq/Z44cOcmx8VsOhO+uEgE3cjYg== dependencies: - "@octokit/types" "^5.5.0" + "@octokit/types" "^6.11.0" + +"@octokit/plugin-request-log@^1.0.2": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.3.tgz#70a62be213e1edc04bb8897ee48c311482f9700d" + integrity sha512-4RFU4li238jMJAzLgAwkBAw+4Loile5haQMQr+uhFq27BmyJXcXSKvoQKqh0agsZEiUlW6iSv3FAgvmGkur7OQ== + +"@octokit/plugin-rest-endpoint-methods@5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.0.0.tgz#cf2cdeb24ea829c31688216a5b165010b61f9a98" + integrity sha512-Jc7CLNUueIshXT+HWt6T+M0sySPjF32mSFQAK7UfAg8qGeRI6OM1GSBxDLwbXjkqy2NVdnqCedJcP1nC785JYg== + dependencies: + "@octokit/types" "^6.13.0" deprecation "^2.3.1" "@octokit/request-error@^2.0.0": @@ -567,7 +573,16 @@ deprecation "^2.0.0" once "^1.4.0" -"@octokit/request@^5.3.0", "@octokit/request@^5.4.0": +"@octokit/request-error@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.5.tgz#72cc91edc870281ad583a42619256b380c600143" + integrity sha512-T/2wcCFyM7SkXzNoyVNWjyVlUwBvW3igM3Btr/eKYiPmucXTtkxt2RBsf6gn3LTzaLSLTQtNmvg+dGsOxQrjZg== + dependencies: + "@octokit/types" "^6.0.3" + deprecation "^2.0.0" + once "^1.4.0" + +"@octokit/request@^5.3.0": version "5.4.9" resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.9.tgz#0a46f11b82351b3416d3157261ad9b1558c43365" integrity sha512-CzwVvRyimIM1h2n9pLVYfTDmX9m+KHSgCpqPsY8F1NdEK8IaWqXhSBXsdjOBFZSpEcxNEeg4p0UO9cQ8EnOCLA== @@ -581,23 +596,42 @@ once "^1.4.0" universal-user-agent "^6.0.0" -"@octokit/rest@18.0.9": - version "18.0.9" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.9.tgz#964d707d914eb34b1787895fdcacff96de47844d" - integrity sha512-CC5+cIx974Ygx9lQNfUn7/oXDQ9kqGiKUC6j1A9bAVZZ7aoTF8K6yxu0pQhQrLBwSl92J6Z3iVDhGhGFgISCZg== +"@octokit/request@^5.4.12": + version "5.4.15" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.15.tgz#829da413dc7dd3aa5e2cdbb1c7d0ebe1f146a128" + integrity sha512-6UnZfZzLwNhdLRreOtTkT9n57ZwulCve8q3IT/Z477vThu6snfdkBuhxnChpOKNGxcQ71ow561Qoa6uqLdPtag== dependencies: - "@octokit/core" "^3.0.0" - "@octokit/plugin-paginate-rest" "^2.2.0" - "@octokit/plugin-request-log" "^1.0.0" - "@octokit/plugin-rest-endpoint-methods" "4.2.1" + "@octokit/endpoint" "^6.0.1" + "@octokit/request-error" "^2.0.0" + "@octokit/types" "^6.7.1" + is-plain-object "^5.0.0" + node-fetch "^2.6.1" + universal-user-agent "^6.0.0" -"@octokit/types@^5.0.0", "@octokit/types@^5.0.1", "@octokit/types@^5.5.0": +"@octokit/rest@18.5.2": + version "18.5.2" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.5.2.tgz#0369e554b7076e3749005147be94c661c7a5a74b" + integrity sha512-Kz03XYfKS0yYdi61BkL9/aJ0pP2A/WK5vF/syhu9/kY30J8He3P68hv9GRpn8bULFx2K0A9MEErn4v3QEdbZcw== + dependencies: + "@octokit/core" "^3.2.3" + "@octokit/plugin-paginate-rest" "^2.6.2" + "@octokit/plugin-request-log" "^1.0.2" + "@octokit/plugin-rest-endpoint-methods" "5.0.0" + +"@octokit/types@^5.0.0", "@octokit/types@^5.0.1": version "5.5.0" resolved "https://registry.yarnpkg.com/@octokit/types/-/types-5.5.0.tgz#e5f06e8db21246ca102aa28444cdb13ae17a139b" integrity sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ== dependencies: "@types/node" ">= 8" +"@octokit/types@^6.0.3", "@octokit/types@^6.11.0", "@octokit/types@^6.13.0", "@octokit/types@^6.7.1": + version "6.13.1" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.13.1.tgz#85f447f97dc7edb672f221df51f56a51785c131a" + integrity sha512-UF/PL0y4SKGx/p1azFf7e6j9lB78tVwAFvnHtslzOJ6VipshYks74qm9jjTEDlCyaTmbhbk2h3Run5l0CtCF6A== + dependencies: + "@octokit/openapi-types" "^6.0.0" + "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" @@ -1105,6 +1139,11 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" @@ -1125,29 +1164,38 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -before-after-hook@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635" - integrity sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A== +before-after-hook@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.1.tgz#73540563558687586b52ed217dad6a802ab1549c" + integrity sha512-/6FKxSTWoJdbsLDF8tdIjaRiFXiE6UHsEHE3OPI/cwPURCVi1ukP0gmLn7XWEiFk5TcwQjjY5PWsU+j+tgXgmw== big.js@^5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== -boxen@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/boxen/-/boxen-4.2.0.tgz#e411b62357d6d6d36587c8ac3d5d974daa070e64" - integrity sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ== +bl@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" + integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + +boxen@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/boxen/-/boxen-5.0.1.tgz#657528bdd3f59a772b8279b831f27ec2c744664b" + integrity sha512-49VBlw+PrWEF51aCmy7QIteYPIFZxSpvqBdP/2itCPPlJ49kj9zg/XPRFrdkne2W+CfwXUls8exMvu1RysZpKA== dependencies: ansi-align "^3.0.0" - camelcase "^5.3.1" - chalk "^3.0.0" - cli-boxes "^2.2.0" - string-width "^4.1.0" - term-size "^2.1.0" - type-fest "^0.8.1" + camelcase "^6.2.0" + chalk "^4.1.0" + cli-boxes "^2.2.1" + string-width "^4.2.0" + type-fest "^0.20.2" widest-line "^3.1.0" + wrap-ansi "^7.0.0" brace-expansion@^1.1.7: version "1.1.11" @@ -1211,6 +1259,14 @@ buffer-from@1.x, buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== +buffer@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -1267,6 +1323,11 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +camelcase@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" + integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== + capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" @@ -1314,6 +1375,11 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== +ci-info@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.1.1.tgz#9a32fcefdf7bcdb6f0a7e1c0f8098ec57897b80a" + integrity sha512-kdRWLBIJwdsYJWYJFtAFFYxybguqeF91qpZaggjG5Nf8QKdizFG2hjqvaTXbxFIcYbSaD74KpAXv6BSm17DHEQ== + class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -1324,7 +1390,7 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -cli-boxes@^2.2.0: +cli-boxes@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== @@ -1336,10 +1402,10 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" -cli-spinners@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.4.0.tgz#c6256db216b878cfba4720e719cec7cf72685d7f" - integrity sha512-sJAofoarcm76ZGpuooaO0eDy8saEy+YoZBLjC4h8srt4jeBnkYeOgqxgsJQTpyt2LjI5PTfLJHSL+41Yu4fEJA== +cli-spinners@^2.5.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.0.tgz#36c7dc98fb6a9a76bd6238ec3f77e2425627e939" + integrity sha512-t+4/y50K/+4xcCRosKkA7W4gTr1MySvLV0q+PxmG7FJ5g+66ChKurYjxBCjHggHH3HA5Hh9cy+lcUGWDqVH+4Q== cli-width@^3.0.0: version "3.0.0" @@ -1517,7 +1583,7 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.0: +cross-spawn@^7.0.0, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -1925,19 +1991,19 @@ exec-sh@^0.3.2: resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.4.tgz#3a018ceb526cc6f6df2bb504b2bfe8e3a4934ec5" integrity sha512-sEFIkc61v75sWeOe72qyrqg2Qg0OuLESziUDk/O/z2qgS15y2gWVFrI6f2Qn/qw/0/NCfCEsmNA4zOjkwEZT1A== -execa@4.1.0, execa@^4.0.2: - version "4.1.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" - integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== +execa@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376" + integrity sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ== dependencies: - cross-spawn "^7.0.0" - get-stream "^5.0.0" - human-signals "^1.1.1" + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" is-stream "^2.0.0" merge-stream "^2.0.0" - npm-run-path "^4.0.0" - onetime "^5.1.0" - signal-exit "^3.0.2" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" strip-final-newline "^2.0.0" execa@^1.0.0: @@ -1969,6 +2035,21 @@ execa@^3.2.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" +execa@^4.0.2: + version "4.1.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" + integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== + dependencies: + cross-spawn "^7.0.0" + get-stream "^5.0.0" + human-signals "^1.1.1" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.0" + onetime "^5.1.0" + signal-exit "^3.0.2" + strip-final-newline "^2.0.0" + exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -2184,10 +2265,10 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= -form-data@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682" - integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg== +form-data@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== dependencies: asynckit "^0.4.0" combined-stream "^1.0.8" @@ -2253,6 +2334,11 @@ get-stream@^5.0.0, get-stream@^5.1.0: dependencies: pump "^3.0.0" +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -2273,10 +2359,10 @@ git-up@^4.0.0: is-ssh "^1.3.0" parse-url "^5.0.0" -git-url-parse@11.4.0: - version "11.4.0" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.4.0.tgz#f2bb1f2b00f05552540e95a62e31399a639a6aa6" - integrity sha512-KlIa5jvMYLjXMQXkqpFzobsyD/V2K5DRHl5OAf+6oDFPlPLxrGDVQlIdI63c4/Kt6kai4kALENSALlzTGST3GQ== +git-url-parse@11.4.4: + version "11.4.4" + resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.4.4.tgz#5d747debc2469c17bc385719f7d0427802d83d77" + integrity sha512-Y4o9o7vQngQDIU9IjyCmRJBin5iYjI5u9ZITnddRZpD7dcCFQj2sL2XuMNbLRE4b4B/4ENPsp2Q8P44fjAZ0Pw== dependencies: git-up "^4.0.0" @@ -2299,12 +2385,12 @@ glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" -global-dirs@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-2.0.1.tgz#acdf3bb6685bcd55cb35e8a052266569e9469201" - integrity sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A== +global-dirs@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-3.0.0.tgz#70a76fe84ea315ab37b1f5576cbde7d48ef72686" + integrity sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA== dependencies: - ini "^1.3.5" + ini "2.0.0" globals@^11.1.0: version "11.12.0" @@ -2318,10 +2404,10 @@ globals@^12.1.0: dependencies: type-fest "^0.8.1" -globby@11.0.1: - version "11.0.1" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357" - integrity sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ== +globby@11.0.3: + version "11.0.3" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.3.tgz#9b1f0cb523e171dd1ad8c7b2a9fb4b644b9593cb" + integrity sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" @@ -2330,10 +2416,10 @@ globby@11.0.1: merge2 "^1.3.0" slash "^3.0.0" -got@11.8.0: - version "11.8.0" - resolved "https://registry.yarnpkg.com/got/-/got-11.8.0.tgz#be0920c3586b07fd94add3b5b27cb28f49e6545f" - integrity sha512-k9noyoIIY9EejuhaBNLyZ31D5328LeqnyPNXJQb2XlJZcKakLqN5m6O/ikhq/0lw56kUYS54fVm+D1x57YC9oQ== +got@11.8.2: + version "11.8.2" + resolved "https://registry.yarnpkg.com/got/-/got-11.8.2.tgz#7abb3959ea28c31f3576f1576c1effce23f33599" + integrity sha512-D0QywKgIe30ODs+fm8wMZiAcZjypcCodPNuMz5H9Mny7RJ+IjJ10BdmGW7OM7fHXP+O7r6ZwapQ/YQmMSvB0UQ== dependencies: "@sindresorhus/is" "^4.0.0" "@szmarczak/http-timer" "^4.0.5" @@ -2485,6 +2571,11 @@ human-signals@^1.1.1: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -2492,6 +2583,11 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" +ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" @@ -2550,17 +2646,41 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.3, inherits@~2.0.3: +inherits@2, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -ini@^1.3.5, ini@~1.3.0: +ini@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ini/-/ini-2.0.0.tgz#e5fd556ecdd5726be978fa1001862eacb0a94bc5" + integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== + +ini@~1.3.0: version "1.3.7" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.7.tgz#a09363e1911972ea16d7a8851005d84cf09a9a84" integrity sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ== -inquirer@7.3.3, inquirer@^7.0.0: +inquirer@8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.0.0.tgz#957a46db1abcf0fdd2ab82deb7470e90afc7d0ac" + integrity sha512-ON8pEJPPCdyjxj+cxsYRe6XfCJepTxANdNnTebsTuQgXpRyZRRT9t4dJwjRubgmvn20CLSEnozRUayXyM9VTXA== + dependencies: + ansi-escapes "^4.2.1" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-width "^3.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.21" + mute-stream "0.0.8" + run-async "^2.4.0" + rxjs "^6.6.6" + string-width "^4.1.0" + strip-ansi "^6.0.0" + through "^2.3.6" + +inquirer@^7.0.0: version "7.3.3" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA== @@ -2618,7 +2738,14 @@ is-buffer@^1.1.5: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-ci@2.0.0, is-ci@^2.0.0: +is-ci@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.0.tgz#c7e7be3c9d8eef7d0fa144390bd1e4b88dc4c994" + integrity sha512-kDXyttuLeslKAHYL/K28F2YkM3x5jvFPEw3yXbRptXydjD9rpLEz+C5K5iutY9ZiUu6AP41JdvRQwF4Iqs4ZCQ== + dependencies: + ci-info "^3.1.1" + +is-ci@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== @@ -2701,13 +2828,13 @@ is-glob@^4.0.0, is-glob@^4.0.1: dependencies: is-extglob "^2.1.1" -is-installed-globally@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.3.2.tgz#fd3efa79ee670d1187233182d5b0a1dd00313141" - integrity sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g== +is-installed-globally@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.4.0.tgz#9a0fd407949c30f86eb6959ef1b7994ed0b7b520" + integrity sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ== dependencies: - global-dirs "^2.0.1" - is-path-inside "^3.0.1" + global-dirs "^3.0.0" + is-path-inside "^3.0.2" is-interactive@^1.0.0: version "1.0.0" @@ -2736,10 +2863,10 @@ is-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== -is-path-inside@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017" - integrity sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg== +is-path-inside@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" @@ -2775,6 +2902,11 @@ is-typedarray@^1.0.0, is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -3479,22 +3611,23 @@ lodash.sortby@^4.7.0: resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= -lodash@4.17.20, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20: - version "4.17.20" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" - integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== +lodash@4.17.21, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== log-driver@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg== -log-symbols@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" - integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== +log-symbols@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== dependencies: - chalk "^4.0.0" + chalk "^4.1.0" + is-unicode-supported "^0.1.0" logform@^2.2.0: version "2.2.0" @@ -3524,6 +3657,13 @@ lowercase-keys@^2.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + macos-release@^2.2.0: version "2.4.1" resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.4.1.tgz#64033d0ec6a5e6375155a74b1a1eba8e509820ac" @@ -3605,17 +3745,17 @@ micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" -mime-db@1.44.0: - version "1.44.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" - integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== +mime-db@1.47.0: + version "1.47.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.47.0.tgz#8cb313e59965d3c05cfbf898915a267af46a335c" + integrity sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw== -mime-types@2.1.27, mime-types@^2.1.12, mime-types@~2.1.19: - version "2.1.27" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" - integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== +mime-types@2.1.30, mime-types@^2.1.12, mime-types@~2.1.19: + version "2.1.30" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.30.tgz#6e7be8b4c479825f85ed6326695db73f9305d62d" + integrity sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg== dependencies: - mime-db "1.44.0" + mime-db "1.47.0" mimic-fn@^2.1.0: version "2.1.0" @@ -3776,7 +3916,7 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -npm-run-path@^4.0.0: +npm-run-path@^4.0.0, npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== @@ -3830,7 +3970,7 @@ one-time@^1.0.0: dependencies: fn.name "1.x.x" -onetime@^5.1.0: +onetime@^5.1.0, onetime@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== @@ -3849,17 +3989,18 @@ optionator@^0.8.1, optionator@^0.8.3: type-check "~0.3.2" word-wrap "~1.2.3" -ora@5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/ora/-/ora-5.1.0.tgz#b188cf8cd2d4d9b13fd25383bc3e5cba352c94f8" - integrity sha512-9tXIMPvjZ7hPTbk8DFq1f7Kow/HU/pQYB60JbNq+QnGwcyhWVZaQ4hM9zQDEsPxw/muLpgiHSaumUZxCAmod/w== +ora@5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.0.tgz#42eda4855835b9cd14d33864c97a3c95a3f56bf4" + integrity sha512-1StwyXQGoU6gdjYkyVcqOLnVlbKj+6yPNNOxJVgpt9t4eksKjiriiHuxktLYkgllwk+D6MbC4ihH84L1udRXPg== dependencies: + bl "^4.1.0" chalk "^4.1.0" cli-cursor "^3.1.0" - cli-spinners "^2.4.0" + cli-spinners "^2.5.0" is-interactive "^1.0.0" - log-symbols "^4.0.0" - mute-stream "0.0.8" + is-unicode-supported "^0.1.0" + log-symbols "^4.1.0" strip-ansi "^6.0.0" wcwidth "^1.0.1" @@ -3951,10 +4092,10 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-json@5.1.0, parse-json@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.1.0.tgz#f96088cdf24a8faa9aea9a009f2d9d942c999646" - integrity sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ== +parse-json@5.2.0, parse-json@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== dependencies: "@babel/code-frame" "^7.0.0" error-ex "^1.3.1" @@ -4251,39 +4392,39 @@ registry-url@^5.0.0: dependencies: rc "^1.2.8" -release-it@14.2.2: - version "14.2.2" - resolved "https://registry.yarnpkg.com/release-it/-/release-it-14.2.2.tgz#ec01be53b04c5aa251a45c7a0b29cceace7827b3" - integrity sha512-rnJOzDIXErrwCD9cRMtDgmOZlcLQiL0z0dVyN95G2T1FQVBQNr7AD5EiH3U+K6X7s+EVoK90lF96NXe5QuvG1A== +release-it@14.6.1: + version "14.6.1" + resolved "https://registry.yarnpkg.com/release-it/-/release-it-14.6.1.tgz#a04623312d67886b37b8a6d298844ee3e0c7150a" + integrity sha512-noBho2997G3yrm6YvdLJj4Ua2SCFOU7ajCqtvteI3DZtpM1IhiyXSgcn2Q5irq8lTNK0it4eiNq9TSrAWNYDkA== dependencies: "@iarna/toml" "2.2.5" - "@octokit/rest" "18.0.9" + "@octokit/rest" "18.5.2" async-retry "1.3.1" chalk "4.1.0" cosmiconfig "7.0.0" debug "4.3.1" deprecated-obj "2.0.0" - execa "4.1.0" + execa "5.0.0" find-up "5.0.0" - form-data "3.0.0" - git-url-parse "11.4.0" - globby "11.0.1" - got "11.8.0" + form-data "4.0.0" + git-url-parse "11.4.4" + globby "11.0.3" + got "11.8.2" import-cwd "3.0.0" - inquirer "7.3.3" - is-ci "2.0.0" - lodash "4.17.20" - mime-types "2.1.27" - ora "5.1.0" + inquirer "8.0.0" + is-ci "3.0.0" + lodash "4.17.21" + mime-types "2.1.30" + ora "5.4.0" os-name "4.0.0" - parse-json "5.1.0" - semver "7.3.2" + parse-json "5.2.0" + semver "7.3.5" shelljs "0.8.4" - update-notifier "5.0.1" + update-notifier "5.1.0" url-join "4.0.1" - uuid "8.3.1" - yaml "1.10.0" - yargs-parser "20.2.4" + uuid "8.3.2" + yaml "1.10.2" + yargs-parser "20.2.7" remove-trailing-separator@^1.0.1: version "1.1.0" @@ -4464,6 +4605,13 @@ rxjs@^6.6.0: dependencies: tslib "^1.9.0" +rxjs@^6.6.6: + version "6.6.7" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" + integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== + dependencies: + tslib "^1.9.0" + safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -4525,10 +4673,12 @@ semver@6.x, semver@^6.0.0, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@7.3.2, semver@^7.3.2: - version "7.3.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" - integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== +semver@7.3.5, semver@^7.3.2, semver@^7.3.4: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + dependencies: + lru-cache "^6.0.0" set-blocking@^2.0.0: version "2.0.0" @@ -4583,7 +4733,7 @@ shellwords@^0.1.1: resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== -signal-exit@^3.0.0, signal-exit@^3.0.2: +signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== @@ -4880,11 +5030,6 @@ tapable@^1.0.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== -term-size@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/term-size/-/term-size-2.2.0.tgz#1f16adedfe9bdc18800e1776821734086fcc6753" - integrity sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw== - terminal-link@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" @@ -5089,6 +5234,11 @@ type-fest@^0.11.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + type-fest@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" @@ -5141,23 +5291,23 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" -update-notifier@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-5.0.1.tgz#1f92d45fb1f70b9e33880a72dd262bc12d22c20d" - integrity sha512-BuVpRdlwxeIOvmc32AGYvO1KVdPlsmqSh8KDDBxS6kDE5VR7R8OMP1d8MdhaVBvxl4H3551k9akXr0Y1iIB2Wg== +update-notifier@5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-5.1.0.tgz#4ab0d7c7f36a231dd7316cf7729313f0214d9ad9" + integrity sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw== dependencies: - boxen "^4.2.0" + boxen "^5.0.0" chalk "^4.1.0" configstore "^5.0.1" has-yarn "^2.1.0" import-lazy "^2.1.0" is-ci "^2.0.0" - is-installed-globally "^0.3.2" + is-installed-globally "^0.4.0" is-npm "^5.0.0" is-yarn-global "^0.3.0" latest-version "^5.1.0" pupa "^2.1.1" - semver "^7.3.2" + semver "^7.3.4" semver-diff "^3.1.1" xdg-basedir "^4.0.0" @@ -5195,10 +5345,10 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= -uuid@8.3.1: - version "8.3.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.1.tgz#2ba2e6ca000da60fce5a196954ab241131e05a31" - integrity sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg== +uuid@8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== uuid@^3.3.2: version "3.4.0" @@ -5362,6 +5512,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -5409,10 +5568,15 @@ y18n@^4.0.0: resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== -yaml@1.10.0, yaml@^1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" - integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yaml@1.10.2, yaml@^1.10.0: + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== yargs-parser@18.x, yargs-parser@^18.1.2: version "18.1.3" @@ -5422,10 +5586,10 @@ yargs-parser@18.x, yargs-parser@^18.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== +yargs-parser@20.2.7: + version "20.2.7" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a" + integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw== yargs@^15.3.1: version "15.4.1" From 112d9063e74316c24a49de3444e94b05a6546c14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Apr 2021 11:33:05 +0000 Subject: [PATCH 31/45] Bump @types/jest from 26.0.20 to 26.0.22 Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.20 to 26.0.22. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) Signed-off-by: dependabot[bot] --- package-lock.json | 18 +++++++++--------- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index b72474d..0c0b332 100644 --- a/package-lock.json +++ b/package-lock.json @@ -965,9 +965,9 @@ } }, "@types/jest": { - "version": "26.0.20", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.20.tgz", - "integrity": "sha512-9zi2Y+5USJRxd0FsahERhBwlcvFh6D2GLQnY2FH2BzK8J9s9omvNHIbvABwIluXa0fD8XVKMLTO0aOEuUfACAA==", + "version": "26.0.22", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.22.tgz", + "integrity": "sha512-eeWwWjlqxvBxc4oQdkueW5OF/gtfSceKk4OnOAGlUSwS/liBRtZppbJuz1YkgbrbfGOoeBHun9fOvXnjNwrSOw==", "dev": true, "requires": { "jest-diff": "^26.0.0", @@ -997,9 +997,9 @@ } }, "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -1043,9 +1043,9 @@ } }, "react-is": { - "version": "17.0.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz", - "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==", + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true } } diff --git a/package.json b/package.json index 7969dc4..9f9c099 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "author": "Ricardo Ambrogi", "license": "MIT", "devDependencies": { - "@types/jest": "26.0.20", + "@types/jest": "26.0.22", "@types/nock": "11.1.0", "@typescript-eslint/eslint-plugin": "2.34.0", "@typescript-eslint/parser": "2.34.0", diff --git a/yarn.lock b/yarn.lock index 3f927f5..1b78fe7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -755,10 +755,10 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@26.0.20": - version "26.0.20" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.20.tgz#cd2f2702ecf69e86b586e1f5223a60e454056307" - integrity sha512-9zi2Y+5USJRxd0FsahERhBwlcvFh6D2GLQnY2FH2BzK8J9s9omvNHIbvABwIluXa0fD8XVKMLTO0aOEuUfACAA== +"@types/jest@26.0.22": + version "26.0.22" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.22.tgz#8308a1debdf1b807aa47be2838acdcd91e88fbe6" + integrity sha512-eeWwWjlqxvBxc4oQdkueW5OF/gtfSceKk4OnOAGlUSwS/liBRtZppbJuz1YkgbrbfGOoeBHun9fOvXnjNwrSOw== dependencies: jest-diff "^26.0.0" pretty-format "^26.0.0" From 85a3cab5e1f23b3af4e57f8079db264a35f712fd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Apr 2021 12:32:54 +0000 Subject: [PATCH 32/45] Bump nock from 13.0.7 to 13.0.11 Bumps [nock](https://github.com/nock/nock) from 13.0.7 to 13.0.11. - [Release notes](https://github.com/nock/nock/releases) - [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md) - [Commits](https://github.com/nock/nock/compare/v13.0.7...v13.0.11) Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0c0b332..71f16b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4960,9 +4960,9 @@ "dev": true }, "nock": { - "version": "13.0.7", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.0.7.tgz", - "integrity": "sha512-WBz73VYIjdbO6BwmXODRQLtn7B5tldA9pNpWJe5QTtTEscQlY5KXU4srnGzBOK2fWakkXj69gfTnXGzmrsaRWw==", + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.0.11.tgz", + "integrity": "sha512-sKZltNkkWblkqqPAsjYW0bm3s9DcHRPiMOyKO/PkfJ+ANHZ2+LA2PLe22r4lLrKgXaiSaDQwW3qGsJFtIpQIeQ==", "dev": true, "requires": { "debug": "^4.1.0", diff --git a/package.json b/package.json index 9f9c099..557f7b9 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "jest-ts-auto-mock": "^1.0.11", "kind-of": "^6.0.3", "minimist": ">=1.2.3", - "nock": "13.0.7", + "nock": "13.0.11", "release-it": "14.6.1", "ts-auto-mock": "^2.6.5", "ts-jest": "25.5.1", diff --git a/yarn.lock b/yarn.lock index 1b78fe7..0639843 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3841,10 +3841,10 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nock@*, nock@13.0.7: - version "13.0.7" - resolved "https://registry.yarnpkg.com/nock/-/nock-13.0.7.tgz#9bc718c66bd0862dfa14601a9ba678a406127910" - integrity sha512-WBz73VYIjdbO6BwmXODRQLtn7B5tldA9pNpWJe5QTtTEscQlY5KXU4srnGzBOK2fWakkXj69gfTnXGzmrsaRWw== +nock@*, nock@13.0.11: + version "13.0.11" + resolved "https://registry.yarnpkg.com/nock/-/nock-13.0.11.tgz#ba733252e720897ca50033205c39db0c7470f331" + integrity sha512-sKZltNkkWblkqqPAsjYW0bm3s9DcHRPiMOyKO/PkfJ+ANHZ2+LA2PLe22r4lLrKgXaiSaDQwW3qGsJFtIpQIeQ== dependencies: debug "^4.1.0" json-stringify-safe "^5.0.1" From a97e9cb9e43e8ca821d7d9a5b2bd6d638e5a1b49 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Apr 2021 12:49:06 +0000 Subject: [PATCH 33/45] Bump jest-ts-auto-mock from 1.0.12 to 2.0.0 Bumps [jest-ts-auto-mock](https://github.com/Typescript-TDD/jest-ts-auto-mock) from 1.0.12 to 2.0.0. - [Release notes](https://github.com/Typescript-TDD/jest-ts-auto-mock/releases) - [Commits](https://github.com/Typescript-TDD/jest-ts-auto-mock/commits) Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 71f16b9..b50bbe5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4338,9 +4338,9 @@ } }, "jest-ts-auto-mock": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/jest-ts-auto-mock/-/jest-ts-auto-mock-1.0.12.tgz", - "integrity": "sha512-Hotcti3+dy+MUi5+lxtRF6sPvvo3d+94UHc0l/iDhw1/Mk+LAuDUgvY45TW5V3VmGbYxQsNE3oyABVYEHP7Gzw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jest-ts-auto-mock/-/jest-ts-auto-mock-2.0.0.tgz", + "integrity": "sha512-ybY/VtTWJUGDPhOLdjAXsM10ShO8ri1EorXpfHYg4CH00b/k30c4RJJ0iM7GQ4FakHsIr7/zTRwETd3N9smxoA==", "dev": true }, "jest-util": { diff --git a/package.json b/package.json index 557f7b9..efa754b 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "dotenv": "^8.2.0", "eslint": "6.8.0", "jest": "25.5.4", - "jest-ts-auto-mock": "^1.0.11", + "jest-ts-auto-mock": "^2.0.0", "kind-of": "^6.0.3", "minimist": ">=1.2.3", "nock": "13.0.11", diff --git a/yarn.lock b/yarn.lock index 0639843..cac1c0f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3319,10 +3319,10 @@ jest-snapshot@^25.5.1: pretty-format "^25.5.0" semver "^6.3.0" -jest-ts-auto-mock@^1.0.11: - version "1.0.12" - resolved "https://registry.yarnpkg.com/jest-ts-auto-mock/-/jest-ts-auto-mock-1.0.12.tgz#c913935cbf049379a0dd7280bcef5fe5ad90565e" - integrity sha512-Hotcti3+dy+MUi5+lxtRF6sPvvo3d+94UHc0l/iDhw1/Mk+LAuDUgvY45TW5V3VmGbYxQsNE3oyABVYEHP7Gzw== +jest-ts-auto-mock@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/jest-ts-auto-mock/-/jest-ts-auto-mock-2.0.0.tgz#0a2a5698ac55e0c3af3923f989b423c07ca0b370" + integrity sha512-ybY/VtTWJUGDPhOLdjAXsM10ShO8ri1EorXpfHYg4CH00b/k30c4RJJ0iM7GQ4FakHsIr7/zTRwETd3N9smxoA== jest-util@^25.5.0: version "25.5.0" From 0f50ac7fdb95b6b5daaeb3bb88c0a777313a26af Mon Sep 17 00:00:00 2001 From: wouterboe Date: Thu, 22 Apr 2021 16:16:17 +0200 Subject: [PATCH 34/45] optional chaining used to increase readability --- src/utils/hmacValidator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/hmacValidator.ts b/src/utils/hmacValidator.ts index a9396fd..85cf600 100644 --- a/src/utils/hmacValidator.ts +++ b/src/utils/hmacValidator.ts @@ -37,7 +37,7 @@ class HmacValidator { if (notificationRequestItem.additionalData?.[ApiConstants.HMAC_SIGNATURE]) { const expectedSign = this.calculateHmac(notificationRequestItem, key); const merchantSign = notificationRequestItem.additionalData?.[ApiConstants.HMAC_SIGNATURE]; - if(merchantSign && expectedSign.length === merchantSign.length) { + if(merchantSign?.length === expectedSign.length) { return timingSafeEqual( Buffer.from(expectedSign, "base64"), Buffer.from(merchantSign, "base64") From 84b3cc3405f30e46c4b399527f8286f84f93158d Mon Sep 17 00:00:00 2001 From: wouterboe Date: Fri, 23 Apr 2021 10:09:50 +0200 Subject: [PATCH 35/45] updated SonarCloud workflow --- .github/workflows/sonarcloud.yml | 21 +++++++++++++++++++ ...oud.properties => sonar-project.properties | 9 +++++--- 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/sonarcloud.yml rename .sonarcloud.properties => sonar-project.properties (65%) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml new file mode 100644 index 0000000..439a448 --- /dev/null +++ b/.github/workflows/sonarcloud.yml @@ -0,0 +1,21 @@ +name: "Sonarcloud Analysis" + +on: ["push", "pull_request"] + +jobs: + sonarcloud-analysis: + + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + # Disabling shallow clone to improve relevancy of SonarCloud reporting + fetch-depth: 0 + + - name: SonarCloud integration + uses: sonarsource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file diff --git a/.sonarcloud.properties b/sonar-project.properties similarity index 65% rename from .sonarcloud.properties rename to sonar-project.properties index 8dea1af..07ac6de 100644 --- a/.sonarcloud.properties +++ b/sonar-project.properties @@ -1,10 +1,13 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright Contributors to the ODPi Egeria project. +# General settings +sonar.organization=adyen +sonar.projectKey=Adyen_adyen-node-api-library + # Path to sources #sonar.sources=. -sonar.exclusions=src/__mocks__/* -sonar.exclusions=src/typings/* +sonar.exclusions=src/__mocks__/**/* , src/typings/**/* #sonar.inclusions= # Path to tests @@ -16,4 +19,4 @@ sonar.exclusions=src/typings/* #sonar.sourceEncoding=UTF-8 # Exclusions for copy-paste detection -#sonar.cpd.exclusions= +#sonar.cpd.exclusions= \ No newline at end of file From d10588026c785fc5ac482d78dc8268a270eaa59b Mon Sep 17 00:00:00 2001 From: wouterboe Date: Fri, 23 Apr 2021 10:15:36 +0200 Subject: [PATCH 36/45] newlines added to new files --- .github/workflows/sonarcloud.yml | 2 +- sonar-project.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 439a448..85a7bfd 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -18,4 +18,4 @@ jobs: uses: sonarsource/sonarcloud-github-action@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/sonar-project.properties b/sonar-project.properties index 07ac6de..5474834 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -19,4 +19,4 @@ sonar.exclusions=src/__mocks__/**/* , src/typings/**/* #sonar.sourceEncoding=UTF-8 # Exclusions for copy-paste detection -#sonar.cpd.exclusions= \ No newline at end of file +#sonar.cpd.exclusions= From db9362d69a5023713bb697faa9ce891a97d210f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Apr 2021 04:03:17 +0000 Subject: [PATCH 37/45] Bump acorn from 8.1.1 to 8.2.1 Bumps [acorn](https://github.com/acornjs/acorn) from 8.1.1 to 8.2.1. - [Release notes](https://github.com/acornjs/acorn/releases) - [Commits](https://github.com/acornjs/acorn/compare/8.1.1...8.2.1) Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- yarn.lock | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index b50bbe5..75c513e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1185,9 +1185,9 @@ "dev": true }, "acorn": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.1.1.tgz", - "integrity": "sha512-xYiIVjNuqtKXMxlRMDc6mZUhXehod4a3gbZ1qRlM7icK4EbxUFNLhWoPblCvFtB2Y9CIqHP3CF/rdxLItaQv8g==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.2.1.tgz", + "integrity": "sha512-z716cpm5TX4uzOzILx8PavOE6C6DKshHDw1aQN52M/yNSqE9s5O8SMfyhCCfCJ3HmTL0NkVOi+8a/55T7YB3bg==", "dev": true }, "acorn-globals": { diff --git a/yarn.lock b/yarn.lock index cac1c0f..c1a825d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -908,9 +908,9 @@ acorn@^7.1.0, acorn@^7.1.1: integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w== acorn@^8.0.1: - version "8.1.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.1.1.tgz#fb0026885b9ac9f48bac1e185e4af472971149ff" - integrity sha512-xYiIVjNuqtKXMxlRMDc6mZUhXehod4a3gbZ1qRlM7icK4EbxUFNLhWoPblCvFtB2Y9CIqHP3CF/rdxLItaQv8g== + version "8.2.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.2.1.tgz#0d36af126fb6755095879c1dc6fd7edf7d60a5fb" + integrity sha512-z716cpm5TX4uzOzILx8PavOE6C6DKshHDw1aQN52M/yNSqE9s5O8SMfyhCCfCJ3HmTL0NkVOi+8a/55T7YB3bg== agent-base@6: version "6.0.1" From 05c39c762cb45c081835f096bbb754c85a67c3a7 Mon Sep 17 00:00:00 2001 From: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com> Date: Mon, 26 Apr 2021 08:56:54 +0200 Subject: [PATCH 38/45] Update CODEOWNERS --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4c54f91..e5c5bf7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @zaiddreakh @maassenbas @msilvagarcia @AlexandrosMor @peterojo +* @zaiddreakh @maassenbas @msilvagarcia @AlexandrosMor @peterojo @wboereboom From e43f264e5d091f1b87871a5815a4c910c95ba9fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Apr 2021 04:03:55 +0000 Subject: [PATCH 39/45] Bump @types/jest from 26.0.22 to 26.0.23 Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.22 to 26.0.23. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index b50bbe5..30404fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -965,9 +965,9 @@ } }, "@types/jest": { - "version": "26.0.22", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.22.tgz", - "integrity": "sha512-eeWwWjlqxvBxc4oQdkueW5OF/gtfSceKk4OnOAGlUSwS/liBRtZppbJuz1YkgbrbfGOoeBHun9fOvXnjNwrSOw==", + "version": "26.0.23", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.23.tgz", + "integrity": "sha512-ZHLmWMJ9jJ9PTiT58juykZpL7KjwJywFN3Rr2pTSkyQfydf/rk22yS7W8p5DaVUMQ2BQC7oYiU3FjbTM/mYrOA==", "dev": true, "requires": { "jest-diff": "^26.0.0", diff --git a/package.json b/package.json index efa754b..b15b09b 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "author": "Ricardo Ambrogi", "license": "MIT", "devDependencies": { - "@types/jest": "26.0.22", + "@types/jest": "26.0.23", "@types/nock": "11.1.0", "@typescript-eslint/eslint-plugin": "2.34.0", "@typescript-eslint/parser": "2.34.0", diff --git a/yarn.lock b/yarn.lock index cac1c0f..4de9bfd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -755,10 +755,10 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@26.0.22": - version "26.0.22" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.22.tgz#8308a1debdf1b807aa47be2838acdcd91e88fbe6" - integrity sha512-eeWwWjlqxvBxc4oQdkueW5OF/gtfSceKk4OnOAGlUSwS/liBRtZppbJuz1YkgbrbfGOoeBHun9fOvXnjNwrSOw== +"@types/jest@26.0.23": + version "26.0.23" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.23.tgz#a1b7eab3c503b80451d019efb588ec63522ee4e7" + integrity sha512-ZHLmWMJ9jJ9PTiT58juykZpL7KjwJywFN3Rr2pTSkyQfydf/rk22yS7W8p5DaVUMQ2BQC7oYiU3FjbTM/mYrOA== dependencies: jest-diff "^26.0.0" pretty-format "^26.0.0" From 67cad90a222b6aaad5db1c9e09c0387d84c6d756 Mon Sep 17 00:00:00 2001 From: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com> Date: Thu, 29 Apr 2021 16:18:32 +0200 Subject: [PATCH 40/45] Pw 4327/checkout api v67 (#671) * update checkout API version * removed lingering comment * bump package version Co-authored-by: wouterboe --- package.json | 2 +- src/__tests__/checkout.spec.ts | 123 +- src/__tests__/recurring.spec.ts | 3 +- src/client.ts | 2 +- src/services/checkout.ts | 72 +- src/typings/checkout.ts | 5191 ----------------- src/typings/checkout/accountInfo.ts | 234 + src/typings/checkout/achDetails.ts | 100 + .../checkout/additionalData3DSecure.ts | 68 + src/typings/checkout/additionalDataAirline.ts | 275 + .../checkout/additionalDataCarRental.ts | 230 + src/typings/checkout/additionalDataCommon.ts | 155 + src/typings/checkout/additionalDataLevel23.ts | 176 + src/typings/checkout/additionalDataLodging.ts | 176 + .../checkout/additionalDataOpenInvoice.ts | 176 + src/typings/checkout/additionalDataOpi.ts | 32 + src/typings/checkout/additionalDataRatepay.ts | 95 + src/typings/checkout/additionalDataRetry.ts | 50 + src/typings/checkout/additionalDataRisk.ts | 203 + .../checkout/additionalDataRiskStandalone.ts | 158 + .../checkout/additionalDataSubMerchant.ts | 185 + .../additionalDataTemporaryServices.ts | 104 + src/typings/checkout/additionalDataWallets.ts | 77 + src/typings/checkout/address.ts | 77 + src/typings/checkout/afterpayDetails.ts | 84 + src/typings/checkout/amazonPayDetails.ts | 46 + src/typings/checkout/amount.ts | 41 + src/typings/checkout/androidPayDetails.ts | 37 + src/typings/checkout/applePayDetails.ts | 76 + src/typings/checkout/applicationInfo.ts | 64 + src/typings/checkout/avs.ts | 48 + .../checkout/bacsDirectDebitDetails.ts | 82 + src/typings/checkout/bankAccount.ts | 104 + src/typings/checkout/billDeskDetails.ts | 47 + src/typings/checkout/blikDetails.ts | 64 + src/typings/checkout/browserInfo.ts | 104 + src/typings/checkout/card.ts | 95 + src/typings/checkout/cardDetails.ts | 151 + src/typings/checkout/cellulantDetails.ts | 46 + src/typings/checkout/checkoutAwaitAction.ts | 64 + .../checkout/checkoutBalanceCheckRequest.ts | 397 ++ .../checkout/checkoutBalanceCheckResponse.ts | 87 + .../checkout/checkoutBankTransferAction.ts | 117 + .../checkout/checkoutCancelOrderRequest.ts | 40 + .../checkout/checkoutCancelOrderResponse.ts | 46 + .../checkout/checkoutCreateOrderRequest.ts | 58 + .../checkout/checkoutCreateOrderResponse.ts | 106 + .../checkout/checkoutDonationAction.ts | 64 + .../checkout/checkoutOneTimePasscodeAction.ts | 99 + src/typings/checkout/checkoutOrder.ts | 41 + src/typings/checkout/checkoutOrderResponse.ts | 73 + src/typings/checkout/checkoutQrCodeAction.ts | 73 + .../checkout/checkoutRedirectAction.ts | 73 + src/typings/checkout/checkoutSDKAction.ts | 74 + .../checkout/checkoutThreeDS2Action.ts | 91 + .../checkout/checkoutUtilityRequest.ts | 32 + .../checkout/checkoutUtilityResponse.ts | 32 + src/typings/checkout/checkoutVoucherAction.ts | 201 + src/typings/checkout/commonField.ts | 41 + src/typings/checkout/company.ts | 77 + src/typings/checkout/configuration.ts | 61 + .../checkout/createPaymentLinkRequest.ts | 280 + src/typings/checkout/detailsRequest.ts | 49 + src/typings/checkout/deviceRenderOptions.ts | 55 + src/typings/checkout/dokuDetails.ts | 72 + src/typings/checkout/dotpayDetails.ts | 46 + src/typings/checkout/dragonpayDetails.ts | 58 + .../checkout/econtextVoucherDetails.ts | 74 + src/typings/checkout/entercashDetails.ts | 46 + src/typings/checkout/externalPlatform.ts | 50 + src/typings/checkout/forexQuote.ts | 121 + src/typings/checkout/fraudCheckResult.ts | 50 + src/typings/checkout/fraudResult.ts | 43 + .../genericIssuerPaymentMethodDetails.ts | 64 + src/typings/checkout/giropayDetails.ts | 55 + src/typings/checkout/googlePayDetails.ts | 76 + src/typings/checkout/idealDetails.ts | 64 + src/typings/checkout/inputDetail.ts | 107 + src/typings/checkout/installmentOption.ts | 65 + src/typings/checkout/installments.ts | 47 + src/typings/checkout/installments2.ts | 32 + src/typings/checkout/item.ts | 41 + src/typings/checkout/klarnaDetails.ts | 88 + src/typings/checkout/lianLianPayDetails.ts | 45 + src/typings/checkout/lineItem.ts | 121 + src/typings/checkout/mandate.ts | 116 + src/typings/checkout/masterpassDetails.ts | 58 + src/typings/checkout/mbwayDetails.ts | 49 + src/typings/checkout/merchantDevice.ts | 50 + src/typings/checkout/merchantRiskIndicator.ts | 120 + src/typings/checkout/mobilePayDetails.ts | 37 + src/typings/checkout/models.ts | 700 +++ src/typings/checkout/molPayDetails.ts | 47 + src/typings/checkout/name.ts | 50 + src/typings/checkout/openInvoiceDetails.ts | 82 + src/typings/checkout/payPalDetails.ts | 86 + src/typings/checkout/payUUpiDetails.ts | 73 + .../checkout/paymentCompletionDetails.ts | 167 + src/typings/checkout/paymentDetails.ts | 78 + .../checkout/paymentDetailsResponse.ts | 149 + src/typings/checkout/paymentLinkResource.ts | 278 + src/typings/checkout/paymentMethod.ts | 109 + src/typings/checkout/paymentMethodGroup.ts | 50 + src/typings/checkout/paymentMethodsRequest.ts | 135 + .../checkout/paymentMethodsResponse.ts | 44 + src/typings/checkout/paymentRequest.ts | 577 ++ src/typings/checkout/paymentResponse.ts | 149 + src/typings/checkout/paymentSetupRequest.ts | 488 ++ src/typings/checkout/paymentSetupResponse.ts | 43 + .../checkout/paymentVerificationRequest.ts | 32 + .../checkout/paymentVerificationResponse.ts | 133 + src/typings/checkout/qiwiWalletDetails.ts | 43 + src/typings/checkout/ratepayDetails.ts | 82 + src/typings/checkout/recurring.ts | 79 + src/typings/checkout/recurringDetail.ts | 125 + src/typings/checkout/redirect.ts | 56 + .../responseAdditionalData3DSecure.ts | 41 + .../responseAdditionalDataBillingAddress.ts | 77 + .../checkout/responseAdditionalDataCard.ts | 86 + .../checkout/responseAdditionalDataCommon.ts | 453 ++ .../responseAdditionalDataDeliveryAddress.ts | 77 + .../responseAdditionalDataInstallments.ts | 131 + .../responseAdditionalDataNetworkTokens.ts | 50 + .../checkout/responseAdditionalDataOpi.ts | 32 + .../checkout/responseAdditionalDataPayPal.ts | 68 + .../checkout/responseAdditionalDataSepa.ts | 50 + src/typings/checkout/riskData.ts | 59 + src/typings/checkout/sDKEphemPubKey.ts | 59 + src/typings/checkout/samsungPayDetails.ts | 76 + .../checkout/sepaDirectDebitDetails.ts | 73 + src/typings/checkout/serviceError.ts | 77 + src/typings/checkout/serviceError2.ts | 41 + src/typings/checkout/shopperInput.ts | 67 + .../checkout/shopperInteractionDevice.ts | 50 + src/typings/checkout/split.ts | 78 + src/typings/checkout/splitAmount.ts | 41 + src/typings/checkout/storedDetails.ts | 47 + src/typings/checkout/storedPaymentMethod.ts | 131 + .../checkout/storedPaymentMethodDetails.ts | 69 + src/typings/checkout/subInputDetail.ts | 79 + src/typings/checkout/threeDS2RequestData.ts | 233 + src/typings/checkout/threeDS2Result.ts | 140 + src/typings/checkout/threeDSecureData.ts | 131 + .../checkout/updatePaymentLinkRequest.ts | 37 + src/typings/checkout/upiDetails.ts | 73 + src/typings/checkout/vippsDetails.ts | 61 + src/typings/checkout/visaCheckoutDetails.ts | 58 + src/typings/checkout/weChatPayDetails.ts | 37 + .../checkout/weChatPayMiniProgramDetails.ts | 49 + src/typings/checkout/zipDetails.ts | 64 + src/typings/index.ts | 1 - 151 files changed, 14663 insertions(+), 5267 deletions(-) delete mode 100644 src/typings/checkout.ts create mode 100644 src/typings/checkout/accountInfo.ts create mode 100644 src/typings/checkout/achDetails.ts create mode 100644 src/typings/checkout/additionalData3DSecure.ts create mode 100644 src/typings/checkout/additionalDataAirline.ts create mode 100644 src/typings/checkout/additionalDataCarRental.ts create mode 100644 src/typings/checkout/additionalDataCommon.ts create mode 100644 src/typings/checkout/additionalDataLevel23.ts create mode 100644 src/typings/checkout/additionalDataLodging.ts create mode 100644 src/typings/checkout/additionalDataOpenInvoice.ts create mode 100644 src/typings/checkout/additionalDataOpi.ts create mode 100644 src/typings/checkout/additionalDataRatepay.ts create mode 100644 src/typings/checkout/additionalDataRetry.ts create mode 100644 src/typings/checkout/additionalDataRisk.ts create mode 100644 src/typings/checkout/additionalDataRiskStandalone.ts create mode 100644 src/typings/checkout/additionalDataSubMerchant.ts create mode 100644 src/typings/checkout/additionalDataTemporaryServices.ts create mode 100644 src/typings/checkout/additionalDataWallets.ts create mode 100644 src/typings/checkout/address.ts create mode 100644 src/typings/checkout/afterpayDetails.ts create mode 100644 src/typings/checkout/amazonPayDetails.ts create mode 100644 src/typings/checkout/amount.ts create mode 100644 src/typings/checkout/androidPayDetails.ts create mode 100644 src/typings/checkout/applePayDetails.ts create mode 100644 src/typings/checkout/applicationInfo.ts create mode 100644 src/typings/checkout/avs.ts create mode 100644 src/typings/checkout/bacsDirectDebitDetails.ts create mode 100644 src/typings/checkout/bankAccount.ts create mode 100644 src/typings/checkout/billDeskDetails.ts create mode 100644 src/typings/checkout/blikDetails.ts create mode 100644 src/typings/checkout/browserInfo.ts create mode 100644 src/typings/checkout/card.ts create mode 100644 src/typings/checkout/cardDetails.ts create mode 100644 src/typings/checkout/cellulantDetails.ts create mode 100644 src/typings/checkout/checkoutAwaitAction.ts create mode 100644 src/typings/checkout/checkoutBalanceCheckRequest.ts create mode 100644 src/typings/checkout/checkoutBalanceCheckResponse.ts create mode 100644 src/typings/checkout/checkoutBankTransferAction.ts create mode 100644 src/typings/checkout/checkoutCancelOrderRequest.ts create mode 100644 src/typings/checkout/checkoutCancelOrderResponse.ts create mode 100644 src/typings/checkout/checkoutCreateOrderRequest.ts create mode 100644 src/typings/checkout/checkoutCreateOrderResponse.ts create mode 100644 src/typings/checkout/checkoutDonationAction.ts create mode 100644 src/typings/checkout/checkoutOneTimePasscodeAction.ts create mode 100644 src/typings/checkout/checkoutOrder.ts create mode 100644 src/typings/checkout/checkoutOrderResponse.ts create mode 100644 src/typings/checkout/checkoutQrCodeAction.ts create mode 100644 src/typings/checkout/checkoutRedirectAction.ts create mode 100644 src/typings/checkout/checkoutSDKAction.ts create mode 100644 src/typings/checkout/checkoutThreeDS2Action.ts create mode 100644 src/typings/checkout/checkoutUtilityRequest.ts create mode 100644 src/typings/checkout/checkoutUtilityResponse.ts create mode 100644 src/typings/checkout/checkoutVoucherAction.ts create mode 100644 src/typings/checkout/commonField.ts create mode 100644 src/typings/checkout/company.ts create mode 100644 src/typings/checkout/configuration.ts create mode 100644 src/typings/checkout/createPaymentLinkRequest.ts create mode 100644 src/typings/checkout/detailsRequest.ts create mode 100644 src/typings/checkout/deviceRenderOptions.ts create mode 100644 src/typings/checkout/dokuDetails.ts create mode 100644 src/typings/checkout/dotpayDetails.ts create mode 100644 src/typings/checkout/dragonpayDetails.ts create mode 100644 src/typings/checkout/econtextVoucherDetails.ts create mode 100644 src/typings/checkout/entercashDetails.ts create mode 100644 src/typings/checkout/externalPlatform.ts create mode 100644 src/typings/checkout/forexQuote.ts create mode 100644 src/typings/checkout/fraudCheckResult.ts create mode 100644 src/typings/checkout/fraudResult.ts create mode 100644 src/typings/checkout/genericIssuerPaymentMethodDetails.ts create mode 100644 src/typings/checkout/giropayDetails.ts create mode 100644 src/typings/checkout/googlePayDetails.ts create mode 100644 src/typings/checkout/idealDetails.ts create mode 100644 src/typings/checkout/inputDetail.ts create mode 100644 src/typings/checkout/installmentOption.ts create mode 100644 src/typings/checkout/installments.ts create mode 100644 src/typings/checkout/installments2.ts create mode 100644 src/typings/checkout/item.ts create mode 100644 src/typings/checkout/klarnaDetails.ts create mode 100644 src/typings/checkout/lianLianPayDetails.ts create mode 100644 src/typings/checkout/lineItem.ts create mode 100644 src/typings/checkout/mandate.ts create mode 100644 src/typings/checkout/masterpassDetails.ts create mode 100644 src/typings/checkout/mbwayDetails.ts create mode 100644 src/typings/checkout/merchantDevice.ts create mode 100644 src/typings/checkout/merchantRiskIndicator.ts create mode 100644 src/typings/checkout/mobilePayDetails.ts create mode 100644 src/typings/checkout/models.ts create mode 100644 src/typings/checkout/molPayDetails.ts create mode 100644 src/typings/checkout/name.ts create mode 100644 src/typings/checkout/openInvoiceDetails.ts create mode 100644 src/typings/checkout/payPalDetails.ts create mode 100644 src/typings/checkout/payUUpiDetails.ts create mode 100644 src/typings/checkout/paymentCompletionDetails.ts create mode 100644 src/typings/checkout/paymentDetails.ts create mode 100644 src/typings/checkout/paymentDetailsResponse.ts create mode 100644 src/typings/checkout/paymentLinkResource.ts create mode 100644 src/typings/checkout/paymentMethod.ts create mode 100644 src/typings/checkout/paymentMethodGroup.ts create mode 100644 src/typings/checkout/paymentMethodsRequest.ts create mode 100644 src/typings/checkout/paymentMethodsResponse.ts create mode 100644 src/typings/checkout/paymentRequest.ts create mode 100644 src/typings/checkout/paymentResponse.ts create mode 100644 src/typings/checkout/paymentSetupRequest.ts create mode 100644 src/typings/checkout/paymentSetupResponse.ts create mode 100644 src/typings/checkout/paymentVerificationRequest.ts create mode 100644 src/typings/checkout/paymentVerificationResponse.ts create mode 100644 src/typings/checkout/qiwiWalletDetails.ts create mode 100644 src/typings/checkout/ratepayDetails.ts create mode 100644 src/typings/checkout/recurring.ts create mode 100644 src/typings/checkout/recurringDetail.ts create mode 100644 src/typings/checkout/redirect.ts create mode 100644 src/typings/checkout/responseAdditionalData3DSecure.ts create mode 100644 src/typings/checkout/responseAdditionalDataBillingAddress.ts create mode 100644 src/typings/checkout/responseAdditionalDataCard.ts create mode 100644 src/typings/checkout/responseAdditionalDataCommon.ts create mode 100644 src/typings/checkout/responseAdditionalDataDeliveryAddress.ts create mode 100644 src/typings/checkout/responseAdditionalDataInstallments.ts create mode 100644 src/typings/checkout/responseAdditionalDataNetworkTokens.ts create mode 100644 src/typings/checkout/responseAdditionalDataOpi.ts create mode 100644 src/typings/checkout/responseAdditionalDataPayPal.ts create mode 100644 src/typings/checkout/responseAdditionalDataSepa.ts create mode 100644 src/typings/checkout/riskData.ts create mode 100644 src/typings/checkout/sDKEphemPubKey.ts create mode 100644 src/typings/checkout/samsungPayDetails.ts create mode 100644 src/typings/checkout/sepaDirectDebitDetails.ts create mode 100644 src/typings/checkout/serviceError.ts create mode 100644 src/typings/checkout/serviceError2.ts create mode 100644 src/typings/checkout/shopperInput.ts create mode 100644 src/typings/checkout/shopperInteractionDevice.ts create mode 100644 src/typings/checkout/split.ts create mode 100644 src/typings/checkout/splitAmount.ts create mode 100644 src/typings/checkout/storedDetails.ts create mode 100644 src/typings/checkout/storedPaymentMethod.ts create mode 100644 src/typings/checkout/storedPaymentMethodDetails.ts create mode 100644 src/typings/checkout/subInputDetail.ts create mode 100644 src/typings/checkout/threeDS2RequestData.ts create mode 100644 src/typings/checkout/threeDS2Result.ts create mode 100644 src/typings/checkout/threeDSecureData.ts create mode 100644 src/typings/checkout/updatePaymentLinkRequest.ts create mode 100644 src/typings/checkout/upiDetails.ts create mode 100644 src/typings/checkout/vippsDetails.ts create mode 100644 src/typings/checkout/visaCheckoutDetails.ts create mode 100644 src/typings/checkout/weChatPayDetails.ts create mode 100644 src/typings/checkout/weChatPayMiniProgramDetails.ts create mode 100644 src/typings/checkout/zipDetails.ts diff --git a/package.json b/package.json index b15b09b..e8e5a07 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@adyen/api-library", - "version": "7.0.0", + "version": "8.0.0", "description": "The Adyen API Library for NodeJS enables you to work with Adyen APIs.", "main": "lib/src/index.js", "types": "lib/src/index.d.ts", diff --git a/src/__tests__/checkout.spec.ts b/src/__tests__/checkout.spec.ts index c4c7960..5706f58 100644 --- a/src/__tests__/checkout.spec.ts +++ b/src/__tests__/checkout.spec.ts @@ -18,47 +18,63 @@ */ import nock from "nock"; -import { createClient } from "../__mocks__/base"; -import { paymentMethodsSuccess } from "../__mocks__/checkout/paymentMethodsSuccess"; -import { paymentsSuccess } from "../__mocks__/checkout/paymentsSuccess"; -import { paymentDetailsSuccess } from "../__mocks__/checkout/paymentsDetailsSuccess"; -import { paymentSessionSuccess } from "../__mocks__/checkout/paymentSessionSucess"; -import { originKeysSuccess } from "../__mocks__/checkout/originkeysSuccess"; -import { paymentsResultMultibancoSuccess } from "../__mocks__/checkout/paymentsResultMultibancoSuccess"; -import { paymentsResultSuccess } from "../__mocks__/checkout/paymentsResultSucess"; +import {createClient} from "../__mocks__/base"; +import {paymentMethodsSuccess} from "../__mocks__/checkout/paymentMethodsSuccess"; +import {paymentsSuccess} from "../__mocks__/checkout/paymentsSuccess"; +import {paymentDetailsSuccess} from "../__mocks__/checkout/paymentsDetailsSuccess"; +import {paymentSessionSuccess} from "../__mocks__/checkout/paymentSessionSucess"; +import {originKeysSuccess} from "../__mocks__/checkout/originkeysSuccess"; +import {paymentsResultMultibancoSuccess} from "../__mocks__/checkout/paymentsResultMultibancoSuccess"; +import {paymentsResultSuccess} from "../__mocks__/checkout/paymentsResultSucess"; import Client from "../client"; import Checkout from "../services/checkout"; import HttpClientException from "../httpClient/httpClientException"; +import { + Amount, + CheckoutBalanceCheckRequest, + CheckoutBalanceCheckResponse, + CheckoutCancelOrderResponse, + CheckoutCreateOrderRequest, + CheckoutCreateOrderResponse, + CheckoutUtilityRequest, + CreatePaymentLinkRequest, + DetailsRequest, + PaymentLinkResource, + PaymentMethodsRequest, + PaymentRequest, + PaymentResponse, + PaymentSetupRequest, + PaymentVerificationRequest, +} from "../typings/checkout/models"; const merchantAccount = process.env.ADYEN_MERCHANT!; const reference = "Your order number"; const isCI = process.env.CI === "true" || (typeof process.env.CI === "boolean" && process.env.CI); -function createAmountObject(currency: string, value: number): ICheckout.Amount { +function createAmountObject(currency: string, value: number): Amount { return { currency, value, }; } -function createPaymentsDetailsRequest(): ICheckout.DetailsRequest { +function createPaymentsDetailsRequest(): DetailsRequest { return { details: { - MD: "mdValue", - PaRes: "paResValue", + mD: "mdValue", + paRes: "paResValue", }, paymentData: "Ab02b4c0!BQABAgCJN1wRZuGJmq8dMncmypvknj9s7l5Tj...", }; } -export function createPaymentsCheckoutRequest(): ICheckout.PaymentRequest { +export function createPaymentsCheckoutRequest(): PaymentRequest { const paymentMethodDetails = { - cvc: "737", - expiryMonth: "03", - expiryYear: "2030", - holderName: "John Smith", - number: "4111111111111111", type: "scheme", + encryptedCardNumber: "test_4111111111111111", + encryptedExpiryMonth: "test_03", + encryptedExpiryYear: "test_2030", + encryptedSecurityCode: "test_737" }; return { @@ -72,18 +88,18 @@ export function createPaymentsCheckoutRequest(): ICheckout.PaymentRequest { }; } -function createPaymentSessionRequest(): ICheckout.PaymentSetupRequest { +function createPaymentSessionRequest(): PaymentSetupRequest { return { amount: createAmountObject("USD", 1000), countryCode: "NL", merchantAccount, reference, returnUrl: "https://your-company.com/...", - channel: "Web", + channel: PaymentSetupRequest.ChannelEnum.Web, sdkVersion: "3.7.0" }; } -function getPaymentLinkSuccess(expiresAt: string): ICheckout.PaymentLinkResource { +function getPaymentLinkSuccess(expiresAt: string): PaymentLinkResource { return { amount: createAmountObject("USD", 1000), expiresAt, @@ -91,11 +107,11 @@ function getPaymentLinkSuccess(expiresAt: string): ICheckout.PaymentLinkResource url: "paymentLinkResponse.url", id: "mocked_id", merchantAccount, - status: "active" + status: PaymentLinkResource.StatusEnum.Active }; } -function createPaymentLinkRequest(): ICheckout.CreatePaymentLinkRequest { +function createPaymentLinkRequest(): CreatePaymentLinkRequest { return { allowedPaymentMethods: ["scheme", "boletobancario"], amount: createAmountObject("USD", 1000), @@ -147,8 +163,8 @@ describe("Checkout", (): void => { scope.post("/payments") .reply(200, paymentsSuccess); - const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest(); - const paymentsResponse: ICheckout.PaymentResponse = await checkout.payments(paymentsRequest); + const paymentsRequest: PaymentRequest = createPaymentsCheckoutRequest(); + const paymentsResponse: PaymentResponse = await checkout.payments(paymentsRequest); expect(paymentsResponse.pspReference).toBeTruthy(); }); @@ -158,7 +174,7 @@ describe("Checkout", (): void => { scope.post("/payments") .reply(401); - const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest(); + const paymentsRequest: PaymentRequest = createPaymentsCheckoutRequest(); await checkout.payments(paymentsRequest); } catch (e) { expect(e instanceof HttpClientException).toBeTruthy(); @@ -167,7 +183,7 @@ describe("Checkout", (): void => { test.each([false, true])("should have valid payment methods, isMock: %p", async (isMock): Promise => { !isMock && nock.restore(); - const paymentMethodsRequest: ICheckout.PaymentMethodsRequest = {merchantAccount: "MagentoMerchantTest"}; + const paymentMethodsRequest: PaymentMethodsRequest = {merchantAccount: "MagentoMerchantTest"}; scope.post("/paymentMethods") .reply(200, paymentMethodsSuccess); @@ -183,7 +199,7 @@ describe("Checkout", (): void => { test.each([false, true])("should have valid payment link, isMock: %p", async (isMock): Promise => { !isMock && nock.restore(); const expiresAt = "2019-12-17T10:05:29Z"; - const paymentLinkSuccess: ICheckout.PaymentLinkResource = getPaymentLinkSuccess(expiresAt); + const paymentLinkSuccess: PaymentLinkResource = getPaymentLinkSuccess(expiresAt); scope.post("/paymentLinks").reply(200, paymentLinkSuccess); @@ -194,7 +210,7 @@ describe("Checkout", (): void => { test.each([isCI, true])("should get payment link, isMock: %p", async (isMock): Promise => { !isMock && nock.restore(); const expiresAt = "2019-12-17T10:05:29Z"; - const paymentLinkSuccess: ICheckout.PaymentLinkResource = getPaymentLinkSuccess(expiresAt); + const paymentLinkSuccess: PaymentLinkResource = getPaymentLinkSuccess(expiresAt); scope.post("/paymentLinks").reply(200, paymentLinkSuccess); @@ -208,7 +224,7 @@ describe("Checkout", (): void => { test.each([isCI, true])("should patch payment link, isMock: %p", async (isMock): Promise => { !isMock && nock.restore(); const expiresAt = "2019-12-17T10:05:29Z"; - const paymentLinkSuccess: ICheckout.PaymentLinkResource = getPaymentLinkSuccess(expiresAt); + const paymentLinkSuccess: PaymentLinkResource = getPaymentLinkSuccess(expiresAt); scope.post("/paymentLinks").reply(200, paymentLinkSuccess); @@ -232,7 +248,7 @@ describe("Checkout", (): void => { !isMock && nock.restore(); scope.post("/paymentSession") .reply(200, paymentSessionSuccess); - const paymentSessionRequest: ICheckout.PaymentSetupRequest = createPaymentSessionRequest(); + const paymentSessionRequest: PaymentSetupRequest = createPaymentSessionRequest(); const paymentSessionResponse = await checkout.paymentSession(paymentSessionRequest); expect(paymentSessionResponse.paymentSession).not.toBeUndefined(); }); @@ -241,7 +257,7 @@ describe("Checkout", (): void => { !isMock && nock.restore(); scope.post("/payments/result") .reply(200, paymentsResultSuccess); - const paymentResultRequest: ICheckout.PaymentVerificationRequest = { + const paymentResultRequest: PaymentVerificationRequest = { payload: "This is a test payload", }; const paymentResultResponse = await checkout.paymentResult(paymentResultRequest); @@ -265,8 +281,8 @@ describe("Checkout", (): void => { scope.post("/payments") .reply(200, paymentsResultMultibancoSuccess); - const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest(); - const paymentsResponse: ICheckout.PaymentResponse = await checkout.payments(paymentsRequest); + const paymentsRequest: PaymentRequest = createPaymentsCheckoutRequest(); + const paymentsResponse: PaymentResponse = await checkout.payments(paymentsRequest); expect(paymentsResponse.pspReference).toBeTruthy(); expect(paymentsResponse.additionalData).toBeTruthy(); @@ -275,7 +291,7 @@ describe("Checkout", (): void => { test.each([false, true])("should get origin keys. isMock: %p", async (isMock): Promise => { !isMock && nock.restore(); const checkoutUtility = new Checkout(client); - const originKeysRequest: ICheckout.CheckoutUtilityRequest = { + const originKeysRequest: CheckoutUtilityRequest = { originDomains: ["https://www.your-domain.com"], }; @@ -293,61 +309,74 @@ describe("Checkout", (): void => { // TODO: add gift card to PaymentMethod and unmock test test.each([true, true])("should get payment methods balance", async (isMock): Promise => { !isMock && nock.restore(); - const paymentMethodsRequest: ICheckout.CheckoutBalanceCheckRequest = { + const paymentMethodsRequest: CheckoutBalanceCheckRequest = { merchantAccount, amount: createAmountObject("USD", 1000), paymentMethod: { }, reference: "mocked_reference" }; - const paymentMethodsBalanceResponse: ICheckout.CheckoutBalanceCheckResponse = { balance: {currency: "USD", value: 1000}}; + const paymentMethodsBalanceResponse: CheckoutBalanceCheckResponse = { + balance: {currency: "USD", value: 1000}, + resultCode: CheckoutBalanceCheckResponse.ResultCodeEnum.Success + }; scope.post("/paymentMethods/balance") .reply(200, paymentMethodsBalanceResponse); - const paymentsResponse: ICheckout.CheckoutBalanceCheckResponse = await checkout.paymentMethodsBalance(paymentMethodsRequest); + const paymentsResponse: CheckoutBalanceCheckResponse = await checkout.paymentMethodsBalance(paymentMethodsRequest); expect(paymentsResponse.balance.value).toEqual(1000); }); test.each([false, true])("should create order", async (isMock): Promise => { !isMock && nock.restore(); const expiresAt = "2019-12-17T10:05:29Z"; - const orderRequest: ICheckout.CheckoutCreateOrderRequest = { + const orderRequest: CheckoutCreateOrderRequest = { amount: createAmountObject("USD", 1000), merchantAccount, reference }; - const orderResponse: ICheckout.CheckoutCreateOrderResponse = {expiresAt, orderData: "mocked_order_data", remainingAmount: {currency: "USD", value: 500} }; + const orderResponse: CheckoutCreateOrderResponse = { + expiresAt, + orderData: "mocked_order_data", + remainingAmount: {currency: "USD", value: 500} , + resultCode: CheckoutCreateOrderResponse.ResultCodeEnum.Success + }; scope.post("/orders") .reply(200, orderResponse); - const response: ICheckout.CheckoutCreateOrderResponse = await checkout.orders(orderRequest); + const response: CheckoutCreateOrderResponse = await checkout.orders(orderRequest); expect(response).toBeTruthy(); }); test.each([false, true])("should cancel order", async (isMock): Promise => { !isMock && nock.restore(); const expiresAt = "2019-12-17T10:05:29Z"; - const orderRequest: ICheckout.CheckoutCreateOrderRequest = { + const orderRequest: CheckoutCreateOrderRequest = { amount: createAmountObject("USD", 1000), merchantAccount, reference }; - const orderResponse: ICheckout.CheckoutCreateOrderResponse = {expiresAt, orderData: "mocked_order_data", remainingAmount: {currency: "USD", value: 500} }; + const orderResponse: CheckoutCreateOrderResponse = { + expiresAt, + orderData: "mocked_order_data", + remainingAmount: {currency: "USD", value: 500}, + resultCode: CheckoutCreateOrderResponse.ResultCodeEnum.Success + }; scope.post("/orders") .reply(200, orderResponse); - const createOrderResponse: ICheckout.CheckoutCreateOrderResponse = await checkout.orders(orderRequest); + const createOrderResponse: CheckoutCreateOrderResponse = await checkout.orders(orderRequest); - const orderCancelResponse: ICheckout.CheckoutCancelOrderResponse = { + const orderCancelResponse: CheckoutCancelOrderResponse = { pspReference: "mocked_psp_ref", - resultCode: "CANCELLED" + resultCode: CheckoutCancelOrderResponse.ResultCodeEnum.Received }; scope.post("/orders/cancel") .reply(200, orderCancelResponse); - const response: ICheckout.CheckoutCancelOrderResponse = await checkout.ordersCancel({ + const response: CheckoutCancelOrderResponse = await checkout.ordersCancel({ order: { orderData: createOrderResponse.orderData, pspReference: createOrderResponse.pspReference! diff --git a/src/__tests__/recurring.spec.ts b/src/__tests__/recurring.spec.ts index 5803cbe..b604ac9 100644 --- a/src/__tests__/recurring.spec.ts +++ b/src/__tests__/recurring.spec.ts @@ -26,6 +26,7 @@ import Client from "../client"; import { paymentsSuccess } from "../__mocks__/checkout/paymentsSuccess"; import { createPaymentsCheckoutRequest } from "./checkout.spec"; import Checkout from "../services/checkout"; +import { PaymentRequest } from "../typings/checkout/models"; const createRecurringDetailsRequest = (): IRecurring.RecurringDetailsRequest => { return { @@ -75,7 +76,7 @@ describe("Recurring", (): void => { scope.post("/payments") .reply(200, paymentsSuccess); - const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest(); + const paymentsRequest: PaymentRequest = createPaymentsCheckoutRequest(); const res = await checkout.payments(paymentsRequest); scope.post("/disable") diff --git a/src/client.ts b/src/client.ts index 240ab0b..3345dc3 100644 --- a/src/client.ts +++ b/src/client.ts @@ -52,7 +52,7 @@ class Client { public static HPP_LIVE = "https://live.adyen.com/hpp"; public static MARKETPAY_ENDPOINT_TEST = "https://cal-test.adyen.com/cal/services"; public static MARKETPAY_ENDPOINT_LIVE = "https://cal-live.adyen.com/cal/services"; - public static CHECKOUT_API_VERSION = "v66"; + public static CHECKOUT_API_VERSION = "v67"; public static API_VERSION = "v64"; public static RECURRING_API_VERSION = "v49"; public static MARKETPAY_ACCOUNT_API_VERSION = "v6"; diff --git a/src/services/checkout.ts b/src/services/checkout.ts index 9ce2219..2adabe1 100644 --- a/src/services/checkout.ts +++ b/src/services/checkout.ts @@ -29,6 +29,28 @@ import PaymentLinks from "./resource/checkout/paymentLinks"; import OriginKeys from "./resource/checkout/originKeys"; import setApplicationInfo from "../helpers/setApplicationInfo"; import { IRequest } from "../typings/requestOptions"; +import { + PaymentRequest, + PaymentResponse, + PaymentMethodsRequest, + PaymentMethodsResponse, + PaymentLinkResource, + CreatePaymentLinkRequest, + DetailsRequest, + PaymentSetupRequest, + PaymentSetupResponse, + PaymentVerificationRequest, + PaymentVerificationResponse, + CheckoutUtilityRequest, + CheckoutUtilityResponse, + CheckoutBalanceCheckRequest, + CheckoutBalanceCheckResponse, + CheckoutCreateOrderRequest, + CheckoutCreateOrderResponse, + CheckoutCancelOrderRequest, + CheckoutCancelOrderResponse +} from "../typings/checkout/models"; + import PaymentLinksId from "./resource/checkout/paymentLinksId"; import PaymentMethodsBalance from "./resource/checkout/paymentMethodsBalance"; import Orders from "./resource/checkout/orders"; @@ -62,48 +84,48 @@ class Checkout extends ApiKeyAuthenticatedService { this._ordersCancel = new OrdersCancel(this); } - public payments(paymentsRequest: ICheckout.PaymentRequest, requestOptions?: IRequest.Options): Promise { - return getJsonResponse( + public payments(paymentsRequest: PaymentRequest, requestOptions?: IRequest.Options): Promise { + return getJsonResponse( this._payments, setApplicationInfo(paymentsRequest), requestOptions, ); } - public paymentMethods(paymentMethodsRequest: ICheckout.PaymentMethodsRequest): Promise { - return getJsonResponse( + public paymentMethods(paymentMethodsRequest: PaymentMethodsRequest): Promise { + return getJsonResponse( this._paymentMethods, paymentMethodsRequest, ); } - public paymentLinks(paymentLinkRequest: ICheckout.CreatePaymentLinkRequest): Promise { - return getJsonResponse( + public paymentLinks(paymentLinkRequest: CreatePaymentLinkRequest): Promise { + return getJsonResponse( this._paymentLinks, paymentLinkRequest ); } - public getPaymentLinks(linkId: string): Promise { + public getPaymentLinks(linkId: string): Promise { this._paymentLinksId.id = linkId; - return getJsonResponse<{}, ICheckout.PaymentLinkResource>( + return getJsonResponse<{}, PaymentLinkResource>( this._paymentLinksId, {}, { method: "GET" } ); } - public updatePaymentLinks(linkId: string, status: "expired"): Promise { + public updatePaymentLinks(linkId: string, status: "expired"): Promise { this._paymentLinksId.id = linkId; - return getJsonResponse<{}, ICheckout.PaymentLinkResource>( + return getJsonResponse<{}, PaymentLinkResource>( this._paymentLinksId, { status }, { method: "PATCH" } ); } - public paymentsDetails(paymentsDetailsRequest: ICheckout.DetailsRequest, requestOptions?: IRequest.Options): Promise { - return getJsonResponse( + public paymentsDetails(paymentsDetailsRequest: DetailsRequest, requestOptions?: IRequest.Options): Promise { + return getJsonResponse( this._paymentsDetails, paymentsDetailsRequest, requestOptions @@ -111,46 +133,46 @@ class Checkout extends ApiKeyAuthenticatedService { } public paymentSession( - paymentSessionRequest: ICheckout.PaymentSetupRequest, + paymentSessionRequest: PaymentSetupRequest, requestOptions?: IRequest.Options, - ): Promise { - return getJsonResponse( + ): Promise { + return getJsonResponse( this._paymentSession, paymentSessionRequest, requestOptions, ); } - public paymentResult(paymentResultRequest: ICheckout.PaymentVerificationRequest): Promise { - return getJsonResponse( + public paymentResult(paymentResultRequest: PaymentVerificationRequest): Promise { + return getJsonResponse( this._paymentsResult, paymentResultRequest, ); } - public originKeys(originKeysRequest: ICheckout.CheckoutUtilityRequest): Promise { - return getJsonResponse( + public originKeys(originKeysRequest: CheckoutUtilityRequest): Promise { + return getJsonResponse( this._originKeys, originKeysRequest, ); } - public paymentMethodsBalance(paymentMethodsBalanceRequest: ICheckout.CheckoutBalanceCheckRequest): Promise { - return getJsonResponse( + public paymentMethodsBalance(paymentMethodsBalanceRequest: CheckoutBalanceCheckRequest): Promise { + return getJsonResponse( this._paymentMethodsBalance, paymentMethodsBalanceRequest, ); } - public orders(ordersRequest: ICheckout.CheckoutCreateOrderRequest): Promise { - return getJsonResponse( + public orders(ordersRequest: CheckoutCreateOrderRequest): Promise { + return getJsonResponse( this._orders, ordersRequest, ); } - public ordersCancel(ordersCancelRequest: ICheckout.CheckoutCancelOrderRequest): Promise { - return getJsonResponse( + public ordersCancel(ordersCancelRequest: CheckoutCancelOrderRequest): Promise { + return getJsonResponse( this._ordersCancel, ordersCancelRequest, ); diff --git a/src/typings/checkout.ts b/src/typings/checkout.ts deleted file mode 100644 index 3303a5a..0000000 --- a/src/typings/checkout.ts +++ /dev/null @@ -1,5191 +0,0 @@ - -/* - * ###### - * ###### - * ############ ####( ###### #####. ###### ############ ############ - * ############# #####( ###### #####. ###### ############# ############# - * ###### #####( ###### #####. ###### ##### ###### ##### ###### - * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### - * ###### ###### #####( ###### #####. ###### ##### ##### ###### - * ############# ############# ############# ############# ##### ###### - * ############ ############ ############# ############ ##### ###### - * ###### - * ############# - * ############ - * - * Adyen NodeJS API Library - * - * Version of Checkout: v64 - * - * Copyright (c) 2020 Adyen B.V. - * This file is open source and available under the MIT license. - * See the LICENSE file for more info. - */ - - -declare namespace ICheckout { - export interface AccountInfo { - /** - * Indicator for the length of time since this shopper account was created in the merchant's environment. - * Allowed values: - * * notApplicable - * * thisTransaction - * * lessThan30Days - * * from30To60Days - * * moreThan60Days - */ - accountAgeIndicator?: "notApplicable" | "thisTransaction" | "lessThan30Days" | "from30To60Days" | "moreThan60Days"; - /** - * Date when the shopper's account was last changed. - */ - accountChangeDate?: string; // date-time - /** - * Indicator for the length of time since the shopper's account was last updated. - * Allowed values: - * * thisTransaction - * * lessThan30Days - * * from30To60Days - * * moreThan60Days - */ - accountChangeIndicator?: "thisTransaction" | "lessThan30Days" | "from30To60Days" | "moreThan60Days"; - /** - * Date when the shopper's account was created. - */ - accountCreationDate?: string; // date-time - /** - * Indicates the type of account. For example, for a multi-account card product. - * Allowed values: - * * notApplicable - * * credit - * * debit - */ - accountType?: "notApplicable" | "credit" | "debit"; - /** - * Number of attempts the shopper tried to add a card to their account in the last day. - */ - addCardAttemptsDay?: number; // int32 - /** - * Date the selected delivery address was first used. - */ - deliveryAddressUsageDate?: string; // date-time - /** - * Indicator for the length of time since this delivery address was first used. - * Allowed values: - * * thisTransaction - * * lessThan30Days - * * from30To60Days - * * moreThan60Days - */ - deliveryAddressUsageIndicator?: "thisTransaction" | "lessThan30Days" | "from30To60Days" | "moreThan60Days"; - /** - * Shopper's home phone number (including the country code). - */ - homePhone?: string; - /** - * Shopper's mobile phone number (including the country code). - */ - mobilePhone?: string; - /** - * Date when the shopper last changed their password. - */ - passwordChangeDate?: string; // date-time - /** - * Indicator when the shopper has changed their password. - * Allowed values: - * * notApplicable - * * thisTransaction - * * lessThan30Days - * * from30To60Days - * * moreThan60Days - */ - passwordChangeIndicator?: "notApplicable" | "thisTransaction" | "lessThan30Days" | "from30To60Days" | "moreThan60Days"; - /** - * Number of all transactions (successful and abandoned) from this shopper in the past 24 hours. - */ - pastTransactionsDay?: number; // int32 - /** - * Number of all transactions (successful and abandoned) from this shopper in the past year. - */ - pastTransactionsYear?: number; // int32 - /** - * Date this payment method was added to the shopper's account. - */ - paymentAccountAge?: string; // date-time - /** - * Indicator for the length of time since this payment method was added to this shopper's account. - * Allowed values: - * * notApplicable - * * thisTransaction - * * lessThan30Days - * * from30To60Days - * * moreThan60Days - */ - paymentAccountIndicator?: "notApplicable" | "thisTransaction" | "lessThan30Days" | "from30To60Days" | "moreThan60Days"; - /** - * Number of successful purchases in the last six months. - */ - purchasesLast6Months?: number; // int32 - /** - * Whether suspicious activity was recorded on this account. - */ - suspiciousActivity?: boolean; - /** - * Shopper's work phone number (including the country code). - */ - workPhone?: string; - } - export interface AchDetails { - /** - * The bank account number (without separators). - */ - bankAccountNumber: string; - /** - * The bank routing number of the account. The field value is `nil` in most cases. - */ - bankLocationId?: string; - /** - * Encrypted bank account number. The bank account number (without separators). - */ - encryptedBankAccountNumber?: string; - /** - * Encrypted location id. The bank routing number of the account. The field value is `nil` in most cases. - */ - encryptedBankLocationId?: string; - /** - * The name of the bank account holder. - * If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: - * * χ12 is converted to ch12. - * * üA is converted to euA. - * * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. - * After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: - * * John17 - allowed. - * * J17 - allowed. - * * 171 - not allowed. - * * John-7 - allowed. - * > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'. - */ - ownerName?: string; - /** - * This is the `recurringDetailReference` returned in the response when you created the token. - */ - storedPaymentMethodId?: string; - /** - * **ach** - */ - type: string; - } - export interface AdditionalData3DSecure { - /** - * This parameter indicates that you are able to process 3D Secure 2 transactions natively on your payment page. Send this field when you are using `/payments` endpoint with any of our [native 3D Secure 2 solutions](https://docs.adyen.com/checkout/3d-secure/native-3ds2), such as Components or Drop-in. Possible values: - * * **true** - Ready to support native 3D Secure 2 authentication. Setting this to true does not mean always applying 3D Secure 2. Adyen still selects the version of 3D Secure based on configuration to optimize authorisation rates and improve the shopper's experience. - * * **false** – Not ready to support native 3D Secure 2 authentication. Adyen will not offer 3D Secure 2 to your shopper regardless of your configuration. - * > This parameter only indicates your readiness to support 3D Secure 2 natively on Drop-in or Components. To specify that you want to perform 3D Secure on a transaction, use Dynamic 3D Secure or send the `executeThreeD` parameter. - */ - allow3DS2?: string; - /** - * This parameter indicates if you want to perform 3D Secure authentication on a transaction or not. Allowed values: - * * **true** – Perform 3D Secure authentication. - * * **false** – Don't perform 3D Secure authentication. - * > Alternatively, you can also use Dynamic 3D Secure to configure rules for applying 3D Secure. - */ - executeThreeD?: string; - /** - * In case of Secure+, this field must be set to **CUPSecurePlus**. - */ - mpiImplementationType?: string; - /** - * Indicates the [exemption type](https://docs.adyen.com/payments-fundamentals/psd2-sca-compliance-and-implementation-guide#specifypreferenceinyourapirequest) that you want to request for the transaction. Possible values: - * * **lowValue** - * * **secureCorporate** - * * **trustedBeneficiary** - * * **transactionRiskAnalysis** - */ - scaExemption?: string; - } - export interface AdditionalDataAirline { - /** - * Reference number for the invoice, issued by the agency. - * * minLength: 1 - * * maxLength: 6 - */ - "airline.agency_invoice_number"?: string; - /** - * 2-letter agency plan identifier; alphabetical. - * * minLength: 2 - * * maxLength: 2 - */ - "airline.agency_plan_name"?: string; - /** - * [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX); numeric. It identifies the carrier. - * * Format: IATA 3-digit accounting code (PAX) - * * Example: KLM = 074 - * * minLength: 3 - * * maxLength: 3 - */ - "airline.airline_code"?: string; - /** - * [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX); alphabetical. It identifies the carrier. - * * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter airline code - * * Example: KLM = KL - * * minLength: 2 - * * maxLength: 2 - */ - "airline.airline_designator_code"?: string; - /** - * Chargeable amount for boarding the plane. - * The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). - * * minLength: 1 - * * maxLength: 18 - */ - "airline.boarding_fee"?: string; - /** - * The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the reservation and purchase the ticket. - * * Format: alphanumeric. - * * minLength: 4 - * * maxLength: 4 - */ - "airline.computerized_reservation_system"?: string; - /** - * Reference number; alphanumeric. - * * minLength: 0 - * * maxLength: 20 - */ - "airline.customer_reference_number"?: string; - /** - * Optional 2-digit code; alphanumeric. It identifies the type of product of the transaction. The description of the code may appear on credit card statements. - * * Format: 2-digit code - * * Example: Passenger ticket = 01 - * * minLength: 2 - * * maxLength: 2 - */ - "airline.document_type"?: string; - /** - * Flight departure date. Local time `(HH:mm)` is optional. - * * Date format: `yyyy-MM-dd` - * * Date and time format: `yyyy-MM-dd HH:mm` - * * minLength: 10 - * * maxLength: 16 - */ - "airline.flight_date"?: string; - /** - * [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX); alphabetical. It identifies the carrier. - * This field is required/mandatory if the airline data includes leg details. - * * Format: IATA 2-letter airline code - * * Example: KLM = KL - * * minLength: 2 - * * maxLength: 2 - */ - "airline.leg.carrier_code"?: string; - /** - * 1-letter travel class identifier; alphabetical. There is no standard; however, the following codes are used rather consistently: - * * F: first class - * * J: business class - * * Y: economy class - * * W: premium economy - * - * Limitations: - * * minLength: 1 - * * maxLength: 1 - */ - "airline.leg.class_of_travel"?: string; - /** - * - * Date and time of travel. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-compliant. - * * Format: `yyyy-MM-dd HH:mm` - * * minLength: 16 - * * maxLength: 16 - */ - "airline.leg.date_of_travel"?: string; - /** - * Alphabetical identifier of the departure airport. - * This field is required if the airline data includes leg details. - * * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code. - * * Example: Amsterdam = AMS - * * minLength: 3 - * * maxLength: 3 - */ - "airline.leg.depart_airport"?: string; - /** - * [Departure tax](https://en.wikipedia.org/wiki/Departure_tax). Amount charged by a country to an individual upon their leaving. The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). - * * minLength: 1 - * * maxLength: 12 - */ - "airline.leg.depart_tax"?: string; - /** - * Alphabetical identifier of the destination/arrival airport. - * This field is required/mandatory if the airline data includes leg details. - * * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code. - * * Example: Amsterdam = AMS - * * minLength: 3 - * * maxLength: 3 - */ - "airline.leg.destination_code"?: string; - /** - * [Fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code); alphanumeric. - * * minLength: 1 - * * maxLength: 7 - */ - "airline.leg.fare_base_code"?: string; - /** - * The flight identifier. - * * minLength: 1 - * * maxLength: 5 - */ - "airline.leg.flight_number"?: string; - /** - * 1-letter code that indicates whether the passenger is entitled to make a stopover. Only two types of characters are allowed: - * * O: Stopover allowed - * * X: Stopover not allowed - * - * Limitations: - * * minLength: 1 - * * maxLength: 1 - */ - "airline.leg.stop_over_code"?: string; - /** - * Date of birth of the passenger. - * - * Date format: `yyyy-MM-dd` - * * minLength: 10 - * * maxLength: 10 - */ - "airline.passenger.date_of_birth"?: string; - /** - * Passenger first name/given name. - * > This field is required/mandatory if the airline data includes passenger details or leg details. - */ - "airline.passenger.first_name"?: string; - /** - * Passenger last name/family name. - * > This field is required/mandatory if the airline data includes passenger details or leg details. - */ - "airline.passenger.last_name"?: string; - /** - * Telephone number of the passenger, including country code. This is an alphanumeric field that can include the '+' and '-' signs. - * * minLength: 3 - * * maxLength: 30 - */ - "airline.passenger.telephone_number"?: string; - /** - * Passenger type code (PTC). IATA PTC values are 3-letter alphabetical. Example: ADT, SRC, CNN, INS. - * - * However, several carriers use non-standard codes that can be up to 5 alphanumeric characters. - * * minLength: 3 - * * maxLength: 6 - */ - "airline.passenger.traveller_type"?: string; - /** - * Passenger name, initials, and a title. - * * Format: last name + first name or initials + title. - * * Example: *FLYER / MARY MS*. - * * minLength: 1 - * * maxLength: 49 - */ - "airline.passenger_name": string; - /** - * Address of the place/agency that issued the ticket. - * * minLength: 0 - * * maxLength: 16 - */ - "airline.ticket_issue_address"?: string; - /** - * The ticket's unique identifier. - * * minLength: 1 - * * maxLength: 150 - */ - "airline.ticket_number"?: string; - /** - * IATA number, also ARC number or ARC/IATA number. Unique identifier number for travel agencies. - * * minLength: 1 - * * maxLength: 8 - */ - "airline.travel_agency_code"?: string; - /** - * The name of the travel agency. - * * minLength: 1 - * * maxLength: 25 - */ - "airline.travel_agency_name"?: string; - } - export interface AdditionalDataCarRental { - /** - * Pick-up date. - * * Date format: `yyyyMMdd` - */ - "carRental.checkOutDate"?: string; - /** - * The customer service phone number of the car rental company. - * * Format: Alphanumeric - * * maxLength: 17 - */ - "carRental.customerServiceTollFreeNumber"?: string; - /** - * Number of days for which the car is being rented. - * * Format: Numeric - * * maxLength: 19 - */ - "carRental.daysRented"?: string; - /** - * Any fuel charges associated with the rental. - * * Format: Numeric - * * maxLength: 12 - */ - "carRental.fuelCharges"?: string; - /** - * Any insurance charges associated with the rental. - * * Format: Numeric - * * maxLength: 12 - */ - "carRental.insuranceCharges"?: string; - /** - * The city from which the car is rented. - * * Format: Alphanumeric - * * maxLength: 18 - */ - "carRental.locationCity"?: string; - /** - * The country from which the car is rented. - * * Format: Alphanumeric - * * maxLength: 2 - */ - "carRental.locationCountry"?: string; - /** - * The state or province from where the car is rented. - * * Format: Alphanumeric - * * maxLength: 3 - */ - "carRental.locationStateProvince"?: string; - /** - * Indicates if the customer was a "no-show" (neither keeps nor cancels their booking). - * * Y - Customer was a no show. - * * N - Not applicable. - */ - "carRental.noShowIndicator"?: string; - /** - * Charge associated with not returning a vehicle to the original rental location. - */ - "carRental.oneWayDropOffCharges"?: string; - /** - * Daily rental rate. - * * Format: Alphanumeric - * * maxLength: 12 - */ - "carRental.rate"?: string; - /** - * Specifies whether the given rate is applied daily or weekly. - * * D - Daily rate. - * * W - Weekly rate. - */ - "carRental.rateIndicator"?: string; - /** - * The rental agreement number associated with this car rental. - * * Format: Alphanumeric - * * maxLength: 9 - */ - "carRental.rentalAgreementNumber"?: string; - /** - * Daily rental rate. - * * Format: Alphanumeric - * * maxLength: 12 - */ - "carRental.rentalClassId"?: string; - /** - * The name of the person renting the car. - * * Format: Alphanumeric - * * maxLength: 26 - */ - "carRental.renterName"?: string; - /** - * The city where the car must be returned. - * * Format: Alphanumeric - * * maxLength: 18 - */ - "carRental.returnCity"?: string; - /** - * The country where the car must be returned. - * * Format: Alphanumeric - * * maxLength: 2 - */ - "carRental.returnCountry"?: string; - /** - * The last date to return the car by. - * * Date format: `yyyyMMdd` - */ - "carRental.returnDate"?: string; - /** - * Agency code, phone number, or address abbreviation - * * Format: Alphanumeric - * * maxLength: 10 - */ - "carRental.returnLocationId"?: string; - /** - * The state or province where the car must be returned. - * * Format: Alphanumeric - * * maxLength: 3 - */ - "carRental.returnStateProvince"?: string; - /** - * Indicates whether the goods or services were tax-exempt, or tax was not collected. - * - * Values: - * * Y - Goods or services were tax exempt - * * N - Tax was not collected - */ - "carRental.taxExemptIndicator"?: string; - /** - * Number of nights. This should be included in the auth message. - * * Format: Numeric - * * maxLength: 2 - */ - "travelEntertainmentAuthData.duration"?: string; - /** - * Indicates what market-specific dataset will be submitted or is being submitted. Value should be "A" for Car rental. This should be included in the auth message. - * * Format: Alphanumeric - * * maxLength: 1 - */ - "travelEntertainmentAuthData.market"?: string; - } - export interface AdditionalDataCommon { - /** - * Triggers test scenarios that allow to replicate certain communication errors. - * - * Allowed values: - * * **NO_CONNECTION_AVAILABLE** – There wasn't a connection available to service the outgoing communication. - * This is a transient, retriable error since no messaging could be initiated to an issuing system (or third-party acquiring system). Therefore, the header Transient-Error: true is returned in the response. A subsequent request using the same idempotency key will be processed as if it was the first request. - * * **IOEXCEPTION_RECEIVED** – Something went wrong during transmission of the message or receiving the response. - * This is a classified as non-transient because the message could have been received by the issuing party and been acted upon. No transient error header is returned. If using idempotency, the (error) response is stored as the final result for the idempotency key. Subsequent messages with the same idempotency key not be processed beyond returning the stored response. - */ - RequestedTestErrorResponseCode?: string; - /** - * Flags a card payment request for either pre-authorisation or final authorisation. For more information, refer to [Authorisation types](https://docs.adyen.com/checkout/adjust-authorisation#authorisation-types). - * - * Allowed values: - * * **PreAuth** – flags the payment request to be handled as a pre-authorisation. - * * **FinalAuth** – flags the payment request to be handled as a final authorisation. - */ - authorisationType?: string; - /** - * Allows you to determine or override the acquirer account that should be used for the transaction. - * - * If you need to process a payment with an acquirer different from a default one, you can set up a corresponding configuration on the Adyen payments platform. Then you can pass a custom routing flag in a payment request's additional data to target a specific acquirer. - * - * To enable this functionality, contact [Support](https://support.adyen.com/hc/en-us/requests/new). - */ - customRoutingFlag?: string; - /** - * Allows you to link the transaction to the original or previous one in a subscription/card-on-file chain. This field is required for token-based transactions where Adyen does not tokenize the card. - * - * Transaction identifier from card schemes, for example, Mastercard Trace ID or the Visa Transaction ID. - * - * Submit the original transaction ID of the contract in your payment request if you are not tokenizing card details with Adyen and are making a merchant-initiated transaction (MIT) for subsequent charges. - * - * Make sure you are sending `shopperInteraction` **ContAuth** and `recurringProcessingModel` **Subscription** or **UnscheduledCardOnFile** to ensure that the transaction is classified as MIT. - */ - networkTxReference?: string; - /** - * Boolean indicator that can be optionally used for performing debit transactions on combo cards (for example, combo cards in Brazil). This is not mandatory but we recommend that you set this to true if you want to use the `selectedBrand` value to specify how to process the transaction. - */ - overwriteBrand?: string; - /** - * This field is required if the transaction is performed by a registered payment facilitator. This field must contain the city of the actual merchant's address. - * * Format: alpha-numeric. - * * Maximum length: 13 characters. - */ - subMerchantCity?: string; - /** - * This field is required if the transaction is performed by a registered payment facilitator. This field must contain the three-letter country code of the actual merchant's address. - * * Format: alpha-numeric. - * * Fixed length: 3 characters. - */ - subMerchantCountry?: string; - /** - * This field contains an identifier of the actual merchant when a transaction is submitted via a payment facilitator. The payment facilitator must send in this unique ID. - * - * A unique identifier per submerchant that is required if the transaction is performed by a registered payment facilitator. - * * Format: alpha-numeric. - * * Fixed length: 15 characters. - */ - subMerchantID?: string; - /** - * This field is required if the transaction is performed by a registered payment facilitator. This field must contain the name of the actual merchant. - * * Format: alpha-numeric. - * * Maximum length: 22 characters. - */ - subMerchantName?: string; - /** - * This field is required if the transaction is performed by a registered payment facilitator. This field must contain the postal code of the actual merchant's address. - * * Format: alpha-numeric. - * * Maximum length: 10 characters. - */ - subMerchantPostalCode?: string; - /** - * This field is required if the transaction is performed by a registered payment facilitator, and if applicable to the country. This field must contain the state code of the actual merchant's address. - * * Format: alpha-numeric. - * * Maximum length: 3 characters. - */ - subMerchantState?: string; - /** - * This field is required if the transaction is performed by a registered payment facilitator. This field must contain the street of the actual merchant's address. - * * Format: alpha-numeric. - * * Maximum length: 60 characters. - */ - subMerchantStreet?: string; - /** - * This field is required if the transaction is performed by a registered payment facilitator. This field must contain the tax ID of the actual merchant. - * * Format: alpha-numeric. - * * Fixed length: 11 or 14 characters. - */ - subMerchantTaxId?: string; - } - export interface AdditionalDataLevel23 { - /** - * Customer code, if supplied by a customer. - * - * Encoding: ASCII. - * - * Max length: 25 characters. - * - * > Required for Level 2 and Level 3 data. - */ - "enhancedSchemeData.customerReference"?: string; - /** - * Destination country code. - * - * Encoding: ASCII. - * - * Max length: 3 characters. - */ - "enhancedSchemeData.destinationCountryCode"?: string; - /** - * The postal code of a destination address. - * - * Encoding: ASCII. - * - * Max length: 10 characters. - * - * > Required for American Express. - */ - "enhancedSchemeData.destinationPostalCode"?: string; - /** - * Destination state or province code. - * - * Encoding: ASCII.Max length: 3 characters. - */ - "enhancedSchemeData.destinationStateProvinceCode"?: string; - /** - * Duty amount, in minor units. - * - * For example, 2000 means USD 20.00. - * - * Max length: 12 characters. - */ - "enhancedSchemeData.dutyAmount"?: string; - /** - * Shipping amount, in minor units. - * - * For example, 2000 means USD 20.00. - * - * Max length: 12 characters. - */ - "enhancedSchemeData.freightAmount"?: string; - /** - * Item commodity code. - * - * Encoding: ASCII. - * - * Max length: 12 characters. - */ - "enhancedSchemeData.itemDetailLine[itemNr].commodityCode"?: string; - /** - * Item description. - * - * Encoding: ASCII. - * - * Max length: 26 characters. - */ - "enhancedSchemeData.itemDetailLine[itemNr].description"?: string; - /** - * Discount amount, in minor units. - * - * For example, 2000 means USD 20.00. - * - * Max length: 12 characters. - */ - "enhancedSchemeData.itemDetailLine[itemNr].discountAmount"?: string; - /** - * Product code. - * - * Encoding: ASCII. - * - * Max length: 12 characters. - */ - "enhancedSchemeData.itemDetailLine[itemNr].productCode"?: string; - /** - * Quantity, specified as an integer value. - * - * Value must be greater than 0. - * - * Max length: 12 characters. - */ - "enhancedSchemeData.itemDetailLine[itemNr].quantity"?: string; - /** - * Total amount, in minor units. - * - * For example, 2000 means USD 20.00. - * - * Max length: 12 characters. - */ - "enhancedSchemeData.itemDetailLine[itemNr].totalAmount"?: string; - /** - * Item unit of measurement. - * - * Encoding: ASCII. - * - * Max length: 3 characters. - */ - "enhancedSchemeData.itemDetailLine[itemNr].unitOfMeasure"?: string; - /** - * Unit price, specified in [minor units](https://docs.adyen.com/development-resources/currency-codes). - * - * Max length: 12 characters. - */ - "enhancedSchemeData.itemDetailLine[itemNr].unitPrice"?: string; - /** - * Order date. - * * Format: `ddMMyy` - * - * Encoding: ASCII. - * - * Max length: 6 characters. - */ - "enhancedSchemeData.orderDate"?: string; - /** - * The postal code of a "ship-from" address. - * - * Encoding: ASCII. - * - * Max length: 10 characters. - */ - "enhancedSchemeData.shipFromPostalCode"?: string; - /** - * Total tax amount, in minor units. - * - * For example, 2000 means USD 20.00. - * - * Max length: 12 characters. - * - * > Required for Level 2 and Level 3 data. - */ - "enhancedSchemeData.totalTaxAmount"?: string; - } - export interface AdditionalDataLodging { - /** - * The arrival date. - * * Date format: `yyyyMMdd` - */ - "lodging.checkInDate"?: string; - /** - * The departure date. - * * Date format: `yyyyMMdd` - */ - "lodging.checkOutDate"?: string; - /** - * The toll free phone number for the hotel/lodgings. - * * Format: Alphanumeric - * * maxLength: 17 - */ - "lodging.customerServiceTollFreeNumber"?: string; - /** - * Identifies that the facility complies with the Hotel and Motel Fire Safety Act of 1990. Values can be: 'Y' or 'N'. - * * Format: Alphabetic - * * maxLength: 1 - */ - "lodging.fireSafetyActIndicator"?: string; - /** - * The folio cash advances. - * * Format: Numeric - * * maxLength: 12 - */ - "lodging.folioCashAdvances"?: string; - /** - * Card acceptor’s internal invoice or billing ID reference number. - * * Format: Alphanumeric - * * maxLength: 25 - */ - "lodging.folioNumber"?: string; - /** - * Any charges for food and beverages associated with the booking. - * * Format: Numeric - * * maxLength: 12 - */ - "lodging.foodBeverageCharges"?: string; - /** - * Indicates if the customer was a "no-show" (neither keeps nor cancels their booking). - * - * Value should be Y or N. - * * Format: Numeric - * * maxLength: 1 - */ - "lodging.noShowIndicator"?: string; - /** - * Prepaid expenses for the booking. - * * Format: Numeric - * * maxLength: 12 - */ - "lodging.prepaidExpenses"?: string; - /** - * Identifies specific lodging property location by its local phone number. - * * Format: Alphanumeric - * * maxLength: 17 - */ - "lodging.propertyPhoneNumber"?: string; - /** - * Total number of nights the room will be rented. - * * Format: Numeric - * * maxLength: 4 - */ - "lodging.room1.numberOfNights"?: string; - /** - * The rate of the room. - * * Format: Numeric - * * maxLength: 12 - */ - "lodging.room1.rate"?: string; - /** - * The total amount of tax to be paid. - * * Format: Numeric - * * maxLength: 12 - */ - "lodging.room1.tax"?: string; - /** - * Total room tax amount. - * * Format: Numeric - * * maxLength: 12 - */ - "lodging.totalRoomTax"?: string; - /** - * Total tax amount. - * * Format: Numeric - * * maxLength: 12 - */ - "lodging.totalTax"?: string; - /** - * Number of nights. This should be included in the auth message. - * * Format: Numeric - * * maxLength: 2 - */ - "travelEntertainmentAuthData.duration"?: string; - /** - * Indicates what market-specific dataset will be submitted or is being submitted. Value should be "H" for Hotel. This should be included in the auth message. - * - * * Format: Alphanumeric - * * maxLength: 1 - */ - "travelEntertainmentAuthData.market"?: string; - } - export interface AdditionalDataOpenInvoice { - /** - * Holds different merchant data points like product, purchase, customer, and so on. It takes data in a Base64 encoded string. - * - * The `merchantData` parameter needs to be added to the `openinvoicedata` signature at the end. - * - * Since the field is optional, if it's not included it does not impact computing the merchant signature. - * - * Applies only to Klarna. - * - * You can contact Klarna for the format and structure of the string. - */ - "openinvoicedata.merchantData"?: string; - /** - * The number of invoice lines included in `openinvoicedata`. - * - * There needs to be at least one line, so `numberOfLines` needs to be at least 1. - */ - "openinvoicedata.numberOfLines"?: string; - /** - * The three-character ISO currency code. - */ - "openinvoicedataLine[itemNr].currencyCode"?: string; - /** - * A text description of the product the invoice line refers to. - */ - "openinvoicedataLine[itemNr].description"?: string; - /** - * The price for one item in the invoice line, represented in minor units. - * - * The due amount for the item, VAT excluded. - */ - "openinvoicedataLine[itemNr].itemAmount"?: string; - /** - * A unique id for this item. Required for RatePay if the description of each item is not unique. - */ - "openinvoicedataLine[itemNr].itemId"?: string; - /** - * The VAT due for one item in the invoice line, represented in minor units. - */ - "openinvoicedataLine[itemNr].itemVatAmount"?: string; - /** - * The VAT percentage for one item in the invoice line, represented in minor units. - * - * For example, 19% VAT is specified as 1900. - */ - "openinvoicedataLine[itemNr].itemVatPercentage"?: string; - /** - * The number of units purchased of a specific product. - */ - "openinvoicedataLine[itemNr].numberOfItems"?: string; - /** - * Required for AfterPay. The country-specific VAT category a product falls under. - * - * Allowed values: - * * High - * * Low - * * None. - */ - "openinvoicedataLine[itemNr].vatCategory"?: string; - } - export interface AdditionalDataRatepay { - /** - * Amount the customer has to pay each month. - */ - "ratepay.installmentAmount"?: string; - /** - * Interest rate of this installment. - */ - "ratepay.interestRate"?: string; - /** - * Amount of the last installment. - */ - "ratepay.lastInstallmentAmount"?: string; - /** - * Calendar day of the first payment. - */ - "ratepay.paymentFirstday"?: string; - /** - * Date the merchant delivered the goods to the customer. - */ - "ratepaydata.deliveryDate"?: string; - /** - * Date by which the customer must settle the payment. - */ - "ratepaydata.dueDate"?: string; - /** - * Invoice date, defined by the merchant. If not included, the invoice date is set to the delivery date. - */ - "ratepaydata.invoiceDate"?: string; - /** - * Identification name or number for the invoice, defined by the merchant. - */ - "ratepaydata.invoiceId"?: string; - } - export interface AdditionalDataRetry { - /** - * The number of times the transaction (not order) has been retried between different payment service providers. For instance, the `chainAttemptNumber` set to 2 means that this transaction has been recently tried on another provider before being sent to Adyen. - * - * > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together. - */ - "retry.chainAttemptNumber"?: string; - /** - * The index of the attempt to bill a particular order, which is identified by the `merchantOrderReference` field. For example, if a recurring transaction fails and is retried one day later, then the order number for these attempts would be 1 and 2, respectively. - * - * > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together. - */ - "retry.orderAttemptNumber"?: string; - /** - * The Boolean value indicating whether Adyen should skip or retry this transaction, if possible. - * - * > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together. - */ - "retry.skipRetry"?: string; - } - export interface AdditionalDataRisk { - /** - * The data for your custom risk field. For more information, refer to [Create custom risk fields](https://docs.adyen.com/risk-management/configure-custom-risk-rules#step-1-create-custom-risk-fields). - */ - "riskdata.[customFieldName]"?: string; - /** - * The price of item in the basket, represented in [minor units](https://docs.adyen.com/development-resources/currency-codes). - */ - "riskdata.basket.item[itemNr].amountPerItem"?: string; - /** - * Brand of the item. - */ - "riskdata.basket.item[itemNr].brand"?: string; - /** - * Category of the item. - */ - "riskdata.basket.item[itemNr].category"?: string; - /** - * Color of the item. - */ - "riskdata.basket.item[itemNr].color"?: string; - /** - * The three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). - */ - "riskdata.basket.item[itemNr].currency"?: string; - /** - * ID of the item. - */ - "riskdata.basket.item[itemNr].itemID"?: string; - /** - * Manufacturer of the item. - */ - "riskdata.basket.item[itemNr].manufacturer"?: string; - /** - * A text description of the product the invoice line refers to. - */ - "riskdata.basket.item[itemNr].productTitle"?: string; - /** - * Quantity of the item purchased. - */ - "riskdata.basket.item[itemNr].quantity"?: string; - /** - * Email associated with the given product in the basket (usually in electronic gift cards). - */ - "riskdata.basket.item[itemNr].receiverEmail"?: string; - /** - * Size of the item. - */ - "riskdata.basket.item[itemNr].size"?: string; - /** - * [Stock keeping unit](https://en.wikipedia.org/wiki/Stock_keeping_unit). - */ - "riskdata.basket.item[itemNr].sku"?: string; - /** - * [Universal Product Code](https://en.wikipedia.org/wiki/Universal_Product_Code). - */ - "riskdata.basket.item[itemNr].upc"?: string; - /** - * Code of the promotion. - */ - "riskdata.promotions.promotion[itemNr].promotionCode"?: string; - /** - * The discount amount of the promotion, represented in [minor units](https://docs.adyen.com/development-resources/currency-codes). - */ - "riskdata.promotions.promotion[itemNr].promotionDiscountAmount"?: string; - /** - * The three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). - */ - "riskdata.promotions.promotion[itemNr].promotionDiscountCurrency"?: string; - /** - * Promotion's percentage discount. It is represented in percentage value and there is no need to include the '%' sign. - * - * e.g. for a promotion discount of 30%, the value of the field should be 30. - */ - "riskdata.promotions.promotion[itemNr].promotionDiscountPercentage"?: string; - /** - * Name of the promotion. - */ - "riskdata.promotions.promotion[itemNr].promotionName"?: string; - } - export interface AdditionalDataRiskStandalone { - /** - * Shopper's country of residence in the form of ISO standard 3166 2-character country codes. - */ - "PayPal.CountryCode"?: string; - /** - * Shopper's email. - */ - "PayPal.EmailId"?: string; - /** - * Shopper's first name. - */ - "PayPal.FirstName"?: string; - /** - * Shopper's last name. - */ - "PayPal.LastName"?: string; - /** - * Unique PayPal Customer Account identification number. Character length and limitations: 13 single-byte alphanumeric characters. - */ - "PayPal.PayerId"?: string; - /** - * Shopper's phone number. - */ - "PayPal.Phone"?: string; - /** - * Allowed values: - * * **Eligible** — Merchant is protected by PayPal's Seller Protection Policy for Unauthorized Payments and Item Not Received. - * - * * **PartiallyEligible** — Merchant is protected by PayPal's Seller Protection Policy for Item Not Received. - * - * * **Ineligible** — Merchant is not protected under the Seller Protection Policy. - */ - "PayPal.ProtectionEligibility"?: string; - /** - * Unique transaction ID of the payment. - */ - "PayPal.TransactionId"?: string; - /** - * Raw AVS result received from the acquirer, where available. Example: D - */ - avsResultRaw?: string; - /** - * The Bank Identification Number of a credit card, which is the first six digits of a card number. Required for [tokenized card request](https://docs.adyen.com/risk-management/standalone-risk#tokenised-pan-request). - */ - bin?: string; - /** - * Raw CVC result received from the acquirer, where available. Example: 1 - */ - cvcResultRaw?: string; - /** - * Unique identifier or token for the shopper's card details. - */ - riskToken?: string; - /** - * A Boolean value indicating whether 3DS authentication was completed on this payment. Example: true - */ - threeDAuthenticated?: string; - /** - * A Boolean value indicating whether 3DS was offered for this payment. Example: true - */ - threeDOffered?: string; - /** - * Required for PayPal payments only. The only supported value is: **paypal**. - */ - tokenDataType?: string; - } - export interface AdditionalDataTemporaryServices { - /** - * Customer code, if supplied by a customer. - * * Encoding: ASCII - * * maxLength: 25 - */ - "enhancedSchemeData.customerReference"?: string; - /** - * Name or ID associated with the individual working in a temporary capacity. - * * maxLength: 40 - */ - "enhancedSchemeData.employeeName"?: string; - /** - * Description of the job or task of the individual working in a temporary capacity. - * * maxLength: 40 - */ - "enhancedSchemeData.jobDescription"?: string; - /** - * Amount paid per regular hours worked, minor units. - * * maxLength: 7 - */ - "enhancedSchemeData.regularHoursRate"?: string; - /** - * Amount of time worked during a normal operation for the task or job. - * * maxLength: 7 - */ - "enhancedSchemeData.regularHoursWorked"?: string; - /** - * Name of the individual requesting temporary services. - * * maxLength: 40 - */ - "enhancedSchemeData.requestName"?: string; - /** - * Date for the beginning of the pay period. - * * Format: ddMMyy - * * maxLength: 6 - */ - "enhancedSchemeData.tempStartDate"?: string; - /** - * Date of the end of the billing cycle. - * * Format: ddMMyy - * * maxLength: 6 - */ - "enhancedSchemeData.tempWeekEnding"?: string; - /** - * Total tax amount, in minor units. For example, 2000 means USD 20.00 - * * maxLength: 12 - */ - "enhancedSchemeData.totalTaxAmount"?: string; - } - export interface AdditionalDataWallets { - /** - * The Android Pay token retrieved from the SDK. - */ - "androidpay.token"?: string; - /** - * The Mastercard Masterpass Transaction ID retrieved from the SDK. - */ - "masterpass.transactionId"?: string; - /** - * The Apple Pay token retrieved from the SDK. - */ - "payment.token"?: string; - /** - * The Google Pay token retrieved from the SDK. - */ - "paywithgoogle.token"?: string; - /** - * The Samsung Pay token retrieved from the SDK. - */ - "samsungpay.token"?: string; - /** - * The Visa Checkout Call ID retrieved from the SDK. - */ - "visacheckout.callId"?: string; - } - export interface Address { - /** - * The name of the city. - */ - city: string; - /** - * The two-character country code as defined in ISO-3166-1 alpha-2. For example, **US**. - * > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. - */ - country: string; - /** - * The number or name of the house. - */ - houseNumberOrName: string; - /** - * A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. - */ - postalCode: string; - /** - * State or province codes as defined in ISO 3166-2. For example, **CA** in the US or **ON** in Canada. - * > Required for the US and Canada. - */ - stateOrProvince?: string; - /** - * The name of the street. - * > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. - */ - street: string; - } - export interface AmazonPayDetails { - amazonPayToken?: string; - checkoutSessionId?: string; - /** - * **amazonpay** - */ - type: string; - } - export interface Amount { - /** - * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - */ - currency: string; - /** - * The payable amount that can be charged for the transaction. - * - * The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). - */ - value: number; // int64 - } - export interface AndroidPayDetails { - /** - * - */ - androidPayToken: string; - /** - * **androidpay** - */ - type: string; - } - export interface ApplePayDetails { - /** - * - */ - applePayToken: string; - fundingSource?: "credit" | "debit"; - /** - * This is the `recurringDetailReference` returned in the response when you created the token. - */ - storedPaymentMethodId?: string; - /** - * **applepay** - */ - type: string; - } - export interface ApplicationInfo { - /** - * Adyen-developed software, such as libraries and plugins, used to interact with the Adyen API. For example, Magento plugin, Java API library, etc. - */ - adyenLibrary?: CommonField; - /** - * Adyen-developed software to get payment details. For example, Checkout SDK, Secured Fields SDK, etc. - */ - adyenPaymentSource?: CommonField; - /** - * Third-party developed platform used to initiate payment requests. For example, Magento, Zuora, etc. - */ - externalPlatform?: ExternalPlatform; - /** - * Merchant developed software, such as cashier application, used to interact with the Adyen API. - */ - merchantApplication?: CommonField; - /** - * Merchant device information. - */ - merchantDevice?: MerchantDevice; - /** - * Shopper interaction device, such as terminal, mobile device or web browser, to initiate payment requests. - */ - shopperInteractionDevice?: ShopperInteractionDevice; - } - export interface Avs { - /** - * Indicates whether the shopper is allowed to modify the billing address for the current payment request. - */ - addressEditable?: boolean; - /** - * Specifies whether the shopper should enter their billing address during checkout. - * - * Allowed values: - * * yes — Perform AVS checks for every card payment. - * * automatic — Perform AVS checks only when required to optimize the conversion rate. - * * no — Do not perform AVS checks. - */ - enabled?: "yes" | "no" | "automatic"; - } - export interface BankAccount { - /** - * The bank account number (without separators). - */ - bankAccountNumber?: string; - /** - * The bank city. - */ - bankCity?: string; - /** - * The location id of the bank. The field value is `nil` in most cases. - */ - bankLocationId?: string; - /** - * The name of the bank. - */ - bankName?: string; - /** - * The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases. - */ - bic?: string; - /** - * Country code where the bank is located. - * - * A valid value is an ISO two-character country code (e.g. 'NL'). - */ - countryCode?: string; - /** - * The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN). - */ - iban?: string; - /** - * The name of the bank account holder. - * If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: - * * χ12 is converted to ch12. - * * üA is converted to euA. - * * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. - * After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: - * * John17 - allowed. - * * J17 - allowed. - * * 171 - not allowed. - * * John-7 - allowed. - * > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'. - */ - ownerName?: string; - /** - * The bank account holder's tax ID. - */ - taxId?: string; - } - export interface BillDeskOnlineDetails { - /** - * The issuer id of the shopper's selected bank. - */ - issuer: string; - /** - * **billdesk_online** - */ - type: string; - } - export interface BillDeskWalletDetails { - /** - * The issuer id of the shopper's selected bank. - */ - issuer: string; - /** - * **billdesk_wallet** - */ - type: string; - } - export interface BlikDetails { - /** - * BLIK code consisting of 6 digits. - */ - blikCode?: string; - /** - * **blik** - */ - type: string; - } - export interface BrowserInfo { - /** - * The accept header value of the shopper's browser. - */ - acceptHeader: string; - /** - * The color depth of the shopper's browser in bits per pixel. This should be obtained by using the browser's `screen.colorDepth` property. Accepted values: 1, 4, 8, 15, 16, 24, 30, 32 or 48 bit color depth. - */ - colorDepth: number; // int32 - /** - * Boolean value indicating if the shopper's browser is able to execute Java. - */ - javaEnabled: boolean; - /** - * Boolean value indicating if the shopper's browser is able to execute JavaScript. A default 'true' value is assumed if the field is not present. - */ - javaScriptEnabled?: boolean; - /** - * The `navigator.language` value of the shopper's browser (as defined in IETF BCP 47). - */ - language: string; - /** - * The total height of the shopper's device screen in pixels. - */ - screenHeight: number; // int32 - /** - * The total width of the shopper's device screen in pixels. - */ - screenWidth: number; // int32 - /** - * Time difference between UTC time and the shopper's browser local time, in minutes. - */ - timeZoneOffset: number; // int32 - /** - * The user agent value of the shopper's browser. - */ - userAgent: string; - } - export interface Card { - /** - * The [card verification code](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid) (1-20 characters). Depending on the card brand, it is known also as: - * * CVV2/CVC2 – length: 3 digits - * * CID – length: 4 digits - * > If you are using [Client-Side Encryption](https://docs.adyen.com/classic-integration/cse-integration-ecommerce), the CVC code is present in the encrypted data. You must never post the card details to the server. - * > This field must be always present in a [one-click payment request](https://docs.adyen.com/classic-integration/recurring-payments). - * > When this value is returned in a response, it is always empty because it is not stored. - */ - cvc?: string; - /** - * The card expiry month. - * Format: 2 digits, zero-padded for single digits. For example: - * * 03 = March - * * 11 = November - */ - expiryMonth: string; - /** - * The card expiry year. - * Format: 4 digits. For example: 2020 - */ - expiryYear: string; - /** - * The name of the cardholder, as printed on the card. - */ - holderName: string; - /** - * The issue number of the card (for some UK debit cards only). - */ - issueNumber?: string; - /** - * The card number (4-19 characters). Do not use any separators. - * When this value is returned in a response, only the last 4 digits of the card number are returned. - */ - number: string; - /** - * The month component of the start date (for some UK debit cards only). - */ - startMonth?: string; - /** - * The year component of the start date (for some UK debit cards only). - */ - startYear?: string; - } - export interface CardDetails { - "cupsecureplus.smscode"?: string; - cvc?: string; - /** - * - */ - encryptedCardNumber: string; - /** - * - */ - encryptedExpiryMonth: string; - /** - * - */ - encryptedExpiryYear: string; - expiryMonth?: string; - expiryYear?: string; - fundingSource?: "credit" | "debit"; - holderName?: string; - number?: string; - /** - * This is the `recurringDetailReference` returned in the response when you created the token. - */ - storedPaymentMethodId?: string; - /** - * **scheme** - */ - type: string; - } - export interface CheckoutAwaitAction { - /** - * When non-empty, contains a value that you must submit to the `/payments/details` endpoint. In some cases, required for polling. - */ - paymentData?: string; - /** - * Specifies the payment method. - */ - paymentMethodType?: string; - /** - * Specifies the URL to redirect to. - */ - url?: string; - } - export interface CheckoutBalanceCheckRequest { - /** - * Shopper account information for 3D Secure 2. - * > For 3D Secure 2 transactions, we recommend that you include this object to increase the chances of achieving a frictionless flow. - */ - accountInfo?: AccountInfo; - /** - * If you want a [BIN or card verification](https://docs.adyen.com/payment-methods/cards/bin-data-and-card-verification) request to use a non-zero value, assign this value to `additionalAmount` (while the amount must be still set to 0 to trigger BIN or card verification). - * Required to be in the same currency as the `amount`. - */ - additionalAmount?: Amount; - /** - * This field contains additional data, which may be required for a particular payment request. - * - * The `additionalData` object consists of entries, each of which includes the key and value. - */ - additionalData?: /** - * This field contains additional data, which may be required for a particular payment request. - * - * The `additionalData` object consists of entries, each of which includes the key and value. - */ - AdditionalDataCommon | AdditionalData3DSecure | AdditionalDataAirline | AdditionalDataCarRental | AdditionalDataLevel23 | AdditionalDataLodging | AdditionalDataOpenInvoice | AdditionalDataRatepay | AdditionalDataRetry | AdditionalDataRisk | AdditionalDataRiskStandalone | AdditionalDataTemporaryServices | AdditionalDataWallets; - /** - * The amount information for the transaction (in [minor units](https://docs.adyen.com/development-resources/currency-codes)). For [BIN or card verification](https://docs.adyen.com/payment-methods/cards/bin-data-and-card-verification) requests, set amount to 0 (zero). - */ - amount: Amount; - /** - * Information about your application. For more details, see [Building Adyen solutions](https://docs.adyen.com/development-resources/building-adyen-solutions). - */ - applicationInfo?: ApplicationInfo; - /** - * The address where to send the invoice. - * > For 3D Secure 2 transactions, schemes require the `billingAddress` for both `deviceChannel` **browser** and **app**. Include all of the fields within this object. - */ - billingAddress?: Address; - /** - * The shopper's browser information. - * > For 3D Secure transactions, `browserInfo` is required for `channel` **web** (or `deviceChannel` **browser**). - */ - browserInfo?: BrowserInfo; - /** - * The delay between the authorisation and scheduled auto-capture, specified in hours. - */ - captureDelayHours?: number; // int32 - /** - * The shopper's date of birth. - * - * Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - */ - dateOfBirth?: string; // date-time - /** - * The forex quote as returned in the response of the forex service. - */ - dccQuote?: ForexQuote; - /** - * The address where the purchased goods should be delivered. - */ - deliveryAddress?: Address; - /** - * The date and time the purchased goods should be delivered. - * - * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD - * - * Example: 2017-07-17T13:42:40.428+01:00 - */ - deliveryDate?: string; // date-time - /** - * A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). - */ - deviceFingerprint?: string; - /** - * Choose if a specific transaction should use the Real-time Account Updater, regardless of other settings. - */ - enableRealTimeUpdate?: boolean; - /** - * An integer value that is added to the normal fraud score. The value can be either positive or negative. - */ - fraudOffset?: number; // int32 - /** - * Contains installment settings. For more information, refer to [Installments](https://docs.adyen.com/payment-methods/cards/credit-card-installments). - */ - installments?: Installments; - /** - * The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. - */ - mcc?: string; - /** - * The merchant account identifier, with which you want to process the transaction. - */ - merchantAccount: string; - /** - * This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. - * The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. - * > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. - */ - merchantOrderReference?: string; - /** - * Additional risk fields for 3D Secure 2. - * > For 3D Secure 2 transactions, we recommend that you include this object to increase the chances of achieving a frictionless flow. - */ - merchantRiskIndicator?: MerchantRiskIndicator; - /** - * Metadata consists of entries, each of which includes a key and a value. - * Limitations: Maximum 20 key-value pairs per request. When exceeding, the "177" error occurs: "Metadata size exceeds limit". - */ - metadata?: { - [name: string]: string; - }; - /** - * When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. - */ - orderReference?: string; - /** - * The collection that contains the type of the payment method and its specific information. - */ - paymentMethod: { - [name: string]: string; - }; - /** - * The recurring settings for the payment. Use this property when you want to enable [recurring payments](https://docs.adyen.com/classic-integration/recurring-payments). - */ - recurring?: Recurring; - /** - * Defines a recurring payment type. - * Allowed values: - * * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. - * * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. - * * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - * - */ - recurringProcessingModel?: "CardOnFile" | "Subscription" | "UnscheduledCardOnFile"; - /** - * The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. - * If you need to provide multiple references for a transaction, separate them with hyphens ("-"). - * Maximum length: 80 characters. - */ - reference: string; - /** - * Some payment methods require defining a value for this field to specify how to process the transaction. - * - * For the Bancontact payment method, it can be set to: - * * `maestro` (default), to be processed like a Maestro card, or - * * `bcmc`, to be processed like a Bancontact card. - */ - selectedBrand?: string; - /** - * The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. - */ - selectedRecurringDetailReference?: string; - /** - * A session ID used to identify a payment session. - */ - sessionId?: string; - /** - * The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. - * > For 3D Secure 2 transactions, schemes require the `shopperEmail` for both `deviceChannel` **browser** and **app**. - */ - shopperEmail?: string; - /** - * The shopper's IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). - * > Required for 3D Secure 2 transactions. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://support.adyen.com/hc/en-us/requests/new). - */ - shopperIP?: string; - /** - * Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. - * For the web service API, Adyen assumes Ecommerce shopper interaction by default. - * - * This field has the following possible values: - * * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. - * * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). - * * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. - * * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - */ - shopperInteraction?: "Ecommerce" | "ContAuth" | "Moto" | "POS"; - /** - * The combination of a language code and a country code to specify the language to be used in the payment. - */ - shopperLocale?: string; - /** - * The shopper's full name and gender (if specified). - */ - shopperName?: Name; - /** - * The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID). - * > This field is required for recurring payments. - */ - shopperReference?: string; - /** - * The text to be shown on the shopper's bank statement. To enable this field, contact our [Support Team](https://support.adyen.com/hc/en-us/requests/new). - * We recommend sending a maximum of 25 characters, otherwise banks might truncate the string. - */ - shopperStatement?: string; - /** - * The shopper's social security number. - */ - socialSecurityNumber?: string; - /** - * Information on how the payment should be split between accounts when using [Adyen for Platforms](https://docs.adyen.com/platforms/processing-payments#providing-split-information). - */ - splits?: Split[]; - /** - * The physical store, for which this payment is processed. - */ - store?: string; - /** - * The shopper's telephone number. - */ - telephoneNumber?: string; - /** - * Request fields for 3D Secure 2. - */ - threeDS2RequestData?: ThreeDS2RequestData; - /** - * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/checkout/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. - */ - threeDSAuthenticationOnly?: boolean; - /** - * The reference value to aggregate sales totals in reporting. When not specified, the store field is used (if available). - */ - totalsGroup?: string; - /** - * Set to true if the payment should be routed to a trusted MID. - */ - trustedShopper?: boolean; - } - export interface CheckoutBalanceCheckResponse { - /** - * This field contains additional data, which may be required to return in a particular payment response. To choose data fields to be returned, go to **Customer Area** > **Account** > **API URLs** > **Additional data settings**. - */ - additionalData?: /* This field contains additional data, which may be required to return in a particular payment response. To choose data fields to be returned, go to **Customer Area** > **Account** > **API URLs** > **Additional data settings**. */ ResponseAdditionalDataCommon | ResponseAdditionalDataBillingAddress | ResponseAdditionalDataCard | ResponseAdditionalDataDeliveryAddress | ResponseAdditionalDataInstallments | ResponseAdditionalDataNetworkTokens | ResponseAdditionalDataPayPal | ResponseAdditionalDataSepa; - /** - * The balance for the payment method. - */ - balance: Amount; - /** - * The fraud result properties of the payment. - */ - fraudResult?: FraudResult; - /** - * Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - * - * > `pspReference` is returned only for non-redirect payment methods. - */ - pspReference?: string; - /** - * If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. - * - * For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - */ - refusalReason?: string; - /** - * The result of the payment. For more information, see [Result codes](https://docs.adyen.com/checkout/payment-result-codes). - * - * Possible values: - * - * * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. - * * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. - * * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. - * * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. - * * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. - * * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. - * * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. - * * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. - * * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. - * * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. - * * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. - */ - resultCode?: "AuthenticationFinished" | "Authorised" | "Cancelled" | "ChallengeShopper" | "Error" | "IdentifyShopper" | "Pending" | "PresentToShopper" | "Received" | "RedirectShopper" | "Refused"; - } - export interface CheckoutCancelOrderRequest { - /** - * The merchant account identifier that orderData belongs to. - */ - merchantAccount: string; - /** - * The order request object that contains a pspReference that represents the order and the matching encrypted order data. - */ - order: CheckoutOrder; - } - export interface CheckoutCancelOrderResponse { - /** - * A unique reference of the cancellation request. - */ - pspReference: string; - /** - * The result of the cancellation request. - */ - resultCode: string; - } - export interface CheckoutCreateOrderRequest { - /** - * The total amount of the order. - */ - amount: Amount; - /** - * The date that order expires; e.g. 2019-03-23T12:25:28Z. If not provided, the default expiry duration is 1 day. - */ - expiresAt?: string; - /** - * The merchant account identifier, with which you want to process the order. - */ - merchantAccount: string; - /** - * A custom reference identifying the order. - */ - reference?: string; - } - export interface CheckoutCreateOrderResponse { - /** - * This field contains additional data, which may be required to return in a particular payment response. To choose data fields to be returned, go to **Customer Area** > **Account** > **API URLs** > **Additional data settings**. - */ - additionalData?: /* This field contains additional data, which may be required to return in a particular payment response. To choose data fields to be returned, go to **Customer Area** > **Account** > **API URLs** > **Additional data settings**. */ ResponseAdditionalDataCommon | ResponseAdditionalDataBillingAddress | ResponseAdditionalDataCard | ResponseAdditionalDataDeliveryAddress | ResponseAdditionalDataInstallments | ResponseAdditionalDataNetworkTokens | ResponseAdditionalDataPayPal | ResponseAdditionalDataSepa; - /** - * The date that the order will expire. - */ - expiresAt: string; - /** - * The fraud result properties of the payment. - */ - fraudResult?: FraudResult; - /** - * The encrypted data that will be used by merchant for adding payments to the order. - */ - orderData: string; - /** - * Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - * - * > `pspReference` is returned only for non-redirect payment methods. - */ - pspReference?: string; - /** - * If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. - * - * For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - */ - refusalReason?: string; - /** - * The remaining amount in the order. - */ - remainingAmount: Amount; - /** - * The result of the payment. For more information, see [Result codes](https://docs.adyen.com/checkout/payment-result-codes). - * - * Possible values: - * - * * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. - * * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. - * * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. - * * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. - * * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. - * * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. - * * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. - * * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. - * * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. - * * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. - * * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. - */ - resultCode?: "AuthenticationFinished" | "Authorised" | "Cancelled" | "ChallengeShopper" | "Error" | "IdentifyShopper" | "Pending" | "PresentToShopper" | "Received" | "RedirectShopper" | "Refused"; - } - export interface CheckoutDonationAction { - /** - * When non-empty, contains a value that you must submit to the `/payments/details` endpoint. In some cases, required for polling. - */ - paymentData?: string; - /** - * Specifies the payment method. - */ - paymentMethodType?: string; - /** - * Specifies the URL to redirect to. - */ - url?: string; - } - export interface CheckoutOneTimePasscodeAction { - /** - * When non-empty, contains a value that you must submit to the `/payments/details` endpoint. In some cases, required for polling. - */ - paymentData?: string; - /** - * Specifies the payment method. - */ - paymentMethodType?: string; - /** - * When the payment flow requires a redirect as fallback, this object contains information about the redirect. - */ - redirect?: Redirect; - /** - * The interval in second between OTP resend. - */ - resendInterval?: number; // int32 - /** - * The maximum number of OTP resend attempts. - */ - resendMaxAttempts?: number; // int32 - /** - * The URL, to which you make POST request to trigger OTP resend. - */ - resendUrl?: string; - /** - * Specifies the URL to redirect to. - */ - url?: string; - } - export interface CheckoutOrder { - /** - * The encrypted order data. - */ - orderData: string; - /** - * The `pspReference` that belongs to the order. - */ - pspReference: string; - } - export interface CheckoutOrderResponse { - /** - * The expiry date for the order. - */ - expiresAt?: string; - /** - * The encrypted order data. - */ - orderData?: string; - /** - * The `pspReference` that belongs to the order. - */ - pspReference: string; - /** - * The merchant reference for the order. - */ - reference?: string; - /** - * The updated remaining amount. - */ - remainingAmount?: Amount; - } - export interface CheckoutQrCodeAction { - /** - * When non-empty, contains a value that you must submit to the `/payments/details` endpoint. In some cases, required for polling. - */ - paymentData?: string; - /** - * Specifies the payment method. - */ - paymentMethodType?: string; - /** - * The contents of the QR code as a UTF8 string. - */ - qrCodeData?: string; - /** - * Specifies the URL to redirect to. - */ - url?: string; - } - export interface CheckoutRedirectAction { - /** - * When the redirect URL must be accessed via POST, use this data to post to the redirect URL. - */ - data?: { - [name: string]: string; - }; - /** - * Specifies the HTTP method, for example GET or POST. - */ - method?: string; - /** - * When non-empty, contains a value that you must submit to the `/payments/details` endpoint. In some cases, required for polling. - */ - paymentData?: string; - /** - * Specifies the payment method. - */ - paymentMethodType?: string; - /** - * Specifies the URL to redirect to. - */ - url?: string; - } - export interface CheckoutSDKAction { - /** - * When non-empty, contains a value that you must submit to the `/payments/details` endpoint. In some cases, required for polling. - */ - paymentData?: string; - /** - * Specifies the payment method. - */ - paymentMethodType?: string; - /** - * The data to pass to the SDK. - */ - sdkData?: { - [name: string]: string; - }; - /** - * Specifies the URL to redirect to. - */ - url?: string; - } - export interface CheckoutThreeDS2ChallengeAction { - /** - * When non-empty, contains a value that you must submit to the `/payments/details` endpoint. In some cases, required for polling. - */ - paymentData?: string; - /** - * Specifies the payment method. - */ - paymentMethodType?: string; - /** - * A token to pass to the 3DS2 Component to get the challenge. - */ - token?: string; - /** - * Specifies the URL to redirect to. - */ - url?: string; - } - export interface CheckoutThreeDS2FingerPrintAction { - /** - * When non-empty, contains a value that you must submit to the `/payments/details` endpoint. In some cases, required for polling. - */ - paymentData?: string; - /** - * Specifies the payment method. - */ - paymentMethodType?: string; - /** - * A token to pass to the 3DS2 Component to get the fingerprint. - */ - token?: string; - /** - * Specifies the URL to redirect to. - */ - url?: string; - } - export interface CheckoutUtilityRequest { - /** - * The list of origin domains, for which origin keys are requested. - */ - originDomains: string[]; - } - export interface CheckoutUtilityResponse { - /** - * The list of origin keys for all requested domains. For each list item, the key is the domain and the value is the origin key. - */ - originKeys?: { - [name: string]: string; - }; - } - export interface CheckoutVoucherAction { - /** - * The voucher alternative reference code. - */ - alternativeReference?: string; - /** - * A collection institution number (store number) for Econtext Pay-Easy ATM. - */ - collectionInstitutionNumber?: string; - /** - * The URL to download the voucher. - */ - downloadUrl?: string; - /** - * An entity number of Multibanco. - */ - entity?: string; - /** - * The date time of the voucher expiry. - */ - expiresAt?: string; - /** - * The initial amount. - */ - initialAmount?: Amount; - /** - * The URL to the detailed instructions to make payment using the voucher. - */ - instructionsUrl?: string; - /** - * The issuer of the voucher. - */ - issuer?: string; - /** - * The shopper telephone number (partially masked). - */ - maskedTelephoneNumber?: string; - /** - * The merchant name. - */ - merchantName?: string; - /** - * The merchant reference. - */ - merchantReference?: string; - /** - * When non-empty, contains a value that you must submit to the `/payments/details` endpoint. In some cases, required for polling. - */ - paymentData?: string; - /** - * Specifies the payment method. - */ - paymentMethodType?: string; - /** - * The voucher reference code. - */ - reference?: string; - /** - * The shopper email. - */ - shopperEmail?: string; - /** - * The shopper name. - */ - shopperName?: string; - /** - * The surcharge amount. - */ - surcharge?: Amount; - /** - * The total amount (initial plus surcharge amount). - */ - totalAmount?: Amount; - /** - * Specifies the URL to redirect to. - */ - url?: string; - } - export interface CommonField { - /** - * Name of the field. For example, Name of External Platform. - */ - name?: string; - /** - * Version of the field. For example, Version of External Platform. - */ - version?: string; - } - export interface Company { - /** - * The company website's home page. - */ - homepage?: string; - /** - * The company name. - */ - name?: string; - /** - * Registration number of the company. - */ - registrationNumber?: string; - /** - * Registry location of the company. - */ - registryLocation?: string; - /** - * Tax ID of the company. - */ - taxId?: string; - /** - * The company type. - */ - type?: string; - } - export interface Configuration { - /** - * Describes the configuration for AVS ([Address Verification System](https://en.wikipedia.org/wiki/Address_Verification_System)). - */ - avs?: Avs; - /** - * Determines whether the cardholder name should be provided or not. - * - * Permitted values: - * * NONE - * * OPTIONAL - * * REQUIRED - */ - cardHolderName?: "NONE" | "OPTIONAL" | "REQUIRED"; - /** - * Describes the configuration for [installment payments](https://docs.adyen.com/payment-methods/cards/credit-card-installments). - */ - installments?: Installments; - /** - * Determines how to display the details fields. - */ - shopperInput?: ShopperInput; - } - export interface CreatePaymentLinkRequest { - /** - * List of payments methods to be presented to the shopper. To refer to payment methods, use their `paymentMethod.type` from [Payment methods overview](https://docs.adyen.com/payment-methods). - * - * Example: `"allowedPaymentMethods":["ideal","giropay"]` - */ - allowedPaymentMethods?: string[]; - /** - * The payment amount and currency. - */ - amount: Amount; - /** - * Information about your application. For more details, see [Building Adyen solutions](https://docs.adyen.com/development-resources/building-adyen-solutions). - */ - applicationInfo?: ApplicationInfo; - /** - * The address where to send the invoice. - */ - billingAddress?: Address; - /** - * List of payments methods to be hidden from the shopper. To refer to payment methods, use their `paymentMethod.type` from [Payment methods overview](https://docs.adyen.com/payment-methods). - * - * Example: `"blockedPaymentMethods":["ideal","giropay"]` - */ - blockedPaymentMethods?: string[]; - /** - * The shopper's two-letter country code. - */ - countryCode?: string; - /** - * The address where the purchased goods should be delivered. - */ - deliveryAddress?: Address; - /** - * A short description visible on the payment page. - * Maximum length: 280 characters. - */ - description?: string; - /** - * The date that the payment link expires, in ISO 8601 format. For example `2019-11-23T12:25:28Z`, or `2020-05-27T20:25:28+08:00`. Maximum expiry date should be 30 days from when the payment link is created. If not provided, the default expiry is set to 24 hours after the payment link is created. - */ - expiresAt?: string; - /** - * Price and product information about the purchased items, to be included on the invoice sent to the shopper. - * This parameter is required for open invoice (_buy now, pay later_) payment methods such AfterPay, Klarna, RatePay, and Zip. - */ - lineItems?: LineItem[]; - /** - * The merchant account identifier for which the payment link is created. - */ - merchantAccount: string; - /** - * This reference allows linking multiple transactions to each other for reporting purposes (for example, order auth-rate). The reference should be unique per billing cycle. - */ - merchantOrderReference?: string; - /** - * Metadata consists of entries, each of which includes a key and a value. - * Limitations: - * * Maximum 20 key-value pairs per request. When exceeding, the "177" error occurs: "Metadata size exceeds limit" - * * Maximum 20 characters per key. When exceeding, the "178" error occurs: "Metadata key size exceeds limit" - * * A key cannot have the name `checkout.linkId`. Whatever value is present under that key is going to be replaced by the real link id - */ - metadata?: { - [name: string]: string; - }; - /** - * Defines a recurring payment type. - * Allowed values: - * * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. - * * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. - * * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - * - */ - recurringProcessingModel?: "CardOnFile" | "Subscription" | "UnscheduledCardOnFile"; - /** - * A reference that is used to uniquely identify the payment in future communications about the payment status. - */ - reference: string; - /** - * Website URL used for redirection after payment is completed. - * If provided, a **Continue** button will be shown on the payment page. If shoppers select the button, they are redirected to the specified URL. - */ - returnUrl?: string; - /** - * Indicates whether the payment link can be reused for multiple payments. If not provided, this defaults to **false** which means the link can be used for one successful payment only. - */ - reusable?: boolean; - /** - * The shopper's email address. - */ - shopperEmail?: string; - /** - * The language to be used in the payment page, specified by a combination of a language and country code. For example, `en-US`. - * - * For a list of shopper locales that Pay by Link supports, refer to [Language and localization](https://docs.adyen.com/checkout/pay-by-link#language-and-localization). - */ - shopperLocale?: string; - /** - * The shopper's full name. This object is required for some payment methods such as AfterPay, Klarna, or if you're enrolled in the PayPal Seller Protection program. - */ - shopperName?: Name; - /** - * A unique identifier for the shopper (for example, user ID or account ID). - */ - shopperReference?: string; - /** - * Information on how the payment should be split between accounts when using [Adyen for Platforms](https://docs.adyen.com/platforms/processing-payments#providing-split-information). - */ - splits?: Split[]; - /** - * The physical store, for which this payment is processed. - */ - store?: string; - /** - * When this is set to **true** and the `shopperReference` is provided, the payment details will be stored. - */ - storePaymentMethod?: boolean; - } - export interface DetailsRequest { - /** - * Use this collection to submit the details that were returned as a result of the `/payments` call. - */ - details: PaymentCompletionDetails; - /** - * The `paymentData` value that you received in the response to the `/payments` call. - */ - paymentData?: string; - /** - * Change the `authenticationOnly` indicator originally set in the `/payments` request. Only needs to be set if you want to modify the value set previously. - */ - threeDSAuthenticationOnly?: boolean; - } - export interface DeviceRenderOptions { - /** - * Supported SDK interface types. - * Allowed values: - * * native - * * html - * * both - */ - sdkInterface?: "native" | "html" | "both"; - /** - * UI types supported for displaying specific challenges. - * Allowed values: - * * text - * * singleSelect - * * outOfBand - * * otherHtml - * * multiSelect - */ - sdkUiType?: ("multiSelect" | "otherHtml" | "outOfBand" | "singleSelect" | "text")[]; - } - export interface DokuDetails { - /** - * The shopper's first name. - */ - firstName: string; - infix?: string; - /** - * The shopper's last name. - */ - lastName: string; - ovoId?: string; - /** - * The shopper's email. - */ - shopperEmail: string; - /** - * **doku** - */ - type: "doku_mandiri_va" | "doku_cimb_va" | "doku_danamon_va" | "doku_bni_va" | "doku_permata_lite_atm" | "doku_bri_va" | "doku_bca_va" | "doku_alfamart" | "doku_indomaret"; - } - export interface DotpayDetails { - /** - * The Dotpay issuer value of the shopper's selected bank. Set this to an **id** of a Dotpay issuer to preselect it. - */ - issuer: string; - /** - * **dotpay** - */ - type: string; - } - export interface DragonpayDetails { - /** - * The Dragonpay issuer value of the shopper's selected bank. Set this to an **id** of a Dragonpay issuer to preselect it. - */ - issuer: string; - /** - * The shopper’s email address. - */ - shopperEmail?: string; - /** - * **dragonpay** - */ - type: "dragonpay_ebanking" | "dragonpay_otc_banking" | "dragonpay_otc_non_banking" | "dragonpay_otc_philippines"; - } - export interface EcontextVoucherDetails { - /** - * The shopper's first name. - */ - firstName: string; - /** - * The shopper's last name. - */ - lastName: string; - /** - * The shopper's email. - */ - shopperEmail: string; - /** - * The shopper's contact number. - */ - telephoneNumber: string; - /** - * **econtextvoucher** - */ - type: "econtext_seveneleven" | "econtext_stores"; - } - export interface EntercashDetails { - /** - * The issuer id of the shopper's selected bank. - */ - issuer: string; - /** - * **entercash** - */ - type: string; - } - export interface ExternalPlatform { - /** - * External platform integrator. - */ - integrator?: string; - /** - * Name of the field. For example, Name of External Platform. - */ - name?: string; - /** - * Version of the field. For example, Version of External Platform. - */ - version?: string; - } - export interface ForexQuote { - /** - * The account name. - */ - account?: string; - /** - * The account type. - */ - accountType?: string; - /** - * The base amount. - */ - baseAmount?: Amount; - /** - * The base points. - */ - basePoints: number; // int32 - /** - * The buy rate. - */ - buy?: Amount; - /** - * The interbank amount. - */ - interbank?: Amount; - /** - * The reference assigned to the forex quote request. - */ - reference?: string; - /** - * The sell rate. - */ - sell?: Amount; - /** - * The signature to validate the integrity. - */ - signature?: string; - /** - * The source of the forex quote. - */ - source?: string; - /** - * The type of forex. - */ - type?: string; - /** - * The date until which the forex quote is valid. - */ - validTill: string; // date-time - } - export interface FraudCheckResult { - /** - * The fraud score generated by the risk check. - */ - accountScore: number; // int32 - /** - * The ID of the risk check. - */ - checkId: number; // int32 - /** - * The name of the risk check. - */ - name: string; - } - export interface FraudResult { - /** - * The total fraud score generated by the risk checks. - */ - accountScore: number; // int32 - /** - * The result of the individual risk checks. - */ - results?: FraudCheckResult[]; - } - export interface GiropayDetails { - /** - * This is the `recurringDetailReference` returned in the response when you created the token. - */ - storedPaymentMethodId?: string; - /** - * **giropay** - */ - type: string; - } - export interface GooglePayDetails { - fundingSource?: "credit" | "debit"; - /** - * - */ - googlePayCardNetwork: string; - /** - * - */ - googlePayToken: string; - /** - * This is the `recurringDetailReference` returned in the response when you created the token. - */ - storedPaymentMethodId?: string; - /** - * **paywithgoogle** - */ - type: string; - } - export interface IdealDetails { - /** - * The iDEAL issuer value of the shopper's selected bank. Set this to an **id** of an iDEAL issuer to preselect it. - */ - issuer: string; - /** - * This is the `recurringDetailReference` returned in the response when you created the token. - */ - storedPaymentMethodId?: string; - /** - * **ideal** - */ - type: string; - } - export interface InputDetail { - /** - * Configuration parameters for the required input. - */ - configuration?: { - [name: string]: string; - }; - /** - * Input details can also be provided recursively. - */ - details?: SubInputDetail[]; - /** - * Input details can also be provided recursively (deprecated). - */ - inputDetails?: SubInputDetail[]; - /** - * In case of a select, the URL from which to query the items. - */ - itemSearchUrl?: string; - /** - * In case of a select, the items to choose from. - */ - items?: Item[]; - /** - * The value to provide in the result. - */ - key?: string; - /** - * True if this input value is optional. - */ - optional?: boolean; - /** - * The type of the required input. - */ - type?: string; - /** - * The value can be pre-filled, if available. - */ - value?: string; - } - export interface Installments { - /** - * Defines the type of installment plan. If not set, defaults to **regular**. - * - * Possible values: - * * **regular** - * * **revolving** - */ - plan?: "regular" | "revolving"; - /** - * Defines the number of installments. Its value needs to be greater than zero. - * - * Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. - */ - value: number; // int32 - } - export interface Item { - /** - * The value to provide in the result. - */ - id?: string; - /** - * The display name. - */ - name?: string; - } - export interface KlarnaDetails { - bankAccount?: string; - billingAddress?: string; - deliveryAddress?: string; - installmentConfigurationKey?: string; - personalDetails?: string; - separateDeliveryAddress?: string; - /** - * This is the `recurringDetailReference` returned in the response when you created the token. - */ - storedPaymentMethodId?: string; - token?: string; - /** - * **klarna** - */ - type: "klarna" | "klarnapayments" | "klarnapayments_account" | "klarnapayments_b2b" | "klarna_paynow" | "klarna_account" | "klarna_b2b"; - } - export interface LianLianPayDetails { - /** - * - */ - telephoneNumber: string; - /** - * **lianlianpay** - */ - type: "lianlianpay_ebanking_enterprise" | "lianlianpay_ebanking_credit" | "lianlianpay_ebanking_debit"; - } - export interface LineItem { - /** - * Item amount excluding the tax, in minor units. - */ - amountExcludingTax?: number; // int64 - /** - * Item amount including the tax, in minor units. - */ - amountIncludingTax?: number; // int64 - /** - * Description of the line item. - */ - description?: string; - /** - * ID of the line item. - */ - id?: string; - /** - * Number of items. - */ - quantity?: number; // int64 - /** - * Tax amount, in minor units. - */ - taxAmount?: number; // int64 - /** - * Required for AfterPay. Tax category: High, Low, None, Zero - */ - taxCategory?: "High" | "Low" | "None" | "Zero"; - /** - * Tax percentage, in minor units. - */ - taxPercentage?: number; // int64 - } - export interface MasterpassDetails { - fundingSource?: "credit" | "debit"; - /** - * The Masterpass transaction ID. - */ - masterpassTransactionId: string; - /** - * **masterpass** - */ - type: string; - } - export interface MbwayDetails { - /** - * - */ - shopperEmail: string; - /** - * - */ - telephoneNumber: string; - /** - * **mbway** - */ - type: string; - } - export interface MerchantDevice { - /** - * Operating system running on the merchant device. - */ - os?: string; - /** - * Version of the operating system on the merchant device. - */ - osVersion?: string; - /** - * Merchant device reference. - */ - reference?: string; - } - export interface MerchantRiskIndicator { - /** - * Whether the chosen delivery address is identical to the billing address. - */ - addressMatch?: boolean; - /** - * Indicator regarding the delivery address. - * Allowed values: - * * `shipToBillingAddress` - * * `shipToVerifiedAddress` - * * `shipToNewAddress` - * * `shipToStore` - * * `digitalGoods` - * * `goodsNotShipped` - * * `other` - */ - deliveryAddressIndicator?: "shipToBillingAddress" | "shipToVerifiedAddress" | "shipToNewAddress" | "shipToStore" | "digitalGoods" | "goodsNotShipped" | "other"; - /** - * The delivery email address (for digital goods). - */ - deliveryEmail?: string; - /** - * The estimated delivery time for the shopper to receive the goods. - * Allowed values: - * * `electronicDelivery` - * * `sameDayShipping` - * * `overnightShipping` - * * `twoOrMoreDaysShipping` - */ - deliveryTimeframe?: "electronicDelivery" | "sameDayShipping" | "overnightShipping" | "twoOrMoreDaysShipping"; - /** - * For prepaid or gift card purchase, the purchase amount total of prepaid or gift card(s). - */ - giftCardAmount?: Amount; - /** - * For prepaid or gift card purchase, total count of individual prepaid or gift cards/codes purchased. - */ - giftCardCount?: number; // int32 - /** - * For pre-order purchases, the expected date this product will be available to the shopper. - */ - preOrderDate?: string; // date-time - /** - * Indicator for whether this transaction is for pre-ordering a product. - */ - preOrderPurchase?: boolean; - /** - * Indicator for whether the shopper has already purchased the same items in the past. - */ - reorderItems?: boolean; - } - export interface MobilePayDetails { - /** - * **mobilepay** - */ - type: string; - } - export interface MolPayDetails { - /** - * - */ - issuer: string; - /** - * **molpay** - */ - type: "molpay_ebanking_fpx_MY" | "molpay_ebanking_TH"; - } - export interface Name { - /** - * The first name. - */ - firstName: string; - /** - * The gender. - * >The following values are permitted: `MALE`, `FEMALE`, `UNKNOWN`. - */ - gender: "MALE" | "FEMALE" | "UNKNOWN"; - /** - * The name's infix, if applicable. - * >A maximum length of twenty (20) characters is imposed. - */ - infix?: string; - /** - * The last name. - */ - lastName: string; - } - export interface NexoRouterDetails { - /** - * **nexorouter** - */ - type: string; - uniqueTerminalId?: string; - } - export interface OpenInvoiceDetails { - bankAccount?: string; - billingAddress?: string; - deliveryAddress?: string; - installmentConfigurationKey?: string; - personalDetails?: string; - separateDeliveryAddress?: string; - /** - * This is the `recurringDetailReference` returned in the response when you created the token. - */ - storedPaymentMethodId?: string; - /** - * **openinvoice** - */ - type: string; - } - export interface PayPalDetails { - orderID?: string; - payerID?: string; - /** - * The type of flow to initiate. - */ - subtype?: "redirect" | "sdk"; - /** - * **paypal** - */ - type: string; - } - export interface PayUUpiDetails { - /** - * **payu_IN_upi** - */ - type: string; - /** - * The VPA (Virtual Payment Address) for UPI. - */ - vpa?: string; - } - export interface PaymentCompletionDetails { - MD?: string; - PaReq?: string; - PaRes?: string; - billingToken?: string; - "cupsecureplus.smscode"?: string; - facilitatorAccessToken?: string; - oneTimePasscode?: string; - orderID?: string; - payerID?: string; - payload?: string; - paymentID?: string; - paymentStatus?: string; - redirectResult?: string; - returnUrlQueryString?: string; - "threeds2.challengeResult"?: string; - "threeds2.fingerprint"?: string; - } - export interface PaymentDetails { - /** - * The payment method type. - */ - type: string; - } - export interface PaymentLinkResource { - /** - * List of payments methods to be presented to the shopper. To refer to payment methods, use their `paymentMethod.type` from [Payment methods overview](https://docs.adyen.com/payment-methods). - * - * Example: `"allowedPaymentMethods":["ideal","giropay"]` - */ - allowedPaymentMethods?: string[]; - /** - * The payment amount and currency. - */ - amount: Amount; - /** - * Information about your application. For more details, see [Building Adyen solutions](https://docs.adyen.com/development-resources/building-adyen-solutions). - */ - applicationInfo?: ApplicationInfo; - /** - * The address where to send the invoice. - */ - billingAddress?: Address; - /** - * List of payments methods to be hidden from the shopper. To refer to payment methods, use their `paymentMethod.type` from [Payment methods overview](https://docs.adyen.com/payment-methods). - * - * Example: `"blockedPaymentMethods":["ideal","giropay"]` - */ - blockedPaymentMethods?: string[]; - /** - * The shopper's two-letter country code. - */ - countryCode?: string; - /** - * The address where the purchased goods should be delivered. - */ - deliveryAddress?: Address; - /** - * A short description visible on the payment page. - * Maximum length: 280 characters. - */ - description?: string; - /** - * The date that the payment link expires, in ISO 8601 format. For example `2019-11-23T12:25:28Z`, or `2020-05-27T20:25:28+08:00`. Maximum expiry date should be 30 days from when the payment link is created. If not provided, the default expiry is set to 24 hours after the payment link is created. - */ - expiresAt?: string; - /** - * A unique identifier of the payment link. - */ - readonly id: string; - /** - * Price and product information about the purchased items, to be included on the invoice sent to the shopper. - * This parameter is required for open invoice (_buy now, pay later_) payment methods such AfterPay, Klarna, RatePay, and Zip. - */ - lineItems?: LineItem[]; - /** - * The merchant account identifier for which the payment link is created. - */ - merchantAccount: string; - /** - * This reference allows linking multiple transactions to each other for reporting purposes (for example, order auth-rate). The reference should be unique per billing cycle. - */ - merchantOrderReference?: string; - /** - * Defines a recurring payment type. - * Allowed values: - * * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. - * * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. - * * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - * - */ - recurringProcessingModel?: "CardOnFile" | "Subscription" | "UnscheduledCardOnFile"; - /** - * A reference that is used to uniquely identify the payment in future communications about the payment status. - */ - reference: string; - /** - * Website URL used for redirection after payment is completed. - * If provided, a **Continue** button will be shown on the payment page. If shoppers select the button, they are redirected to the specified URL. - */ - returnUrl?: string; - /** - * Indicates whether the payment link can be reused for multiple payments. If not provided, this defaults to **false** which means the link can be used for one successful payment only. - */ - reusable?: boolean; - /** - * The shopper's email address. - */ - shopperEmail?: string; - /** - * The language to be used in the payment page, specified by a combination of a language and country code. For example, `en-US`. - * - * For a list of shopper locales that Pay by Link supports, refer to [Language and localization](https://docs.adyen.com/checkout/pay-by-link#language-and-localization). - */ - shopperLocale?: string; - /** - * The shopper's full name. This object is required for some payment methods such as AfterPay, Klarna, or if you're enrolled in the PayPal Seller Protection program. - */ - shopperName?: Name; - /** - * A unique identifier for the shopper (for example, user ID or account ID). - */ - shopperReference?: string; - /** - * Information on how the payment should be split between accounts when using [Adyen for Platforms](https://docs.adyen.com/platforms/processing-payments#providing-split-information). - */ - splits?: Split[]; - /** - * Status of the payment link. Possible values: - * * **active** - * * **paid** - * * **expired** - */ - status: "active" | "expired" | "paid"; - /** - * The physical store, for which this payment is processed. - */ - store?: string; - /** - * When this is set to **true** and the `shopperReference` is provided, the payment details will be stored. - */ - storePaymentMethod?: boolean; - /** - * The URL at which the shopper can complete the payment. - */ - readonly url: string; - } - export interface PaymentMethod { - /** - * List of possible brands. For example: visa, mc. - */ - brands?: string[]; - /** - * The configuration of the payment method. - */ - configuration?: { - [name: string]: string; - }; - /** - * All input details to be provided to complete the payment with this payment method. - */ - details?: InputDetail[]; - /** - * The funding source of the payment method. - */ - fundingSource?: "credit" | "debit"; - /** - * The group where this payment method belongs to. - */ - group?: PaymentMethodGroup; - /** - * All input details to be provided to complete the payment with this payment method. - */ - inputDetails?: InputDetail[]; - /** - * The displayable name of this payment method. - */ - name?: string; - /** - * Echo data required to send in next calls. - */ - paymentMethodData?: string; - /** - * Indicates whether this payment method supports tokenization or not. - */ - supportsRecurring?: boolean; - /** - * The unique payment method code. - */ - type?: string; - } - export interface PaymentMethodGroup { - /** - * The name of the group. - */ - name?: string; - /** - * Echo data to be used if the payment method is displayed as part of this group. - */ - paymentMethodData?: string; - /** - * The unique code of the group. - */ - type?: string; - } - export interface PaymentMethodsGroup { - /** - * The type to submit for any payment method in this group. - */ - groupType?: string; - /** - * The human-readable name of this group. - */ - name?: string; - /** - * The types of payment methods that belong in this group. - */ - types?: string[]; - } - export interface PaymentMethodsRequest { - /** - * This field contains additional data, which may be required for a particular payment request. - * - * The `additionalData` object consists of entries, each of which includes the key and value. - */ - additionalData?: /** - * This field contains additional data, which may be required for a particular payment request. - * - * The `additionalData` object consists of entries, each of which includes the key and value. - */ - AdditionalDataCommon | AdditionalData3DSecure | AdditionalDataAirline | AdditionalDataCarRental | AdditionalDataLevel23 | AdditionalDataLodging | AdditionalDataOpenInvoice | AdditionalDataRatepay | AdditionalDataRetry | AdditionalDataRisk | AdditionalDataRiskStandalone | AdditionalDataTemporaryServices | AdditionalDataWallets; - /** - * List of payments methods to be presented to the shopper. To refer to payment methods, use their `paymentMethod.type` from [Payment methods overview](https://docs.adyen.com/payment-methods). - * - * Example: `"allowedPaymentMethods":["ideal","giropay"]` - */ - allowedPaymentMethods?: string[]; - /** - * The amount information for the transaction (in [minor units](https://docs.adyen.com/development-resources/currency-codes)). For [BIN or card verification](https://docs.adyen.com/payment-methods/cards/bin-data-and-card-verification) requests, set amount to 0 (zero). - */ - amount?: Amount; - /** - * List of payments methods to be hidden from the shopper. To refer to payment methods, use their `paymentMethod.type` from [Payment methods overview](https://docs.adyen.com/payment-methods). - * - * Example: `"blockedPaymentMethods":["ideal","giropay"]` - */ - blockedPaymentMethods?: string[]; - /** - * The platform where a payment transaction takes place. This field can be used for filtering out payment methods that are only available on specific platforms. Possible values: - * * iOS - * * Android - * * Web - */ - channel?: "iOS" | "Android" | "Web"; - /** - * The shopper's country code. - */ - countryCode?: string; - /** - * Choose if a specific transaction should use the Real-time Account Updater, regardless of other settings. - */ - enableRealTimeUpdate?: boolean; - /** - * The merchant account identifier, with which you want to process the transaction. - */ - merchantAccount: string; - /** - * Contains the order information which is required for partial payments. - */ - order?: CheckoutOrder; - /** - * The combination of a language code and a country code to specify the language to be used in the payment. - */ - shopperLocale?: string; - /** - * The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID). - * > This field is required for recurring payments. - */ - shopperReference?: string; - /** - * Boolean value indicating whether the card payment method should be split into separate debit and credit options. - */ - splitCardFundingSources?: boolean; - /** - * The physical store, for which this payment is processed. - */ - store?: string; - } - export interface PaymentMethodsResponse { - /** - * Groups of payment methods. - */ - groups?: PaymentMethodsGroup[]; - /** - * Detailed list of one-click payment methods. - */ - oneClickPaymentMethods?: RecurringDetail[]; - /** - * Detailed list of payment methods required to generate payment forms. - */ - paymentMethods?: PaymentMethod[]; - /** - * List of all stored payment methods. - */ - storedPaymentMethods?: StoredPaymentMethod[]; - } - export interface PaymentRequest { - /** - * Shopper account information for 3D Secure 2. - * > For 3D Secure 2 transactions, we recommend that you include this object to increase the chances of achieving a frictionless flow. - */ - accountInfo?: AccountInfo; - /** - * This field contains additional data, which may be required for a particular payment request. - * - * The `additionalData` object consists of entries, each of which includes the key and value. - */ - additionalData?: /** - * This field contains additional data, which may be required for a particular payment request. - * - * The `additionalData` object consists of entries, each of which includes the key and value. - */ - AdditionalDataCommon | AdditionalData3DSecure | AdditionalDataAirline | AdditionalDataCarRental | AdditionalDataLevel23 | AdditionalDataLodging | AdditionalDataOpenInvoice | AdditionalDataRatepay | AdditionalDataRetry | AdditionalDataRisk | AdditionalDataRiskStandalone | AdditionalDataTemporaryServices | AdditionalDataWallets; - /** - * The amount information for the transaction (in [minor units](https://docs.adyen.com/development-resources/currency-codes)). For [BIN or card verification](https://docs.adyen.com/payment-methods/cards/bin-data-and-card-verification) requests, set amount to 0 (zero). - */ - amount: Amount; - /** - * Information about your application. For more details, see [Building Adyen solutions](https://docs.adyen.com/development-resources/building-adyen-solutions). - */ - applicationInfo?: ApplicationInfo; - /** - * The address where to send the invoice. - * > For 3D Secure 2 transactions, schemes require the `billingAddress` for both `deviceChannel` **browser** and **app**. Include all of the fields within this object. - */ - billingAddress?: Address; - /** - * The shopper's browser information. - * > For 3D Secure transactions, `browserInfo` is required for `channel` **web** (or `deviceChannel` **browser**). - */ - browserInfo?: BrowserInfo; - /** - * The delay between the authorisation and scheduled auto-capture, specified in hours. - */ - captureDelayHours?: number; // int32 - /** - * The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. - * - * Possible values: - * * iOS - * * Android - * * Web - */ - channel?: "iOS" | "Android" | "Web"; - /** - * Information regarding the company. - */ - company?: Company; - /** - * Conversion ID that corresponds to the Id generated for tracking user payment journey. - */ - conversionId?: string; - /** - * The shopper country. - * - * Format: [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) - * Example: NL or DE - */ - countryCode?: string; - /** - * The shopper's date of birth. - * - * Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - */ - dateOfBirth?: string; // date-time - /** - * The forex quote as returned in the response of the forex service. - */ - dccQuote?: ForexQuote; - /** - * The address where the purchased goods should be delivered. - */ - deliveryAddress?: Address; - /** - * The date and time the purchased goods should be delivered. - * - * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD - * - * Example: 2017-07-17T13:42:40.428+01:00 - */ - deliveryDate?: string; // date-time - /** - * A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). - */ - deviceFingerprint?: string; - /** - * When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments. - */ - enableOneClick?: boolean; - /** - * When true and `shopperReference` is provided, the payment details will be tokenized for payouts. - */ - enablePayOut?: boolean; - /** - * Choose if a specific transaction should use the Real-time Account Updater, regardless of other settings. - */ - enableRealTimeUpdate?: boolean; - /** - * When true and `shopperReference` is provided, the payment details will be tokenized for recurring payments. - */ - enableRecurring?: boolean; - /** - * The type of the entity the payment is processed for. - */ - entityType?: "NaturalPerson" | "CompanyName"; - /** - * An integer value that is added to the normal fraud score. The value can be either positive or negative. - */ - fraudOffset?: number; // int32 - /** - * Contains installment settings. For more information, refer to [Installments](https://docs.adyen.com/payment-methods/cards/credit-card-installments). - */ - installments?: Installments; - /** - * Price and product information about the purchased items, to be included on the invoice sent to the shopper. - * > This field is required for Klarna, AfterPay, and RatePay. - */ - lineItems?: LineItem[]; - /** - * The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. - */ - mcc?: string; - /** - * The merchant account identifier, with which you want to process the transaction. - */ - merchantAccount: string; - /** - * This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. - * The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. - * > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. - */ - merchantOrderReference?: string; - /** - * Additional risk fields for 3D Secure 2. - * > For 3D Secure 2 transactions, we recommend that you include this object to increase the chances of achieving a frictionless flow. - */ - merchantRiskIndicator?: MerchantRiskIndicator; - /** - * Metadata consists of entries, each of which includes a key and a value. - * Limitations: Maximum 20 key-value pairs per request. When exceeding, the "177" error occurs: "Metadata size exceeds limit". - */ - metadata?: { - [name: string]: string; - }; - /** - * Authentication data produced by an MPI (Mastercard SecureCode or Visa Secure). - */ - mpiData?: ThreeDSecureData; - /** - * Contains the order information which is required for partial payments. - */ - order?: CheckoutOrder; - /** - * When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. - */ - orderReference?: string; - /** - * Required for the 3D Secure 2 `channel` **Web** integration. - * - * Set this parameter to the origin URL of the page that you are loading the 3D Secure Component from. - */ - origin?: string; - /** - * The type and required details of a payment method to use. - */ - paymentMethod: /* The type and required details of a payment method to use. */ ApplePayDetails | SamsungPayDetails | AndroidPayDetails | VisaCheckoutDetails | GooglePayDetails | AmazonPayDetails | MasterpassDetails | StoredPaymentMethodDetails | CardDetails | PaymentDetails | AchDetails | KlarnaDetails | IdealDetails | PayPalDetails | SepaDirectDebitDetails | QiwiWalletDetails | VippsDetails | MobilePayDetails | WeChatPayDetails | WeChatPayMiniProgramDetails | LianLianPayDetails | MolPayDetails | BillDeskOnlineDetails | BillDeskWalletDetails | PayUUpiDetails | DotpayDetails | EntercashDetails | OpenInvoiceDetails | DokuDetails | EcontextVoucherDetails | DragonpayDetails | GiropayDetails | NexoRouterDetails | BlikDetails | MbwayDetails; - /** - * Date after which no further authorisations shall be performed. Only for 3D Secure 2. - */ - recurringExpiry?: string; - /** - * Minimum number of days between authorisations. Only for 3D Secure 2. - */ - recurringFrequency?: string; - /** - * Defines a recurring payment type. - * Allowed values: - * * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. - * * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. - * * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - * - */ - recurringProcessingModel?: "CardOnFile" | "Subscription" | "UnscheduledCardOnFile"; - /** - * Specifies the redirect method (GET or POST) when redirecting back from the issuer. - */ - redirectFromIssuerMethod?: string; - /** - * Specifies the redirect method (GET or POST) when redirecting to the issuer. - */ - redirectToIssuerMethod?: string; - /** - * The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. - * If you need to provide multiple references for a transaction, separate them with hyphens ("-"). - * Maximum length: 80 characters. - */ - reference: string; - /** - * The URL to return to in case of a redirection. - * The format depends on the channel. This URL can have a maximum of 1024 characters. - * * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. - * Example: `https://your-company.com/checkout?shopperOrder=12xy` - * * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). - * Example: `my-app://` - * * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). - * Example: `my-app://your.package.name` - */ - returnUrl: string; - /** - * Contains risk data, such as client-side data, used to identify risk for a transaction. - */ - riskData?: RiskData; - /** - * The date and time until when the session remains valid, in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format. - * - * For example: 2020-07-18T15:42:40.428+01:00 - */ - sessionValidity?: string; - /** - * The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. - * > For 3D Secure 2 transactions, schemes require the `shopperEmail` for both `deviceChannel` **browser** and **app**. - */ - shopperEmail?: string; - /** - * The shopper's IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). - * > Required for 3D Secure 2 transactions. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://support.adyen.com/hc/en-us/requests/new). - */ - shopperIP?: string; - /** - * Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. - * For the web service API, Adyen assumes Ecommerce shopper interaction by default. - * - * This field has the following possible values: - * * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. - * * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). - * * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. - * * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - */ - shopperInteraction?: "Ecommerce" | "ContAuth" | "Moto" | "POS"; - /** - * The combination of a language code and a country code to specify the language to be used in the payment. - */ - shopperLocale?: string; - /** - * The shopper's full name and gender (if specified). - */ - shopperName?: Name; - /** - * The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID). - * > This field is required for recurring payments. - */ - shopperReference?: string; - /** - * The text to be shown on the shopper's bank statement. To enable this field, contact our [Support Team](https://support.adyen.com/hc/en-us/requests/new). - * We recommend sending a maximum of 25 characters, otherwise banks might truncate the string. - */ - shopperStatement?: string; - /** - * The shopper's social security number. - */ - socialSecurityNumber?: string; - /** - * Information on how the payment should be split between accounts when using [Adyen for Platforms](https://docs.adyen.com/platforms/processing-payments#providing-split-information). - */ - splits?: Split[]; - /** - * The physical store, for which this payment is processed. - */ - store?: string; - /** - * When true and `shopperReference` is provided, the payment details will be stored. - */ - storePaymentMethod?: boolean; - /** - * The shopper's telephone number. - */ - telephoneNumber?: string; - /** - * Request fields for 3D Secure 2. - */ - threeDS2RequestData?: ThreeDS2RequestData; - /** - * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/checkout/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. - */ - threeDSAuthenticationOnly?: boolean; - /** - * Set to true if the payment should be routed to a trusted MID. - */ - trustedShopper?: boolean; - } - export interface PaymentResponse { - /** - * Action to be taken for completing the payment. - */ - action?: /* Action to be taken for completing the payment. */ CheckoutDonationAction | CheckoutQrCodeAction | CheckoutRedirectAction | CheckoutSDKAction | CheckoutThreeDS2ChallengeAction | CheckoutThreeDS2FingerPrintAction | CheckoutAwaitAction | CheckoutVoucherAction | CheckoutOneTimePasscodeAction; - /** - * This field contains additional data, which may be required to return in a particular payment response. To choose data fields to be returned, go to **Customer Area** > **Account** > **API URLs** > **Additional data settings**. - */ - additionalData?: /* This field contains additional data, which may be required to return in a particular payment response. To choose data fields to be returned, go to **Customer Area** > **Account** > **API URLs** > **Additional data settings**. */ ResponseAdditionalDataCommon | ResponseAdditionalDataBillingAddress | ResponseAdditionalDataCard | ResponseAdditionalDataDeliveryAddress | ResponseAdditionalDataInstallments | ResponseAdditionalDataNetworkTokens | ResponseAdditionalDataPayPal | ResponseAdditionalDataSepa; - /** - * Authorised amount in the transaction. - */ - amount?: Amount; - /** - * Contains `threeds2.fingerprint` or `threeds2.challengeToken` values to be used in further calls to `/payments/details` endpoint. - */ - authentication?: { - [name: string]: string; - }; - /** - * When non-empty, contains all the fields that you must submit to the `/payments/details` endpoint. - */ - details?: InputDetail[]; - /** - * The fraud result properties of the payment. - */ - fraudResult?: FraudResult; - /** - * The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. - * If you need to provide multiple references for a transaction, separate them with hyphens ("-"). - * Maximum length: 80 characters. - */ - merchantReference?: string; - /** - * Contains updated information regarding the order in case order information was provided in the request. - */ - order?: CheckoutOrderResponse; - /** - * Contains the details that will be presented to the shopper. - */ - outputDetails?: { - [name: string]: string; - }; - /** - * When non-empty, contains a value that you must submit to the `/payments/details` endpoint. - */ - paymentData?: string; - /** - * Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - * - * > `pspReference` is returned only for non-redirect payment methods. - */ - pspReference?: string; - /** - * When the payment flow requires a redirect, this object contains information about the redirect URL. - */ - redirect?: Redirect; - /** - * If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. - * - * For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - */ - refusalReason?: string; - /** - * Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - */ - refusalReasonCode?: string; - /** - * The result of the payment. For more information, see [Result codes](https://docs.adyen.com/checkout/payment-result-codes). - * - * Possible values: - * - * * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. - * * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. - * * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. - * * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. - * * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. - * * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. - * * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. - * * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. - * * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. - * * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. - * * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. - */ - resultCode?: "AuthenticationFinished" | "Authorised" | "Cancelled" | "ChallengeShopper" | "Error" | "IdentifyShopper" | "Pending" | "PresentToShopper" | "Received" | "RedirectShopper" | "Refused"; - } - export interface PaymentSetupRequest { - /** - * This field contains additional data, which may be required for a particular payment request. - * - * The `additionalData` object consists of entries, each of which includes the key and value. - */ - additionalData?: /** - * This field contains additional data, which may be required for a particular payment request. - * - * The `additionalData` object consists of entries, each of which includes the key and value. - */ - AdditionalDataCommon | AdditionalData3DSecure | AdditionalDataAirline | AdditionalDataCarRental | AdditionalDataLevel23 | AdditionalDataLodging | AdditionalDataOpenInvoice | AdditionalDataRatepay | AdditionalDataRetry | AdditionalDataRisk | AdditionalDataRiskStandalone | AdditionalDataTemporaryServices | AdditionalDataWallets; - /** - * List of payments methods to be presented to the shopper. To refer to payment methods, use their `paymentMethod.type`from [Payment methods overview](https://docs.adyen.com/payment-methods). - * - * Example: `"allowedPaymentMethods":["ideal","giropay"]` - */ - allowedPaymentMethods?: string[]; - /** - * The amount information for the transaction (in [minor units](https://docs.adyen.com/development-resources/currency-codes)). For [BIN or card verification](https://docs.adyen.com/payment-methods/cards/bin-data-and-card-verification) requests, set amount to 0 (zero). - */ - amount: Amount; - /** - * Information about your application. For more details, see [Building Adyen solutions](https://docs.adyen.com/development-resources/building-adyen-solutions). - */ - applicationInfo?: ApplicationInfo; - /** - * The address where to send the invoice. - * > For 3D Secure 2 transactions, schemes require the `billingAddress` for both `deviceChannel` **browser** and **app**. Include all of the fields within this object. - */ - billingAddress?: Address; - /** - * List of payments methods to be hidden from the shopper. To refer to payment methods, use their `paymentMethod.type`from [Payment methods overview](https://docs.adyen.com/payment-methods). - * - * Example: `"blockedPaymentMethods":["ideal","giropay"]` - */ - blockedPaymentMethods?: string[]; - /** - * The delay between the authorisation and scheduled auto-capture, specified in hours. - */ - captureDelayHours?: number; // int32 - /** - * The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. - * - * Possible values: - * * iOS - * * Android - * * Web - */ - channel?: "iOS" | "Android" | "Web"; - /** - * Information regarding the company. - */ - company?: Company; - /** - * Specify configurations to enable additional features. - */ - configuration?: Configuration; - /** - * Conversion ID that corresponds to the Id generated for tracking user payment journey. - */ - conversionId?: string; - /** - * The shopper country. - * - * Format: [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) - * Example: NL or DE - */ - countryCode: string; - /** - * The shopper's date of birth. - * - * Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - */ - dateOfBirth?: string; // date-time - /** - * The forex quote as returned in the response of the forex service. - */ - dccQuote?: ForexQuote; - /** - * The address where the purchased goods should be delivered. - */ - deliveryAddress?: Address; - /** - * The date and time the purchased goods should be delivered. - * - * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD - * - * Example: 2017-07-17T13:42:40.428+01:00 - */ - deliveryDate?: string; // date-time - /** - * When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments. - */ - enableOneClick?: boolean; - /** - * When true and `shopperReference` is provided, the payment details will be tokenized for payouts. - */ - enablePayOut?: boolean; - /** - * Choose if a specific transaction should use the Real-time Account Updater, regardless of other settings. - */ - enableRealTimeUpdate?: boolean; - /** - * When true and `shopperReference` is provided, the payment details will be tokenized for recurring payments. - */ - enableRecurring?: boolean; - /** - * The type of the entity the payment is processed for. - */ - entityType?: "NaturalPerson" | "CompanyName"; - /** - * An integer value that is added to the normal fraud score. The value can be either positive or negative. - */ - fraudOffset?: number; // int32 - /** - * Contains installment settings. For more information, refer to [Installments](https://docs.adyen.com/payment-methods/cards/credit-card-installments). - */ - installments?: Installments; - /** - * Price and product information about the purchased items, to be included on the invoice sent to the shopper. - * > This field is required for Klarna, AfterPay, and RatePay. - */ - lineItems?: LineItem[]; - /** - * The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. - */ - mcc?: string; - /** - * The merchant account identifier, with which you want to process the transaction. - */ - merchantAccount: string; - /** - * This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. - * The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. - * > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. - */ - merchantOrderReference?: string; - /** - * Metadata consists of entries, each of which includes a key and a value. - * Limitations: Maximum 20 key-value pairs per request. When exceeding, the "177" error occurs: "Metadata size exceeds limit". - */ - metadata?: { - [name: string]: string; - }; - /** - * When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. - */ - orderReference?: string; - /** - * Required for the Web integration. - * - * Set this parameter to the origin URL of the page that you are loading the SDK from. - */ - origin?: string; - /** - * Date after which no further authorisations shall be performed. Only for 3D Secure 2. - */ - recurringExpiry?: string; - /** - * Minimum number of days between authorisations. Only for 3D Secure 2. - */ - recurringFrequency?: string; - /** - * The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. - * If you need to provide multiple references for a transaction, separate them with hyphens ("-"). - * Maximum length: 80 characters. - */ - reference: string; - /** - * The URL to return to in case of a redirection. - * The format depends on the channel. This URL can have a maximum of 1024 characters. - * * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. - * Example: `https://your-company.com/checkout?shopperOrder=12xy` - * * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). - * Example: `my-app://` - * * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). - * Example: `my-app://your.package.name` - */ - returnUrl: string; - /** - * Contains risk data, such as client-side data, used to identify risk for a transaction. - */ - riskData?: RiskData; - /** - * The version of the SDK you are using (for Web SDK integrations only). - */ - sdkVersion?: string; - /** - * The date and time until when the session remains valid, in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format. - * - * For example: 2020-07-18T15:42:40.428+01:00 - */ - sessionValidity?: string; - /** - * The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. - * > For 3D Secure 2 transactions, schemes require the `shopperEmail` for both `deviceChannel` **browser** and **app**. - */ - shopperEmail?: string; - /** - * The shopper's IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). - * > Required for 3D Secure 2 transactions. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://support.adyen.com/hc/en-us/requests/new). - */ - shopperIP?: string; - /** - * Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. - * For the web service API, Adyen assumes Ecommerce shopper interaction by default. - * - * This field has the following possible values: - * * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. - * * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). - * * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. - * * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - */ - shopperInteraction?: "Ecommerce" | "ContAuth" | "Moto" | "POS"; - /** - * The combination of a language code and a country code to specify the language to be used in the payment. - */ - shopperLocale?: string; - /** - * The shopper's full name and gender (if specified). - */ - shopperName?: Name; - /** - * The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID). - * > This field is required for recurring payments. - */ - shopperReference?: string; - /** - * The text to be shown on the shopper's bank statement. To enable this field, contact our [Support Team](https://support.adyen.com/hc/en-us/requests/new). - * We recommend sending a maximum of 25 characters, otherwise banks might truncate the string. - */ - shopperStatement?: string; - /** - * The shopper's social security number. - */ - socialSecurityNumber?: string; - /** - * Information on how the payment should be split between accounts when using [Adyen for Platforms](https://docs.adyen.com/platforms/processing-payments#providing-split-information). - */ - splits?: Split[]; - /** - * When true and `shopperReference` is provided, the payment details will be stored. - */ - storePaymentMethod?: boolean; - /** - * The shopper's telephone number. - */ - telephoneNumber?: string; - /** - * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/checkout/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. - */ - threeDSAuthenticationOnly?: boolean; - /** - * The token obtained when initializing the SDK. - * - * > This parameter is required for iOS and Android; not required for Web. - */ - token?: string; - /** - * Set to true if the payment should be routed to a trusted MID. - */ - trustedShopper?: boolean; - } - export interface PaymentSetupResponse { - /** - * The encoded payment session that you need to pass to the SDK. - */ - paymentSession?: string; - /** - * The detailed list of stored payment details required to generate payment forms. Will be empty if oneClick is set to false in the request. - */ - recurringDetails?: RecurringDetail[]; - } - export interface PaymentVerificationRequest { - /** - * Encrypted and signed payment result data. You should receive this value from the Checkout SDK after the shopper completes the payment. - */ - payload: string; - } - export interface PaymentVerificationResponse { - /** - * This field contains additional data, which may be required to return in a particular payment response. To choose data fields to be returned, go to **Customer Area** > **Account** > **API URLs** > **Additional data settings**. - */ - additionalData?: /* This field contains additional data, which may be required to return in a particular payment response. To choose data fields to be returned, go to **Customer Area** > **Account** > **API URLs** > **Additional data settings**. */ ResponseAdditionalDataCommon | ResponseAdditionalDataBillingAddress | ResponseAdditionalDataCard | ResponseAdditionalDataDeliveryAddress | ResponseAdditionalDataInstallments | ResponseAdditionalDataNetworkTokens | ResponseAdditionalDataPayPal | ResponseAdditionalDataSepa; - /** - * The fraud result properties of the payment. - */ - fraudResult?: FraudResult; - /** - * A unique value that you provided in the initial `/paymentSession` request as a `reference` field. - */ - merchantReference: string; - /** - * Contains updated information regarding the order in case order information was provided in the request. - */ - order?: CheckoutOrderResponse; - /** - * The payment method used in the transaction. - */ - paymentMethod: string; - /** - * Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - * - * > `pspReference` is returned only for non-redirect payment methods. - */ - pspReference?: string; - /** - * If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. - * - * For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - */ - refusalReason?: string; - /** - * Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - */ - refusalReasonCode?: string; - /** - * The result of the payment. For more information, see [Result codes](https://docs.adyen.com/checkout/payment-result-codes). - * - * Possible values: - * - * * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. - * * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. - * * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. - * * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. - * * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. - * * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. - * * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. - * * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. - * * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. - * * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. - * * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. - */ - resultCode?: "AuthenticationFinished" | "Authorised" | "Cancelled" | "ChallengeShopper" | "Error" | "IdentifyShopper" | "Pending" | "PresentToShopper" | "Received" | "RedirectShopper" | "Refused"; - /** - * The type of the error. - */ - serviceError?: ServiceError; - /** - * The shopperLocale value provided in the payment request. - */ - shopperLocale: string; - } - export interface QiwiWalletDetails { - /** - * - */ - telephoneNumber: string; - /** - * **qiwiwallet** - */ - type: string; - } - export interface Recurring { - /** - * The type of recurring contract to be used. - * Possible values: - * * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). - * * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). - * * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. - * * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/checkout/online-payouts). - */ - contract?: "ONECLICK" | "RECURRING" | "PAYOUT"; - /** - * A descriptive name for this detail. - */ - recurringDetailName?: string; - /** - * Date after which no further authorisations shall be performed. Only for 3D Secure 2. - */ - recurringExpiry?: string; // date-time - /** - * Minimum number of days between authorisations. Only for 3D Secure 2. - */ - recurringFrequency?: string; - /** - * The name of the token service. - */ - tokenService?: "VISATOKENSERVICE" | "MCTOKENSERVICE"; - } - export interface RecurringDetail { - /** - * List of possible brands. For example: visa, mc. - */ - brands?: string[]; - /** - * The configuration of the payment method. - */ - configuration?: { - [name: string]: string; - }; - /** - * All input details to be provided to complete the payment with this payment method. - */ - details?: InputDetail[]; - /** - * The funding source of the payment method. - */ - fundingSource?: "credit" | "debit"; - /** - * The group where this payment method belongs to. - */ - group?: PaymentMethodGroup; - /** - * All input details to be provided to complete the payment with this payment method. - */ - inputDetails?: InputDetail[]; - /** - * The displayable name of this payment method. - */ - name?: string; - /** - * Echo data required to send in next calls. - */ - paymentMethodData?: string; - /** - * The reference that uniquely identifies the recurring detail. - */ - recurringDetailReference?: string; - /** - * Contains information on previously stored payment details. - */ - storedDetails?: StoredDetails; - /** - * Indicates whether this payment method supports tokenization or not. - */ - supportsRecurring?: boolean; - /** - * The unique payment method code. - */ - type?: string; - } - export interface Redirect { - /** - * When the redirect URL must be accessed via POST, use this data to post to the redirect URL. - */ - data?: { - [name: string]: string; - }; - /** - * The web method that you must use to access the redirect URL. - * - * Possible values: GET, POST. - */ - method?: "GET" | "POST"; - /** - * The URL, to which you must redirect a shopper to complete a payment. - */ - url?: string; - } - export interface ResponseAdditionalDataBillingAddress { - /** - * The billing address city passed in the payment request. - */ - "billingAddress.city"?: string; - /** - * The billing address country passed in the payment request. - * - * Example: NL - */ - "billingAddress.country"?: string; - /** - * The billing address house number or name passed in the payment request. - */ - "billingAddress.houseNumberOrName"?: string; - /** - * The billing address postal code passed in the payment request. - * - * Example: 1011 DJ - */ - "billingAddress.postalCode"?: string; - /** - * The billing address state or province passed in the payment request. - * - * Example: NH - */ - "billingAddress.stateOrProvince"?: string; - /** - * The billing address street passed in the payment request. - */ - "billingAddress.street"?: string; - } - export interface ResponseAdditionalDataCard { - /** - * The Bank Identification Number of a credit card, which is the first six digits of a card number. - * - * Example: 521234 - */ - cardBin?: string; - /** - * The cardholder name passed in the payment request. - */ - cardHolderName?: string; - /** - * The bank or the financial institution granting lines of credit through card association branded payment cards. This information can be included when available. - */ - cardIssuingBank?: string; - /** - * The country where the card was issued. - * - * Example: US - */ - cardIssuingCountry?: string; - /** - * The currency in which the card is issued, if this information is available. Provided as the currency code or currency number from the ISO-4217 standard. - * - * Example: USD - */ - cardIssuingCurrency?: string; - /** - * The card payment method used for the transaction. - * - * Example: amex - */ - cardPaymentMethod?: string; - /** - * The last four digits of a card number. - * - * > Returned only in case of a card payment. - */ - cardSummary?: string; - } - export interface ResponseAdditionalDataCommon { - /** - * The name of the Adyen acquirer account. - * - * Example: PayPalSandbox_TestAcquirer - * - * > Only relevant for PayPal transactions. - */ - acquirerAccountCode?: string; - /** - * The name of the acquirer processing the payment request. - * - * Example: TestPmmAcquirer - */ - acquirerCode?: string; - /** - * The reference number that can be used for reconciliation in case a non-Adyen acquirer is used for settlement. - * - * Example: 7C9N3FNBKT9 - */ - acquirerReference?: string; - /** - * The Adyen alias of the card. - * - * Example: H167852639363479 - */ - alias?: string; - /** - * The type of the card alias. - * - * Example: Default - */ - aliasType?: string; - /** - * Authorisation code: - * * When the payment is authorised successfully, this field holds the authorisation code for the payment. - * * When the payment is not authorised, this field is empty. - * - * Example: 58747 - */ - authCode?: string; - /** - * The currency of the authorised amount, as a three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - */ - authorisedAmountCurrency?: string; - /** - * Value of the amount authorised. - * - * This amount is represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). - */ - authorisedAmountValue?: string; - /** - * The AVS result code of the payment, which provides information about the outcome of the AVS check. - * - * For possible values, see [AVS](https://docs.adyen.com/risk-management/configure-standard-risk-rules/consistency-rules#billing-address-does-not-match-cardholder-address-avs). - */ - avsResult?: string; - /** - * Raw AVS result received from the acquirer, where available. - * - * Example: D - */ - avsResultRaw?: string; - /** - * BIC of a bank account. - * - * Example: TESTNL01 - * - * > Only relevant for SEPA Direct Debit transactions. - */ - bic?: string; - /** - * Supported for 3D Secure 2. The unique transaction identifier assigned by the DS to identify a single transaction. - */ - dsTransID?: string; - /** - * The Electronic Commerce Indicator returned from the schemes for the 3DS payment session. - * - * Example: 02 - */ - eci?: string; - /** - * The expiry date on the card. - * - * Example: 6/2016 - * - * > Returned only in case of a card payment. - */ - expiryDate?: string; - /** - * The currency of the extra amount charged due to additional amounts set in the skin used in the HPP payment request. - * - * Example: EUR - */ - extraCostsCurrency?: string; - /** - * The value of the extra amount charged due to additional amounts set in the skin used in the HPP payment request. The amount is in minor units. - */ - extraCostsValue?: string; - /** - * The fraud score due to a particular fraud check. The fraud check name is found in the key of the key-value pair. - */ - "fraudCheck-[itemNr]-[FraudCheckname]"?: string; - /** - * Information regarding the funding type of the card. The possible return values are: - * * CHARGE - * * CREDIT - * * DEBIT - * * PREPAID - * * PREPAID_RELOADABLE - * - * * PREPAID_NONRELOADABLE - * * DEFFERED_DEBIT - * - * > This functionality requires additional configuration on Adyen's end. To enable it, contact the Support Team. - * - * For receiving this field in the notification, enable **Include Funding Source** in **Notifications** > **Additional settings**. - */ - fundingSource?: string; - /** - * Indicates availability of funds. - * - * Visa: - * * "I" (fast funds are supported) - * * "N" (otherwise) - * - * Mastercard: - * * "I" (product type is Prepaid or Debit, or issuing country is in CEE/HGEM list) - * * "N" (otherwise) - * - * > Returned when you verify a card BIN or estimate costs, and only if payoutEligible is "Y" or "D". - */ - fundsAvailability?: string; - /** - * Provides the more granular indication of why a transaction was refused. When a transaction fails with either "Refused", "Restricted Card", "Transaction Not Permitted", "Not supported" or "DeclinedNon Generic" refusalReason from the issuer, Adyen cross references its PSP-wide data for extra insight into the refusal reason. If an inferred refusal reason is available, the `inferredRefusalReason`, field is populated and the `refusalReason`, is set to "Not Supported". - * - * Possible values: - * - * * 3D Secure Mandated - * * Closed Account - * * ContAuth Not Supported - * * CVC Mandated - * * Ecommerce Not Allowed - * * Crossborder Not Supported - * * Card Updated - * - * * Low Authrate Bin - * * Non-reloadable prepaid card - */ - inferredRefusalReason?: string; - /** - * The issuing country of the card based on the BIN list that Adyen maintains. - * - * Example: JP - */ - issuerCountry?: string; - /** - * The `mcBankNetReferenceNumber`, is a minimum of six characters and a maximum of nine characters long. - * - * > Contact Support Team to enable this field. - */ - mcBankNetReferenceNumber?: string; - /** - * Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. - * - * This contains either the Mastercard Trace ID or the Visa Transaction ID. - */ - networkTxReference?: string; - /** - * The owner name of a bank account. - * - * Only relevant for SEPA Direct Debit transactions. - */ - ownerName?: string; - /** - * The Payment Account Reference (PAR) value links a network token with the underlying primary account number (PAN). The PAR value consists of 29 uppercase alphanumeric characters. - */ - paymentAccountReference?: string; - /** - * The Adyen sub-variant of the payment method used for the payment request. - * - * For more information, refer to [PaymentMethodVariant](https://docs.adyen.com/development-resources/paymentmethodvariant). - * - * Example: mcpro - */ - paymentMethodVariant?: string; - /** - * Indicates whether a payout is eligible or not for this card. - * - * Visa: - * * "Y" - * * "N" - * - * Mastercard: - * * "Y" (domestic and cross-border) - * - * * "D" (only domestic) - * * "N" (no MoneySend) - * * "U" (unknown) - */ - payoutEligible?: string; - /** - * The response code from the Real Time Account Updater service. - * - * Possible return values are: - * * CardChanged - * * CardExpiryChanged - * * CloseAccount - * - * * ContactCardAccountHolder - */ - realtimeAccountUpdaterStatus?: string; - /** - * Message to be displayed on the terminal. - */ - receiptFreeText?: string; - /** - * The `pspReference`, of the first recurring payment that created the recurring detail. - * - * This functionality requires additional configuration on Adyen's end. To enable it, contact the Support Team. - */ - "recurring.firstPspReference"?: string; - /** - * The reference that uniquely identifies the recurring transaction. - */ - "recurring.recurringDetailReference"?: string; - /** - * If the payment is referred, this field is set to true. - * - * This field is unavailable if the payment is referred and is usually not returned with ecommerce transactions. - * - * Example: true - */ - referred?: string; - /** - * Raw refusal reason received from the acquirer, where available. - * - * Example: AUTHORISED - */ - refusalReasonRaw?: string; - /** - * The shopper interaction type of the payment request. - * - * Example: Ecommerce - */ - shopperInteraction?: string; - /** - * The shopperReference passed in the payment request. - * - * Example: AdyenTestShopperXX - */ - shopperReference?: string; - /** - * The terminal ID used in a point-of-sale payment. - * - * Example: 06022622 - */ - terminalId?: string; - /** - * A Boolean value indicating whether 3DS authentication was completed on this payment. - * - * Example: true - */ - threeDAuthenticated?: string; - /** - * The raw 3DS authentication result from the card issuer. - * - * Example: N - */ - threeDAuthenticatedResponse?: string; - /** - * A Boolean value indicating whether 3DS was offered for this payment. - * - * Example: true - */ - threeDOffered?: string; - /** - * The raw enrollment result from the 3DS directory services of the card schemes. - * - * Example: Y - */ - threeDOfferedResponse?: string; - /** - * The 3D Secure 2 version. - */ - threeDSVersion?: string; - /** - * The `visaTransactionId`, has a fixed length of 15 numeric characters. - * - * > Contact Support Team to enable this field. - */ - visaTransactionId?: string; - /** - * The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse 'N' or 'Y'. If you want to submit the xid in your 3D Secure 1 request, use the `mpiData.xid`, field. - * - * Example: ODgxNDc2MDg2MDExODk5MAAAAAA= - */ - xid?: string; - } - export interface ResponseAdditionalDataDeliveryAddress { - /** - * The delivery address city passed in the payment request. - */ - "deliveryAddress.city"?: string; - /** - * The delivery address country passed in the payment request. - * - * Example: NL - */ - "deliveryAddress.country"?: string; - /** - * The delivery address house number or name passed in the payment request. - */ - "deliveryAddress.houseNumberOrName"?: string; - /** - * The delivery address postal code passed in the payment request. - * - * Example: 1011 DJ - */ - "deliveryAddress.postalCode"?: string; - /** - * The delivery address state or province passed in the payment request. - * - * Example: NH - */ - "deliveryAddress.stateOrProvince"?: string; - /** - * The delivery address street passed in the payment request. - */ - "deliveryAddress.street"?: string; - } - export interface ResponseAdditionalDataInstallments { - /** - * Type of installment. The value of `installmentType` should be **IssuerFinanced**. - */ - "installmentPaymentData.installmentType"?: string; - /** - * Annual interest rate. - */ - "installmentPaymentData.option[itemNr].annualPercentageRate"?: string; - /** - * First Installment Amount in minor units. - */ - "installmentPaymentData.option[itemNr].firstInstallmentAmount"?: string; - /** - * Installment fee amount in minor units. - */ - "installmentPaymentData.option[itemNr].installmentFee"?: string; - /** - * Interest rate for the installment period. - */ - "installmentPaymentData.option[itemNr].interestRate"?: string; - /** - * Maximum number of installments possible for this payment. - */ - "installmentPaymentData.option[itemNr].maximumNumberOfInstallments"?: string; - /** - * Minimum number of installments possible for this payment. - */ - "installmentPaymentData.option[itemNr].minimumNumberOfInstallments"?: string; - /** - * Total number of installments possible for this payment. - */ - "installmentPaymentData.option[itemNr].numberOfInstallments"?: string; - /** - * Subsequent Installment Amount in minor units. - */ - "installmentPaymentData.option[itemNr].subsequentInstallmentAmount"?: string; - /** - * Total amount in minor units. - */ - "installmentPaymentData.option[itemNr].totalAmountDue"?: string; - /** - * Possible values: - * * PayInInstallmentsOnly - * * PayInFullOnly - * * PayInFullOrInstallments - */ - "installmentPaymentData.paymentOptions"?: string; - /** - * The number of installments that the payment amount should be charged with. - * - * Example: 5 - * > Only relevant for card payments in countries that support installments. - */ - "installments.value"?: string; - } - export interface ResponseAdditionalDataNetworkTokens { - /** - * Indicates whether a network token is available for the specified card. - */ - "networkToken.available"?: string; - /** - * The Bank Identification Number of a tokenized card, which is the first six digits of a card number. - */ - "networkToken.bin"?: string; - /** - * The last four digits of a card number. - */ - "networkToken.tokenSummary"?: string; - } - export interface ResponseAdditionalDataPayPal { - /** - * The buyer's PayPal account email address. - * - * Example: paypaltest@adyen.com - */ - paypalEmail?: string; - /** - * The buyer's PayPal ID. - * - * Example: LF5HCWWBRV2KL - */ - paypalPayerId?: string; - /** - * The buyer's country of residence. - * - * Example: NL - */ - paypalPayerResidenceCountry?: string; - /** - * The status of the buyer's PayPal account. - * - * Example: unverified - */ - paypalPayerStatus?: string; - /** - * The eligibility for PayPal Seller Protection for this payment. - * - * Example: Ineligible - */ - paypalProtectionEligibility?: string; - } - export interface ResponseAdditionalDataSepa { - /** - * The transaction signature date. - * - * Format: yyyy-MM-dd - */ - "sepadirectdebit.dateOfSignature"?: string; - /** - * Its value corresponds to the pspReference value of the transaction. - */ - "sepadirectdebit.mandateId"?: string; - /** - * This field can take one of the following values: - * * OneOff: (OOFF) Direct debit instruction to initiate exactly one direct debit transaction. - * - * * First: (FRST) Initial/first collection in a series of direct debit instructions. - * * Recurring: (RCUR) Direct debit instruction to carry out regular direct debit transactions initiated by the creditor. - * * Final: (FNAL) Last/final collection in a series of direct debit instructions. - * - * Example: OOFF - */ - "sepadirectdebit.sequenceType"?: string; - } - export interface RiskData { - /** - * Contains client-side data, like the device fingerprint, cookies, and specific browser settings. - */ - clientData?: string; - } - export interface SDKEphemPubKey { - /** - * The `crv` value as received from the 3D Secure 2 SDK. - */ - crv?: string; - /** - * The `kty` value as received from the 3D Secure 2 SDK. - */ - kty?: string; - /** - * The `x` value as received from the 3D Secure 2 SDK. - */ - x?: string; - /** - * The `y` value as received from the 3D Secure 2 SDK. - */ - y?: string; - } - export interface SamsungPayDetails { - fundingSource?: "credit" | "debit"; - /** - * - */ - samsungPayToken: string; - /** - * This is the `recurringDetailReference` returned in the response when you created the token. - */ - storedPaymentMethodId?: string; - /** - * **samsungpay** - */ - type: string; - } - export interface SepaDirectDebitDetails { - /** - * The International Bank Account Number (IBAN). - */ - iban: string; - /** - * The name of the bank account holder. - */ - ownerName: string; - /** - * This is the `recurringDetailReference` returned in the response when you created the token. - */ - storedPaymentMethodId?: string; - /** - * **sepadirectdebit** - */ - type: string; - } - export interface ServiceError { - errorCode?: string; - errorType?: string; - message?: string; - } - export interface ShopperInput { - /** - * Specifies visibility of billing address fields. - * - * Permitted values: - * * editable - * * hidden - * * readOnly - */ - billingAddress?: "editable" | "hidden" | "readOnly"; - /** - * Specifies visibility of delivery address fields. - * - * Permitted values: - * * editable - * * hidden - * * readOnly - */ - deliveryAddress?: "editable" | "hidden" | "readOnly"; - /** - * Specifies visibility of personal details. - * - * Permitted values: - * * editable - * * hidden - * * readOnly - */ - personalDetails?: "editable" | "hidden" | "readOnly"; - } - export interface ShopperInteractionDevice { - /** - * Locale on the shopper interaction device. - */ - locale?: string; - /** - * Operating system running on the shopper interaction device. - */ - os?: string; - /** - * Version of the operating system on the shopper interaction device. - */ - osVersion?: string; - } - export interface Split { - /** - * The account to which this split applies. - * - * >Required if the type is `MarketPlace`. - */ - account?: string; - /** - * The amount of this split. - */ - amount: SplitAmount; - /** - * A description of this split. - */ - description?: string; - /** - * The reference of this split. Used to link other operations (e.g. captures and refunds) to this split. - * - * >Required if the type is `MarketPlace`. - */ - reference?: string; - /** - * The type of this split. - * - * >Permitted values: `Default`, `PaymentFee`, `VAT`, `Commission`, `MarketPlace`, `BalanceAccount`. - */ - type: "BalanceAccount" | "Commission" | "Default" | "MarketPlace" | "PaymentFee" | "VAT" | "Verification"; - } - export interface SplitAmount { - /** - * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - * - * If this value is not provided, the currency in which the payment is made will be used. - */ - currency?: string; - /** - * The payable amount that can be charged for the transaction. - * - * The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). - */ - value: number; // int64 - } - export interface StoredDetails { - /** - * The stored bank account. - */ - bank?: BankAccount; - /** - * The stored card information. - */ - card?: Card; - /** - * The email associated with stored payment details. - */ - emailAddress?: string; - } - export interface StoredPaymentMethod { - /** - * The brand of the card. - */ - brand?: string; - /** - * The month the card expires. - */ - expiryMonth?: string; - /** - * The year the card expires. - */ - expiryYear?: string; - /** - * The unique payment method code. - */ - holderName?: string; - /** - * A unique identifier of this stored payment method. - */ - id?: string; - /** - * The last four digits of the PAN. - */ - lastFour?: string; - /** - * The display name of the stored payment method. - */ - name?: string; - /** - * The shopper’s email address. - */ - shopperEmail?: string; - /** - * The supported shopper interactions for this stored payment method. - */ - supportedShopperInteractions?: string[]; - /** - * The type of payment method. - */ - type?: string; - } - export interface StoredPaymentMethodDetails { - /** - * This is the `recurringDetailReference` returned in the response when you created the token. - */ - storedPaymentMethodId?: string; - /** - * The payment method type. - */ - type: string; - } - export interface SubInputDetail { - /** - * Configuration parameters for the required input. - */ - configuration?: { - [name: string]: string; - }; - /** - * In case of a select, the items to choose from. - */ - items?: Item[]; - /** - * The value to provide in the result. - */ - key?: string; - /** - * True if this input is optional to provide. - */ - optional?: boolean; - /** - * The type of the required input. - */ - type?: string; - /** - * The value can be pre-filled, if available. - */ - value?: string; - } - export interface ThreeDS2RequestData { - /** - * Required for [authentication-only integration](https://docs.adyen.com/checkout/3d-secure/other-3ds-flows/authentication-only). The acquiring BIN enrolled for 3D Secure 2. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. - */ - acquirerBIN?: string; - /** - * Required for [authentication-only integration](https://docs.adyen.com/checkout/3d-secure/other-3ds-flows/authentication-only). The merchantId that is enrolled for 3D Secure 2 by the merchant's acquirer. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. - */ - acquirerMerchantID?: string; - /** - * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/checkout/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. - */ - authenticationOnly?: boolean; - /** - * Possibility to specify a preference for receiving a challenge from the issuer. - * Allowed values: - * * `noPreference` - * * `requestNoChallenge` - * * `requestChallenge` - * * `requestChallengeAsMandate` - * - */ - challengeIndicator?: "noPreference" | "requestNoChallenge" | "requestChallenge" | "requestChallengeAsMandate"; - /** - * The environment of the shopper. - * Allowed values: - * * `app` - * * `browser` - */ - deviceChannel: string; - /** - * Display options for the 3D Secure 2 SDK. - * Optional and only for `deviceChannel` **app**. - */ - deviceRenderOptions?: DeviceRenderOptions; - /** - * Required for merchants that have been enrolled for 3D Secure 2 by another party than Adyen, mostly [authentication-only integrations](https://docs.adyen.com/checkout/3d-secure/other-3ds-flows/authentication-only). The `mcc` is a four-digit code with which the previously given `acquirerMerchantID` is registered at the scheme. - */ - mcc?: string; - /** - * Required for [authentication-only integration](https://docs.adyen.com/checkout/3d-secure/other-3ds-flows/authentication-only). The merchant name that the issuer presents to the shopper if they get a challenge. We recommend to use the same value that you will use in the authorization. Maximum length is 40 characters. - * > Optional for a [full 3D Secure 2 integration](https://docs.adyen.com/checkout/3d-secure/native-3ds2/api-integration). Use this field if you are enrolled for 3D Secure 2 with us and want to override the merchant name already configured on your account. - */ - merchantName?: string; - /** - * The `messageVersion` value indicating the 3D Secure 2 protocol version. - */ - messageVersion?: string; - /** - * URL to where the issuer should send the `CRes`. Required if you are not using components for `channel` **Web** or if you are using classic integration `deviceChannel` **browser**. - */ - notificationURL?: string; - /** - * The `sdkAppID` value as received from the 3D Secure 2 SDK. - * Required for `deviceChannel` set to **app**. - */ - sdkAppID?: string; - /** - * The `sdkEncData` value as received from the 3D Secure 2 SDK. - * Required for `deviceChannel` set to **app**. - */ - sdkEncData?: string; - /** - * The `sdkEphemPubKey` value as received from the 3D Secure 2 SDK. - * Required for `deviceChannel` set to **app**. - */ - sdkEphemPubKey?: SDKEphemPubKey; - /** - * The maximum amount of time in minutes for the 3D Secure 2 authentication process. - * Optional and only for `deviceChannel` set to **app**. Defaults to **60** minutes. - */ - sdkMaxTimeout?: number; // int32 - /** - * The `sdkReferenceNumber` value as received from the 3D Secure 2 SDK. - * Only for `deviceChannel` set to **app**. - */ - sdkReferenceNumber?: string; - /** - * The `sdkTransID` value as received from the 3D Secure 2 SDK. - * Only for `deviceChannel` set to **app**. - */ - sdkTransID?: string; - /** - * Completion indicator for the device fingerprinting. - */ - threeDSCompInd?: string; - /** - * Required for [authentication-only integration](https://docs.adyen.com/checkout/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor identifier assigned by the Directory Server when you enrol for 3D Secure 2. - */ - threeDSRequestorID?: string; - /** - * Required for [authentication-only integration](https://docs.adyen.com/checkout/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor name assigned by the Directory Server when you enrol for 3D Secure 2. - */ - threeDSRequestorName?: string; - /** - * URL of the (customer service) website that will be shown to the shopper in case of technical errors during the 3D Secure 2 process. - */ - threeDSRequestorURL?: string; - /** - * Identify the type of the transaction being authenticated. - */ - transactionType?: "goodsOrServicePurchase" | "checkAcceptance" | "accountFunding" | "quasiCashTransaction" | "prepaidActivationAndLoad"; - /** - * The `whiteListStatus` value returned from a previous 3D Secure 2 transaction, only applicable for 3D Secure 2 protocol version 2.2.0. - */ - whiteListStatus?: string; - } - export interface ThreeDSecureData { - /** - * In 3D Secure 1, the authentication response if the shopper was redirected. - * - * In 3D Secure 2, this is the `transStatus` from the challenge result. If the transaction was frictionless, omit this parameter. - */ - authenticationResponse?: "Y" | "N" | "U" | "A"; - /** - * The cardholder authentication value (base64 encoded, 20 bytes in a decoded form). - */ - cavv?: string; // byte - /** - * The CAVV algorithm used. Include this only for 3D Secure 1. - */ - cavvAlgorithm?: string; - /** - * In 3D Secure 1, this is the enrollment response from the 3D directory server. - * - * In 3D Secure 2, this is the `transStatus` from the `ARes`. - */ - directoryResponse?: "A" | "C" | "D" | "I" | "N" | "R" | "U" | "Y"; - /** - * Supported for 3D Secure 2. The unique transaction identifier assigned by the Directory Server (DS) to identify a single transaction. - */ - dsTransID?: string; - /** - * The electronic commerce indicator. - */ - eci?: string; - /** - * The version of the 3D Secure protocol. - */ - threeDSVersion?: string; - /** - * Supported for 3D Secure 1. The transaction identifier (Base64-encoded, 20 bytes in a decoded form). - */ - xid?: string; // byte - } - export interface UpdatePaymentLinkRequest { - /** - * Status of the payment link. Possible values: - * * **expired** - */ - status: "expired"; - } - export interface VippsDetails { - /** - * This is the `recurringDetailReference` returned in the response when you created the token. - */ - storedPaymentMethodId?: string; - /** - * - */ - telephoneNumber: string; - /** - * **vipps** - */ - type: string; - } - export interface VisaCheckoutDetails { - fundingSource?: "credit" | "debit"; - /** - * **visacheckout** - */ - type: string; - /** - * - */ - visaCheckoutCallId: string; - } - export interface WeChatPayDetails { - appId?: string; - openid?: string; - /** - * **wechatpay** - */ - type: string; - } - export interface WeChatPayMiniProgramDetails { - appId?: string; - openid?: string; - /** - * **wechatpayMiniProgram** - */ - type: string; - } -} -declare namespace Paths { - namespace GetPaymentLinksLinkId { - namespace Parameters { - export type LinkId = string; - } - export interface PathParameters { - linkId: Parameters.LinkId; - } - namespace Responses { - export type $200 = ICheckout.PaymentLinkResource; - export interface $400 { - } - export interface $401 { - } - export interface $403 { - } - export interface $422 { - } - export interface $500 { - } - } - } - namespace PatchPaymentLinksLinkId { - namespace Parameters { - export type LinkId = string; - } - export interface PathParameters { - linkId: Parameters.LinkId; - } - export type RequestBody = ICheckout.UpdatePaymentLinkRequest; - namespace Responses { - export type $200 = ICheckout.PaymentLinkResource; - export interface $400 { - } - export interface $401 { - } - export interface $403 { - } - export interface $422 { - } - export interface $500 { - } - } - } - namespace PostOrders { - export type RequestBody = ICheckout.CheckoutCreateOrderRequest; - namespace Responses { - export type $200 = ICheckout.CheckoutCreateOrderResponse; - export interface $400 { - } - export interface $401 { - } - export interface $403 { - } - export interface $422 { - } - export interface $500 { - } - } - } - namespace PostOrdersCancel { - export type RequestBody = ICheckout.CheckoutCancelOrderRequest; - namespace Responses { - export type $200 = ICheckout.CheckoutCancelOrderResponse; - export interface $400 { - } - export interface $401 { - } - export interface $403 { - } - export interface $422 { - } - export interface $500 { - } - } - } - namespace PostOriginKeys { - export type RequestBody = ICheckout.CheckoutUtilityRequest; - namespace Responses { - export type $200 = ICheckout.CheckoutUtilityResponse; - export interface $400 { - } - export interface $401 { - } - export interface $403 { - } - export interface $422 { - } - export interface $500 { - } - } - } - namespace PostPaymentLinks { - export type RequestBody = ICheckout.CreatePaymentLinkRequest; - namespace Responses { - export type $200 = ICheckout.PaymentLinkResource; - export interface $201 { - } - export interface $400 { - } - export interface $401 { - } - export interface $403 { - } - export interface $422 { - } - export interface $500 { - } - } - } - namespace PostPaymentMethods { - export type RequestBody = ICheckout.PaymentMethodsRequest; - namespace Responses { - export type $200 = ICheckout.PaymentMethodsResponse; - export interface $400 { - } - export interface $401 { - } - export interface $403 { - } - export interface $422 { - } - export interface $500 { - } - } - } - namespace PostPaymentMethodsBalance { - export type RequestBody = ICheckout.CheckoutBalanceCheckRequest; - namespace Responses { - export type $200 = ICheckout.CheckoutBalanceCheckResponse; - export interface $400 { - } - export interface $401 { - } - export interface $403 { - } - export interface $422 { - } - export interface $500 { - } - } - } - namespace PostPaymentSession { - export type RequestBody = ICheckout.PaymentSetupRequest; - namespace Responses { - export type $200 = ICheckout.PaymentSetupResponse; - export interface $400 { - } - export interface $401 { - } - export interface $403 { - } - export interface $422 { - } - export interface $500 { - } - } - } - namespace PostPayments { - export type RequestBody = ICheckout.PaymentRequest; - namespace Responses { - export type $200 = ICheckout.PaymentResponse; - export interface $400 { - } - export interface $401 { - } - export interface $403 { - } - export interface $422 { - } - export interface $500 { - } - } - } - namespace PostPaymentsDetails { - export type RequestBody = ICheckout.DetailsRequest; - namespace Responses { - export type $200 = ICheckout.PaymentResponse; - export interface $400 { - } - export interface $401 { - } - export interface $403 { - } - export interface $422 { - } - export interface $500 { - } - } - } - namespace PostPaymentsResult { - export type RequestBody = ICheckout.PaymentVerificationRequest; - namespace Responses { - export type $200 = ICheckout.PaymentVerificationResponse; - export interface $400 { - } - export interface $401 { - } - export interface $403 { - } - export interface $422 { - } - export interface $500 { - } - } - } -} diff --git a/src/typings/checkout/accountInfo.ts b/src/typings/checkout/accountInfo.ts new file mode 100644 index 0000000..71ab18c --- /dev/null +++ b/src/typings/checkout/accountInfo.ts @@ -0,0 +1,234 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class AccountInfo { + /** + * Indicator for the length of time since this shopper account was created in the merchant\'s environment. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days + */ + 'accountAgeIndicator'?: AccountInfo.AccountAgeIndicatorEnum; + /** + * Date when the shopper\'s account was last changed. + */ + 'accountChangeDate'?: Date; + /** + * Indicator for the length of time since the shopper\'s account was last updated. Allowed values: * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days + */ + 'accountChangeIndicator'?: AccountInfo.AccountChangeIndicatorEnum; + /** + * Date when the shopper\'s account was created. + */ + 'accountCreationDate'?: Date; + /** + * Indicates the type of account. For example, for a multi-account card product. Allowed values: * notApplicable * credit * debit + */ + 'accountType'?: AccountInfo.AccountTypeEnum; + /** + * Number of attempts the shopper tried to add a card to their account in the last day. + */ + 'addCardAttemptsDay'?: number; + /** + * Date the selected delivery address was first used. + */ + 'deliveryAddressUsageDate'?: Date; + /** + * Indicator for the length of time since this delivery address was first used. Allowed values: * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days + */ + 'deliveryAddressUsageIndicator'?: AccountInfo.DeliveryAddressUsageIndicatorEnum; + /** + * Shopper\'s home phone number (including the country code). + */ + 'homePhone'?: string; + /** + * Shopper\'s mobile phone number (including the country code). + */ + 'mobilePhone'?: string; + /** + * Date when the shopper last changed their password. + */ + 'passwordChangeDate'?: Date; + /** + * Indicator when the shopper has changed their password. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days + */ + 'passwordChangeIndicator'?: AccountInfo.PasswordChangeIndicatorEnum; + /** + * Number of all transactions (successful and abandoned) from this shopper in the past 24 hours. + */ + 'pastTransactionsDay'?: number; + /** + * Number of all transactions (successful and abandoned) from this shopper in the past year. + */ + 'pastTransactionsYear'?: number; + /** + * Date this payment method was added to the shopper\'s account. + */ + 'paymentAccountAge'?: Date; + /** + * Indicator for the length of time since this payment method was added to this shopper\'s account. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days + */ + 'paymentAccountIndicator'?: AccountInfo.PaymentAccountIndicatorEnum; + /** + * Number of successful purchases in the last six months. + */ + 'purchasesLast6Months'?: number; + /** + * Whether suspicious activity was recorded on this account. + */ + 'suspiciousActivity'?: boolean; + /** + * Shopper\'s work phone number (including the country code). + */ + 'workPhone'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountAgeIndicator", + "baseName": "accountAgeIndicator", + "type": "AccountInfo.AccountAgeIndicatorEnum" + }, + { + "name": "accountChangeDate", + "baseName": "accountChangeDate", + "type": "Date" + }, + { + "name": "accountChangeIndicator", + "baseName": "accountChangeIndicator", + "type": "AccountInfo.AccountChangeIndicatorEnum" + }, + { + "name": "accountCreationDate", + "baseName": "accountCreationDate", + "type": "Date" + }, + { + "name": "accountType", + "baseName": "accountType", + "type": "AccountInfo.AccountTypeEnum" + }, + { + "name": "addCardAttemptsDay", + "baseName": "addCardAttemptsDay", + "type": "number" + }, + { + "name": "deliveryAddressUsageDate", + "baseName": "deliveryAddressUsageDate", + "type": "Date" + }, + { + "name": "deliveryAddressUsageIndicator", + "baseName": "deliveryAddressUsageIndicator", + "type": "AccountInfo.DeliveryAddressUsageIndicatorEnum" + }, + { + "name": "homePhone", + "baseName": "homePhone", + "type": "string" + }, + { + "name": "mobilePhone", + "baseName": "mobilePhone", + "type": "string" + }, + { + "name": "passwordChangeDate", + "baseName": "passwordChangeDate", + "type": "Date" + }, + { + "name": "passwordChangeIndicator", + "baseName": "passwordChangeIndicator", + "type": "AccountInfo.PasswordChangeIndicatorEnum" + }, + { + "name": "pastTransactionsDay", + "baseName": "pastTransactionsDay", + "type": "number" + }, + { + "name": "pastTransactionsYear", + "baseName": "pastTransactionsYear", + "type": "number" + }, + { + "name": "paymentAccountAge", + "baseName": "paymentAccountAge", + "type": "Date" + }, + { + "name": "paymentAccountIndicator", + "baseName": "paymentAccountIndicator", + "type": "AccountInfo.PaymentAccountIndicatorEnum" + }, + { + "name": "purchasesLast6Months", + "baseName": "purchasesLast6Months", + "type": "number" + }, + { + "name": "suspiciousActivity", + "baseName": "suspiciousActivity", + "type": "boolean" + }, + { + "name": "workPhone", + "baseName": "workPhone", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AccountInfo.attributeTypeMap; + } +} + +export namespace AccountInfo { + export enum AccountAgeIndicatorEnum { + NotApplicable = 'notApplicable', + ThisTransaction = 'thisTransaction', + LessThan30Days = 'lessThan30Days', + From30To60Days = 'from30To60Days', + MoreThan60Days = 'moreThan60Days' + } + export enum AccountChangeIndicatorEnum { + ThisTransaction = 'thisTransaction', + LessThan30Days = 'lessThan30Days', + From30To60Days = 'from30To60Days', + MoreThan60Days = 'moreThan60Days' + } + export enum AccountTypeEnum { + NotApplicable = 'notApplicable', + Credit = 'credit', + Debit = 'debit' + } + export enum DeliveryAddressUsageIndicatorEnum { + ThisTransaction = 'thisTransaction', + LessThan30Days = 'lessThan30Days', + From30To60Days = 'from30To60Days', + MoreThan60Days = 'moreThan60Days' + } + export enum PasswordChangeIndicatorEnum { + NotApplicable = 'notApplicable', + ThisTransaction = 'thisTransaction', + LessThan30Days = 'lessThan30Days', + From30To60Days = 'from30To60Days', + MoreThan60Days = 'moreThan60Days' + } + export enum PaymentAccountIndicatorEnum { + NotApplicable = 'notApplicable', + ThisTransaction = 'thisTransaction', + LessThan30Days = 'lessThan30Days', + From30To60Days = 'from30To60Days', + MoreThan60Days = 'moreThan60Days' + } +} diff --git a/src/typings/checkout/achDetails.ts b/src/typings/checkout/achDetails.ts new file mode 100644 index 0000000..2f97662 --- /dev/null +++ b/src/typings/checkout/achDetails.ts @@ -0,0 +1,100 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class AchDetails { + /** + * The bank account number (without separators). + */ + 'bankAccountNumber': string; + /** + * The bank routing number of the account. The field value is `nil` in most cases. + */ + 'bankLocationId'?: string; + /** + * Encrypted bank account number. The bank account number (without separators). + */ + 'encryptedBankAccountNumber'?: string; + /** + * Encrypted location id. The bank routing number of the account. The field value is `nil` in most cases. + */ + 'encryptedBankLocationId'?: string; + /** + * The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don\'t accept \'ø\'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don\'t match the required format, the response returns the error message: 203 \'Invalid bank account holder name\'. + */ + 'ownerName'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * **ach** + */ + 'type'?: AchDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "bankAccountNumber", + "baseName": "bankAccountNumber", + "type": "string" + }, + { + "name": "bankLocationId", + "baseName": "bankLocationId", + "type": "string" + }, + { + "name": "encryptedBankAccountNumber", + "baseName": "encryptedBankAccountNumber", + "type": "string" + }, + { + "name": "encryptedBankLocationId", + "baseName": "encryptedBankLocationId", + "type": "string" + }, + { + "name": "ownerName", + "baseName": "ownerName", + "type": "string" + }, + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "AchDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return AchDetails.attributeTypeMap; + } +} + +export namespace AchDetails { + export enum TypeEnum { + Ach = 'ach' + } +} diff --git a/src/typings/checkout/additionalData3DSecure.ts b/src/typings/checkout/additionalData3DSecure.ts new file mode 100644 index 0000000..8bef87d --- /dev/null +++ b/src/typings/checkout/additionalData3DSecure.ts @@ -0,0 +1,68 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class AdditionalData3DSecure { + /** + * Indicates if you are able to process 3D Secure 2 transactions natively on your payment page. Send this parameter when you are using `/payments` endpoint with any of our [native 3D Secure 2 solutions](https://docs.adyen.com/online-payments/3d-secure/native-3ds2). > This parameter only indicates readiness to support native 3D Secure 2 authentication. To specify if you _want_ to perform 3D Secure, use [Dynamic 3D Secure](/risk-management/dynamic-3d-secure) or send the `executeThreeD` parameter. Possible values: * **true** - Ready to support native 3D Secure 2 authentication. Setting this to true does not mean always applying 3D Secure 2. Adyen still selects the version of 3D Secure based on configuration to optimize authorisation rates and improve the shopper\'s experience. * **false** – Not ready to support native 3D Secure 2 authentication. Adyen will not offer 3D Secure 2 to your shopper regardless of your configuration. + */ + 'allow3DS2'?: string; + /** + * Indicates if you want to perform 3D Secure authentication on a transaction. > Alternatively, you can use [Dynamic 3D Secure](/risk-management/dynamic-3d-secure) to configure rules for applying 3D Secure. Possible values: * **true** – Perform 3D Secure authentication. * **false** – Don\'t perform 3D Secure authentication. + */ + 'executeThreeD'?: string; + /** + * In case of Secure+, this field must be set to **CUPSecurePlus**. + */ + 'mpiImplementationType'?: string; + /** + * Indicates the [exemption type](https://docs.adyen.com/payments-fundamentals/psd2-sca-compliance-and-implementation-guide#specifypreferenceinyourapirequest) that you want to request for the transaction. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** + */ + 'scaExemption'?: string; + /** + * Indicates your preference for the 3D Secure version. > If you use this parameter, you override the checks from Adyen\'s Authentication Engine. We recommend to use this field only if you have an extensive knowledge of 3D Secure. Possible values: * **1.0.2**: Apply 3D Secure version 1.0.2. * **2.1.0**: Apply 3D Secure version 2.1.0. * **2.2.0**: Apply 3D Secure version 2.2.0. If the issuer does not support version 2.2.0, we will fall back to 2.1.0. The following rules apply: * If you prefer 2.1.0 or 2.2.0 but we receive a negative `transStatus` in the `ARes`, we will apply the fallback policy configured in your account. For example, if the configuration is to fall back to 3D Secure 1, we will apply version 1.0.2. * If you prefer 2.1.0 or 2.2.0 but the BIN is not enrolled, you will receive an error. + */ + 'threeDSVersion'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "allow3DS2", + "baseName": "allow3DS2", + "type": "string" + }, + { + "name": "executeThreeD", + "baseName": "executeThreeD", + "type": "string" + }, + { + "name": "mpiImplementationType", + "baseName": "mpiImplementationType", + "type": "string" + }, + { + "name": "scaExemption", + "baseName": "scaExemption", + "type": "string" + }, + { + "name": "threeDSVersion", + "baseName": "threeDSVersion", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AdditionalData3DSecure.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/additionalDataAirline.ts b/src/typings/checkout/additionalDataAirline.ts new file mode 100644 index 0000000..5d57425 --- /dev/null +++ b/src/typings/checkout/additionalDataAirline.ts @@ -0,0 +1,275 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class AdditionalDataAirline { + /** + * Reference number for the invoice, issued by the agency. * minLength: 1 * maxLength: 6 + */ + 'airlineAgencyInvoiceNumber'?: string; + /** + * 2-letter agency plan identifier; alphabetical. * minLength: 2 * maxLength: 2 + */ + 'airlineAgencyPlanName'?: string; + /** + * [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX); numeric. It identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 * maxLength: 3 + */ + 'airlineAirlineCode'?: string; + /** + * [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX); alphabetical. It identifies the carrier. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter airline code * Example: KLM = KL * minLength: 2 * maxLength: 2 + */ + 'airlineAirlineDesignatorCode'?: string; + /** + * Chargeable amount for boarding the plane. The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). * minLength: 1 * maxLength: 18 + */ + 'airlineBoardingFee'?: string; + /** + * The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the reservation and purchase the ticket. * Format: alphanumeric. * minLength: 4 * maxLength: 4 + */ + 'airlineComputerizedReservationSystem'?: string; + /** + * Reference number; alphanumeric. * minLength: 0 * maxLength: 20 + */ + 'airlineCustomerReferenceNumber'?: string; + /** + * Optional 2-digit code; alphanumeric. It identifies the type of product of the transaction. The description of the code may appear on credit card statements. * Format: 2-digit code * Example: Passenger ticket = 01 * minLength: 2 * maxLength: 2 + */ + 'airlineDocumentType'?: string; + /** + * Flight departure date. Local time `(HH:mm)` is optional. * Date format: `yyyy-MM-dd` * Date and time format: `yyyy-MM-dd HH:mm` * minLength: 10 * maxLength: 16 + */ + 'airlineFlightDate'?: string; + /** + * [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX); alphabetical. It identifies the carrier. This field is required/mandatory if the airline data includes leg details. * Format: IATA 2-letter airline code * Example: KLM = KL * minLength: 2 * maxLength: 2 + */ + 'airlineLegCarrierCode'?: string; + /** + * 1-letter travel class identifier; alphabetical. There is no standard; however, the following codes are used rather consistently: * F: first class * J: business class * Y: economy class * W: premium economy Limitations: * minLength: 1 * maxLength: 1 + */ + 'airlineLegClassOfTravel'?: string; + /** + * Date and time of travel. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-compliant. * Format: `yyyy-MM-dd HH:mm` * minLength: 16 * maxLength: 16 + */ + 'airlineLegDateOfTravel'?: string; + /** + * Alphabetical identifier of the departure airport. This field is required if the airline data includes leg details. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code. * Example: Amsterdam = AMS * minLength: 3 * maxLength: 3 + */ + 'airlineLegDepartAirport'?: string; + /** + * [Departure tax](https://en.wikipedia.org/wiki/Departure_tax). Amount charged by a country to an individual upon their leaving. The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). * minLength: 1 * maxLength: 12 + */ + 'airlineLegDepartTax'?: string; + /** + * Alphabetical identifier of the destination/arrival airport. This field is required/mandatory if the airline data includes leg details. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code. * Example: Amsterdam = AMS * minLength: 3 * maxLength: 3 + */ + 'airlineLegDestinationCode'?: string; + /** + * [Fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code); alphanumeric. * minLength: 1 * maxLength: 7 + */ + 'airlineLegFareBaseCode'?: string; + /** + * The flight identifier. * minLength: 1 * maxLength: 5 + */ + 'airlineLegFlightNumber'?: string; + /** + * 1-letter code that indicates whether the passenger is entitled to make a stopover. Only two types of characters are allowed: * O: Stopover allowed * X: Stopover not allowed Limitations: * minLength: 1 * maxLength: 1 + */ + 'airlineLegStopOverCode'?: string; + /** + * Date of birth of the passenger. Date format: `yyyy-MM-dd` * minLength: 10 * maxLength: 10 + */ + 'airlinePassengerDateOfBirth'?: string; + /** + * Passenger first name/given name. > This field is required/mandatory if the airline data includes passenger details or leg details. + */ + 'airlinePassengerFirstName'?: string; + /** + * Passenger last name/family name. > This field is required/mandatory if the airline data includes passenger details or leg details. + */ + 'airlinePassengerLastName'?: string; + /** + * Telephone number of the passenger, including country code. This is an alphanumeric field that can include the \'+\' and \'-\' signs. * minLength: 3 * maxLength: 30 + */ + 'airlinePassengerTelephoneNumber'?: string; + /** + * Passenger type code (PTC). IATA PTC values are 3-letter alphabetical. Example: ADT, SRC, CNN, INS. However, several carriers use non-standard codes that can be up to 5 alphanumeric characters. * minLength: 3 * maxLength: 6 + */ + 'airlinePassengerTravellerType'?: string; + /** + * Passenger name, initials, and a title. * Format: last name + first name or initials + title. * Example: *FLYER / MARY MS*. * minLength: 1 * maxLength: 49 + */ + 'airlinePassengerName': string; + /** + * Address of the place/agency that issued the ticket. * minLength: 0 * maxLength: 16 + */ + 'airlineTicketIssueAddress'?: string; + /** + * The ticket\'s unique identifier. * minLength: 1 * maxLength: 150 + */ + 'airlineTicketNumber'?: string; + /** + * IATA number, also ARC number or ARC/IATA number. Unique identifier number for travel agencies. * minLength: 1 * maxLength: 8 + */ + 'airlineTravelAgencyCode'?: string; + /** + * The name of the travel agency. * minLength: 1 * maxLength: 25 + */ + 'airlineTravelAgencyName'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "airlineAgencyInvoiceNumber", + "baseName": "airline.agency_invoice_number", + "type": "string" + }, + { + "name": "airlineAgencyPlanName", + "baseName": "airline.agency_plan_name", + "type": "string" + }, + { + "name": "airlineAirlineCode", + "baseName": "airline.airline_code", + "type": "string" + }, + { + "name": "airlineAirlineDesignatorCode", + "baseName": "airline.airline_designator_code", + "type": "string" + }, + { + "name": "airlineBoardingFee", + "baseName": "airline.boarding_fee", + "type": "string" + }, + { + "name": "airlineComputerizedReservationSystem", + "baseName": "airline.computerized_reservation_system", + "type": "string" + }, + { + "name": "airlineCustomerReferenceNumber", + "baseName": "airline.customer_reference_number", + "type": "string" + }, + { + "name": "airlineDocumentType", + "baseName": "airline.document_type", + "type": "string" + }, + { + "name": "airlineFlightDate", + "baseName": "airline.flight_date", + "type": "string" + }, + { + "name": "airlineLegCarrierCode", + "baseName": "airline.leg.carrier_code", + "type": "string" + }, + { + "name": "airlineLegClassOfTravel", + "baseName": "airline.leg.class_of_travel", + "type": "string" + }, + { + "name": "airlineLegDateOfTravel", + "baseName": "airline.leg.date_of_travel", + "type": "string" + }, + { + "name": "airlineLegDepartAirport", + "baseName": "airline.leg.depart_airport", + "type": "string" + }, + { + "name": "airlineLegDepartTax", + "baseName": "airline.leg.depart_tax", + "type": "string" + }, + { + "name": "airlineLegDestinationCode", + "baseName": "airline.leg.destination_code", + "type": "string" + }, + { + "name": "airlineLegFareBaseCode", + "baseName": "airline.leg.fare_base_code", + "type": "string" + }, + { + "name": "airlineLegFlightNumber", + "baseName": "airline.leg.flight_number", + "type": "string" + }, + { + "name": "airlineLegStopOverCode", + "baseName": "airline.leg.stop_over_code", + "type": "string" + }, + { + "name": "airlinePassengerDateOfBirth", + "baseName": "airline.passenger.date_of_birth", + "type": "string" + }, + { + "name": "airlinePassengerFirstName", + "baseName": "airline.passenger.first_name", + "type": "string" + }, + { + "name": "airlinePassengerLastName", + "baseName": "airline.passenger.last_name", + "type": "string" + }, + { + "name": "airlinePassengerTelephoneNumber", + "baseName": "airline.passenger.telephone_number", + "type": "string" + }, + { + "name": "airlinePassengerTravellerType", + "baseName": "airline.passenger.traveller_type", + "type": "string" + }, + { + "name": "airlinePassengerName", + "baseName": "airline.passenger_name", + "type": "string" + }, + { + "name": "airlineTicketIssueAddress", + "baseName": "airline.ticket_issue_address", + "type": "string" + }, + { + "name": "airlineTicketNumber", + "baseName": "airline.ticket_number", + "type": "string" + }, + { + "name": "airlineTravelAgencyCode", + "baseName": "airline.travel_agency_code", + "type": "string" + }, + { + "name": "airlineTravelAgencyName", + "baseName": "airline.travel_agency_name", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AdditionalDataAirline.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/additionalDataCarRental.ts b/src/typings/checkout/additionalDataCarRental.ts new file mode 100644 index 0000000..58514bb --- /dev/null +++ b/src/typings/checkout/additionalDataCarRental.ts @@ -0,0 +1,230 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class AdditionalDataCarRental { + /** + * Pick-up date. * Date format: `yyyyMMdd` + */ + 'carRentalCheckOutDate'?: string; + /** + * The customer service phone number of the car rental company. * Format: Alphanumeric * maxLength: 17 + */ + 'carRentalCustomerServiceTollFreeNumber'?: string; + /** + * Number of days for which the car is being rented. * Format: Numeric * maxLength: 19 + */ + 'carRentalDaysRented'?: string; + /** + * Any fuel charges associated with the rental. * Format: Numeric * maxLength: 12 + */ + 'carRentalFuelCharges'?: string; + /** + * Any insurance charges associated with the rental. * Format: Numeric * maxLength: 12 + */ + 'carRentalInsuranceCharges'?: string; + /** + * The city from which the car is rented. * Format: Alphanumeric * maxLength: 18 + */ + 'carRentalLocationCity'?: string; + /** + * The country from which the car is rented. * Format: Alphanumeric * maxLength: 2 + */ + 'carRentalLocationCountry'?: string; + /** + * The state or province from where the car is rented. * Format: Alphanumeric * maxLength: 3 + */ + 'carRentalLocationStateProvince'?: string; + /** + * Indicates if the customer was a \"no-show\" (neither keeps nor cancels their booking). * Y - Customer was a no show. * N - Not applicable. + */ + 'carRentalNoShowIndicator'?: string; + /** + * Charge associated with not returning a vehicle to the original rental location. + */ + 'carRentalOneWayDropOffCharges'?: string; + /** + * Daily rental rate. * Format: Alphanumeric * maxLength: 12 + */ + 'carRentalRate'?: string; + /** + * Specifies whether the given rate is applied daily or weekly. * D - Daily rate. * W - Weekly rate. + */ + 'carRentalRateIndicator'?: string; + /** + * The rental agreement number associated with this car rental. * Format: Alphanumeric * maxLength: 9 + */ + 'carRentalRentalAgreementNumber'?: string; + /** + * Daily rental rate. * Format: Alphanumeric * maxLength: 12 + */ + 'carRentalRentalClassId'?: string; + /** + * The name of the person renting the car. * Format: Alphanumeric * maxLength: 26 + */ + 'carRentalRenterName'?: string; + /** + * The city where the car must be returned. * Format: Alphanumeric * maxLength: 18 + */ + 'carRentalReturnCity'?: string; + /** + * The country where the car must be returned. * Format: Alphanumeric * maxLength: 2 + */ + 'carRentalReturnCountry'?: string; + /** + * The last date to return the car by. * Date format: `yyyyMMdd` + */ + 'carRentalReturnDate'?: string; + /** + * Agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10 + */ + 'carRentalReturnLocationId'?: string; + /** + * The state or province where the car must be returned. * Format: Alphanumeric * maxLength: 3 + */ + 'carRentalReturnStateProvince'?: string; + /** + * Indicates whether the goods or services were tax-exempt, or tax was not collected. Values: * Y - Goods or services were tax exempt * N - Tax was not collected + */ + 'carRentalTaxExemptIndicator'?: string; + /** + * Number of nights. This should be included in the auth message. * Format: Numeric * maxLength: 2 + */ + 'travelEntertainmentAuthDataDuration'?: string; + /** + * Indicates what market-specific dataset will be submitted or is being submitted. Value should be \"A\" for Car rental. This should be included in the auth message. * Format: Alphanumeric * maxLength: 1 + */ + 'travelEntertainmentAuthDataMarket'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "carRentalCheckOutDate", + "baseName": "carRental.checkOutDate", + "type": "string" + }, + { + "name": "carRentalCustomerServiceTollFreeNumber", + "baseName": "carRental.customerServiceTollFreeNumber", + "type": "string" + }, + { + "name": "carRentalDaysRented", + "baseName": "carRental.daysRented", + "type": "string" + }, + { + "name": "carRentalFuelCharges", + "baseName": "carRental.fuelCharges", + "type": "string" + }, + { + "name": "carRentalInsuranceCharges", + "baseName": "carRental.insuranceCharges", + "type": "string" + }, + { + "name": "carRentalLocationCity", + "baseName": "carRental.locationCity", + "type": "string" + }, + { + "name": "carRentalLocationCountry", + "baseName": "carRental.locationCountry", + "type": "string" + }, + { + "name": "carRentalLocationStateProvince", + "baseName": "carRental.locationStateProvince", + "type": "string" + }, + { + "name": "carRentalNoShowIndicator", + "baseName": "carRental.noShowIndicator", + "type": "string" + }, + { + "name": "carRentalOneWayDropOffCharges", + "baseName": "carRental.oneWayDropOffCharges", + "type": "string" + }, + { + "name": "carRentalRate", + "baseName": "carRental.rate", + "type": "string" + }, + { + "name": "carRentalRateIndicator", + "baseName": "carRental.rateIndicator", + "type": "string" + }, + { + "name": "carRentalRentalAgreementNumber", + "baseName": "carRental.rentalAgreementNumber", + "type": "string" + }, + { + "name": "carRentalRentalClassId", + "baseName": "carRental.rentalClassId", + "type": "string" + }, + { + "name": "carRentalRenterName", + "baseName": "carRental.renterName", + "type": "string" + }, + { + "name": "carRentalReturnCity", + "baseName": "carRental.returnCity", + "type": "string" + }, + { + "name": "carRentalReturnCountry", + "baseName": "carRental.returnCountry", + "type": "string" + }, + { + "name": "carRentalReturnDate", + "baseName": "carRental.returnDate", + "type": "string" + }, + { + "name": "carRentalReturnLocationId", + "baseName": "carRental.returnLocationId", + "type": "string" + }, + { + "name": "carRentalReturnStateProvince", + "baseName": "carRental.returnStateProvince", + "type": "string" + }, + { + "name": "carRentalTaxExemptIndicator", + "baseName": "carRental.taxExemptIndicator", + "type": "string" + }, + { + "name": "travelEntertainmentAuthDataDuration", + "baseName": "travelEntertainmentAuthData.duration", + "type": "string" + }, + { + "name": "travelEntertainmentAuthDataMarket", + "baseName": "travelEntertainmentAuthData.market", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AdditionalDataCarRental.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/additionalDataCommon.ts b/src/typings/checkout/additionalDataCommon.ts new file mode 100644 index 0000000..247bcf9 --- /dev/null +++ b/src/typings/checkout/additionalDataCommon.ts @@ -0,0 +1,155 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class AdditionalDataCommon { + /** + * Triggers test scenarios that allow to replicate certain communication errors. Allowed values: * **NO_CONNECTION_AVAILABLE** – There wasn\'t a connection available to service the outgoing communication. This is a transient, retriable error since no messaging could be initiated to an issuing system (or third-party acquiring system). Therefore, the header Transient-Error: true is returned in the response. A subsequent request using the same idempotency key will be processed as if it was the first request. * **IOEXCEPTION_RECEIVED** – Something went wrong during transmission of the message or receiving the response. This is a classified as non-transient because the message could have been received by the issuing party and been acted upon. No transient error header is returned. If using idempotency, the (error) response is stored as the final result for the idempotency key. Subsequent messages with the same idempotency key not be processed beyond returning the stored response. + */ + 'requestedTestErrorResponseCode'?: string; + /** + * Flags a card payment request for either pre-authorisation or final authorisation. For more information, refer to [Authorisation types](https://docs.adyen.com/online-payments/adjust-authorisation#authorisation-types). Allowed values: * **PreAuth** – flags the payment request to be handled as a pre-authorisation. * **FinalAuth** – flags the payment request to be handled as a final authorisation. + */ + 'authorisationType'?: string; + /** + * Allows you to determine or override the acquirer account that should be used for the transaction. If you need to process a payment with an acquirer different from a default one, you can set up a corresponding configuration on the Adyen payments platform. Then you can pass a custom routing flag in a payment request\'s additional data to target a specific acquirer. To enable this functionality, contact [Support](https://support.adyen.com/hc/en-us/requests/new). + */ + 'customRoutingFlag'?: string; + /** + * In case of [asynchronous authorisation adjustment](https://docs.adyen.com/online-payments/adjust-authorisation#adjust-authorisation), this field denotes why the additional payment is made. Possible values: * **NoShow**: An incremental charge is carried out because of a no-show for a guaranteed reservation. * **DelayedCharge**: An incremental charge is carried out to process an additional payment after the original services have been rendered and the respective payment has been processed. + */ + 'industryUsage'?: AdditionalDataCommon.IndustryUsageEnum; + /** + * Allows you to link the transaction to the original or previous one in a subscription/card-on-file chain. This field is required for token-based transactions where Adyen does not tokenize the card. Transaction identifier from card schemes, for example, Mastercard Trace ID or the Visa Transaction ID. Submit the original transaction ID of the contract in your payment request if you are not tokenizing card details with Adyen and are making a merchant-initiated transaction (MIT) for subsequent charges. Make sure you are sending `shopperInteraction` **ContAuth** and `recurringProcessingModel` **Subscription** or **UnscheduledCardOnFile** to ensure that the transaction is classified as MIT. + */ + 'networkTxReference'?: string; + /** + * Boolean indicator that can be optionally used for performing debit transactions on combo cards (for example, combo cards in Brazil). This is not mandatory but we recommend that you set this to true if you want to use the `selectedBrand` value to specify how to process the transaction. + */ + 'overwriteBrand'?: string; + /** + * This field is required if the transaction is performed by a registered payment facilitator. This field must contain the city of the actual merchant\'s address. * Format: alpha-numeric. * Maximum length: 13 characters. + */ + 'subMerchantCity'?: string; + /** + * This field is required if the transaction is performed by a registered payment facilitator. This field must contain the three-letter country code of the actual merchant\'s address. * Format: alpha-numeric. * Fixed length: 3 characters. + */ + 'subMerchantCountry'?: string; + /** + * This field contains an identifier of the actual merchant when a transaction is submitted via a payment facilitator. The payment facilitator must send in this unique ID. A unique identifier per submerchant that is required if the transaction is performed by a registered payment facilitator. * Format: alpha-numeric. * Fixed length: 15 characters. + */ + 'subMerchantID'?: string; + /** + * This field is required if the transaction is performed by a registered payment facilitator. This field must contain the name of the actual merchant. * Format: alpha-numeric. * Maximum length: 22 characters. + */ + 'subMerchantName'?: string; + /** + * This field is required if the transaction is performed by a registered payment facilitator. This field must contain the postal code of the actual merchant\'s address. * Format: alpha-numeric. * Maximum length: 10 characters. + */ + 'subMerchantPostalCode'?: string; + /** + * This field is required if the transaction is performed by a registered payment facilitator, and if applicable to the country. This field must contain the state code of the actual merchant\'s address. * Format: alpha-numeric. * Maximum length: 3 characters. + */ + 'subMerchantState'?: string; + /** + * This field is required if the transaction is performed by a registered payment facilitator. This field must contain the street of the actual merchant\'s address. * Format: alpha-numeric. * Maximum length: 60 characters. + */ + 'subMerchantStreet'?: string; + /** + * This field is required if the transaction is performed by a registered payment facilitator. This field must contain the tax ID of the actual merchant. * Format: alpha-numeric. * Fixed length: 11 or 14 characters. + */ + 'subMerchantTaxId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "requestedTestErrorResponseCode", + "baseName": "RequestedTestErrorResponseCode", + "type": "string" + }, + { + "name": "authorisationType", + "baseName": "authorisationType", + "type": "string" + }, + { + "name": "customRoutingFlag", + "baseName": "customRoutingFlag", + "type": "string" + }, + { + "name": "industryUsage", + "baseName": "industryUsage", + "type": "AdditionalDataCommon.IndustryUsageEnum" + }, + { + "name": "networkTxReference", + "baseName": "networkTxReference", + "type": "string" + }, + { + "name": "overwriteBrand", + "baseName": "overwriteBrand", + "type": "string" + }, + { + "name": "subMerchantCity", + "baseName": "subMerchantCity", + "type": "string" + }, + { + "name": "subMerchantCountry", + "baseName": "subMerchantCountry", + "type": "string" + }, + { + "name": "subMerchantID", + "baseName": "subMerchantID", + "type": "string" + }, + { + "name": "subMerchantName", + "baseName": "subMerchantName", + "type": "string" + }, + { + "name": "subMerchantPostalCode", + "baseName": "subMerchantPostalCode", + "type": "string" + }, + { + "name": "subMerchantState", + "baseName": "subMerchantState", + "type": "string" + }, + { + "name": "subMerchantStreet", + "baseName": "subMerchantStreet", + "type": "string" + }, + { + "name": "subMerchantTaxId", + "baseName": "subMerchantTaxId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AdditionalDataCommon.attributeTypeMap; + } +} + +export namespace AdditionalDataCommon { + export enum IndustryUsageEnum { + NoShow = 'NoShow', + DelayedCharge = 'DelayedCharge' + } +} diff --git a/src/typings/checkout/additionalDataLevel23.ts b/src/typings/checkout/additionalDataLevel23.ts new file mode 100644 index 0000000..4c8f08b --- /dev/null +++ b/src/typings/checkout/additionalDataLevel23.ts @@ -0,0 +1,176 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class AdditionalDataLevel23 { + /** + * Customer code, if supplied by a customer. Encoding: ASCII. Max length: 25 characters. > Required for Level 2 and Level 3 data. + */ + 'enhancedSchemeDataCustomerReference'?: string; + /** + * Destination country code. Encoding: ASCII. Max length: 3 characters. + */ + 'enhancedSchemeDataDestinationCountryCode'?: string; + /** + * The postal code of a destination address. Encoding: ASCII. Max length: 10 characters. > Required for American Express. + */ + 'enhancedSchemeDataDestinationPostalCode'?: string; + /** + * Destination state or province code. Encoding: ASCII.Max length: 3 characters. + */ + 'enhancedSchemeDataDestinationStateProvinceCode'?: string; + /** + * Duty amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + */ + 'enhancedSchemeDataDutyAmount'?: string; + /** + * Shipping amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + */ + 'enhancedSchemeDataFreightAmount'?: string; + /** + * Item commodity code. Encoding: ASCII. Max length: 12 characters. + */ + 'enhancedSchemeDataItemDetailLineItemNrCommodityCode'?: string; + /** + * Item description. Encoding: ASCII. Max length: 26 characters. + */ + 'enhancedSchemeDataItemDetailLineItemNrDescription'?: string; + /** + * Discount amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + */ + 'enhancedSchemeDataItemDetailLineItemNrDiscountAmount'?: string; + /** + * Product code. Encoding: ASCII. Max length: 12 characters. + */ + 'enhancedSchemeDataItemDetailLineItemNrProductCode'?: string; + /** + * Quantity, specified as an integer value. Value must be greater than 0. Max length: 12 characters. + */ + 'enhancedSchemeDataItemDetailLineItemNrQuantity'?: string; + /** + * Total amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + */ + 'enhancedSchemeDataItemDetailLineItemNrTotalAmount'?: string; + /** + * Item unit of measurement. Encoding: ASCII. Max length: 3 characters. + */ + 'enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure'?: string; + /** + * Unit price, specified in [minor units](https://docs.adyen.com/development-resources/currency-codes). Max length: 12 characters. + */ + 'enhancedSchemeDataItemDetailLineItemNrUnitPrice'?: string; + /** + * Order date. * Format: `ddMMyy` Encoding: ASCII. Max length: 6 characters. + */ + 'enhancedSchemeDataOrderDate'?: string; + /** + * The postal code of a \"ship-from\" address. Encoding: ASCII. Max length: 10 characters. + */ + 'enhancedSchemeDataShipFromPostalCode'?: string; + /** + * Total tax amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. > Required for Level 2 and Level 3 data. + */ + 'enhancedSchemeDataTotalTaxAmount'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "enhancedSchemeDataCustomerReference", + "baseName": "enhancedSchemeData.customerReference", + "type": "string" + }, + { + "name": "enhancedSchemeDataDestinationCountryCode", + "baseName": "enhancedSchemeData.destinationCountryCode", + "type": "string" + }, + { + "name": "enhancedSchemeDataDestinationPostalCode", + "baseName": "enhancedSchemeData.destinationPostalCode", + "type": "string" + }, + { + "name": "enhancedSchemeDataDestinationStateProvinceCode", + "baseName": "enhancedSchemeData.destinationStateProvinceCode", + "type": "string" + }, + { + "name": "enhancedSchemeDataDutyAmount", + "baseName": "enhancedSchemeData.dutyAmount", + "type": "string" + }, + { + "name": "enhancedSchemeDataFreightAmount", + "baseName": "enhancedSchemeData.freightAmount", + "type": "string" + }, + { + "name": "enhancedSchemeDataItemDetailLineItemNrCommodityCode", + "baseName": "enhancedSchemeData.itemDetailLine[itemNr].commodityCode", + "type": "string" + }, + { + "name": "enhancedSchemeDataItemDetailLineItemNrDescription", + "baseName": "enhancedSchemeData.itemDetailLine[itemNr].description", + "type": "string" + }, + { + "name": "enhancedSchemeDataItemDetailLineItemNrDiscountAmount", + "baseName": "enhancedSchemeData.itemDetailLine[itemNr].discountAmount", + "type": "string" + }, + { + "name": "enhancedSchemeDataItemDetailLineItemNrProductCode", + "baseName": "enhancedSchemeData.itemDetailLine[itemNr].productCode", + "type": "string" + }, + { + "name": "enhancedSchemeDataItemDetailLineItemNrQuantity", + "baseName": "enhancedSchemeData.itemDetailLine[itemNr].quantity", + "type": "string" + }, + { + "name": "enhancedSchemeDataItemDetailLineItemNrTotalAmount", + "baseName": "enhancedSchemeData.itemDetailLine[itemNr].totalAmount", + "type": "string" + }, + { + "name": "enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure", + "baseName": "enhancedSchemeData.itemDetailLine[itemNr].unitOfMeasure", + "type": "string" + }, + { + "name": "enhancedSchemeDataItemDetailLineItemNrUnitPrice", + "baseName": "enhancedSchemeData.itemDetailLine[itemNr].unitPrice", + "type": "string" + }, + { + "name": "enhancedSchemeDataOrderDate", + "baseName": "enhancedSchemeData.orderDate", + "type": "string" + }, + { + "name": "enhancedSchemeDataShipFromPostalCode", + "baseName": "enhancedSchemeData.shipFromPostalCode", + "type": "string" + }, + { + "name": "enhancedSchemeDataTotalTaxAmount", + "baseName": "enhancedSchemeData.totalTaxAmount", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AdditionalDataLevel23.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/additionalDataLodging.ts b/src/typings/checkout/additionalDataLodging.ts new file mode 100644 index 0000000..a76b22f --- /dev/null +++ b/src/typings/checkout/additionalDataLodging.ts @@ -0,0 +1,176 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class AdditionalDataLodging { + /** + * The arrival date. * Date format: `yyyyMMdd` + */ + 'lodgingCheckInDate'?: string; + /** + * The departure date. * Date format: `yyyyMMdd` + */ + 'lodgingCheckOutDate'?: string; + /** + * The toll free phone number for the hotel/lodgings. * Format: Alphanumeric * maxLength: 17 + */ + 'lodgingCustomerServiceTollFreeNumber'?: string; + /** + * Identifies that the facility complies with the Hotel and Motel Fire Safety Act of 1990. Values can be: \'Y\' or \'N\'. * Format: Alphabetic * maxLength: 1 + */ + 'lodgingFireSafetyActIndicator'?: string; + /** + * The folio cash advances. * Format: Numeric * maxLength: 12 + */ + 'lodgingFolioCashAdvances'?: string; + /** + * Card acceptor’s internal invoice or billing ID reference number. * Format: Alphanumeric * maxLength: 25 + */ + 'lodgingFolioNumber'?: string; + /** + * Any charges for food and beverages associated with the booking. * Format: Numeric * maxLength: 12 + */ + 'lodgingFoodBeverageCharges'?: string; + /** + * Indicates if the customer was a \"no-show\" (neither keeps nor cancels their booking). Value should be Y or N. * Format: Numeric * maxLength: 1 + */ + 'lodgingNoShowIndicator'?: string; + /** + * Prepaid expenses for the booking. * Format: Numeric * maxLength: 12 + */ + 'lodgingPrepaidExpenses'?: string; + /** + * Identifies specific lodging property location by its local phone number. * Format: Alphanumeric * maxLength: 17 + */ + 'lodgingPropertyPhoneNumber'?: string; + /** + * Total number of nights the room will be rented. * Format: Numeric * maxLength: 4 + */ + 'lodgingRoom1NumberOfNights'?: string; + /** + * The rate of the room. * Format: Numeric * maxLength: 12 + */ + 'lodgingRoom1Rate'?: string; + /** + * The total amount of tax to be paid. * Format: Numeric * maxLength: 12 + */ + 'lodgingRoom1Tax'?: string; + /** + * Total room tax amount. * Format: Numeric * maxLength: 12 + */ + 'lodgingTotalRoomTax'?: string; + /** + * Total tax amount. * Format: Numeric * maxLength: 12 + */ + 'lodgingTotalTax'?: string; + /** + * Number of nights. This should be included in the auth message. * Format: Numeric * maxLength: 2 + */ + 'travelEntertainmentAuthDataDuration'?: string; + /** + * Indicates what market-specific dataset will be submitted or is being submitted. Value should be \"H\" for Hotel. This should be included in the auth message. * Format: Alphanumeric * maxLength: 1 + */ + 'travelEntertainmentAuthDataMarket'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "lodgingCheckInDate", + "baseName": "lodging.checkInDate", + "type": "string" + }, + { + "name": "lodgingCheckOutDate", + "baseName": "lodging.checkOutDate", + "type": "string" + }, + { + "name": "lodgingCustomerServiceTollFreeNumber", + "baseName": "lodging.customerServiceTollFreeNumber", + "type": "string" + }, + { + "name": "lodgingFireSafetyActIndicator", + "baseName": "lodging.fireSafetyActIndicator", + "type": "string" + }, + { + "name": "lodgingFolioCashAdvances", + "baseName": "lodging.folioCashAdvances", + "type": "string" + }, + { + "name": "lodgingFolioNumber", + "baseName": "lodging.folioNumber", + "type": "string" + }, + { + "name": "lodgingFoodBeverageCharges", + "baseName": "lodging.foodBeverageCharges", + "type": "string" + }, + { + "name": "lodgingNoShowIndicator", + "baseName": "lodging.noShowIndicator", + "type": "string" + }, + { + "name": "lodgingPrepaidExpenses", + "baseName": "lodging.prepaidExpenses", + "type": "string" + }, + { + "name": "lodgingPropertyPhoneNumber", + "baseName": "lodging.propertyPhoneNumber", + "type": "string" + }, + { + "name": "lodgingRoom1NumberOfNights", + "baseName": "lodging.room1.numberOfNights", + "type": "string" + }, + { + "name": "lodgingRoom1Rate", + "baseName": "lodging.room1.rate", + "type": "string" + }, + { + "name": "lodgingRoom1Tax", + "baseName": "lodging.room1.tax", + "type": "string" + }, + { + "name": "lodgingTotalRoomTax", + "baseName": "lodging.totalRoomTax", + "type": "string" + }, + { + "name": "lodgingTotalTax", + "baseName": "lodging.totalTax", + "type": "string" + }, + { + "name": "travelEntertainmentAuthDataDuration", + "baseName": "travelEntertainmentAuthData.duration", + "type": "string" + }, + { + "name": "travelEntertainmentAuthDataMarket", + "baseName": "travelEntertainmentAuthData.market", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AdditionalDataLodging.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/additionalDataOpenInvoice.ts b/src/typings/checkout/additionalDataOpenInvoice.ts new file mode 100644 index 0000000..e38dacf --- /dev/null +++ b/src/typings/checkout/additionalDataOpenInvoice.ts @@ -0,0 +1,176 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class AdditionalDataOpenInvoice { + /** + * Holds different merchant data points like product, purchase, customer, and so on. It takes data in a Base64 encoded string. The `merchantData` parameter needs to be added to the `openinvoicedata` signature at the end. Since the field is optional, if it\'s not included it does not impact computing the merchant signature. Applies only to Klarna. You can contact Klarna for the format and structure of the string. + */ + 'openinvoicedataMerchantData'?: string; + /** + * The number of invoice lines included in `openinvoicedata`. There needs to be at least one line, so `numberOfLines` needs to be at least 1. + */ + 'openinvoicedataNumberOfLines'?: string; + /** + * The three-character ISO currency code. + */ + 'openinvoicedataLineItemNrCurrencyCode'?: string; + /** + * A text description of the product the invoice line refers to. + */ + 'openinvoicedataLineItemNrDescription'?: string; + /** + * The price for one item in the invoice line, represented in minor units. The due amount for the item, VAT excluded. + */ + 'openinvoicedataLineItemNrItemAmount'?: string; + /** + * A unique id for this item. Required for RatePay if the description of each item is not unique. + */ + 'openinvoicedataLineItemNrItemId'?: string; + /** + * The VAT due for one item in the invoice line, represented in minor units. + */ + 'openinvoicedataLineItemNrItemVatAmount'?: string; + /** + * The VAT percentage for one item in the invoice line, represented in minor units. For example, 19% VAT is specified as 1900. + */ + 'openinvoicedataLineItemNrItemVatPercentage'?: string; + /** + * The number of units purchased of a specific product. + */ + 'openinvoicedataLineItemNrNumberOfItems'?: string; + /** + * Name of the shipping company handling the the return shipment. + */ + 'openinvoicedataLineItemNrReturnShippingCompany'?: string; + /** + * The tracking number for the return of the shipment. + */ + 'openinvoicedataLineItemNrReturnTrackingNumber'?: string; + /** + * URI where the customer can track the return of their shipment. + */ + 'openinvoicedataLineItemNrReturnTrackingUri'?: string; + /** + * Name of the shipping company handling the delivery. + */ + 'openinvoicedataLineItemNrShippingCompany'?: string; + /** + * Shipping method. + */ + 'openinvoicedataLineItemNrShippingMethod'?: string; + /** + * The tracking number for the shipment. + */ + 'openinvoicedataLineItemNrTrackingNumber'?: string; + /** + * URI where the customer can track their shipment. + */ + 'openinvoicedataLineItemNrTrackingUri'?: string; + /** + * Required for AfterPay. The country-specific VAT category a product falls under. Allowed values: * High * Low * None. + */ + 'openinvoicedataLineItemNrVatCategory'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "openinvoicedataMerchantData", + "baseName": "openinvoicedata.merchantData", + "type": "string" + }, + { + "name": "openinvoicedataNumberOfLines", + "baseName": "openinvoicedata.numberOfLines", + "type": "string" + }, + { + "name": "openinvoicedataLineItemNrCurrencyCode", + "baseName": "openinvoicedataLine[itemNr].currencyCode", + "type": "string" + }, + { + "name": "openinvoicedataLineItemNrDescription", + "baseName": "openinvoicedataLine[itemNr].description", + "type": "string" + }, + { + "name": "openinvoicedataLineItemNrItemAmount", + "baseName": "openinvoicedataLine[itemNr].itemAmount", + "type": "string" + }, + { + "name": "openinvoicedataLineItemNrItemId", + "baseName": "openinvoicedataLine[itemNr].itemId", + "type": "string" + }, + { + "name": "openinvoicedataLineItemNrItemVatAmount", + "baseName": "openinvoicedataLine[itemNr].itemVatAmount", + "type": "string" + }, + { + "name": "openinvoicedataLineItemNrItemVatPercentage", + "baseName": "openinvoicedataLine[itemNr].itemVatPercentage", + "type": "string" + }, + { + "name": "openinvoicedataLineItemNrNumberOfItems", + "baseName": "openinvoicedataLine[itemNr].numberOfItems", + "type": "string" + }, + { + "name": "openinvoicedataLineItemNrReturnShippingCompany", + "baseName": "openinvoicedataLine[itemNr].returnShippingCompany", + "type": "string" + }, + { + "name": "openinvoicedataLineItemNrReturnTrackingNumber", + "baseName": "openinvoicedataLine[itemNr].returnTrackingNumber", + "type": "string" + }, + { + "name": "openinvoicedataLineItemNrReturnTrackingUri", + "baseName": "openinvoicedataLine[itemNr].returnTrackingUri", + "type": "string" + }, + { + "name": "openinvoicedataLineItemNrShippingCompany", + "baseName": "openinvoicedataLine[itemNr].shippingCompany", + "type": "string" + }, + { + "name": "openinvoicedataLineItemNrShippingMethod", + "baseName": "openinvoicedataLine[itemNr].shippingMethod", + "type": "string" + }, + { + "name": "openinvoicedataLineItemNrTrackingNumber", + "baseName": "openinvoicedataLine[itemNr].trackingNumber", + "type": "string" + }, + { + "name": "openinvoicedataLineItemNrTrackingUri", + "baseName": "openinvoicedataLine[itemNr].trackingUri", + "type": "string" + }, + { + "name": "openinvoicedataLineItemNrVatCategory", + "baseName": "openinvoicedataLine[itemNr].vatCategory", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AdditionalDataOpenInvoice.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/additionalDataOpi.ts b/src/typings/checkout/additionalDataOpi.ts new file mode 100644 index 0000000..54de058 --- /dev/null +++ b/src/typings/checkout/additionalDataOpi.ts @@ -0,0 +1,32 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class AdditionalDataOpi { + /** + * Optional boolean indicator. Set to **true** if you want an ecommerce transaction to return an `opi.transToken` as additional data in the response. You can store this Oracle Payment Interface token in your Oracle Opera database. For more information and required settings, see [Oracle Opera](https://docs.adyen.com/plugins/oracle-opera#opi-token-ecommerce). + */ + 'opiIncludeTransToken'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "opiIncludeTransToken", + "baseName": "opi.includeTransToken", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AdditionalDataOpi.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/additionalDataRatepay.ts b/src/typings/checkout/additionalDataRatepay.ts new file mode 100644 index 0000000..4985882 --- /dev/null +++ b/src/typings/checkout/additionalDataRatepay.ts @@ -0,0 +1,95 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class AdditionalDataRatepay { + /** + * Amount the customer has to pay each month. + */ + 'ratepayInstallmentAmount'?: string; + /** + * Interest rate of this installment. + */ + 'ratepayInterestRate'?: string; + /** + * Amount of the last installment. + */ + 'ratepayLastInstallmentAmount'?: string; + /** + * Calendar day of the first payment. + */ + 'ratepayPaymentFirstday'?: string; + /** + * Date the merchant delivered the goods to the customer. + */ + 'ratepaydataDeliveryDate'?: string; + /** + * Date by which the customer must settle the payment. + */ + 'ratepaydataDueDate'?: string; + /** + * Invoice date, defined by the merchant. If not included, the invoice date is set to the delivery date. + */ + 'ratepaydataInvoiceDate'?: string; + /** + * Identification name or number for the invoice, defined by the merchant. + */ + 'ratepaydataInvoiceId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "ratepayInstallmentAmount", + "baseName": "ratepay.installmentAmount", + "type": "string" + }, + { + "name": "ratepayInterestRate", + "baseName": "ratepay.interestRate", + "type": "string" + }, + { + "name": "ratepayLastInstallmentAmount", + "baseName": "ratepay.lastInstallmentAmount", + "type": "string" + }, + { + "name": "ratepayPaymentFirstday", + "baseName": "ratepay.paymentFirstday", + "type": "string" + }, + { + "name": "ratepaydataDeliveryDate", + "baseName": "ratepaydata.deliveryDate", + "type": "string" + }, + { + "name": "ratepaydataDueDate", + "baseName": "ratepaydata.dueDate", + "type": "string" + }, + { + "name": "ratepaydataInvoiceDate", + "baseName": "ratepaydata.invoiceDate", + "type": "string" + }, + { + "name": "ratepaydataInvoiceId", + "baseName": "ratepaydata.invoiceId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AdditionalDataRatepay.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/additionalDataRetry.ts b/src/typings/checkout/additionalDataRetry.ts new file mode 100644 index 0000000..7ab8ca5 --- /dev/null +++ b/src/typings/checkout/additionalDataRetry.ts @@ -0,0 +1,50 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class AdditionalDataRetry { + /** + * The number of times the transaction (not order) has been retried between different payment service providers. For instance, the `chainAttemptNumber` set to 2 means that this transaction has been recently tried on another provider before being sent to Adyen. > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together. + */ + 'retryChainAttemptNumber'?: string; + /** + * The index of the attempt to bill a particular order, which is identified by the `merchantOrderReference` field. For example, if a recurring transaction fails and is retried one day later, then the order number for these attempts would be 1 and 2, respectively. > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together. + */ + 'retryOrderAttemptNumber'?: string; + /** + * The Boolean value indicating whether Adyen should skip or retry this transaction, if possible. > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together. + */ + 'retrySkipRetry'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "retryChainAttemptNumber", + "baseName": "retry.chainAttemptNumber", + "type": "string" + }, + { + "name": "retryOrderAttemptNumber", + "baseName": "retry.orderAttemptNumber", + "type": "string" + }, + { + "name": "retrySkipRetry", + "baseName": "retry.skipRetry", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AdditionalDataRetry.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/additionalDataRisk.ts b/src/typings/checkout/additionalDataRisk.ts new file mode 100644 index 0000000..97ca2f9 --- /dev/null +++ b/src/typings/checkout/additionalDataRisk.ts @@ -0,0 +1,203 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class AdditionalDataRisk { + /** + * The data for your custom risk field. For more information, refer to [Create custom risk fields](https://docs.adyen.com/risk-management/configure-custom-risk-rules#step-1-create-custom-risk-fields). + */ + 'riskdataCustomFieldName'?: string; + /** + * The price of item in the basket, represented in [minor units](https://docs.adyen.com/development-resources/currency-codes). + */ + 'riskdataBasketItemItemNrAmountPerItem'?: string; + /** + * Brand of the item. + */ + 'riskdataBasketItemItemNrBrand'?: string; + /** + * Category of the item. + */ + 'riskdataBasketItemItemNrCategory'?: string; + /** + * Color of the item. + */ + 'riskdataBasketItemItemNrColor'?: string; + /** + * The three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). + */ + 'riskdataBasketItemItemNrCurrency'?: string; + /** + * ID of the item. + */ + 'riskdataBasketItemItemNrItemID'?: string; + /** + * Manufacturer of the item. + */ + 'riskdataBasketItemItemNrManufacturer'?: string; + /** + * A text description of the product the invoice line refers to. + */ + 'riskdataBasketItemItemNrProductTitle'?: string; + /** + * Quantity of the item purchased. + */ + 'riskdataBasketItemItemNrQuantity'?: string; + /** + * Email associated with the given product in the basket (usually in electronic gift cards). + */ + 'riskdataBasketItemItemNrReceiverEmail'?: string; + /** + * Size of the item. + */ + 'riskdataBasketItemItemNrSize'?: string; + /** + * [Stock keeping unit](https://en.wikipedia.org/wiki/Stock_keeping_unit). + */ + 'riskdataBasketItemItemNrSku'?: string; + /** + * [Universal Product Code](https://en.wikipedia.org/wiki/Universal_Product_Code). + */ + 'riskdataBasketItemItemNrUpc'?: string; + /** + * Code of the promotion. + */ + 'riskdataPromotionsPromotionItemNrPromotionCode'?: string; + /** + * The discount amount of the promotion, represented in [minor units](https://docs.adyen.com/development-resources/currency-codes). + */ + 'riskdataPromotionsPromotionItemNrPromotionDiscountAmount'?: string; + /** + * The three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). + */ + 'riskdataPromotionsPromotionItemNrPromotionDiscountCurrency'?: string; + /** + * Promotion\'s percentage discount. It is represented in percentage value and there is no need to include the \'%\' sign. e.g. for a promotion discount of 30%, the value of the field should be 30. + */ + 'riskdataPromotionsPromotionItemNrPromotionDiscountPercentage'?: string; + /** + * Name of the promotion. + */ + 'riskdataPromotionsPromotionItemNrPromotionName'?: string; + /** + * Reference number of the risk profile that you want to apply to the payment. If not provided or left blank, the merchant-level account\'s default risk profile will be applied to the payment. For more information, see [dynamically assign a risk profile to a payment](https://docs.adyen.com/risk-management/create-and-use-risk-profiles#dynamically-assign-a-risk-profile-to-a-payment). + */ + 'riskdataRiskProfileReference'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "riskdataCustomFieldName", + "baseName": "riskdata.[customFieldName]", + "type": "string" + }, + { + "name": "riskdataBasketItemItemNrAmountPerItem", + "baseName": "riskdata.basket.item[itemNr].amountPerItem", + "type": "string" + }, + { + "name": "riskdataBasketItemItemNrBrand", + "baseName": "riskdata.basket.item[itemNr].brand", + "type": "string" + }, + { + "name": "riskdataBasketItemItemNrCategory", + "baseName": "riskdata.basket.item[itemNr].category", + "type": "string" + }, + { + "name": "riskdataBasketItemItemNrColor", + "baseName": "riskdata.basket.item[itemNr].color", + "type": "string" + }, + { + "name": "riskdataBasketItemItemNrCurrency", + "baseName": "riskdata.basket.item[itemNr].currency", + "type": "string" + }, + { + "name": "riskdataBasketItemItemNrItemID", + "baseName": "riskdata.basket.item[itemNr].itemID", + "type": "string" + }, + { + "name": "riskdataBasketItemItemNrManufacturer", + "baseName": "riskdata.basket.item[itemNr].manufacturer", + "type": "string" + }, + { + "name": "riskdataBasketItemItemNrProductTitle", + "baseName": "riskdata.basket.item[itemNr].productTitle", + "type": "string" + }, + { + "name": "riskdataBasketItemItemNrQuantity", + "baseName": "riskdata.basket.item[itemNr].quantity", + "type": "string" + }, + { + "name": "riskdataBasketItemItemNrReceiverEmail", + "baseName": "riskdata.basket.item[itemNr].receiverEmail", + "type": "string" + }, + { + "name": "riskdataBasketItemItemNrSize", + "baseName": "riskdata.basket.item[itemNr].size", + "type": "string" + }, + { + "name": "riskdataBasketItemItemNrSku", + "baseName": "riskdata.basket.item[itemNr].sku", + "type": "string" + }, + { + "name": "riskdataBasketItemItemNrUpc", + "baseName": "riskdata.basket.item[itemNr].upc", + "type": "string" + }, + { + "name": "riskdataPromotionsPromotionItemNrPromotionCode", + "baseName": "riskdata.promotions.promotion[itemNr].promotionCode", + "type": "string" + }, + { + "name": "riskdataPromotionsPromotionItemNrPromotionDiscountAmount", + "baseName": "riskdata.promotions.promotion[itemNr].promotionDiscountAmount", + "type": "string" + }, + { + "name": "riskdataPromotionsPromotionItemNrPromotionDiscountCurrency", + "baseName": "riskdata.promotions.promotion[itemNr].promotionDiscountCurrency", + "type": "string" + }, + { + "name": "riskdataPromotionsPromotionItemNrPromotionDiscountPercentage", + "baseName": "riskdata.promotions.promotion[itemNr].promotionDiscountPercentage", + "type": "string" + }, + { + "name": "riskdataPromotionsPromotionItemNrPromotionName", + "baseName": "riskdata.promotions.promotion[itemNr].promotionName", + "type": "string" + }, + { + "name": "riskdataRiskProfileReference", + "baseName": "riskdata.riskProfileReference", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AdditionalDataRisk.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/additionalDataRiskStandalone.ts b/src/typings/checkout/additionalDataRiskStandalone.ts new file mode 100644 index 0000000..24bf809 --- /dev/null +++ b/src/typings/checkout/additionalDataRiskStandalone.ts @@ -0,0 +1,158 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class AdditionalDataRiskStandalone { + /** + * Shopper\'s country of residence in the form of ISO standard 3166 2-character country codes. + */ + 'payPalCountryCode'?: string; + /** + * Shopper\'s email. + */ + 'payPalEmailId'?: string; + /** + * Shopper\'s first name. + */ + 'payPalFirstName'?: string; + /** + * Shopper\'s last name. + */ + 'payPalLastName'?: string; + /** + * Unique PayPal Customer Account identification number. Character length and limitations: 13 single-byte alphanumeric characters. + */ + 'payPalPayerId'?: string; + /** + * Shopper\'s phone number. + */ + 'payPalPhone'?: string; + /** + * Allowed values: * **Eligible** — Merchant is protected by PayPal\'s Seller Protection Policy for Unauthorized Payments and Item Not Received. * **PartiallyEligible** — Merchant is protected by PayPal\'s Seller Protection Policy for Item Not Received. * **Ineligible** — Merchant is not protected under the Seller Protection Policy. + */ + 'payPalProtectionEligibility'?: string; + /** + * Unique transaction ID of the payment. + */ + 'payPalTransactionId'?: string; + /** + * Raw AVS result received from the acquirer, where available. Example: D + */ + 'avsResultRaw'?: string; + /** + * The Bank Identification Number of a credit card, which is the first six digits of a card number. Required for [tokenized card request](https://docs.adyen.com/risk-management/standalone-risk#tokenised-pan-request). + */ + 'bin'?: string; + /** + * Raw CVC result received from the acquirer, where available. Example: 1 + */ + 'cvcResultRaw'?: string; + /** + * Unique identifier or token for the shopper\'s card details. + */ + 'riskToken'?: string; + /** + * A Boolean value indicating whether 3DS authentication was completed on this payment. Example: true + */ + 'threeDAuthenticated'?: string; + /** + * A Boolean value indicating whether 3DS was offered for this payment. Example: true + */ + 'threeDOffered'?: string; + /** + * Required for PayPal payments only. The only supported value is: **paypal**. + */ + 'tokenDataType'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "payPalCountryCode", + "baseName": "PayPal.CountryCode", + "type": "string" + }, + { + "name": "payPalEmailId", + "baseName": "PayPal.EmailId", + "type": "string" + }, + { + "name": "payPalFirstName", + "baseName": "PayPal.FirstName", + "type": "string" + }, + { + "name": "payPalLastName", + "baseName": "PayPal.LastName", + "type": "string" + }, + { + "name": "payPalPayerId", + "baseName": "PayPal.PayerId", + "type": "string" + }, + { + "name": "payPalPhone", + "baseName": "PayPal.Phone", + "type": "string" + }, + { + "name": "payPalProtectionEligibility", + "baseName": "PayPal.ProtectionEligibility", + "type": "string" + }, + { + "name": "payPalTransactionId", + "baseName": "PayPal.TransactionId", + "type": "string" + }, + { + "name": "avsResultRaw", + "baseName": "avsResultRaw", + "type": "string" + }, + { + "name": "bin", + "baseName": "bin", + "type": "string" + }, + { + "name": "cvcResultRaw", + "baseName": "cvcResultRaw", + "type": "string" + }, + { + "name": "riskToken", + "baseName": "riskToken", + "type": "string" + }, + { + "name": "threeDAuthenticated", + "baseName": "threeDAuthenticated", + "type": "string" + }, + { + "name": "threeDOffered", + "baseName": "threeDOffered", + "type": "string" + }, + { + "name": "tokenDataType", + "baseName": "tokenDataType", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AdditionalDataRiskStandalone.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/additionalDataSubMerchant.ts b/src/typings/checkout/additionalDataSubMerchant.ts new file mode 100644 index 0000000..b01e8e8 --- /dev/null +++ b/src/typings/checkout/additionalDataSubMerchant.ts @@ -0,0 +1,185 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class AdditionalDataSubMerchant { + /** + * Required for transactions performed by registered payment facilitators. Indicates the number of sub-merchants contained in the request. For example, **3**. + */ + 'subMerchantNumberOfSubSellers'?: string; + /** + * Required for transactions performed by registered payment facilitators. The city of the sub-merchant\'s address. * Format: Alphanumeric * Maximum length: 13 characters + */ + 'subMerchantSubSellerSubSellerNrCity'?: string; + /** + * Required for transactions performed by registered payment facilitators. The three-letter country code of the sub-merchant\'s address. For example, **BRA** for Brazil. * Format: [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) * Fixed length: 3 characters + */ + 'subMerchantSubSellerSubSellerNrCountry'?: string; + /** + * The sub-merchant\'s bank account number with the check digit number and without punctuations or dashes. * Format: Numeric * Maximum length: 12 digits + */ + 'subMerchantSubSellerSubSellerNrCreditSettlementAccount'?: string; + /** + * A two-letter indicator of the type of the sub-merchant\'s bank account. Possible values: - **CC** - Checking account - **CD** - Deposit account - **PG** - Payments account - **PP** - Savings account + */ + 'subMerchantSubSellerSubSellerNrCreditSettlementAccountType'?: string; + /** + * The four-digit branch code of the sub-merchant\'s bank, without the check digit, slashes, or dashes. * Format: Numeric * Fixed length: 4 digits + */ + 'subMerchantSubSellerSubSellerNrCreditSettlementAgency'?: string; + /** + * The identifier of the sub-merchant\'s bank. In Brazil, this is the three-digit bank number format specified by the Central Bank of Brazil (BACEN). * Format: Numeric * Fixed length: 3 digits + */ + 'subMerchantSubSellerSubSellerNrCreditSettlementBank'?: string; + /** + * The sub-merchant\'s bank account number with the check digit number and without punctuations or dashes. * Format: Numeric * Maximum length: 12 digits + */ + 'subMerchantSubSellerSubSellerNrDebitSettlementAccount'?: string; + /** + * A two-letter indicator of the type of the sub-merchant\'s bank account. Possible values: - **CC** - Checking account - **CD** - Deposit account - **PG** - Payments account - **PP** - Savings account + */ + 'subMerchantSubSellerSubSellerNrDebitSettlementAccountType'?: string; + /** + * The four-digit branch code of the sub-merchant\'s bank, without the check digit, slashes, or dashes. * Format: Numeric * Fixed length: 4 digits + */ + 'subMerchantSubSellerSubSellerNrDebitSettlementAgency'?: string; + /** + * The identifier of the sub-merchant\'s bank. In Brazil, this is the three-digit bank number format specified by the Central Bank of Brazil (BACEN). * Format: Numeric * Fixed length: 3 digits + */ + 'subMerchantSubSellerSubSellerNrDebitSettlementBank'?: string; + /** + * Required for transactions performed by registered payment facilitators. A unique identifier that you create for the sub-merchant, used by schemes to identify the sub-merchant. * Format: Alphanumeric * Maximum length: 15 characters + */ + 'subMerchantSubSellerSubSellerNrId'?: string; + /** + * Required for transactions performed by registered payment facilitators. The sub-merchant\'s 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits + */ + 'subMerchantSubSellerSubSellerNrMcc'?: string; + /** + * Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. * Format: Alphanumeric * Maximum length: 22 characters + */ + 'subMerchantSubSellerSubSellerNrName'?: string; + /** + * Required for transactions performed by registered payment facilitators. The postal code of the sub-merchant\'s address, without dashes. * Format: Numeric * Fixed length: 8 digits + */ + 'subMerchantSubSellerSubSellerNrPostalCode'?: string; + /** + * Required for transactions performed by registered payment facilitators. The state code of the sub-merchant\'s address, if applicable to the country. * Format: Alphanumeric * Maximum length: 2 characters + */ + 'subMerchantSubSellerSubSellerNrState'?: string; + /** + * Required for transactions performed by registered payment facilitators. The street name and house number of the sub-merchant\'s address. * Format: Alphanumeric * Maximum length: 60 characters + */ + 'subMerchantSubSellerSubSellerNrStreet'?: string; + /** + * Required for transactions performed by registered payment facilitators. The tax ID of the sub-merchant. * Format: Numeric * Fixed length: 11 digits for the CPF or 14 digits for the CNPJ + */ + 'subMerchantSubSellerSubSellerNrTaxId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "subMerchantNumberOfSubSellers", + "baseName": "subMerchant.numberOfSubSellers", + "type": "string" + }, + { + "name": "subMerchantSubSellerSubSellerNrCity", + "baseName": "subMerchant.subSeller[subSellerNr].city", + "type": "string" + }, + { + "name": "subMerchantSubSellerSubSellerNrCountry", + "baseName": "subMerchant.subSeller[subSellerNr].country", + "type": "string" + }, + { + "name": "subMerchantSubSellerSubSellerNrCreditSettlementAccount", + "baseName": "subMerchant.subSeller[subSellerNr].creditSettlementAccount", + "type": "string" + }, + { + "name": "subMerchantSubSellerSubSellerNrCreditSettlementAccountType", + "baseName": "subMerchant.subSeller[subSellerNr].creditSettlementAccountType", + "type": "string" + }, + { + "name": "subMerchantSubSellerSubSellerNrCreditSettlementAgency", + "baseName": "subMerchant.subSeller[subSellerNr].creditSettlementAgency", + "type": "string" + }, + { + "name": "subMerchantSubSellerSubSellerNrCreditSettlementBank", + "baseName": "subMerchant.subSeller[subSellerNr].creditSettlementBank", + "type": "string" + }, + { + "name": "subMerchantSubSellerSubSellerNrDebitSettlementAccount", + "baseName": "subMerchant.subSeller[subSellerNr].debitSettlementAccount", + "type": "string" + }, + { + "name": "subMerchantSubSellerSubSellerNrDebitSettlementAccountType", + "baseName": "subMerchant.subSeller[subSellerNr].debitSettlementAccountType", + "type": "string" + }, + { + "name": "subMerchantSubSellerSubSellerNrDebitSettlementAgency", + "baseName": "subMerchant.subSeller[subSellerNr].debitSettlementAgency", + "type": "string" + }, + { + "name": "subMerchantSubSellerSubSellerNrDebitSettlementBank", + "baseName": "subMerchant.subSeller[subSellerNr].debitSettlementBank", + "type": "string" + }, + { + "name": "subMerchantSubSellerSubSellerNrId", + "baseName": "subMerchant.subSeller[subSellerNr].id", + "type": "string" + }, + { + "name": "subMerchantSubSellerSubSellerNrMcc", + "baseName": "subMerchant.subSeller[subSellerNr].mcc", + "type": "string" + }, + { + "name": "subMerchantSubSellerSubSellerNrName", + "baseName": "subMerchant.subSeller[subSellerNr].name", + "type": "string" + }, + { + "name": "subMerchantSubSellerSubSellerNrPostalCode", + "baseName": "subMerchant.subSeller[subSellerNr].postalCode", + "type": "string" + }, + { + "name": "subMerchantSubSellerSubSellerNrState", + "baseName": "subMerchant.subSeller[subSellerNr].state", + "type": "string" + }, + { + "name": "subMerchantSubSellerSubSellerNrStreet", + "baseName": "subMerchant.subSeller[subSellerNr].street", + "type": "string" + }, + { + "name": "subMerchantSubSellerSubSellerNrTaxId", + "baseName": "subMerchant.subSeller[subSellerNr].taxId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AdditionalDataSubMerchant.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/additionalDataTemporaryServices.ts b/src/typings/checkout/additionalDataTemporaryServices.ts new file mode 100644 index 0000000..8811636 --- /dev/null +++ b/src/typings/checkout/additionalDataTemporaryServices.ts @@ -0,0 +1,104 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class AdditionalDataTemporaryServices { + /** + * Customer code, if supplied by a customer. * Encoding: ASCII * maxLength: 25 + */ + 'enhancedSchemeDataCustomerReference'?: string; + /** + * Name or ID associated with the individual working in a temporary capacity. * maxLength: 40 + */ + 'enhancedSchemeDataEmployeeName'?: string; + /** + * Description of the job or task of the individual working in a temporary capacity. * maxLength: 40 + */ + 'enhancedSchemeDataJobDescription'?: string; + /** + * Amount paid per regular hours worked, minor units. * maxLength: 7 + */ + 'enhancedSchemeDataRegularHoursRate'?: string; + /** + * Amount of time worked during a normal operation for the task or job. * maxLength: 7 + */ + 'enhancedSchemeDataRegularHoursWorked'?: string; + /** + * Name of the individual requesting temporary services. * maxLength: 40 + */ + 'enhancedSchemeDataRequestName'?: string; + /** + * Date for the beginning of the pay period. * Format: ddMMyy * maxLength: 6 + */ + 'enhancedSchemeDataTempStartDate'?: string; + /** + * Date of the end of the billing cycle. * Format: ddMMyy * maxLength: 6 + */ + 'enhancedSchemeDataTempWeekEnding'?: string; + /** + * Total tax amount, in minor units. For example, 2000 means USD 20.00 * maxLength: 12 + */ + 'enhancedSchemeDataTotalTaxAmount'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "enhancedSchemeDataCustomerReference", + "baseName": "enhancedSchemeData.customerReference", + "type": "string" + }, + { + "name": "enhancedSchemeDataEmployeeName", + "baseName": "enhancedSchemeData.employeeName", + "type": "string" + }, + { + "name": "enhancedSchemeDataJobDescription", + "baseName": "enhancedSchemeData.jobDescription", + "type": "string" + }, + { + "name": "enhancedSchemeDataRegularHoursRate", + "baseName": "enhancedSchemeData.regularHoursRate", + "type": "string" + }, + { + "name": "enhancedSchemeDataRegularHoursWorked", + "baseName": "enhancedSchemeData.regularHoursWorked", + "type": "string" + }, + { + "name": "enhancedSchemeDataRequestName", + "baseName": "enhancedSchemeData.requestName", + "type": "string" + }, + { + "name": "enhancedSchemeDataTempStartDate", + "baseName": "enhancedSchemeData.tempStartDate", + "type": "string" + }, + { + "name": "enhancedSchemeDataTempWeekEnding", + "baseName": "enhancedSchemeData.tempWeekEnding", + "type": "string" + }, + { + "name": "enhancedSchemeDataTotalTaxAmount", + "baseName": "enhancedSchemeData.totalTaxAmount", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AdditionalDataTemporaryServices.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/additionalDataWallets.ts b/src/typings/checkout/additionalDataWallets.ts new file mode 100644 index 0000000..c5d6e65 --- /dev/null +++ b/src/typings/checkout/additionalDataWallets.ts @@ -0,0 +1,77 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class AdditionalDataWallets { + /** + * The Android Pay token retrieved from the SDK. + */ + 'androidpayToken'?: string; + /** + * The Mastercard Masterpass Transaction ID retrieved from the SDK. + */ + 'masterpassTransactionId'?: string; + /** + * The Apple Pay token retrieved from the SDK. + */ + 'paymentToken'?: string; + /** + * The Google Pay token retrieved from the SDK. + */ + 'paywithgoogleToken'?: string; + /** + * The Samsung Pay token retrieved from the SDK. + */ + 'samsungpayToken'?: string; + /** + * The Visa Checkout Call ID retrieved from the SDK. + */ + 'visacheckoutCallId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "androidpayToken", + "baseName": "androidpay.token", + "type": "string" + }, + { + "name": "masterpassTransactionId", + "baseName": "masterpass.transactionId", + "type": "string" + }, + { + "name": "paymentToken", + "baseName": "payment.token", + "type": "string" + }, + { + "name": "paywithgoogleToken", + "baseName": "paywithgoogle.token", + "type": "string" + }, + { + "name": "samsungpayToken", + "baseName": "samsungpay.token", + "type": "string" + }, + { + "name": "visacheckoutCallId", + "baseName": "visacheckout.callId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AdditionalDataWallets.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/address.ts b/src/typings/checkout/address.ts new file mode 100644 index 0000000..66a6cb4 --- /dev/null +++ b/src/typings/checkout/address.ts @@ -0,0 +1,77 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class Address { + /** + * The name of the city. + */ + 'city': string; + /** + * The two-character country code as defined in ISO-3166-1 alpha-2. For example, **US**. > If you don\'t know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. + */ + 'country': string; + /** + * The number or name of the house. + */ + 'houseNumberOrName': string; + /** + * A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. + */ + 'postalCode': string; + /** + * State or province codes as defined in ISO 3166-2. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + */ + 'stateOrProvince'?: string; + /** + * The name of the street. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. + */ + 'street': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "city", + "baseName": "city", + "type": "string" + }, + { + "name": "country", + "baseName": "country", + "type": "string" + }, + { + "name": "houseNumberOrName", + "baseName": "houseNumberOrName", + "type": "string" + }, + { + "name": "postalCode", + "baseName": "postalCode", + "type": "string" + }, + { + "name": "stateOrProvince", + "baseName": "stateOrProvince", + "type": "string" + }, + { + "name": "street", + "baseName": "street", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Address.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/afterpayDetails.ts b/src/typings/checkout/afterpayDetails.ts new file mode 100644 index 0000000..070d1aa --- /dev/null +++ b/src/typings/checkout/afterpayDetails.ts @@ -0,0 +1,84 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class AfterpayDetails { + /** + * The address where to send the invoice. + */ + 'billingAddress'?: string; + /** + * The address where the goods should be delivered. + */ + 'deliveryAddress'?: string; + /** + * Shopper name, date of birth, phone number, and email address. + */ + 'personalDetails'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * **afterpay_default** + */ + 'type': AfterpayDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "billingAddress", + "baseName": "billingAddress", + "type": "string" + }, + { + "name": "deliveryAddress", + "baseName": "deliveryAddress", + "type": "string" + }, + { + "name": "personalDetails", + "baseName": "personalDetails", + "type": "string" + }, + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "AfterpayDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return AfterpayDetails.attributeTypeMap; + } +} + +export namespace AfterpayDetails { + export enum TypeEnum { + AfterpayDefault = 'afterpay_default', + Afterpaytouch = 'afterpaytouch', + AfterpayB2b = 'afterpay_b2b' + } +} diff --git a/src/typings/checkout/amazonPayDetails.ts b/src/typings/checkout/amazonPayDetails.ts new file mode 100644 index 0000000..0e1c3c0 --- /dev/null +++ b/src/typings/checkout/amazonPayDetails.ts @@ -0,0 +1,46 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class AmazonPayDetails { + /** + * This is the `amazonPayToken` that you obtained from the [Get Checkout Session](https://amazon-pay-acquirer-guide.s3-eu-west-1.amazonaws.com/v1/amazon-pay-api-v2/checkout-session.html#get-checkout-session) response. + */ + 'amazonPayToken'?: string; + /** + * **amazonpay** + */ + 'type'?: AmazonPayDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "amazonPayToken", + "baseName": "amazonPayToken", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "AmazonPayDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return AmazonPayDetails.attributeTypeMap; + } +} + +export namespace AmazonPayDetails { + export enum TypeEnum { + Amazonpay = 'amazonpay' + } +} diff --git a/src/typings/checkout/amount.ts b/src/typings/checkout/amount.ts new file mode 100644 index 0000000..037dbfa --- /dev/null +++ b/src/typings/checkout/amount.ts @@ -0,0 +1,41 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class Amount { + /** + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + */ + 'currency': string; + /** + * The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + */ + 'value': number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "currency", + "baseName": "currency", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return Amount.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/androidPayDetails.ts b/src/typings/checkout/androidPayDetails.ts new file mode 100644 index 0000000..ba086c9 --- /dev/null +++ b/src/typings/checkout/androidPayDetails.ts @@ -0,0 +1,37 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class AndroidPayDetails { + /** + * **androidpay** + */ + 'type'?: AndroidPayDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "AndroidPayDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return AndroidPayDetails.attributeTypeMap; + } +} + +export namespace AndroidPayDetails { + export enum TypeEnum { + Androidpay = 'androidpay' + } +} diff --git a/src/typings/checkout/applePayDetails.ts b/src/typings/checkout/applePayDetails.ts new file mode 100644 index 0000000..de56d14 --- /dev/null +++ b/src/typings/checkout/applePayDetails.ts @@ -0,0 +1,76 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class ApplePayDetails { + /** + * The stringified and base64 encoded `paymentData` you retrieved from the Apple framework. + */ + 'applePayToken': string; + /** + * The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + */ + 'fundingSource'?: ApplePayDetails.FundingSourceEnum; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * **applepay** + */ + 'type'?: ApplePayDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "applePayToken", + "baseName": "applePayToken", + "type": "string" + }, + { + "name": "fundingSource", + "baseName": "fundingSource", + "type": "ApplePayDetails.FundingSourceEnum" + }, + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "ApplePayDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return ApplePayDetails.attributeTypeMap; + } +} + +export namespace ApplePayDetails { + export enum FundingSourceEnum { + Debit = 'debit' + } + export enum TypeEnum { + Applepay = 'applepay' + } +} diff --git a/src/typings/checkout/applicationInfo.ts b/src/typings/checkout/applicationInfo.ts new file mode 100644 index 0000000..7cde0aa --- /dev/null +++ b/src/typings/checkout/applicationInfo.ts @@ -0,0 +1,64 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CommonField } from './commonField'; +import { ExternalPlatform } from './externalPlatform'; +import { MerchantDevice } from './merchantDevice'; +import { ShopperInteractionDevice } from './shopperInteractionDevice'; + +export class ApplicationInfo { + 'adyenLibrary'?: CommonField; + 'adyenPaymentSource'?: CommonField; + 'externalPlatform'?: ExternalPlatform; + 'merchantApplication'?: CommonField; + 'merchantDevice'?: MerchantDevice; + 'shopperInteractionDevice'?: ShopperInteractionDevice; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "adyenLibrary", + "baseName": "adyenLibrary", + "type": "CommonField" + }, + { + "name": "adyenPaymentSource", + "baseName": "adyenPaymentSource", + "type": "CommonField" + }, + { + "name": "externalPlatform", + "baseName": "externalPlatform", + "type": "ExternalPlatform" + }, + { + "name": "merchantApplication", + "baseName": "merchantApplication", + "type": "CommonField" + }, + { + "name": "merchantDevice", + "baseName": "merchantDevice", + "type": "MerchantDevice" + }, + { + "name": "shopperInteractionDevice", + "baseName": "shopperInteractionDevice", + "type": "ShopperInteractionDevice" + } ]; + + static getAttributeTypeMap() { + return ApplicationInfo.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/avs.ts b/src/typings/checkout/avs.ts new file mode 100644 index 0000000..0b8c85a --- /dev/null +++ b/src/typings/checkout/avs.ts @@ -0,0 +1,48 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class Avs { + /** + * Indicates whether the shopper is allowed to modify the billing address for the current payment request. + */ + 'addressEditable'?: boolean; + /** + * Specifies whether the shopper should enter their billing address during checkout. Allowed values: * yes — Perform AVS checks for every card payment. * automatic — Perform AVS checks only when required to optimize the conversion rate. * no — Do not perform AVS checks. + */ + 'enabled'?: Avs.EnabledEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "addressEditable", + "baseName": "addressEditable", + "type": "boolean" + }, + { + "name": "enabled", + "baseName": "enabled", + "type": "Avs.EnabledEnum" + } ]; + + static getAttributeTypeMap() { + return Avs.attributeTypeMap; + } +} + +export namespace Avs { + export enum EnabledEnum { + Yes = 'yes', + No = 'no', + Automatic = 'automatic' + } +} diff --git a/src/typings/checkout/bacsDirectDebitDetails.ts b/src/typings/checkout/bacsDirectDebitDetails.ts new file mode 100644 index 0000000..6eb9ab6 --- /dev/null +++ b/src/typings/checkout/bacsDirectDebitDetails.ts @@ -0,0 +1,82 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class BacsDirectDebitDetails { + /** + * The bank account number (without separators). + */ + 'bankAccountNumber'?: string; + /** + * The bank routing number of the account. + */ + 'bankLocationId'?: string; + /** + * The name of the bank account holder. + */ + 'holderName'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * **directdebit_GB** + */ + 'type'?: BacsDirectDebitDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "bankAccountNumber", + "baseName": "bankAccountNumber", + "type": "string" + }, + { + "name": "bankLocationId", + "baseName": "bankLocationId", + "type": "string" + }, + { + "name": "holderName", + "baseName": "holderName", + "type": "string" + }, + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "BacsDirectDebitDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return BacsDirectDebitDetails.attributeTypeMap; + } +} + +export namespace BacsDirectDebitDetails { + export enum TypeEnum { + DirectdebitGb = 'directdebit_GB' + } +} diff --git a/src/typings/checkout/bankAccount.ts b/src/typings/checkout/bankAccount.ts new file mode 100644 index 0000000..d7783df --- /dev/null +++ b/src/typings/checkout/bankAccount.ts @@ -0,0 +1,104 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class BankAccount { + /** + * The bank account number (without separators). + */ + 'bankAccountNumber'?: string; + /** + * The bank city. + */ + 'bankCity'?: string; + /** + * The location id of the bank. The field value is `nil` in most cases. + */ + 'bankLocationId'?: string; + /** + * The name of the bank. + */ + 'bankName'?: string; + /** + * The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases. + */ + 'bic'?: string; + /** + * Country code where the bank is located. A valid value is an ISO two-character country code (e.g. \'NL\'). + */ + 'countryCode'?: string; + /** + * The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN). + */ + 'iban'?: string; + /** + * The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don\'t accept \'ø\'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don\'t match the required format, the response returns the error message: 203 \'Invalid bank account holder name\'. + */ + 'ownerName'?: string; + /** + * The bank account holder\'s tax ID. + */ + 'taxId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "bankAccountNumber", + "baseName": "bankAccountNumber", + "type": "string" + }, + { + "name": "bankCity", + "baseName": "bankCity", + "type": "string" + }, + { + "name": "bankLocationId", + "baseName": "bankLocationId", + "type": "string" + }, + { + "name": "bankName", + "baseName": "bankName", + "type": "string" + }, + { + "name": "bic", + "baseName": "bic", + "type": "string" + }, + { + "name": "countryCode", + "baseName": "countryCode", + "type": "string" + }, + { + "name": "iban", + "baseName": "iban", + "type": "string" + }, + { + "name": "ownerName", + "baseName": "ownerName", + "type": "string" + }, + { + "name": "taxId", + "baseName": "taxId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return BankAccount.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/billDeskDetails.ts b/src/typings/checkout/billDeskDetails.ts new file mode 100644 index 0000000..06fc2ae --- /dev/null +++ b/src/typings/checkout/billDeskDetails.ts @@ -0,0 +1,47 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class BillDeskDetails { + /** + * The issuer id of the shopper\'s selected bank. + */ + 'issuer': string; + /** + * **billdesk** + */ + 'type': BillDeskDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "issuer", + "baseName": "issuer", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "BillDeskDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return BillDeskDetails.attributeTypeMap; + } +} + +export namespace BillDeskDetails { + export enum TypeEnum { + Online = 'billdesk_online', + Wallet = 'billdesk_wallet' + } +} diff --git a/src/typings/checkout/blikDetails.ts b/src/typings/checkout/blikDetails.ts new file mode 100644 index 0000000..fabd68a --- /dev/null +++ b/src/typings/checkout/blikDetails.ts @@ -0,0 +1,64 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class BlikDetails { + /** + * BLIK code consisting of 6 digits. + */ + 'blikCode'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * **blik** + */ + 'type'?: BlikDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "blikCode", + "baseName": "blikCode", + "type": "string" + }, + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "BlikDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return BlikDetails.attributeTypeMap; + } +} + +export namespace BlikDetails { + export enum TypeEnum { + Blik = 'blik' + } +} diff --git a/src/typings/checkout/browserInfo.ts b/src/typings/checkout/browserInfo.ts new file mode 100644 index 0000000..a941225 --- /dev/null +++ b/src/typings/checkout/browserInfo.ts @@ -0,0 +1,104 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class BrowserInfo { + /** + * The accept header value of the shopper\'s browser. + */ + 'acceptHeader': string; + /** + * The color depth of the shopper\'s browser in bits per pixel. This should be obtained by using the browser\'s `screen.colorDepth` property. Accepted values: 1, 4, 8, 15, 16, 24, 30, 32 or 48 bit color depth. + */ + 'colorDepth': number; + /** + * Boolean value indicating if the shopper\'s browser is able to execute Java. + */ + 'javaEnabled': boolean; + /** + * Boolean value indicating if the shopper\'s browser is able to execute JavaScript. A default \'true\' value is assumed if the field is not present. + */ + 'javaScriptEnabled'?: boolean; + /** + * The `navigator.language` value of the shopper\'s browser (as defined in IETF BCP 47). + */ + 'language': string; + /** + * The total height of the shopper\'s device screen in pixels. + */ + 'screenHeight': number; + /** + * The total width of the shopper\'s device screen in pixels. + */ + 'screenWidth': number; + /** + * Time difference between UTC time and the shopper\'s browser local time, in minutes. + */ + 'timeZoneOffset': number; + /** + * The user agent value of the shopper\'s browser. + */ + 'userAgent': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "acceptHeader", + "baseName": "acceptHeader", + "type": "string" + }, + { + "name": "colorDepth", + "baseName": "colorDepth", + "type": "number" + }, + { + "name": "javaEnabled", + "baseName": "javaEnabled", + "type": "boolean" + }, + { + "name": "javaScriptEnabled", + "baseName": "javaScriptEnabled", + "type": "boolean" + }, + { + "name": "language", + "baseName": "language", + "type": "string" + }, + { + "name": "screenHeight", + "baseName": "screenHeight", + "type": "number" + }, + { + "name": "screenWidth", + "baseName": "screenWidth", + "type": "number" + }, + { + "name": "timeZoneOffset", + "baseName": "timeZoneOffset", + "type": "number" + }, + { + "name": "userAgent", + "baseName": "userAgent", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return BrowserInfo.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/card.ts b/src/typings/checkout/card.ts new file mode 100644 index 0000000..a44bc0a --- /dev/null +++ b/src/typings/checkout/card.ts @@ -0,0 +1,95 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class Card { + /** + * The [card verification code](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid) (1-20 characters). Depending on the card brand, it is known also as: * CVV2/CVC2 – length: 3 digits * CID – length: 4 digits > If you are using [Client-Side Encryption](https://docs.adyen.com/classic-integration/cse-integration-ecommerce), the CVC code is present in the encrypted data. You must never post the card details to the server. > This field must be always present in a [one-click payment request](https://docs.adyen.com/classic-integration/recurring-payments). > When this value is returned in a response, it is always empty because it is not stored. + */ + 'cvc'?: string; + /** + * The card expiry month. Format: 2 digits, zero-padded for single digits. For example: * 03 = March * 11 = November + */ + 'expiryMonth': string; + /** + * The card expiry year. Format: 4 digits. For example: 2020 + */ + 'expiryYear': string; + /** + * The name of the cardholder, as printed on the card. + */ + 'holderName': string; + /** + * The issue number of the card (for some UK debit cards only). + */ + 'issueNumber'?: string; + /** + * The card number (4-19 characters). Do not use any separators. When this value is returned in a response, only the last 4 digits of the card number are returned. + */ + 'number': string; + /** + * The month component of the start date (for some UK debit cards only). + */ + 'startMonth'?: string; + /** + * The year component of the start date (for some UK debit cards only). + */ + 'startYear'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "cvc", + "baseName": "cvc", + "type": "string" + }, + { + "name": "expiryMonth", + "baseName": "expiryMonth", + "type": "string" + }, + { + "name": "expiryYear", + "baseName": "expiryYear", + "type": "string" + }, + { + "name": "holderName", + "baseName": "holderName", + "type": "string" + }, + { + "name": "issueNumber", + "baseName": "issueNumber", + "type": "string" + }, + { + "name": "number", + "baseName": "number", + "type": "string" + }, + { + "name": "startMonth", + "baseName": "startMonth", + "type": "string" + }, + { + "name": "startYear", + "baseName": "startYear", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Card.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/cardDetails.ts b/src/typings/checkout/cardDetails.ts new file mode 100644 index 0000000..18eff59 --- /dev/null +++ b/src/typings/checkout/cardDetails.ts @@ -0,0 +1,151 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class CardDetails { + 'cupsecureplusSmscode'?: string; + /** + * The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + */ + 'cvc'?: string; + /** + * The encrypted card number. + */ + 'encryptedCardNumber'?: string; + /** + * The encrypted card expiry month. + */ + 'encryptedExpiryMonth'?: string; + /** + * The encrypted card expiry year. + */ + 'encryptedExpiryYear'?: string; + /** + * The encrypted card verification code. + */ + 'encryptedSecurityCode'?: string; + /** + * The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + */ + 'expiryMonth'?: string; + /** + * The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + */ + 'expiryYear'?: string; + /** + * The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + */ + 'fundingSource'?: CardDetails.FundingSourceEnum; + /** + * The name of the card holder. + */ + 'holderName'?: string; + /** + * The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + */ + 'number'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * Default payment method details. Common for scheme payment methods, and for simple payment method details. + */ + 'type'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "cupsecureplusSmscode", + "baseName": "cupsecureplus.smscode", + "type": "string" + }, + { + "name": "cvc", + "baseName": "cvc", + "type": "string" + }, + { + "name": "encryptedCardNumber", + "baseName": "encryptedCardNumber", + "type": "string" + }, + { + "name": "encryptedExpiryMonth", + "baseName": "encryptedExpiryMonth", + "type": "string" + }, + { + "name": "encryptedExpiryYear", + "baseName": "encryptedExpiryYear", + "type": "string" + }, + { + "name": "encryptedSecurityCode", + "baseName": "encryptedSecurityCode", + "type": "string" + }, + { + "name": "expiryMonth", + "baseName": "expiryMonth", + "type": "string" + }, + { + "name": "expiryYear", + "baseName": "expiryYear", + "type": "string" + }, + { + "name": "fundingSource", + "baseName": "fundingSource", + "type": "CardDetails.FundingSourceEnum" + }, + { + "name": "holderName", + "baseName": "holderName", + "type": "string" + }, + { + "name": "number", + "baseName": "number", + "type": "string" + }, + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "CardDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return CardDetails.attributeTypeMap; + } +} + +export namespace CardDetails { + export enum FundingSourceEnum { + Debit = 'debit' + } +} diff --git a/src/typings/checkout/cellulantDetails.ts b/src/typings/checkout/cellulantDetails.ts new file mode 100644 index 0000000..aa4f579 --- /dev/null +++ b/src/typings/checkout/cellulantDetails.ts @@ -0,0 +1,46 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class CellulantDetails { + /** + * The Cellulant issuer. + */ + 'issuer'?: string; + /** + * **Cellulant** + */ + 'type'?: CellulantDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "issuer", + "baseName": "issuer", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "CellulantDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return CellulantDetails.attributeTypeMap; + } +} + +export namespace CellulantDetails { + export enum TypeEnum { + Cellulant = 'cellulant' + } +} diff --git a/src/typings/checkout/checkoutAwaitAction.ts b/src/typings/checkout/checkoutAwaitAction.ts new file mode 100644 index 0000000..a9cd086 --- /dev/null +++ b/src/typings/checkout/checkoutAwaitAction.ts @@ -0,0 +1,64 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class CheckoutAwaitAction { + /** + * A value that must be submitted to the `/payments/details` endpoint to verify this payment. + */ + 'paymentData'?: string; + /** + * Specifies the payment method. + */ + 'paymentMethodType'?: string; + /** + * **await** + */ + 'type': CheckoutAwaitAction.TypeEnum; + /** + * Specifies the URL to redirect to. + */ + 'url'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "paymentData", + "baseName": "paymentData", + "type": "string" + }, + { + "name": "paymentMethodType", + "baseName": "paymentMethodType", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "CheckoutAwaitAction.TypeEnum" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CheckoutAwaitAction.attributeTypeMap; + } +} + +export namespace CheckoutAwaitAction { + export enum TypeEnum { + Await = 'await' + } +} diff --git a/src/typings/checkout/checkoutBalanceCheckRequest.ts b/src/typings/checkout/checkoutBalanceCheckRequest.ts new file mode 100644 index 0000000..1beedb5 --- /dev/null +++ b/src/typings/checkout/checkoutBalanceCheckRequest.ts @@ -0,0 +1,397 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AccountInfo } from './accountInfo'; +import { Address } from './address'; +import { Amount } from './amount'; +import { ApplicationInfo } from './applicationInfo'; +import { BrowserInfo } from './browserInfo'; +import { ForexQuote } from './forexQuote'; +import { Installments } from './installments'; +import { MerchantRiskIndicator } from './merchantRiskIndicator'; +import { Name } from './name'; +import { Recurring } from './recurring'; +import { Split } from './split'; +import { ThreeDS2RequestData } from './threeDS2RequestData'; + +export class CheckoutBalanceCheckRequest { + 'accountInfo'?: AccountInfo; + 'additionalAmount'?: Amount; + /** + * This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. + */ + 'additionalData'?: { [key: string]: string; }; + 'amount': Amount; + 'applicationInfo'?: ApplicationInfo; + 'billingAddress'?: Address; + 'browserInfo'?: BrowserInfo; + /** + * The delay between the authorisation and scheduled auto-capture, specified in hours. + */ + 'captureDelayHours'?: number; + /** + * The shopper\'s date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD + */ + 'dateOfBirth'?: Date; + 'dccQuote'?: ForexQuote; + 'deliveryAddress'?: Address; + /** + * The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 + */ + 'deliveryDate'?: Date; + /** + * A string containing the shopper\'s device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). + */ + 'deviceFingerprint'?: string; + /** + * An integer value that is added to the normal fraud score. The value can be either positive or negative. + */ + 'fraudOffset'?: number; + 'installments'?: Installments; + /** + * The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. + */ + 'mcc'?: string; + /** + * The merchant account identifier, with which you want to process the transaction. + */ + 'merchantAccount': string; + /** + * This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. + */ + 'merchantOrderReference'?: string; + 'merchantRiskIndicator'?: MerchantRiskIndicator; + /** + * Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. + */ + 'metadata'?: { [key: string]: string; }; + /** + * When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. + */ + 'orderReference'?: string; + /** + * The collection that contains the type of the payment method and its specific information. + */ + 'paymentMethod': { [key: string]: string; }; + 'recurring'?: Recurring; + /** + * Defines a recurring payment type. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder\'s balance drops below a certain amount. + */ + 'recurringProcessingModel'?: CheckoutBalanceCheckRequest.RecurringProcessingModelEnum; + /** + * The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. + */ + 'reference': string; + /** + * Some payment methods require defining a value for this field to specify how to process the transaction. For the Bancontact payment method, it can be set to: * `maestro` (default), to be processed like a Maestro card, or * `bcmc`, to be processed like a Bancontact card. + */ + 'selectedBrand'?: string; + /** + * The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. + */ + 'selectedRecurringDetailReference'?: string; + /** + * A session ID used to identify a payment session. + */ + 'sessionId'?: string; + /** + * The shopper\'s email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations. + */ + 'shopperEmail'?: string; + /** + * The shopper\'s IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://support.adyen.com/hc/en-us/requests/new). + */ + 'shopperIP'?: string; + /** + * Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. + */ + 'shopperInteraction'?: CheckoutBalanceCheckRequest.ShopperInteractionEnum; + /** + * The combination of a language code and a country code to specify the language to be used in the payment. + */ + 'shopperLocale'?: string; + 'shopperName'?: Name; + /** + * Your reference to uniquely identify this shopper (for example, user ID or account ID). Minimum length: 3 characters. > This field is required for recurring payments. + */ + 'shopperReference'?: string; + /** + * The text to be shown on the shopper\'s bank statement. To enable this field, contact our [Support Team](https://support.adyen.com/hc/en-us/requests/new). We recommend sending a maximum of 25 characters, otherwise banks might truncate the string. + */ + 'shopperStatement'?: string; + /** + * The shopper\'s social security number. + */ + 'socialSecurityNumber'?: string; + /** + * An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). + */ + 'splits'?: Array; + /** + * The physical store, for which this payment is processed. + */ + 'store'?: string; + /** + * The shopper\'s telephone number. + */ + 'telephoneNumber'?: string; + 'threeDS2RequestData'?: ThreeDS2RequestData; + /** + * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. + */ + 'threeDSAuthenticationOnly'?: boolean; + /** + * The reference value to aggregate sales totals in reporting. When not specified, the store field is used (if available). + */ + 'totalsGroup'?: string; + /** + * Set to true if the payment should be routed to a trusted MID. + */ + 'trustedShopper'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountInfo", + "baseName": "accountInfo", + "type": "AccountInfo" + }, + { + "name": "additionalAmount", + "baseName": "additionalAmount", + "type": "Amount" + }, + { + "name": "additionalData", + "baseName": "additionalData", + "type": "{ [key: string]: string; }" + }, + { + "name": "amount", + "baseName": "amount", + "type": "Amount" + }, + { + "name": "applicationInfo", + "baseName": "applicationInfo", + "type": "ApplicationInfo" + }, + { + "name": "billingAddress", + "baseName": "billingAddress", + "type": "Address" + }, + { + "name": "browserInfo", + "baseName": "browserInfo", + "type": "BrowserInfo" + }, + { + "name": "captureDelayHours", + "baseName": "captureDelayHours", + "type": "number" + }, + { + "name": "dateOfBirth", + "baseName": "dateOfBirth", + "type": "Date" + }, + { + "name": "dccQuote", + "baseName": "dccQuote", + "type": "ForexQuote" + }, + { + "name": "deliveryAddress", + "baseName": "deliveryAddress", + "type": "Address" + }, + { + "name": "deliveryDate", + "baseName": "deliveryDate", + "type": "Date" + }, + { + "name": "deviceFingerprint", + "baseName": "deviceFingerprint", + "type": "string" + }, + { + "name": "fraudOffset", + "baseName": "fraudOffset", + "type": "number" + }, + { + "name": "installments", + "baseName": "installments", + "type": "Installments" + }, + { + "name": "mcc", + "baseName": "mcc", + "type": "string" + }, + { + "name": "merchantAccount", + "baseName": "merchantAccount", + "type": "string" + }, + { + "name": "merchantOrderReference", + "baseName": "merchantOrderReference", + "type": "string" + }, + { + "name": "merchantRiskIndicator", + "baseName": "merchantRiskIndicator", + "type": "MerchantRiskIndicator" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "{ [key: string]: string; }" + }, + { + "name": "orderReference", + "baseName": "orderReference", + "type": "string" + }, + { + "name": "paymentMethod", + "baseName": "paymentMethod", + "type": "{ [key: string]: string; }" + }, + { + "name": "recurring", + "baseName": "recurring", + "type": "Recurring" + }, + { + "name": "recurringProcessingModel", + "baseName": "recurringProcessingModel", + "type": "CheckoutBalanceCheckRequest.RecurringProcessingModelEnum" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string" + }, + { + "name": "selectedBrand", + "baseName": "selectedBrand", + "type": "string" + }, + { + "name": "selectedRecurringDetailReference", + "baseName": "selectedRecurringDetailReference", + "type": "string" + }, + { + "name": "sessionId", + "baseName": "sessionId", + "type": "string" + }, + { + "name": "shopperEmail", + "baseName": "shopperEmail", + "type": "string" + }, + { + "name": "shopperIP", + "baseName": "shopperIP", + "type": "string" + }, + { + "name": "shopperInteraction", + "baseName": "shopperInteraction", + "type": "CheckoutBalanceCheckRequest.ShopperInteractionEnum" + }, + { + "name": "shopperLocale", + "baseName": "shopperLocale", + "type": "string" + }, + { + "name": "shopperName", + "baseName": "shopperName", + "type": "Name" + }, + { + "name": "shopperReference", + "baseName": "shopperReference", + "type": "string" + }, + { + "name": "shopperStatement", + "baseName": "shopperStatement", + "type": "string" + }, + { + "name": "socialSecurityNumber", + "baseName": "socialSecurityNumber", + "type": "string" + }, + { + "name": "splits", + "baseName": "splits", + "type": "Array" + }, + { + "name": "store", + "baseName": "store", + "type": "string" + }, + { + "name": "telephoneNumber", + "baseName": "telephoneNumber", + "type": "string" + }, + { + "name": "threeDS2RequestData", + "baseName": "threeDS2RequestData", + "type": "ThreeDS2RequestData" + }, + { + "name": "threeDSAuthenticationOnly", + "baseName": "threeDSAuthenticationOnly", + "type": "boolean" + }, + { + "name": "totalsGroup", + "baseName": "totalsGroup", + "type": "string" + }, + { + "name": "trustedShopper", + "baseName": "trustedShopper", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return CheckoutBalanceCheckRequest.attributeTypeMap; + } +} + +export namespace CheckoutBalanceCheckRequest { + export enum RecurringProcessingModelEnum { + CardOnFile = 'CardOnFile', + Subscription = 'Subscription', + UnscheduledCardOnFile = 'UnscheduledCardOnFile' + } + export enum ShopperInteractionEnum { + Ecommerce = 'Ecommerce', + ContAuth = 'ContAuth', + Moto = 'Moto', + Pos = 'POS' + } +} diff --git a/src/typings/checkout/checkoutBalanceCheckResponse.ts b/src/typings/checkout/checkoutBalanceCheckResponse.ts new file mode 100644 index 0000000..37d8304 --- /dev/null +++ b/src/typings/checkout/checkoutBalanceCheckResponse.ts @@ -0,0 +1,87 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Amount } from './amount'; +import { FraudResult } from './fraudResult'; + +export class CheckoutBalanceCheckResponse { + /** + * Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Account** > **API URLs** > **Additional data settings**. + */ + 'additionalData'?: { [key: string]: string; }; + 'balance': Amount; + 'fraudResult'?: FraudResult; + /** + * Adyen\'s 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. + */ + 'pspReference'?: string; + /** + * If the payment\'s authorisation is refused or an error occurs during authorisation, this field holds Adyen\'s mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). + */ + 'refusalReason'?: string; + /** + * The result of the cancellation request. Possible values: * **Success** – Indicates that the balance check was successful. * **NotEnoughBalance** – Commonly indicates that the card did not have enough balance to pay the amount in the request, or that the currency of the balance on the card did not match the currency of the requested amount. * **Failed** – Indicates that the balance check failed. + */ + 'resultCode': CheckoutBalanceCheckResponse.ResultCodeEnum; + 'transactionLimit'?: Amount; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "additionalData", + "baseName": "additionalData", + "type": "{ [key: string]: string; }" + }, + { + "name": "balance", + "baseName": "balance", + "type": "Amount" + }, + { + "name": "fraudResult", + "baseName": "fraudResult", + "type": "FraudResult" + }, + { + "name": "pspReference", + "baseName": "pspReference", + "type": "string" + }, + { + "name": "refusalReason", + "baseName": "refusalReason", + "type": "string" + }, + { + "name": "resultCode", + "baseName": "resultCode", + "type": "CheckoutBalanceCheckResponse.ResultCodeEnum" + }, + { + "name": "transactionLimit", + "baseName": "transactionLimit", + "type": "Amount" + } ]; + + static getAttributeTypeMap() { + return CheckoutBalanceCheckResponse.attributeTypeMap; + } +} + +export namespace CheckoutBalanceCheckResponse { + export enum ResultCodeEnum { + Success = 'Success', + NotEnoughBalance = 'NotEnoughBalance', + Failed = 'Failed' + } +} diff --git a/src/typings/checkout/checkoutBankTransferAction.ts b/src/typings/checkout/checkoutBankTransferAction.ts new file mode 100644 index 0000000..770f0a9 --- /dev/null +++ b/src/typings/checkout/checkoutBankTransferAction.ts @@ -0,0 +1,117 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Amount } from './amount'; + +export class CheckoutBankTransferAction { + /** + * The name of the account holder. + */ + 'beneficiary'?: string; + /** + * The BIC of the IBAN. + */ + 'bic'?: string; + /** + * The url to download payment details with. + */ + 'downloadUrl'?: string; + /** + * The IBAN of the bank transfer. + */ + 'iban'?: string; + /** + * Specifies the payment method. + */ + 'paymentMethodType'?: string; + /** + * The transfer reference. + */ + 'reference'?: string; + /** + * The e-mail of the shopper, included if an e-mail was sent to the shopper. + */ + 'shopperEmail'?: string; + 'totalAmount'?: Amount; + /** + * The type of the action. + */ + 'type': CheckoutBankTransferAction.TypeEnum; + /** + * Specifies the URL to redirect to. + */ + 'url'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "beneficiary", + "baseName": "beneficiary", + "type": "string" + }, + { + "name": "bic", + "baseName": "bic", + "type": "string" + }, + { + "name": "downloadUrl", + "baseName": "downloadUrl", + "type": "string" + }, + { + "name": "iban", + "baseName": "iban", + "type": "string" + }, + { + "name": "paymentMethodType", + "baseName": "paymentMethodType", + "type": "string" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string" + }, + { + "name": "shopperEmail", + "baseName": "shopperEmail", + "type": "string" + }, + { + "name": "totalAmount", + "baseName": "totalAmount", + "type": "Amount" + }, + { + "name": "type", + "baseName": "type", + "type": "CheckoutBankTransferAction.TypeEnum" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CheckoutBankTransferAction.attributeTypeMap; + } +} + +export namespace CheckoutBankTransferAction { + export enum TypeEnum { + BankTransfer = 'bankTransfer' + } +} diff --git a/src/typings/checkout/checkoutCancelOrderRequest.ts b/src/typings/checkout/checkoutCancelOrderRequest.ts new file mode 100644 index 0000000..cfa6a0d --- /dev/null +++ b/src/typings/checkout/checkoutCancelOrderRequest.ts @@ -0,0 +1,40 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CheckoutOrder } from './checkoutOrder'; + +export class CheckoutCancelOrderRequest { + /** + * The merchant account identifier that orderData belongs to. + */ + 'merchantAccount': string; + 'order': CheckoutOrder; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "merchantAccount", + "baseName": "merchantAccount", + "type": "string" + }, + { + "name": "order", + "baseName": "order", + "type": "CheckoutOrder" + } ]; + + static getAttributeTypeMap() { + return CheckoutCancelOrderRequest.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/checkoutCancelOrderResponse.ts b/src/typings/checkout/checkoutCancelOrderResponse.ts new file mode 100644 index 0000000..1308b06 --- /dev/null +++ b/src/typings/checkout/checkoutCancelOrderResponse.ts @@ -0,0 +1,46 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class CheckoutCancelOrderResponse { + /** + * A unique reference of the cancellation request. + */ + 'pspReference': string; + /** + * The result of the cancellation request. Possible values: * **Received** – Indicates the cancellation has successfully been received by Adyen, and will be processed. + */ + 'resultCode': CheckoutCancelOrderResponse.ResultCodeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "pspReference", + "baseName": "pspReference", + "type": "string" + }, + { + "name": "resultCode", + "baseName": "resultCode", + "type": "CheckoutCancelOrderResponse.ResultCodeEnum" + } ]; + + static getAttributeTypeMap() { + return CheckoutCancelOrderResponse.attributeTypeMap; + } +} + +export namespace CheckoutCancelOrderResponse { + export enum ResultCodeEnum { + Received = 'Received' + } +} diff --git a/src/typings/checkout/checkoutCreateOrderRequest.ts b/src/typings/checkout/checkoutCreateOrderRequest.ts new file mode 100644 index 0000000..f4a9c5b --- /dev/null +++ b/src/typings/checkout/checkoutCreateOrderRequest.ts @@ -0,0 +1,58 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Amount } from './amount'; + +export class CheckoutCreateOrderRequest { + 'amount': Amount; + /** + * The date that order expires; e.g. 2019-03-23T12:25:28Z. If not provided, the default expiry duration is 1 day. + */ + 'expiresAt'?: string; + /** + * The merchant account identifier, with which you want to process the order. + */ + 'merchantAccount': string; + /** + * A custom reference identifying the order. + */ + 'reference': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "amount", + "baseName": "amount", + "type": "Amount" + }, + { + "name": "expiresAt", + "baseName": "expiresAt", + "type": "string" + }, + { + "name": "merchantAccount", + "baseName": "merchantAccount", + "type": "string" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CheckoutCreateOrderRequest.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/checkoutCreateOrderResponse.ts b/src/typings/checkout/checkoutCreateOrderResponse.ts new file mode 100644 index 0000000..dbc56c3 --- /dev/null +++ b/src/typings/checkout/checkoutCreateOrderResponse.ts @@ -0,0 +1,106 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Amount } from './amount'; +import { FraudResult } from './fraudResult'; + +export class CheckoutCreateOrderResponse { + /** + * Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Account** > **API URLs** > **Additional data settings**. + */ + 'additionalData'?: { [key: string]: string; }; + /** + * The date that the order will expire. + */ + 'expiresAt': string; + 'fraudResult'?: FraudResult; + /** + * The encrypted data that will be used by merchant for adding payments to the order. + */ + 'orderData': string; + /** + * Adyen\'s 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. + */ + 'pspReference'?: string; + /** + * The reference provided by merchant for creating the order. + */ + 'reference'?: string; + /** + * If the payment\'s authorisation is refused or an error occurs during authorisation, this field holds Adyen\'s mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). + */ + 'refusalReason'?: string; + 'remainingAmount': Amount; + /** + * The result of the order creation request. The value is always **Success**. + */ + 'resultCode': CheckoutCreateOrderResponse.ResultCodeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "additionalData", + "baseName": "additionalData", + "type": "{ [key: string]: string; }" + }, + { + "name": "expiresAt", + "baseName": "expiresAt", + "type": "string" + }, + { + "name": "fraudResult", + "baseName": "fraudResult", + "type": "FraudResult" + }, + { + "name": "orderData", + "baseName": "orderData", + "type": "string" + }, + { + "name": "pspReference", + "baseName": "pspReference", + "type": "string" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string" + }, + { + "name": "refusalReason", + "baseName": "refusalReason", + "type": "string" + }, + { + "name": "remainingAmount", + "baseName": "remainingAmount", + "type": "Amount" + }, + { + "name": "resultCode", + "baseName": "resultCode", + "type": "CheckoutCreateOrderResponse.ResultCodeEnum" + } ]; + + static getAttributeTypeMap() { + return CheckoutCreateOrderResponse.attributeTypeMap; + } +} + +export namespace CheckoutCreateOrderResponse { + export enum ResultCodeEnum { + Success = 'Success' + } +} diff --git a/src/typings/checkout/checkoutDonationAction.ts b/src/typings/checkout/checkoutDonationAction.ts new file mode 100644 index 0000000..b1886a0 --- /dev/null +++ b/src/typings/checkout/checkoutDonationAction.ts @@ -0,0 +1,64 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class CheckoutDonationAction { + /** + * A value that must be submitted to the `/payments/details` endpoint to verify this payment. + */ + 'paymentData'?: string; + /** + * Specifies the payment method. + */ + 'paymentMethodType'?: string; + /** + * The type of the action. + */ + 'type': CheckoutDonationAction.TypeEnum; + /** + * Specifies the URL to redirect to. + */ + 'url'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "paymentData", + "baseName": "paymentData", + "type": "string" + }, + { + "name": "paymentMethodType", + "baseName": "paymentMethodType", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "CheckoutDonationAction.TypeEnum" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CheckoutDonationAction.attributeTypeMap; + } +} + +export namespace CheckoutDonationAction { + export enum TypeEnum { + Donate = 'donate' + } +} diff --git a/src/typings/checkout/checkoutOneTimePasscodeAction.ts b/src/typings/checkout/checkoutOneTimePasscodeAction.ts new file mode 100644 index 0000000..ac50d5f --- /dev/null +++ b/src/typings/checkout/checkoutOneTimePasscodeAction.ts @@ -0,0 +1,99 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Redirect } from './redirect'; + +export class CheckoutOneTimePasscodeAction { + /** + * A value that must be submitted to the `/payments/details` endpoint to verify this payment. + */ + 'paymentData'?: string; + /** + * Specifies the payment method. + */ + 'paymentMethodType'?: string; + 'redirect'?: Redirect; + /** + * The interval in second between OTP resend. + */ + 'resendInterval'?: number; + /** + * The maximum number of OTP resend attempts. + */ + 'resendMaxAttempts'?: number; + /** + * The URL, to which you make POST request to trigger OTP resend. + */ + 'resendUrl'?: string; + /** + * The type of the action. + */ + 'type': CheckoutOneTimePasscodeAction.TypeEnum; + /** + * Specifies the URL to redirect to. + */ + 'url'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "paymentData", + "baseName": "paymentData", + "type": "string" + }, + { + "name": "paymentMethodType", + "baseName": "paymentMethodType", + "type": "string" + }, + { + "name": "redirect", + "baseName": "redirect", + "type": "Redirect" + }, + { + "name": "resendInterval", + "baseName": "resendInterval", + "type": "number" + }, + { + "name": "resendMaxAttempts", + "baseName": "resendMaxAttempts", + "type": "number" + }, + { + "name": "resendUrl", + "baseName": "resendUrl", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "CheckoutOneTimePasscodeAction.TypeEnum" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CheckoutOneTimePasscodeAction.attributeTypeMap; + } +} + +export namespace CheckoutOneTimePasscodeAction { + export enum TypeEnum { + OneTimePasscode = 'oneTimePasscode' + } +} diff --git a/src/typings/checkout/checkoutOrder.ts b/src/typings/checkout/checkoutOrder.ts new file mode 100644 index 0000000..b169b6d --- /dev/null +++ b/src/typings/checkout/checkoutOrder.ts @@ -0,0 +1,41 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class CheckoutOrder { + /** + * The encrypted order data. + */ + 'orderData': string; + /** + * The `pspReference` that belongs to the order. + */ + 'pspReference': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "orderData", + "baseName": "orderData", + "type": "string" + }, + { + "name": "pspReference", + "baseName": "pspReference", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CheckoutOrder.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/checkoutOrderResponse.ts b/src/typings/checkout/checkoutOrderResponse.ts new file mode 100644 index 0000000..212675a --- /dev/null +++ b/src/typings/checkout/checkoutOrderResponse.ts @@ -0,0 +1,73 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Amount } from './amount'; + +export class CheckoutOrderResponse { + 'amount'?: Amount; + /** + * The expiry date for the order. + */ + 'expiresAt'?: string; + /** + * The encrypted order data. + */ + 'orderData'?: string; + /** + * The `pspReference` that belongs to the order. + */ + 'pspReference': string; + /** + * The merchant reference for the order. + */ + 'reference'?: string; + 'remainingAmount'?: Amount; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "amount", + "baseName": "amount", + "type": "Amount" + }, + { + "name": "expiresAt", + "baseName": "expiresAt", + "type": "string" + }, + { + "name": "orderData", + "baseName": "orderData", + "type": "string" + }, + { + "name": "pspReference", + "baseName": "pspReference", + "type": "string" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string" + }, + { + "name": "remainingAmount", + "baseName": "remainingAmount", + "type": "Amount" + } ]; + + static getAttributeTypeMap() { + return CheckoutOrderResponse.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/checkoutQrCodeAction.ts b/src/typings/checkout/checkoutQrCodeAction.ts new file mode 100644 index 0000000..ebb33bb --- /dev/null +++ b/src/typings/checkout/checkoutQrCodeAction.ts @@ -0,0 +1,73 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class CheckoutQrCodeAction { + /** + * A value that must be submitted to the `/payments/details` endpoint to verify this payment. + */ + 'paymentData'?: string; + /** + * Specifies the payment method. + */ + 'paymentMethodType'?: string; + /** + * The contents of the QR code as a UTF8 string. + */ + 'qrCodeData'?: string; + /** + * **qrCode** + */ + 'type': CheckoutQrCodeAction.TypeEnum; + /** + * Specifies the URL to redirect to. + */ + 'url'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "paymentData", + "baseName": "paymentData", + "type": "string" + }, + { + "name": "paymentMethodType", + "baseName": "paymentMethodType", + "type": "string" + }, + { + "name": "qrCodeData", + "baseName": "qrCodeData", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "CheckoutQrCodeAction.TypeEnum" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CheckoutQrCodeAction.attributeTypeMap; + } +} + +export namespace CheckoutQrCodeAction { + export enum TypeEnum { + QrCode = 'qrCode' + } +} diff --git a/src/typings/checkout/checkoutRedirectAction.ts b/src/typings/checkout/checkoutRedirectAction.ts new file mode 100644 index 0000000..4c33ef8 --- /dev/null +++ b/src/typings/checkout/checkoutRedirectAction.ts @@ -0,0 +1,73 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class CheckoutRedirectAction { + /** + * When the redirect URL must be accessed via POST, use this data to post to the redirect URL. + */ + 'data'?: { [key: string]: string; }; + /** + * Specifies the HTTP method, for example GET or POST. + */ + 'method'?: string; + /** + * Specifies the payment method. + */ + 'paymentMethodType'?: string; + /** + * **redirect** + */ + 'type': CheckoutRedirectAction.TypeEnum; + /** + * Specifies the URL to redirect to. + */ + 'url'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "{ [key: string]: string; }" + }, + { + "name": "method", + "baseName": "method", + "type": "string" + }, + { + "name": "paymentMethodType", + "baseName": "paymentMethodType", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "CheckoutRedirectAction.TypeEnum" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CheckoutRedirectAction.attributeTypeMap; + } +} + +export namespace CheckoutRedirectAction { + export enum TypeEnum { + Redirect = 'redirect' + } +} diff --git a/src/typings/checkout/checkoutSDKAction.ts b/src/typings/checkout/checkoutSDKAction.ts new file mode 100644 index 0000000..3282742 --- /dev/null +++ b/src/typings/checkout/checkoutSDKAction.ts @@ -0,0 +1,74 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class CheckoutSDKAction { + /** + * A value that must be submitted to the `/payments/details` endpoint to verify this payment. + */ + 'paymentData'?: string; + /** + * Specifies the payment method. + */ + 'paymentMethodType'?: string; + /** + * The data to pass to the SDK. + */ + 'sdkData'?: { [key: string]: string; }; + /** + * The type of the action. + */ + 'type': CheckoutSDKAction.TypeEnum; + /** + * Specifies the URL to redirect to. + */ + 'url'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "paymentData", + "baseName": "paymentData", + "type": "string" + }, + { + "name": "paymentMethodType", + "baseName": "paymentMethodType", + "type": "string" + }, + { + "name": "sdkData", + "baseName": "sdkData", + "type": "{ [key: string]: string; }" + }, + { + "name": "type", + "baseName": "type", + "type": "CheckoutSDKAction.TypeEnum" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CheckoutSDKAction.attributeTypeMap; + } +} + +export namespace CheckoutSDKAction { + export enum TypeEnum { + Sdk = 'sdk', + WechatpaySdk = 'wechatpaySDK' + } +} diff --git a/src/typings/checkout/checkoutThreeDS2Action.ts b/src/typings/checkout/checkoutThreeDS2Action.ts new file mode 100644 index 0000000..e5e2e2b --- /dev/null +++ b/src/typings/checkout/checkoutThreeDS2Action.ts @@ -0,0 +1,91 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class CheckoutThreeDS2Action { + /** + * A token needed to authorise a payment. + */ + 'authorisationToken'?: string; + /** + * A value that must be submitted to the `/payments/details` endpoint to verify this payment. + */ + 'paymentData'?: string; + /** + * Specifies the payment method. + */ + 'paymentMethodType'?: string; + /** + * A subtype of the token. + */ + 'subtype'?: string; + /** + * A token to pass to the 3DS2 Component to get the fingerprint. + */ + 'token'?: string; + /** + * **threeDS2** + */ + 'type': CheckoutThreeDS2Action.TypeEnum; + /** + * Specifies the URL to redirect to. + */ + 'url'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "authorisationToken", + "baseName": "authorisationToken", + "type": "string" + }, + { + "name": "paymentData", + "baseName": "paymentData", + "type": "string" + }, + { + "name": "paymentMethodType", + "baseName": "paymentMethodType", + "type": "string" + }, + { + "name": "subtype", + "baseName": "subtype", + "type": "string" + }, + { + "name": "token", + "baseName": "token", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "CheckoutThreeDS2Action.TypeEnum" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CheckoutThreeDS2Action.attributeTypeMap; + } +} + +export namespace CheckoutThreeDS2Action { + export enum TypeEnum { + ThreeDs2 = 'threeDS2' + } +} diff --git a/src/typings/checkout/checkoutUtilityRequest.ts b/src/typings/checkout/checkoutUtilityRequest.ts new file mode 100644 index 0000000..212d7c9 --- /dev/null +++ b/src/typings/checkout/checkoutUtilityRequest.ts @@ -0,0 +1,32 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class CheckoutUtilityRequest { + /** + * The list of origin domains, for which origin keys are requested. + */ + 'originDomains': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "originDomains", + "baseName": "originDomains", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return CheckoutUtilityRequest.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/checkoutUtilityResponse.ts b/src/typings/checkout/checkoutUtilityResponse.ts new file mode 100644 index 0000000..ecbf675 --- /dev/null +++ b/src/typings/checkout/checkoutUtilityResponse.ts @@ -0,0 +1,32 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class CheckoutUtilityResponse { + /** + * The list of origin keys for all requested domains. For each list item, the key is the domain and the value is the origin key. + */ + 'originKeys'?: { [key: string]: string; }; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "originKeys", + "baseName": "originKeys", + "type": "{ [key: string]: string; }" + } ]; + + static getAttributeTypeMap() { + return CheckoutUtilityResponse.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/checkoutVoucherAction.ts b/src/typings/checkout/checkoutVoucherAction.ts new file mode 100644 index 0000000..4a1a46d --- /dev/null +++ b/src/typings/checkout/checkoutVoucherAction.ts @@ -0,0 +1,201 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Amount } from './amount'; + +export class CheckoutVoucherAction { + /** + * The voucher alternative reference code. + */ + 'alternativeReference'?: string; + /** + * A collection institution number (store number) for Econtext Pay-Easy ATM. + */ + 'collectionInstitutionNumber'?: string; + /** + * The URL to download the voucher. + */ + 'downloadUrl'?: string; + /** + * An entity number of Multibanco. + */ + 'entity'?: string; + /** + * The date time of the voucher expiry. + */ + 'expiresAt'?: string; + 'initialAmount'?: Amount; + /** + * The URL to the detailed instructions to make payment using the voucher. + */ + 'instructionsUrl'?: string; + /** + * The issuer of the voucher. + */ + 'issuer'?: string; + /** + * The shopper telephone number (partially masked). + */ + 'maskedTelephoneNumber'?: string; + /** + * The merchant name. + */ + 'merchantName'?: string; + /** + * The merchant reference. + */ + 'merchantReference'?: string; + /** + * A value that must be submitted to the `/payments/details` endpoint to verify this payment. + */ + 'paymentData'?: string; + /** + * Specifies the payment method. + */ + 'paymentMethodType'?: string; + /** + * The voucher reference code. + */ + 'reference'?: string; + /** + * The shopper email. + */ + 'shopperEmail'?: string; + /** + * The shopper name. + */ + 'shopperName'?: string; + 'surcharge'?: Amount; + 'totalAmount'?: Amount; + /** + * **voucher** + */ + 'type': CheckoutVoucherAction.TypeEnum; + /** + * Specifies the URL to redirect to. + */ + 'url'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "alternativeReference", + "baseName": "alternativeReference", + "type": "string" + }, + { + "name": "collectionInstitutionNumber", + "baseName": "collectionInstitutionNumber", + "type": "string" + }, + { + "name": "downloadUrl", + "baseName": "downloadUrl", + "type": "string" + }, + { + "name": "entity", + "baseName": "entity", + "type": "string" + }, + { + "name": "expiresAt", + "baseName": "expiresAt", + "type": "string" + }, + { + "name": "initialAmount", + "baseName": "initialAmount", + "type": "Amount" + }, + { + "name": "instructionsUrl", + "baseName": "instructionsUrl", + "type": "string" + }, + { + "name": "issuer", + "baseName": "issuer", + "type": "string" + }, + { + "name": "maskedTelephoneNumber", + "baseName": "maskedTelephoneNumber", + "type": "string" + }, + { + "name": "merchantName", + "baseName": "merchantName", + "type": "string" + }, + { + "name": "merchantReference", + "baseName": "merchantReference", + "type": "string" + }, + { + "name": "paymentData", + "baseName": "paymentData", + "type": "string" + }, + { + "name": "paymentMethodType", + "baseName": "paymentMethodType", + "type": "string" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string" + }, + { + "name": "shopperEmail", + "baseName": "shopperEmail", + "type": "string" + }, + { + "name": "shopperName", + "baseName": "shopperName", + "type": "string" + }, + { + "name": "surcharge", + "baseName": "surcharge", + "type": "Amount" + }, + { + "name": "totalAmount", + "baseName": "totalAmount", + "type": "Amount" + }, + { + "name": "type", + "baseName": "type", + "type": "CheckoutVoucherAction.TypeEnum" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CheckoutVoucherAction.attributeTypeMap; + } +} + +export namespace CheckoutVoucherAction { + export enum TypeEnum { + Voucher = 'voucher' + } +} diff --git a/src/typings/checkout/commonField.ts b/src/typings/checkout/commonField.ts new file mode 100644 index 0000000..33f62d0 --- /dev/null +++ b/src/typings/checkout/commonField.ts @@ -0,0 +1,41 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class CommonField { + /** + * Name of the field. For example, Name of External Platform. + */ + 'name'?: string; + /** + * Version of the field. For example, Version of External Platform. + */ + 'version'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "version", + "baseName": "version", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CommonField.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/company.ts b/src/typings/checkout/company.ts new file mode 100644 index 0000000..c2740a5 --- /dev/null +++ b/src/typings/checkout/company.ts @@ -0,0 +1,77 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class Company { + /** + * The company website\'s home page. + */ + 'homepage'?: string; + /** + * The company name. + */ + 'name'?: string; + /** + * Registration number of the company. + */ + 'registrationNumber'?: string; + /** + * Registry location of the company. + */ + 'registryLocation'?: string; + /** + * Tax ID of the company. + */ + 'taxId'?: string; + /** + * The company type. + */ + 'type'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "homepage", + "baseName": "homepage", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "registrationNumber", + "baseName": "registrationNumber", + "type": "string" + }, + { + "name": "registryLocation", + "baseName": "registryLocation", + "type": "string" + }, + { + "name": "taxId", + "baseName": "taxId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Company.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/configuration.ts b/src/typings/checkout/configuration.ts new file mode 100644 index 0000000..c907fdb --- /dev/null +++ b/src/typings/checkout/configuration.ts @@ -0,0 +1,61 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Avs } from './avs'; +import { Installments2 } from './installments2'; +import { ShopperInput } from './shopperInput'; + +export class Configuration { + 'avs'?: Avs; + /** + * Determines whether the cardholder name should be provided or not. Permitted values: * NONE * OPTIONAL * REQUIRED + */ + 'cardHolderName'?: Configuration.CardHolderNameEnum; + 'installments'?: Installments2; + 'shopperInput'?: ShopperInput; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "avs", + "baseName": "avs", + "type": "Avs" + }, + { + "name": "cardHolderName", + "baseName": "cardHolderName", + "type": "Configuration.CardHolderNameEnum" + }, + { + "name": "installments", + "baseName": "installments", + "type": "Installments2" + }, + { + "name": "shopperInput", + "baseName": "shopperInput", + "type": "ShopperInput" + } ]; + + static getAttributeTypeMap() { + return Configuration.attributeTypeMap; + } +} + +export namespace Configuration { + export enum CardHolderNameEnum { + None = 'NONE', + Optional = 'OPTIONAL', + Required = 'REQUIRED' + } +} diff --git a/src/typings/checkout/createPaymentLinkRequest.ts b/src/typings/checkout/createPaymentLinkRequest.ts new file mode 100644 index 0000000..644a333 --- /dev/null +++ b/src/typings/checkout/createPaymentLinkRequest.ts @@ -0,0 +1,280 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Address } from './address'; +import { Amount } from './amount'; +import { ApplicationInfo } from './applicationInfo'; +import { InstallmentOption } from './installmentOption'; +import { LineItem } from './lineItem'; +import { Name } from './name'; +import { RiskData } from './riskData'; +import { Split } from './split'; + +export class CreatePaymentLinkRequest { + /** + * List of payment methods to be presented to the shopper. To refer to payment methods, use their `paymentMethod.type` from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]` + */ + 'allowedPaymentMethods'?: Array; + 'amount': Amount; + 'applicationInfo'?: ApplicationInfo; + 'billingAddress'?: Address; + /** + * List of payment methods to be hidden from the shopper. To refer to payment methods, use their `paymentMethod.type` from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]` + */ + 'blockedPaymentMethods'?: Array; + /** + * The shopper\'s two-letter country code. + */ + 'countryCode'?: string; + /** + * The date and time the purchased goods should be delivered. + */ + 'deliverAt'?: Date; + 'deliveryAddress'?: Address; + /** + * A short description visible on the payment page. Maximum length: 280 characters. + */ + 'description'?: string; + /** + * The date that the payment link expires, in ISO 8601 format. For example `2019-11-23T12:25:28Z`, or `2020-05-27T20:25:28+08:00`. Maximum expiry date should be 70 days from when the payment link is created. If not provided, the default expiry is set to 24 hours after the payment link is created. + */ + 'expiresAt'?: string; + /** + * A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options. + */ + 'installmentOptions'?: { [key: string]: InstallmentOption; }; + /** + * Price and product information about the purchased items, to be included on the invoice sent to the shopper. This parameter is required for open invoice (_buy now, pay later_) payment methods such AfterPay, Klarna, RatePay, and Zip. + */ + 'lineItems'?: Array; + /** + * The merchant account identifier for which the payment link is created. + */ + 'merchantAccount': string; + /** + * This reference allows linking multiple transactions to each other for reporting purposes (for example, order auth-rate). The reference should be unique per billing cycle. + */ + 'merchantOrderReference'?: string; + /** + * Metadata consists of entries, each of which includes a key and a value. Limitations: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\" * Maximum 20 characters per key. When exceeding, the \"178\" error occurs: \"Metadata key size exceeds limit\" * A key cannot have the name `checkout.linkId`. Whatever value is present under that key is going to be replaced by the real link id + */ + 'metadata'?: { [key: string]: string; }; + /** + * Defines a recurring payment type. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder\'s balance drops below a certain amount. + */ + 'recurringProcessingModel'?: CreatePaymentLinkRequest.RecurringProcessingModelEnum; + /** + * A reference that is used to uniquely identify the payment in future communications about the payment status. + */ + 'reference': string; + /** + * The fields that have to be filled in by the shopper before completing the payment. Possible values: * `billingAddress` – The address where to send the invoice. * `deliveryAddress` – The address where the purchased goods should be delivered. * `shopperEmail` – The shopper\'s email address. * `shopperName` – The shopper\'s full name. * `telephoneNumber` – The shopper\'s phone number. + */ + 'requiredShopperFields'?: Array; + /** + * Website URL used for redirection after payment is completed. If provided, a **Continue** button will be shown on the payment page. If shoppers select the button, they are redirected to the specified URL. + */ + 'returnUrl'?: string; + /** + * Indicates whether the payment link can be reused for multiple payments. If not provided, this defaults to **false** which means the link can be used for one successful payment only. + */ + 'reusable'?: boolean; + 'riskData'?: RiskData; + /** + * The shopper\'s email address. + */ + 'shopperEmail'?: string; + /** + * The language to be used in the payment page, specified by a combination of a language and country code. For example, `en-US`. For a list of shopper locales that Pay by Link supports, refer to [Language and localization](https://docs.adyen.com/online-payments/pay-by-link#language-and-localization). + */ + 'shopperLocale'?: string; + 'shopperName'?: Name; + /** + * Your reference to uniquely identify this shopper (for example, user ID or account ID). Minimum length: 3 characters. + */ + 'shopperReference'?: string; + /** + * An array of objects specifying how the payment should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/platforms/processing-payments#providing-split-information). + */ + 'splits'?: Array; + /** + * The physical store, for which this payment is processed. + */ + 'store'?: string; + /** + * When this is set to **true** and the `shopperReference` is provided, the payment details will be stored. + */ + 'storePaymentMethod'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "allowedPaymentMethods", + "baseName": "allowedPaymentMethods", + "type": "Array" + }, + { + "name": "amount", + "baseName": "amount", + "type": "Amount" + }, + { + "name": "applicationInfo", + "baseName": "applicationInfo", + "type": "ApplicationInfo" + }, + { + "name": "billingAddress", + "baseName": "billingAddress", + "type": "Address" + }, + { + "name": "blockedPaymentMethods", + "baseName": "blockedPaymentMethods", + "type": "Array" + }, + { + "name": "countryCode", + "baseName": "countryCode", + "type": "string" + }, + { + "name": "deliverAt", + "baseName": "deliverAt", + "type": "Date" + }, + { + "name": "deliveryAddress", + "baseName": "deliveryAddress", + "type": "Address" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "expiresAt", + "baseName": "expiresAt", + "type": "string" + }, + { + "name": "installmentOptions", + "baseName": "installmentOptions", + "type": "{ [key: string]: InstallmentOption; }" + }, + { + "name": "lineItems", + "baseName": "lineItems", + "type": "Array" + }, + { + "name": "merchantAccount", + "baseName": "merchantAccount", + "type": "string" + }, + { + "name": "merchantOrderReference", + "baseName": "merchantOrderReference", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "{ [key: string]: string; }" + }, + { + "name": "recurringProcessingModel", + "baseName": "recurringProcessingModel", + "type": "CreatePaymentLinkRequest.RecurringProcessingModelEnum" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string" + }, + { + "name": "requiredShopperFields", + "baseName": "requiredShopperFields", + "type": "Array" + }, + { + "name": "returnUrl", + "baseName": "returnUrl", + "type": "string" + }, + { + "name": "reusable", + "baseName": "reusable", + "type": "boolean" + }, + { + "name": "riskData", + "baseName": "riskData", + "type": "RiskData" + }, + { + "name": "shopperEmail", + "baseName": "shopperEmail", + "type": "string" + }, + { + "name": "shopperLocale", + "baseName": "shopperLocale", + "type": "string" + }, + { + "name": "shopperName", + "baseName": "shopperName", + "type": "Name" + }, + { + "name": "shopperReference", + "baseName": "shopperReference", + "type": "string" + }, + { + "name": "splits", + "baseName": "splits", + "type": "Array" + }, + { + "name": "store", + "baseName": "store", + "type": "string" + }, + { + "name": "storePaymentMethod", + "baseName": "storePaymentMethod", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return CreatePaymentLinkRequest.attributeTypeMap; + } +} + +export namespace CreatePaymentLinkRequest { + export enum RecurringProcessingModelEnum { + CardOnFile = 'CardOnFile', + Subscription = 'Subscription', + UnscheduledCardOnFile = 'UnscheduledCardOnFile' + } + export enum RequiredShopperFieldsEnum { + BillingAddress = 'billingAddress', + DeliveryAddress = 'deliveryAddress', + ShopperEmail = 'shopperEmail', + ShopperName = 'shopperName', + TelephoneNumber = 'telephoneNumber' + } +} diff --git a/src/typings/checkout/detailsRequest.ts b/src/typings/checkout/detailsRequest.ts new file mode 100644 index 0000000..43dde4f --- /dev/null +++ b/src/typings/checkout/detailsRequest.ts @@ -0,0 +1,49 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { PaymentCompletionDetails } from './paymentCompletionDetails'; + +export class DetailsRequest { + 'details': PaymentCompletionDetails; + /** + * The `paymentData` value from the `/payments` response. Required if the `/payments` response returns this value. In v67 and later, you will always get this value from the Component. + */ + 'paymentData'?: string; + /** + * Change the `authenticationOnly` indicator originally set in the `/payments` request. Only needs to be set if you want to modify the value set previously. + */ + 'threeDSAuthenticationOnly'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "details", + "baseName": "details", + "type": "PaymentCompletionDetails" + }, + { + "name": "paymentData", + "baseName": "paymentData", + "type": "string" + }, + { + "name": "threeDSAuthenticationOnly", + "baseName": "threeDSAuthenticationOnly", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return DetailsRequest.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/deviceRenderOptions.ts b/src/typings/checkout/deviceRenderOptions.ts new file mode 100644 index 0000000..8c786dd --- /dev/null +++ b/src/typings/checkout/deviceRenderOptions.ts @@ -0,0 +1,55 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class DeviceRenderOptions { + /** + * Supported SDK interface types. Allowed values: * native * html * both + */ + 'sdkInterface'?: DeviceRenderOptions.SdkInterfaceEnum; + /** + * UI types supported for displaying specific challenges. Allowed values: * text * singleSelect * outOfBand * otherHtml * multiSelect + */ + 'sdkUiType'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "sdkInterface", + "baseName": "sdkInterface", + "type": "DeviceRenderOptions.SdkInterfaceEnum" + }, + { + "name": "sdkUiType", + "baseName": "sdkUiType", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return DeviceRenderOptions.attributeTypeMap; + } +} + +export namespace DeviceRenderOptions { + export enum SdkInterfaceEnum { + Native = 'native', + Html = 'html', + Both = 'both' + } + export enum SdkUiTypeEnum { + MultiSelect = 'multiSelect', + OtherHtml = 'otherHtml', + OutOfBand = 'outOfBand', + SingleSelect = 'singleSelect', + Text = 'text' + } +} diff --git a/src/typings/checkout/dokuDetails.ts b/src/typings/checkout/dokuDetails.ts new file mode 100644 index 0000000..c81b1f1 --- /dev/null +++ b/src/typings/checkout/dokuDetails.ts @@ -0,0 +1,72 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class DokuDetails { + /** + * The shopper\'s first name. + */ + 'firstName': string; + /** + * The shopper\'s last name. + */ + 'lastName': string; + /** + * The shopper\'s email. + */ + 'shopperEmail': string; + /** + * **doku** + */ + 'type': DokuDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "firstName", + "baseName": "firstName", + "type": "string" + }, + { + "name": "lastName", + "baseName": "lastName", + "type": "string" + }, + { + "name": "shopperEmail", + "baseName": "shopperEmail", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "DokuDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return DokuDetails.attributeTypeMap; + } +} + +export namespace DokuDetails { + export enum TypeEnum { + MandiriVa = 'doku_mandiri_va', + CimbVa = 'doku_cimb_va', + DanamonVa = 'doku_danamon_va', + BniVa = 'doku_bni_va', + PermataLiteAtm = 'doku_permata_lite_atm', + BriVa = 'doku_bri_va', + BcaVa = 'doku_bca_va', + Alfamart = 'doku_alfamart', + Indomaret = 'doku_indomaret' + } +} diff --git a/src/typings/checkout/dotpayDetails.ts b/src/typings/checkout/dotpayDetails.ts new file mode 100644 index 0000000..a15b533 --- /dev/null +++ b/src/typings/checkout/dotpayDetails.ts @@ -0,0 +1,46 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class DotpayDetails { + /** + * The Dotpay issuer value of the shopper\'s selected bank. Set this to an **id** of a Dotpay issuer to preselect it. + */ + 'issuer': string; + /** + * **dotpay** + */ + 'type'?: DotpayDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "issuer", + "baseName": "issuer", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "DotpayDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return DotpayDetails.attributeTypeMap; + } +} + +export namespace DotpayDetails { + export enum TypeEnum { + Dotpay = 'dotpay' + } +} diff --git a/src/typings/checkout/dragonpayDetails.ts b/src/typings/checkout/dragonpayDetails.ts new file mode 100644 index 0000000..3fbcc33 --- /dev/null +++ b/src/typings/checkout/dragonpayDetails.ts @@ -0,0 +1,58 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class DragonpayDetails { + /** + * The Dragonpay issuer value of the shopper\'s selected bank. Set this to an **id** of a Dragonpay issuer to preselect it. + */ + 'issuer': string; + /** + * The shopper’s email address. + */ + 'shopperEmail'?: string; + /** + * **dragonpay** + */ + 'type': DragonpayDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "issuer", + "baseName": "issuer", + "type": "string" + }, + { + "name": "shopperEmail", + "baseName": "shopperEmail", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "DragonpayDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return DragonpayDetails.attributeTypeMap; + } +} + +export namespace DragonpayDetails { + export enum TypeEnum { + Ebanking = 'dragonpay_ebanking', + OtcBanking = 'dragonpay_otc_banking', + OtcNonBanking = 'dragonpay_otc_non_banking', + OtcPhilippines = 'dragonpay_otc_philippines' + } +} diff --git a/src/typings/checkout/econtextVoucherDetails.ts b/src/typings/checkout/econtextVoucherDetails.ts new file mode 100644 index 0000000..14944c1 --- /dev/null +++ b/src/typings/checkout/econtextVoucherDetails.ts @@ -0,0 +1,74 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class EcontextVoucherDetails { + /** + * The shopper\'s first name. + */ + 'firstName': string; + /** + * The shopper\'s last name. + */ + 'lastName': string; + /** + * The shopper\'s email. + */ + 'shopperEmail': string; + /** + * The shopper\'s contact number. It must have an international number format, for example **+31 20 779 1846**. Formats like **+31 (0)20 779 1846** or **0031 20 779 1846** are not accepted. + */ + 'telephoneNumber': string; + /** + * **econtextvoucher** + */ + 'type': EcontextVoucherDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "firstName", + "baseName": "firstName", + "type": "string" + }, + { + "name": "lastName", + "baseName": "lastName", + "type": "string" + }, + { + "name": "shopperEmail", + "baseName": "shopperEmail", + "type": "string" + }, + { + "name": "telephoneNumber", + "baseName": "telephoneNumber", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "EcontextVoucherDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return EcontextVoucherDetails.attributeTypeMap; + } +} + +export namespace EcontextVoucherDetails { + export enum TypeEnum { + Seveneleven = 'econtext_seveneleven', + Stores = 'econtext_stores' + } +} diff --git a/src/typings/checkout/entercashDetails.ts b/src/typings/checkout/entercashDetails.ts new file mode 100644 index 0000000..43977df --- /dev/null +++ b/src/typings/checkout/entercashDetails.ts @@ -0,0 +1,46 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class EntercashDetails { + /** + * The issuer id of the shopper\'s selected bank. + */ + 'issuer': string; + /** + * **entercash** + */ + 'type': EntercashDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "issuer", + "baseName": "issuer", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "EntercashDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return EntercashDetails.attributeTypeMap; + } +} + +export namespace EntercashDetails { + export enum TypeEnum { + Entercash = 'entercash' + } +} diff --git a/src/typings/checkout/externalPlatform.ts b/src/typings/checkout/externalPlatform.ts new file mode 100644 index 0000000..278f111 --- /dev/null +++ b/src/typings/checkout/externalPlatform.ts @@ -0,0 +1,50 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class ExternalPlatform { + /** + * External platform integrator. + */ + 'integrator'?: string; + /** + * Name of the field. For example, Name of External Platform. + */ + 'name'?: string; + /** + * Version of the field. For example, Version of External Platform. + */ + 'version'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "integrator", + "baseName": "integrator", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "version", + "baseName": "version", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ExternalPlatform.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/forexQuote.ts b/src/typings/checkout/forexQuote.ts new file mode 100644 index 0000000..1576651 --- /dev/null +++ b/src/typings/checkout/forexQuote.ts @@ -0,0 +1,121 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Amount } from './amount'; + +export class ForexQuote { + /** + * The account name. + */ + 'account'?: string; + /** + * The account type. + */ + 'accountType'?: string; + 'baseAmount'?: Amount; + /** + * The base points. + */ + 'basePoints': number; + 'buy'?: Amount; + 'interbank'?: Amount; + /** + * The reference assigned to the forex quote request. + */ + 'reference'?: string; + 'sell'?: Amount; + /** + * The signature to validate the integrity. + */ + 'signature'?: string; + /** + * The source of the forex quote. + */ + 'source'?: string; + /** + * The type of forex. + */ + 'type'?: string; + /** + * The date until which the forex quote is valid. + */ + 'validTill': Date; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "account", + "baseName": "account", + "type": "string" + }, + { + "name": "accountType", + "baseName": "accountType", + "type": "string" + }, + { + "name": "baseAmount", + "baseName": "baseAmount", + "type": "Amount" + }, + { + "name": "basePoints", + "baseName": "basePoints", + "type": "number" + }, + { + "name": "buy", + "baseName": "buy", + "type": "Amount" + }, + { + "name": "interbank", + "baseName": "interbank", + "type": "Amount" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string" + }, + { + "name": "sell", + "baseName": "sell", + "type": "Amount" + }, + { + "name": "signature", + "baseName": "signature", + "type": "string" + }, + { + "name": "source", + "baseName": "source", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "validTill", + "baseName": "validTill", + "type": "Date" + } ]; + + static getAttributeTypeMap() { + return ForexQuote.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/fraudCheckResult.ts b/src/typings/checkout/fraudCheckResult.ts new file mode 100644 index 0000000..f2a2c16 --- /dev/null +++ b/src/typings/checkout/fraudCheckResult.ts @@ -0,0 +1,50 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class FraudCheckResult { + /** + * The fraud score generated by the risk check. + */ + 'accountScore': number; + /** + * The ID of the risk check. + */ + 'checkId': number; + /** + * The name of the risk check. + */ + 'name': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountScore", + "baseName": "accountScore", + "type": "number" + }, + { + "name": "checkId", + "baseName": "checkId", + "type": "number" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return FraudCheckResult.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/fraudResult.ts b/src/typings/checkout/fraudResult.ts new file mode 100644 index 0000000..79ec990 --- /dev/null +++ b/src/typings/checkout/fraudResult.ts @@ -0,0 +1,43 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { FraudCheckResult } from './fraudCheckResult'; + +export class FraudResult { + /** + * The total fraud score generated by the risk checks. + */ + 'accountScore': number; + /** + * The result of the individual risk checks. + */ + 'results'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountScore", + "baseName": "accountScore", + "type": "number" + }, + { + "name": "results", + "baseName": "results", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return FraudResult.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/genericIssuerPaymentMethodDetails.ts b/src/typings/checkout/genericIssuerPaymentMethodDetails.ts new file mode 100644 index 0000000..82c1738 --- /dev/null +++ b/src/typings/checkout/genericIssuerPaymentMethodDetails.ts @@ -0,0 +1,64 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class GenericIssuerPaymentMethodDetails { + /** + * The issuer id of the shopper\'s selected bank. + */ + 'issuer': string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * **genericissuer** + */ + 'type': GenericIssuerPaymentMethodDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "issuer", + "baseName": "issuer", + "type": "string" + }, + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "GenericIssuerPaymentMethodDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return GenericIssuerPaymentMethodDetails.attributeTypeMap; + } +} + +export namespace GenericIssuerPaymentMethodDetails { + export enum TypeEnum { + Eps = 'eps' + } +} diff --git a/src/typings/checkout/giropayDetails.ts b/src/typings/checkout/giropayDetails.ts new file mode 100644 index 0000000..266f1c4 --- /dev/null +++ b/src/typings/checkout/giropayDetails.ts @@ -0,0 +1,55 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class GiropayDetails { + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * **giropay** + */ + 'type'?: GiropayDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "GiropayDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return GiropayDetails.attributeTypeMap; + } +} + +export namespace GiropayDetails { + export enum TypeEnum { + Giropay = 'giropay' + } +} diff --git a/src/typings/checkout/googlePayDetails.ts b/src/typings/checkout/googlePayDetails.ts new file mode 100644 index 0000000..c6d83e0 --- /dev/null +++ b/src/typings/checkout/googlePayDetails.ts @@ -0,0 +1,76 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class GooglePayDetails { + /** + * The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + */ + 'fundingSource'?: GooglePayDetails.FundingSourceEnum; + /** + * The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. + */ + 'googlePayToken': string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * **paywithgoogle** + */ + 'type'?: GooglePayDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "fundingSource", + "baseName": "fundingSource", + "type": "GooglePayDetails.FundingSourceEnum" + }, + { + "name": "googlePayToken", + "baseName": "googlePayToken", + "type": "string" + }, + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "GooglePayDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return GooglePayDetails.attributeTypeMap; + } +} + +export namespace GooglePayDetails { + export enum FundingSourceEnum { + Debit = 'debit' + } + export enum TypeEnum { + Paywithgoogle = 'paywithgoogle' + } +} diff --git a/src/typings/checkout/idealDetails.ts b/src/typings/checkout/idealDetails.ts new file mode 100644 index 0000000..e7e7e22 --- /dev/null +++ b/src/typings/checkout/idealDetails.ts @@ -0,0 +1,64 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class IdealDetails { + /** + * The iDEAL issuer value of the shopper\'s selected bank. Set this to an **id** of an iDEAL issuer to preselect it. + */ + 'issuer': string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * **ideal** + */ + 'type'?: IdealDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "issuer", + "baseName": "issuer", + "type": "string" + }, + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "IdealDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return IdealDetails.attributeTypeMap; + } +} + +export namespace IdealDetails { + export enum TypeEnum { + Ideal = 'ideal' + } +} diff --git a/src/typings/checkout/inputDetail.ts b/src/typings/checkout/inputDetail.ts new file mode 100644 index 0000000..7863246 --- /dev/null +++ b/src/typings/checkout/inputDetail.ts @@ -0,0 +1,107 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Item } from './item'; +import { SubInputDetail } from './subInputDetail'; + +export class InputDetail { + /** + * Configuration parameters for the required input. + */ + 'configuration'?: { [key: string]: string; }; + /** + * Input details can also be provided recursively. + */ + 'details'?: Array; + /** + * Input details can also be provided recursively (deprecated). + */ + 'inputDetails'?: Array; + /** + * In case of a select, the URL from which to query the items. + */ + 'itemSearchUrl'?: string; + /** + * In case of a select, the items to choose from. + */ + 'items'?: Array; + /** + * The value to provide in the result. + */ + 'key'?: string; + /** + * True if this input value is optional. + */ + 'optional'?: boolean; + /** + * The type of the required input. + */ + 'type'?: string; + /** + * The value can be pre-filled, if available. + */ + 'value'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "configuration", + "baseName": "configuration", + "type": "{ [key: string]: string; }" + }, + { + "name": "details", + "baseName": "details", + "type": "Array" + }, + { + "name": "inputDetails", + "baseName": "inputDetails", + "type": "Array" + }, + { + "name": "itemSearchUrl", + "baseName": "itemSearchUrl", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "key", + "baseName": "key", + "type": "string" + }, + { + "name": "optional", + "baseName": "optional", + "type": "boolean" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return InputDetail.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/installmentOption.ts b/src/typings/checkout/installmentOption.ts new file mode 100644 index 0000000..e9c1118 --- /dev/null +++ b/src/typings/checkout/installmentOption.ts @@ -0,0 +1,65 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class InstallmentOption { + /** + * The maximum number of installments offered for this payment method. + */ + 'maxValue'?: number; + /** + * Defines the type of installment plan. If not set, defaults to **regular**. Possible values: * **regular** * **revolving** + */ + 'plans'?: Array; + /** + * Preselected number of installments offered for this payment method. + */ + 'preselectedValue'?: number; + /** + * An array of the number of installments that the shopper can choose from. For example, **[2,3,5]**. This cannot be specified simultaneously with `maxValue`. + */ + 'values'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "maxValue", + "baseName": "maxValue", + "type": "number" + }, + { + "name": "plans", + "baseName": "plans", + "type": "Array" + }, + { + "name": "preselectedValue", + "baseName": "preselectedValue", + "type": "number" + }, + { + "name": "values", + "baseName": "values", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return InstallmentOption.attributeTypeMap; + } +} + +export namespace InstallmentOption { + export enum PlansEnum { + Regular = 'regular', + Revolving = 'revolving' + } +} diff --git a/src/typings/checkout/installments.ts b/src/typings/checkout/installments.ts new file mode 100644 index 0000000..648e4d1 --- /dev/null +++ b/src/typings/checkout/installments.ts @@ -0,0 +1,47 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class Installments { + /** + * Defines the type of installment plan. If not set, defaults to **regular**. Possible values: * **regular** * **revolving** + */ + 'plan'?: Installments.PlanEnum; + /** + * Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. + */ + 'value': number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "plan", + "baseName": "plan", + "type": "Installments.PlanEnum" + }, + { + "name": "value", + "baseName": "value", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return Installments.attributeTypeMap; + } +} + +export namespace Installments { + export enum PlanEnum { + Regular = 'regular', + Revolving = 'revolving' + } +} diff --git a/src/typings/checkout/installments2.ts b/src/typings/checkout/installments2.ts new file mode 100644 index 0000000..2ef1095 --- /dev/null +++ b/src/typings/checkout/installments2.ts @@ -0,0 +1,32 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class Installments2 { + /** + * Maximum number of installments + */ + 'maxNumberOfInstallments': number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "maxNumberOfInstallments", + "baseName": "maxNumberOfInstallments", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return Installments2.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/item.ts b/src/typings/checkout/item.ts new file mode 100644 index 0000000..4de2a7f --- /dev/null +++ b/src/typings/checkout/item.ts @@ -0,0 +1,41 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class Item { + /** + * The value to provide in the result. + */ + 'id'?: string; + /** + * The display name. + */ + 'name'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Item.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/klarnaDetails.ts b/src/typings/checkout/klarnaDetails.ts new file mode 100644 index 0000000..80d7313 --- /dev/null +++ b/src/typings/checkout/klarnaDetails.ts @@ -0,0 +1,88 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class KlarnaDetails { + /** + * The address where to send the invoice. + */ + 'billingAddress'?: string; + /** + * The address where the goods should be delivered. + */ + 'deliveryAddress'?: string; + /** + * Shopper name, date of birth, phone number, and email address. + */ + 'personalDetails'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * **klarna** + */ + 'type': KlarnaDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "billingAddress", + "baseName": "billingAddress", + "type": "string" + }, + { + "name": "deliveryAddress", + "baseName": "deliveryAddress", + "type": "string" + }, + { + "name": "personalDetails", + "baseName": "personalDetails", + "type": "string" + }, + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "KlarnaDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return KlarnaDetails.attributeTypeMap; + } +} + +export namespace KlarnaDetails { + export enum TypeEnum { + Klarna = 'klarna', + Klarnapayments = 'klarnapayments', + KlarnapaymentsAccount = 'klarnapayments_account', + KlarnapaymentsB2b = 'klarnapayments_b2b', + KlarnaPaynow = 'klarna_paynow', + KlarnaAccount = 'klarna_account', + KlarnaB2b = 'klarna_b2b' + } +} diff --git a/src/typings/checkout/lianLianPayDetails.ts b/src/typings/checkout/lianLianPayDetails.ts new file mode 100644 index 0000000..86f7e4c --- /dev/null +++ b/src/typings/checkout/lianLianPayDetails.ts @@ -0,0 +1,45 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class LianLianPayDetails { + 'telephoneNumber': string; + /** + * **lianlianpay** + */ + 'type': LianLianPayDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "telephoneNumber", + "baseName": "telephoneNumber", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "LianLianPayDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return LianLianPayDetails.attributeTypeMap; + } +} + +export namespace LianLianPayDetails { + export enum TypeEnum { + Enterprise = 'lianlianpay_ebanking_enterprise', + Credit = 'lianlianpay_ebanking_credit', + Debit = 'lianlianpay_ebanking_debit' + } +} diff --git a/src/typings/checkout/lineItem.ts b/src/typings/checkout/lineItem.ts new file mode 100644 index 0000000..3e916f6 --- /dev/null +++ b/src/typings/checkout/lineItem.ts @@ -0,0 +1,121 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class LineItem { + /** + * Item amount excluding the tax, in minor units. + */ + 'amountExcludingTax'?: number; + /** + * Item amount including the tax, in minor units. + */ + 'amountIncludingTax'?: number; + /** + * Description of the line item. + */ + 'description'?: string; + /** + * ID of the line item. + */ + 'id'?: string; + /** + * Link to the picture of the purchased item. + */ + 'imageUrl'?: string; + /** + * Link to the purchased item. + */ + 'productUrl'?: string; + /** + * Number of items. + */ + 'quantity'?: number; + /** + * Tax amount, in minor units. + */ + 'taxAmount'?: number; + /** + * Required for AfterPay. Tax category: High, Low, None, Zero + */ + 'taxCategory'?: LineItem.TaxCategoryEnum; + /** + * Tax percentage, in minor units. + */ + 'taxPercentage'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "amountExcludingTax", + "baseName": "amountExcludingTax", + "type": "number" + }, + { + "name": "amountIncludingTax", + "baseName": "amountIncludingTax", + "type": "number" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "imageUrl", + "baseName": "imageUrl", + "type": "string" + }, + { + "name": "productUrl", + "baseName": "productUrl", + "type": "string" + }, + { + "name": "quantity", + "baseName": "quantity", + "type": "number" + }, + { + "name": "taxAmount", + "baseName": "taxAmount", + "type": "number" + }, + { + "name": "taxCategory", + "baseName": "taxCategory", + "type": "LineItem.TaxCategoryEnum" + }, + { + "name": "taxPercentage", + "baseName": "taxPercentage", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return LineItem.attributeTypeMap; + } +} + +export namespace LineItem { + export enum TaxCategoryEnum { + High = 'High', + Low = 'Low', + None = 'None', + Zero = 'Zero' + } +} diff --git a/src/typings/checkout/mandate.ts b/src/typings/checkout/mandate.ts new file mode 100644 index 0000000..23251df --- /dev/null +++ b/src/typings/checkout/mandate.ts @@ -0,0 +1,116 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class Mandate { + /** + * The billing amount of the recurring transactions. + */ + 'amount': string; + /** + * The limitation rule of the billing amount. Possible values: * **max**: The transaction amount can not exceed the `amount`. * **exact**: The transaction amount should be the same as the `amount`. + */ + 'amountRule'?: Mandate.AmountRuleEnum; + /** + * The rule to specify the period, within which the recurring debit can happen, relative to the mandate recurring date. Possible values: * **on**: On a specific date. * **before**: Before and on a specific date. * **after**: On and after a specific date. + */ + 'billingAttemptsRule'?: Mandate.BillingAttemptsRuleEnum; + /** + * The number of the day, on which the recurring debit can happen. Should be within the same calendar month as the mandate recurring date. Possible values: 1-31 based on the `frequency`. + */ + 'billingDay'?: string; + /** + * End date of the billing plan, in YYYY-MM-DD format. + */ + 'endsAt': string; + /** + * The frequency with which a shopper should be charged. Possible values: **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. + */ + 'frequency': Mandate.FrequencyEnum; + /** + * The message shown by UPI to the shopper on the approval screen. + */ + 'remarks'?: string; + /** + * Start date of the billing plan, in YYYY-MM-DD format. By default, the transaction date. + */ + 'startsAt'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "amount", + "baseName": "amount", + "type": "string" + }, + { + "name": "amountRule", + "baseName": "amountRule", + "type": "Mandate.AmountRuleEnum" + }, + { + "name": "billingAttemptsRule", + "baseName": "billingAttemptsRule", + "type": "Mandate.BillingAttemptsRuleEnum" + }, + { + "name": "billingDay", + "baseName": "billingDay", + "type": "string" + }, + { + "name": "endsAt", + "baseName": "endsAt", + "type": "string" + }, + { + "name": "frequency", + "baseName": "frequency", + "type": "Mandate.FrequencyEnum" + }, + { + "name": "remarks", + "baseName": "remarks", + "type": "string" + }, + { + "name": "startsAt", + "baseName": "startsAt", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Mandate.attributeTypeMap; + } +} + +export namespace Mandate { + export enum AmountRuleEnum { + Max = 'max', + Exact = 'exact' + } + export enum BillingAttemptsRuleEnum { + On = 'on', + Before = 'before', + After = 'after' + } + export enum FrequencyEnum { + Adhoc = 'adhoc', + Daily = 'daily', + Weekly = 'weekly', + BiWeekly = 'biWeekly', + Monthly = 'monthly', + Quarterly = 'quarterly', + HalfYearly = 'halfYearly', + Yearly = 'yearly' + } +} diff --git a/src/typings/checkout/masterpassDetails.ts b/src/typings/checkout/masterpassDetails.ts new file mode 100644 index 0000000..f1f7ad3 --- /dev/null +++ b/src/typings/checkout/masterpassDetails.ts @@ -0,0 +1,58 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class MasterpassDetails { + /** + * The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + */ + 'fundingSource'?: MasterpassDetails.FundingSourceEnum; + /** + * The Masterpass transaction ID. + */ + 'masterpassTransactionId': string; + /** + * **masterpass** + */ + 'type'?: MasterpassDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "fundingSource", + "baseName": "fundingSource", + "type": "MasterpassDetails.FundingSourceEnum" + }, + { + "name": "masterpassTransactionId", + "baseName": "masterpassTransactionId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "MasterpassDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return MasterpassDetails.attributeTypeMap; + } +} + +export namespace MasterpassDetails { + export enum FundingSourceEnum { + Debit = 'debit' + } + export enum TypeEnum { + Masterpass = 'masterpass' + } +} diff --git a/src/typings/checkout/mbwayDetails.ts b/src/typings/checkout/mbwayDetails.ts new file mode 100644 index 0000000..a63ad80 --- /dev/null +++ b/src/typings/checkout/mbwayDetails.ts @@ -0,0 +1,49 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class MbwayDetails { + 'shopperEmail': string; + 'telephoneNumber': string; + /** + * **mbway** + */ + 'type'?: MbwayDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "shopperEmail", + "baseName": "shopperEmail", + "type": "string" + }, + { + "name": "telephoneNumber", + "baseName": "telephoneNumber", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "MbwayDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return MbwayDetails.attributeTypeMap; + } +} + +export namespace MbwayDetails { + export enum TypeEnum { + Mbway = 'mbway' + } +} diff --git a/src/typings/checkout/merchantDevice.ts b/src/typings/checkout/merchantDevice.ts new file mode 100644 index 0000000..4ed91fb --- /dev/null +++ b/src/typings/checkout/merchantDevice.ts @@ -0,0 +1,50 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class MerchantDevice { + /** + * Operating system running on the merchant device. + */ + 'os'?: string; + /** + * Version of the operating system on the merchant device. + */ + 'osVersion'?: string; + /** + * Merchant device reference. + */ + 'reference'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "os", + "baseName": "os", + "type": "string" + }, + { + "name": "osVersion", + "baseName": "osVersion", + "type": "string" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MerchantDevice.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/merchantRiskIndicator.ts b/src/typings/checkout/merchantRiskIndicator.ts new file mode 100644 index 0000000..2edea1c --- /dev/null +++ b/src/typings/checkout/merchantRiskIndicator.ts @@ -0,0 +1,120 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Amount } from './amount'; + +export class MerchantRiskIndicator { + /** + * Whether the chosen delivery address is identical to the billing address. + */ + 'addressMatch'?: boolean; + /** + * Indicator regarding the delivery address. Allowed values: * `shipToBillingAddress` * `shipToVerifiedAddress` * `shipToNewAddress` * `shipToStore` * `digitalGoods` * `goodsNotShipped` * `other` + */ + 'deliveryAddressIndicator'?: MerchantRiskIndicator.DeliveryAddressIndicatorEnum; + /** + * The delivery email address (for digital goods). + */ + 'deliveryEmail'?: string; + /** + * The estimated delivery time for the shopper to receive the goods. Allowed values: * `electronicDelivery` * `sameDayShipping` * `overnightShipping` * `twoOrMoreDaysShipping` + */ + 'deliveryTimeframe'?: MerchantRiskIndicator.DeliveryTimeframeEnum; + 'giftCardAmount'?: Amount; + /** + * For prepaid or gift card purchase, total count of individual prepaid or gift cards/codes purchased. + */ + 'giftCardCount'?: number; + /** + * For pre-order purchases, the expected date this product will be available to the shopper. + */ + 'preOrderDate'?: Date; + /** + * Indicator for whether this transaction is for pre-ordering a product. + */ + 'preOrderPurchase'?: boolean; + /** + * Indicator for whether the shopper has already purchased the same items in the past. + */ + 'reorderItems'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "addressMatch", + "baseName": "addressMatch", + "type": "boolean" + }, + { + "name": "deliveryAddressIndicator", + "baseName": "deliveryAddressIndicator", + "type": "MerchantRiskIndicator.DeliveryAddressIndicatorEnum" + }, + { + "name": "deliveryEmail", + "baseName": "deliveryEmail", + "type": "string" + }, + { + "name": "deliveryTimeframe", + "baseName": "deliveryTimeframe", + "type": "MerchantRiskIndicator.DeliveryTimeframeEnum" + }, + { + "name": "giftCardAmount", + "baseName": "giftCardAmount", + "type": "Amount" + }, + { + "name": "giftCardCount", + "baseName": "giftCardCount", + "type": "number" + }, + { + "name": "preOrderDate", + "baseName": "preOrderDate", + "type": "Date" + }, + { + "name": "preOrderPurchase", + "baseName": "preOrderPurchase", + "type": "boolean" + }, + { + "name": "reorderItems", + "baseName": "reorderItems", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return MerchantRiskIndicator.attributeTypeMap; + } +} + +export namespace MerchantRiskIndicator { + export enum DeliveryAddressIndicatorEnum { + ShipToBillingAddress = 'shipToBillingAddress', + ShipToVerifiedAddress = 'shipToVerifiedAddress', + ShipToNewAddress = 'shipToNewAddress', + ShipToStore = 'shipToStore', + DigitalGoods = 'digitalGoods', + GoodsNotShipped = 'goodsNotShipped', + Other = 'other' + } + export enum DeliveryTimeframeEnum { + ElectronicDelivery = 'electronicDelivery', + SameDayShipping = 'sameDayShipping', + OvernightShipping = 'overnightShipping', + TwoOrMoreDaysShipping = 'twoOrMoreDaysShipping' + } +} diff --git a/src/typings/checkout/mobilePayDetails.ts b/src/typings/checkout/mobilePayDetails.ts new file mode 100644 index 0000000..d83b3d0 --- /dev/null +++ b/src/typings/checkout/mobilePayDetails.ts @@ -0,0 +1,37 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class MobilePayDetails { + /** + * **mobilepay** + */ + 'type'?: MobilePayDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "MobilePayDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return MobilePayDetails.attributeTypeMap; + } +} + +export namespace MobilePayDetails { + export enum TypeEnum { + Mobilepay = 'mobilepay' + } +} diff --git a/src/typings/checkout/models.ts b/src/typings/checkout/models.ts new file mode 100644 index 0000000..5629a72 --- /dev/null +++ b/src/typings/checkout/models.ts @@ -0,0 +1,700 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2020 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +export * from './accountInfo'; +export * from './achDetails'; +export * from './additionalData3DSecure'; +export * from './additionalDataAirline'; +export * from './additionalDataCarRental'; +export * from './additionalDataCommon'; +export * from './additionalDataLevel23'; +export * from './additionalDataLodging'; +export * from './additionalDataOpenInvoice'; +export * from './additionalDataOpi'; +export * from './additionalDataRatepay'; +export * from './additionalDataRetry'; +export * from './additionalDataRisk'; +export * from './additionalDataRiskStandalone'; +export * from './additionalDataSubMerchant'; +export * from './additionalDataTemporaryServices'; +export * from './additionalDataWallets'; +export * from './address'; +export * from './afterpayDetails'; +export * from './amazonPayDetails'; +export * from './amount'; +export * from './androidPayDetails'; +export * from './applePayDetails'; +export * from './applicationInfo'; +export * from './avs'; +export * from './bacsDirectDebitDetails'; +export * from './bankAccount'; +export * from './billDeskDetails'; +export * from './blikDetails'; +export * from './browserInfo'; +export * from './card'; +export * from './cardDetails'; +export * from './cellulantDetails'; +export * from './checkoutAwaitAction'; +export * from './checkoutBalanceCheckRequest'; +export * from './checkoutBalanceCheckResponse'; +export * from './checkoutBankTransferAction'; +export * from './checkoutCancelOrderRequest'; +export * from './checkoutCancelOrderResponse'; +export * from './checkoutCreateOrderRequest'; +export * from './checkoutCreateOrderResponse'; +export * from './checkoutDonationAction'; +export * from './checkoutOneTimePasscodeAction'; +export * from './checkoutOrder'; +export * from './checkoutOrderResponse'; +export * from './checkoutQrCodeAction'; +export * from './checkoutRedirectAction'; +export * from './checkoutSDKAction'; +export * from './checkoutThreeDS2Action'; +export * from './checkoutUtilityRequest'; +export * from './checkoutUtilityResponse'; +export * from './checkoutVoucherAction'; +export * from './commonField'; +export * from './company'; +export * from './configuration'; +export * from './createPaymentLinkRequest'; +export * from './detailsRequest'; +export * from './deviceRenderOptions'; +export * from './dokuDetails'; +export * from './dotpayDetails'; +export * from './dragonpayDetails'; +export * from './econtextVoucherDetails'; +export * from './entercashDetails'; +export * from './externalPlatform'; +export * from './forexQuote'; +export * from './fraudCheckResult'; +export * from './fraudResult'; +export * from './genericIssuerPaymentMethodDetails'; +export * from './giropayDetails'; +export * from './googlePayDetails'; +export * from './idealDetails'; +export * from './inputDetail'; +export * from './installmentOption'; +export * from './installments'; +export * from './installments2'; +export * from './item'; +export * from './klarnaDetails'; +export * from './lianLianPayDetails'; +export * from './lineItem'; +export * from './mandate'; +export * from './masterpassDetails'; +export * from './mbwayDetails'; +export * from './merchantDevice'; +export * from './merchantRiskIndicator'; +export * from './mobilePayDetails'; +export * from './molPayDetails'; +export * from './name'; +export * from './openInvoiceDetails'; +export * from './payPalDetails'; +export * from './payUUpiDetails'; +export * from './paymentCompletionDetails'; +export * from './paymentDetails'; +export * from './paymentDetailsResponse'; +export * from './paymentLinkResource'; +export * from './paymentMethod'; +export * from './paymentMethodGroup'; +export * from './paymentMethodsRequest'; +export * from './paymentMethodsResponse'; +export * from './paymentRequest'; +export * from './paymentResponse'; +export * from './paymentSetupRequest'; +export * from './paymentSetupResponse'; +export * from './paymentVerificationRequest'; +export * from './paymentVerificationResponse'; +export * from './qiwiWalletDetails'; +export * from './ratepayDetails'; +export * from './recurring'; +export * from './recurringDetail'; +export * from './redirect'; +export * from './responseAdditionalData3DSecure'; +export * from './responseAdditionalDataBillingAddress'; +export * from './responseAdditionalDataCard'; +export * from './responseAdditionalDataCommon'; +export * from './responseAdditionalDataDeliveryAddress'; +export * from './responseAdditionalDataInstallments'; +export * from './responseAdditionalDataNetworkTokens'; +export * from './responseAdditionalDataOpi'; +export * from './responseAdditionalDataPayPal'; +export * from './responseAdditionalDataSepa'; +export * from './riskData'; +export * from './sDKEphemPubKey'; +export * from './samsungPayDetails'; +export * from './sepaDirectDebitDetails'; +export * from './serviceError'; +export * from './serviceError2'; +export * from './shopperInput'; +export * from './shopperInteractionDevice'; +export * from './split'; +export * from './splitAmount'; +export * from './storedDetails'; +export * from './storedPaymentMethod'; +export * from './storedPaymentMethodDetails'; +export * from './subInputDetail'; +export * from './threeDS2RequestData'; +export * from './threeDS2Result'; +export * from './threeDSecureData'; +export * from './updatePaymentLinkRequest'; +export * from './upiDetails'; +export * from './vippsDetails'; +export * from './visaCheckoutDetails'; +export * from './weChatPayDetails'; +export * from './weChatPayMiniProgramDetails'; +export * from './zipDetails'; + +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + + +import { AccountInfo } from './accountInfo'; +import { AchDetails } from './achDetails'; +import { AdditionalData3DSecure } from './additionalData3DSecure'; +import { AdditionalDataAirline } from './additionalDataAirline'; +import { AdditionalDataCarRental } from './additionalDataCarRental'; +import { AdditionalDataCommon } from './additionalDataCommon'; +import { AdditionalDataLevel23 } from './additionalDataLevel23'; +import { AdditionalDataLodging } from './additionalDataLodging'; +import { AdditionalDataOpenInvoice } from './additionalDataOpenInvoice'; +import { AdditionalDataOpi } from './additionalDataOpi'; +import { AdditionalDataRatepay } from './additionalDataRatepay'; +import { AdditionalDataRetry } from './additionalDataRetry'; +import { AdditionalDataRisk } from './additionalDataRisk'; +import { AdditionalDataRiskStandalone } from './additionalDataRiskStandalone'; +import { AdditionalDataSubMerchant } from './additionalDataSubMerchant'; +import { AdditionalDataTemporaryServices } from './additionalDataTemporaryServices'; +import { AdditionalDataWallets } from './additionalDataWallets'; +import { Address } from './address'; +import { AfterpayDetails } from './afterpayDetails'; +import { AmazonPayDetails } from './amazonPayDetails'; +import { Amount } from './amount'; +import { AndroidPayDetails } from './androidPayDetails'; +import { ApplePayDetails } from './applePayDetails'; +import { ApplicationInfo } from './applicationInfo'; +import { Avs } from './avs'; +import { BacsDirectDebitDetails } from './bacsDirectDebitDetails'; +import { BankAccount } from './bankAccount'; +import { BillDeskDetails } from './billDeskDetails'; +import { BlikDetails } from './blikDetails'; +import { BrowserInfo } from './browserInfo'; +import { Card } from './card'; +import { CardDetails } from './cardDetails'; +import { CellulantDetails } from './cellulantDetails'; +import { CheckoutAwaitAction } from './checkoutAwaitAction'; +import { CheckoutBalanceCheckRequest } from './checkoutBalanceCheckRequest'; +import { CheckoutBalanceCheckResponse } from './checkoutBalanceCheckResponse'; +import { CheckoutBankTransferAction } from './checkoutBankTransferAction'; +import { CheckoutCancelOrderRequest } from './checkoutCancelOrderRequest'; +import { CheckoutCancelOrderResponse } from './checkoutCancelOrderResponse'; +import { CheckoutCreateOrderRequest } from './checkoutCreateOrderRequest'; +import { CheckoutCreateOrderResponse } from './checkoutCreateOrderResponse'; +import { CheckoutDonationAction } from './checkoutDonationAction'; +import { CheckoutOneTimePasscodeAction } from './checkoutOneTimePasscodeAction'; +import { CheckoutOrder } from './checkoutOrder'; +import { CheckoutOrderResponse } from './checkoutOrderResponse'; +import { CheckoutQrCodeAction } from './checkoutQrCodeAction'; +import { CheckoutRedirectAction } from './checkoutRedirectAction'; +import { CheckoutSDKAction } from './checkoutSDKAction'; +import { CheckoutThreeDS2Action } from './checkoutThreeDS2Action'; +import { CheckoutUtilityRequest } from './checkoutUtilityRequest'; +import { CheckoutUtilityResponse } from './checkoutUtilityResponse'; +import { CheckoutVoucherAction } from './checkoutVoucherAction'; +import { CommonField } from './commonField'; +import { Company } from './company'; +import { Configuration } from './configuration'; +import { CreatePaymentLinkRequest } from './createPaymentLinkRequest'; +import { DetailsRequest } from './detailsRequest'; +import { DeviceRenderOptions } from './deviceRenderOptions'; +import { DokuDetails } from './dokuDetails'; +import { DotpayDetails } from './dotpayDetails'; +import { DragonpayDetails } from './dragonpayDetails'; +import { EcontextVoucherDetails } from './econtextVoucherDetails'; +import { EntercashDetails } from './entercashDetails'; +import { ExternalPlatform } from './externalPlatform'; +import { ForexQuote } from './forexQuote'; +import { FraudCheckResult } from './fraudCheckResult'; +import { FraudResult } from './fraudResult'; +import { GenericIssuerPaymentMethodDetails } from './genericIssuerPaymentMethodDetails'; +import { GiropayDetails } from './giropayDetails'; +import { GooglePayDetails } from './googlePayDetails'; +import { IdealDetails } from './idealDetails'; +import { InputDetail } from './inputDetail'; +import { InstallmentOption } from './installmentOption'; +import { Installments } from './installments'; +import { Installments2 } from './installments2'; +import { Item } from './item'; +import { KlarnaDetails } from './klarnaDetails'; +import { LianLianPayDetails } from './lianLianPayDetails'; +import { LineItem } from './lineItem'; +import { Mandate } from './mandate'; +import { MasterpassDetails } from './masterpassDetails'; +import { MbwayDetails } from './mbwayDetails'; +import { MerchantDevice } from './merchantDevice'; +import { MerchantRiskIndicator } from './merchantRiskIndicator'; +import { MobilePayDetails } from './mobilePayDetails'; +import { MolPayDetails } from './molPayDetails'; +import { Name } from './name'; +import { OpenInvoiceDetails } from './openInvoiceDetails'; +import { PayPalDetails } from './payPalDetails'; +import { PayUUpiDetails } from './payUUpiDetails'; +import { PaymentCompletionDetails } from './paymentCompletionDetails'; +import { PaymentDetails } from './paymentDetails'; +import { PaymentDetailsResponse } from './paymentDetailsResponse'; +import { PaymentLinkResource } from './paymentLinkResource'; +import { PaymentMethod } from './paymentMethod'; +import { PaymentMethodGroup } from './paymentMethodGroup'; +import { PaymentMethodsRequest } from './paymentMethodsRequest'; +import { PaymentMethodsResponse } from './paymentMethodsResponse'; +import { PaymentRequest } from './paymentRequest'; +import { PaymentResponse } from './paymentResponse'; +import { PaymentSetupRequest } from './paymentSetupRequest'; +import { PaymentSetupResponse } from './paymentSetupResponse'; +import { PaymentVerificationRequest } from './paymentVerificationRequest'; +import { PaymentVerificationResponse } from './paymentVerificationResponse'; +import { QiwiWalletDetails } from './qiwiWalletDetails'; +import { RatepayDetails } from './ratepayDetails'; +import { Recurring } from './recurring'; +import { RecurringDetail } from './recurringDetail'; +import { Redirect } from './redirect'; +import { ResponseAdditionalData3DSecure } from './responseAdditionalData3DSecure'; +import { ResponseAdditionalDataBillingAddress } from './responseAdditionalDataBillingAddress'; +import { ResponseAdditionalDataCard } from './responseAdditionalDataCard'; +import { ResponseAdditionalDataCommon } from './responseAdditionalDataCommon'; +import { ResponseAdditionalDataDeliveryAddress } from './responseAdditionalDataDeliveryAddress'; +import { ResponseAdditionalDataInstallments } from './responseAdditionalDataInstallments'; +import { ResponseAdditionalDataNetworkTokens } from './responseAdditionalDataNetworkTokens'; +import { ResponseAdditionalDataOpi } from './responseAdditionalDataOpi'; +import { ResponseAdditionalDataPayPal } from './responseAdditionalDataPayPal'; +import { ResponseAdditionalDataSepa } from './responseAdditionalDataSepa'; +import { RiskData } from './riskData'; +import { SDKEphemPubKey } from './sDKEphemPubKey'; +import { SamsungPayDetails } from './samsungPayDetails'; +import { SepaDirectDebitDetails } from './sepaDirectDebitDetails'; +import { ServiceError } from './serviceError'; +import { ServiceError2 } from './serviceError2'; +import { ShopperInput } from './shopperInput'; +import { ShopperInteractionDevice } from './shopperInteractionDevice'; +import { Split } from './split'; +import { SplitAmount } from './splitAmount'; +import { StoredDetails } from './storedDetails'; +import { StoredPaymentMethod } from './storedPaymentMethod'; +import { StoredPaymentMethodDetails } from './storedPaymentMethodDetails'; +import { SubInputDetail } from './subInputDetail'; +import { ThreeDS2RequestData } from './threeDS2RequestData'; +import { ThreeDS2Result } from './threeDS2Result'; +import { ThreeDSecureData } from './threeDSecureData'; +import { UpdatePaymentLinkRequest } from './updatePaymentLinkRequest'; +import { UpiDetails } from './upiDetails'; +import { VippsDetails } from './vippsDetails'; +import { VisaCheckoutDetails } from './visaCheckoutDetails'; +import { WeChatPayDetails } from './weChatPayDetails'; +import { WeChatPayMiniProgramDetails } from './weChatPayMiniProgramDetails'; +import { ZipDetails } from './zipDetails'; + +/* tslint:disable:no-unused-variable */ +let primitives = [ + "string", + "boolean", + "double", + "integer", + "long", + "float", + "number", + "any" + ]; + +let enumsMap: {[index: string]: any} = { + "AccountInfo.AccountAgeIndicatorEnum": AccountInfo.AccountAgeIndicatorEnum, + "AccountInfo.AccountChangeIndicatorEnum": AccountInfo.AccountChangeIndicatorEnum, + "AccountInfo.AccountTypeEnum": AccountInfo.AccountTypeEnum, + "AccountInfo.DeliveryAddressUsageIndicatorEnum": AccountInfo.DeliveryAddressUsageIndicatorEnum, + "AccountInfo.PasswordChangeIndicatorEnum": AccountInfo.PasswordChangeIndicatorEnum, + "AccountInfo.PaymentAccountIndicatorEnum": AccountInfo.PaymentAccountIndicatorEnum, + "AchDetails.TypeEnum": AchDetails.TypeEnum, + "AdditionalDataCommon.IndustryUsageEnum": AdditionalDataCommon.IndustryUsageEnum, + "AfterpayDetails.TypeEnum": AfterpayDetails.TypeEnum, + "AmazonPayDetails.TypeEnum": AmazonPayDetails.TypeEnum, + "AndroidPayDetails.TypeEnum": AndroidPayDetails.TypeEnum, + "ApplePayDetails.FundingSourceEnum": ApplePayDetails.FundingSourceEnum, + "ApplePayDetails.TypeEnum": ApplePayDetails.TypeEnum, + "Avs.EnabledEnum": Avs.EnabledEnum, + "BacsDirectDebitDetails.TypeEnum": BacsDirectDebitDetails.TypeEnum, + "BillDeskDetails.TypeEnum": BillDeskDetails.TypeEnum, + "BlikDetails.TypeEnum": BlikDetails.TypeEnum, + "CardDetails.FundingSourceEnum": CardDetails.FundingSourceEnum, + "CellulantDetails.TypeEnum": CellulantDetails.TypeEnum, + "CheckoutAwaitAction.TypeEnum": CheckoutAwaitAction.TypeEnum, + "CheckoutBalanceCheckRequest.RecurringProcessingModelEnum": CheckoutBalanceCheckRequest.RecurringProcessingModelEnum, + "CheckoutBalanceCheckRequest.ShopperInteractionEnum": CheckoutBalanceCheckRequest.ShopperInteractionEnum, + "CheckoutBalanceCheckResponse.ResultCodeEnum": CheckoutBalanceCheckResponse.ResultCodeEnum, + "CheckoutBankTransferAction.TypeEnum": CheckoutBankTransferAction.TypeEnum, + "CheckoutCancelOrderResponse.ResultCodeEnum": CheckoutCancelOrderResponse.ResultCodeEnum, + "CheckoutCreateOrderResponse.ResultCodeEnum": CheckoutCreateOrderResponse.ResultCodeEnum, + "CheckoutDonationAction.TypeEnum": CheckoutDonationAction.TypeEnum, + "CheckoutOneTimePasscodeAction.TypeEnum": CheckoutOneTimePasscodeAction.TypeEnum, + "CheckoutQrCodeAction.TypeEnum": CheckoutQrCodeAction.TypeEnum, + "CheckoutRedirectAction.TypeEnum": CheckoutRedirectAction.TypeEnum, + "CheckoutSDKAction.TypeEnum": CheckoutSDKAction.TypeEnum, + "CheckoutThreeDS2Action.TypeEnum": CheckoutThreeDS2Action.TypeEnum, + "CheckoutVoucherAction.TypeEnum": CheckoutVoucherAction.TypeEnum, + "Configuration.CardHolderNameEnum": Configuration.CardHolderNameEnum, + "CreatePaymentLinkRequest.RecurringProcessingModelEnum": CreatePaymentLinkRequest.RecurringProcessingModelEnum, + "CreatePaymentLinkRequest.RequiredShopperFieldsEnum": CreatePaymentLinkRequest.RequiredShopperFieldsEnum, + "DeviceRenderOptions.SdkInterfaceEnum": DeviceRenderOptions.SdkInterfaceEnum, + "DeviceRenderOptions.SdkUiTypeEnum": DeviceRenderOptions.SdkUiTypeEnum, + "DokuDetails.TypeEnum": DokuDetails.TypeEnum, + "DotpayDetails.TypeEnum": DotpayDetails.TypeEnum, + "DragonpayDetails.TypeEnum": DragonpayDetails.TypeEnum, + "EcontextVoucherDetails.TypeEnum": EcontextVoucherDetails.TypeEnum, + "EntercashDetails.TypeEnum": EntercashDetails.TypeEnum, + "GenericIssuerPaymentMethodDetails.TypeEnum": GenericIssuerPaymentMethodDetails.TypeEnum, + "GiropayDetails.TypeEnum": GiropayDetails.TypeEnum, + "GooglePayDetails.FundingSourceEnum": GooglePayDetails.FundingSourceEnum, + "GooglePayDetails.TypeEnum": GooglePayDetails.TypeEnum, + "IdealDetails.TypeEnum": IdealDetails.TypeEnum, + "InstallmentOption.PlansEnum": InstallmentOption.PlansEnum, + "Installments.PlanEnum": Installments.PlanEnum, + "KlarnaDetails.TypeEnum": KlarnaDetails.TypeEnum, + "LianLianPayDetails.TypeEnum": LianLianPayDetails.TypeEnum, + "LineItem.TaxCategoryEnum": LineItem.TaxCategoryEnum, + "Mandate.AmountRuleEnum": Mandate.AmountRuleEnum, + "Mandate.BillingAttemptsRuleEnum": Mandate.BillingAttemptsRuleEnum, + "Mandate.FrequencyEnum": Mandate.FrequencyEnum, + "MasterpassDetails.FundingSourceEnum": MasterpassDetails.FundingSourceEnum, + "MasterpassDetails.TypeEnum": MasterpassDetails.TypeEnum, + "MbwayDetails.TypeEnum": MbwayDetails.TypeEnum, + "MerchantRiskIndicator.DeliveryAddressIndicatorEnum": MerchantRiskIndicator.DeliveryAddressIndicatorEnum, + "MerchantRiskIndicator.DeliveryTimeframeEnum": MerchantRiskIndicator.DeliveryTimeframeEnum, + "MobilePayDetails.TypeEnum": MobilePayDetails.TypeEnum, + "MolPayDetails.TypeEnum": MolPayDetails.TypeEnum, + "OpenInvoiceDetails.TypeEnum": OpenInvoiceDetails.TypeEnum, + "PayPalDetails.SubtypeEnum": PayPalDetails.SubtypeEnum, + "PayPalDetails.TypeEnum": PayPalDetails.TypeEnum, + "PayUUpiDetails.TypeEnum": PayUUpiDetails.TypeEnum, + "PaymentDetails.TypeEnum": PaymentDetails.TypeEnum, + "PaymentDetailsResponse.ResultCodeEnum": PaymentDetailsResponse.ResultCodeEnum, + "PaymentLinkResource.RecurringProcessingModelEnum": PaymentLinkResource.RecurringProcessingModelEnum, + "PaymentLinkResource.StatusEnum": PaymentLinkResource.StatusEnum, + "PaymentMethod.FundingSourceEnum": PaymentMethod.FundingSourceEnum, + "PaymentMethodsRequest.ChannelEnum": PaymentMethodsRequest.ChannelEnum, + "PaymentRequest.ChannelEnum": PaymentRequest.ChannelEnum, + "PaymentRequest.EntityTypeEnum": PaymentRequest.EntityTypeEnum, + "PaymentRequest.RecurringProcessingModelEnum": PaymentRequest.RecurringProcessingModelEnum, + "PaymentRequest.ShopperInteractionEnum": PaymentRequest.ShopperInteractionEnum, + "PaymentResponse.ResultCodeEnum": PaymentResponse.ResultCodeEnum, + "PaymentSetupRequest.ChannelEnum": PaymentSetupRequest.ChannelEnum, + "PaymentSetupRequest.EntityTypeEnum": PaymentSetupRequest.EntityTypeEnum, + "PaymentSetupRequest.ShopperInteractionEnum": PaymentSetupRequest.ShopperInteractionEnum, + "PaymentVerificationResponse.ResultCodeEnum": PaymentVerificationResponse.ResultCodeEnum, + "QiwiWalletDetails.TypeEnum": QiwiWalletDetails.TypeEnum, + "RatepayDetails.TypeEnum": RatepayDetails.TypeEnum, + "Recurring.ContractEnum": Recurring.ContractEnum, + "Recurring.TokenServiceEnum": Recurring.TokenServiceEnum, + "RecurringDetail.FundingSourceEnum": RecurringDetail.FundingSourceEnum, + "Redirect.MethodEnum": Redirect.MethodEnum, + "ResponseAdditionalDataCommon.RecurringProcessingModelEnum": ResponseAdditionalDataCommon.RecurringProcessingModelEnum, + "SamsungPayDetails.FundingSourceEnum": SamsungPayDetails.FundingSourceEnum, + "SamsungPayDetails.TypeEnum": SamsungPayDetails.TypeEnum, + "SepaDirectDebitDetails.TypeEnum": SepaDirectDebitDetails.TypeEnum, + "ShopperInput.BillingAddressEnum": ShopperInput.BillingAddressEnum, + "ShopperInput.DeliveryAddressEnum": ShopperInput.DeliveryAddressEnum, + "ShopperInput.PersonalDetailsEnum": ShopperInput.PersonalDetailsEnum, + "Split.TypeEnum": Split.TypeEnum, + "StoredPaymentMethodDetails.TypeEnum": StoredPaymentMethodDetails.TypeEnum, + "ThreeDS2RequestData.ChallengeIndicatorEnum": ThreeDS2RequestData.ChallengeIndicatorEnum, + "ThreeDS2RequestData.TransactionTypeEnum": ThreeDS2RequestData.TransactionTypeEnum, + "ThreeDSecureData.AuthenticationResponseEnum": ThreeDSecureData.AuthenticationResponseEnum, + "ThreeDSecureData.DirectoryResponseEnum": ThreeDSecureData.DirectoryResponseEnum, + "UpdatePaymentLinkRequest.StatusEnum": UpdatePaymentLinkRequest.StatusEnum, + "UpiDetails.TypeEnum": UpiDetails.TypeEnum, + "VippsDetails.TypeEnum": VippsDetails.TypeEnum, + "VisaCheckoutDetails.FundingSourceEnum": VisaCheckoutDetails.FundingSourceEnum, + "VisaCheckoutDetails.TypeEnum": VisaCheckoutDetails.TypeEnum, + "WeChatPayDetails.TypeEnum": WeChatPayDetails.TypeEnum, + "WeChatPayMiniProgramDetails.TypeEnum": WeChatPayMiniProgramDetails.TypeEnum, + "ZipDetails.TypeEnum": ZipDetails.TypeEnum, +} + +let typeMap: {[index: string]: any} = { + "AccountInfo": AccountInfo, + "AchDetails": AchDetails, + "AdditionalData3DSecure": AdditionalData3DSecure, + "AdditionalDataAirline": AdditionalDataAirline, + "AdditionalDataCarRental": AdditionalDataCarRental, + "AdditionalDataCommon": AdditionalDataCommon, + "AdditionalDataLevel23": AdditionalDataLevel23, + "AdditionalDataLodging": AdditionalDataLodging, + "AdditionalDataOpenInvoice": AdditionalDataOpenInvoice, + "AdditionalDataOpi": AdditionalDataOpi, + "AdditionalDataRatepay": AdditionalDataRatepay, + "AdditionalDataRetry": AdditionalDataRetry, + "AdditionalDataRisk": AdditionalDataRisk, + "AdditionalDataRiskStandalone": AdditionalDataRiskStandalone, + "AdditionalDataSubMerchant": AdditionalDataSubMerchant, + "AdditionalDataTemporaryServices": AdditionalDataTemporaryServices, + "AdditionalDataWallets": AdditionalDataWallets, + "Address": Address, + "AfterpayDetails": AfterpayDetails, + "AmazonPayDetails": AmazonPayDetails, + "Amount": Amount, + "AndroidPayDetails": AndroidPayDetails, + "ApplePayDetails": ApplePayDetails, + "ApplicationInfo": ApplicationInfo, + "Avs": Avs, + "BacsDirectDebitDetails": BacsDirectDebitDetails, + "BankAccount": BankAccount, + "BillDeskDetails": BillDeskDetails, + "BlikDetails": BlikDetails, + "BrowserInfo": BrowserInfo, + "Card": Card, + "CardDetails": CardDetails, + "CellulantDetails": CellulantDetails, + "CheckoutAwaitAction": CheckoutAwaitAction, + "CheckoutBalanceCheckRequest": CheckoutBalanceCheckRequest, + "CheckoutBalanceCheckResponse": CheckoutBalanceCheckResponse, + "CheckoutBankTransferAction": CheckoutBankTransferAction, + "CheckoutCancelOrderRequest": CheckoutCancelOrderRequest, + "CheckoutCancelOrderResponse": CheckoutCancelOrderResponse, + "CheckoutCreateOrderRequest": CheckoutCreateOrderRequest, + "CheckoutCreateOrderResponse": CheckoutCreateOrderResponse, + "CheckoutDonationAction": CheckoutDonationAction, + "CheckoutOneTimePasscodeAction": CheckoutOneTimePasscodeAction, + "CheckoutOrder": CheckoutOrder, + "CheckoutOrderResponse": CheckoutOrderResponse, + "CheckoutQrCodeAction": CheckoutQrCodeAction, + "CheckoutRedirectAction": CheckoutRedirectAction, + "CheckoutSDKAction": CheckoutSDKAction, + "CheckoutThreeDS2Action": CheckoutThreeDS2Action, + "CheckoutUtilityRequest": CheckoutUtilityRequest, + "CheckoutUtilityResponse": CheckoutUtilityResponse, + "CheckoutVoucherAction": CheckoutVoucherAction, + "CommonField": CommonField, + "Company": Company, + "Configuration": Configuration, + "CreatePaymentLinkRequest": CreatePaymentLinkRequest, + "DetailsRequest": DetailsRequest, + "DeviceRenderOptions": DeviceRenderOptions, + "DokuDetails": DokuDetails, + "DotpayDetails": DotpayDetails, + "DragonpayDetails": DragonpayDetails, + "EcontextVoucherDetails": EcontextVoucherDetails, + "EntercashDetails": EntercashDetails, + "ExternalPlatform": ExternalPlatform, + "ForexQuote": ForexQuote, + "FraudCheckResult": FraudCheckResult, + "FraudResult": FraudResult, + "GenericIssuerPaymentMethodDetails": GenericIssuerPaymentMethodDetails, + "GiropayDetails": GiropayDetails, + "GooglePayDetails": GooglePayDetails, + "IdealDetails": IdealDetails, + "InputDetail": InputDetail, + "InstallmentOption": InstallmentOption, + "Installments": Installments, + "Installments2": Installments2, + "Item": Item, + "KlarnaDetails": KlarnaDetails, + "LianLianPayDetails": LianLianPayDetails, + "LineItem": LineItem, + "Mandate": Mandate, + "MasterpassDetails": MasterpassDetails, + "MbwayDetails": MbwayDetails, + "MerchantDevice": MerchantDevice, + "MerchantRiskIndicator": MerchantRiskIndicator, + "MobilePayDetails": MobilePayDetails, + "MolPayDetails": MolPayDetails, + "Name": Name, + "OpenInvoiceDetails": OpenInvoiceDetails, + "PayPalDetails": PayPalDetails, + "PayUUpiDetails": PayUUpiDetails, + "PaymentCompletionDetails": PaymentCompletionDetails, + "PaymentDetails": PaymentDetails, + "PaymentDetailsResponse": PaymentDetailsResponse, + "PaymentLinkResource": PaymentLinkResource, + "PaymentMethod": PaymentMethod, + "PaymentMethodGroup": PaymentMethodGroup, + "PaymentMethodsRequest": PaymentMethodsRequest, + "PaymentMethodsResponse": PaymentMethodsResponse, + "PaymentRequest": PaymentRequest, + "PaymentResponse": PaymentResponse, + "PaymentSetupRequest": PaymentSetupRequest, + "PaymentSetupResponse": PaymentSetupResponse, + "PaymentVerificationRequest": PaymentVerificationRequest, + "PaymentVerificationResponse": PaymentVerificationResponse, + "QiwiWalletDetails": QiwiWalletDetails, + "RatepayDetails": RatepayDetails, + "Recurring": Recurring, + "RecurringDetail": RecurringDetail, + "Redirect": Redirect, + "ResponseAdditionalData3DSecure": ResponseAdditionalData3DSecure, + "ResponseAdditionalDataBillingAddress": ResponseAdditionalDataBillingAddress, + "ResponseAdditionalDataCard": ResponseAdditionalDataCard, + "ResponseAdditionalDataCommon": ResponseAdditionalDataCommon, + "ResponseAdditionalDataDeliveryAddress": ResponseAdditionalDataDeliveryAddress, + "ResponseAdditionalDataInstallments": ResponseAdditionalDataInstallments, + "ResponseAdditionalDataNetworkTokens": ResponseAdditionalDataNetworkTokens, + "ResponseAdditionalDataOpi": ResponseAdditionalDataOpi, + "ResponseAdditionalDataPayPal": ResponseAdditionalDataPayPal, + "ResponseAdditionalDataSepa": ResponseAdditionalDataSepa, + "RiskData": RiskData, + "SDKEphemPubKey": SDKEphemPubKey, + "SamsungPayDetails": SamsungPayDetails, + "SepaDirectDebitDetails": SepaDirectDebitDetails, + "ServiceError": ServiceError, + "ServiceError2": ServiceError2, + "ShopperInput": ShopperInput, + "ShopperInteractionDevice": ShopperInteractionDevice, + "Split": Split, + "SplitAmount": SplitAmount, + "StoredDetails": StoredDetails, + "StoredPaymentMethod": StoredPaymentMethod, + "StoredPaymentMethodDetails": StoredPaymentMethodDetails, + "SubInputDetail": SubInputDetail, + "ThreeDS2RequestData": ThreeDS2RequestData, + "ThreeDS2Result": ThreeDS2Result, + "ThreeDSecureData": ThreeDSecureData, + "UpdatePaymentLinkRequest": UpdatePaymentLinkRequest, + "UpiDetails": UpiDetails, + "VippsDetails": VippsDetails, + "VisaCheckoutDetails": VisaCheckoutDetails, + "WeChatPayDetails": WeChatPayDetails, + "WeChatPayMiniProgramDetails": WeChatPayMiniProgramDetails, + "ZipDetails": ZipDetails, +} + +export class ObjectSerializer { + public static findCorrectType(data: any, expectedType: string) { + if (data == undefined) { + return expectedType; + } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { + return expectedType; + } else if (expectedType === "Date") { + return expectedType; + } else { + if (enumsMap[expectedType]) { + return expectedType; + } + + if (!typeMap[expectedType]) { + return expectedType; // w/e we don't know the type + } + + // Check the discriminator + let discriminatorProperty = typeMap[expectedType].discriminator; + if (discriminatorProperty == null) { + return expectedType; // the type does not have a discriminator. use it. + } else { + if (data[discriminatorProperty]) { + var discriminatorType = data[discriminatorProperty]; + if(typeMap[discriminatorType]){ + return discriminatorType; // use the type given in the discriminator + } else { + return expectedType; // discriminator did not map to a type + } + } else { + return expectedType; // discriminator was not present (or an empty string) + } + } + } + } + + public static serialize(data: any, type: string) { + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 + let subType: string = type.replace("Array<", ""); // Array => Type> + subType = subType.substring(0, subType.length - 1); // Type> => Type + let transformedData: any[] = []; + for (let index = 0; index < data.length; index++) { + let datum = data[index]; + transformedData.push(ObjectSerializer.serialize(datum, subType)); + } + return transformedData; + } else if (type === "Date") { + return data.toISOString(); + } else { + if (enumsMap[type]) { + return data; + } + if (!typeMap[type]) { // in case we dont know the type + return data; + } + + // Get the actual type of this object + type = this.findCorrectType(data, type); + + // get the map for the correct type. + let attributeTypes = typeMap[type].getAttributeTypeMap(); + let instance: {[index: string]: any} = {}; + for (let index = 0; index < attributeTypes.length; index++) { + let attributeType = attributeTypes[index]; + instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type); + } + return instance; + } + } + + public static deserialize(data: any, type: string) { + // polymorphism may change the actual type. + type = ObjectSerializer.findCorrectType(data, type); + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 + let subType: string = type.replace("Array<", ""); // Array => Type> + subType = subType.substring(0, subType.length - 1); // Type> => Type + let transformedData: any[] = []; + for (let index = 0; index < data.length; index++) { + let datum = data[index]; + transformedData.push(ObjectSerializer.deserialize(datum, subType)); + } + return transformedData; + } else if (type === "Date") { + return new Date(data); + } else { + if (enumsMap[type]) {// is Enum + return data; + } + + if (!typeMap[type]) { // dont know the type + return data; + } + let instance = new typeMap[type](); + let attributeTypes = typeMap[type].getAttributeTypeMap(); + for (let index = 0; index < attributeTypes.length; index++) { + let attributeType = attributeTypes[index]; + instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type); + } + return instance; + } + } +} diff --git a/src/typings/checkout/molPayDetails.ts b/src/typings/checkout/molPayDetails.ts new file mode 100644 index 0000000..980bc89 --- /dev/null +++ b/src/typings/checkout/molPayDetails.ts @@ -0,0 +1,47 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class MolPayDetails { + /** + * The shopper\'s bank. Specify this with the issuer value that corresponds to this bank. + */ + 'issuer': string; + /** + * **molpay** + */ + 'type': MolPayDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "issuer", + "baseName": "issuer", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "MolPayDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return MolPayDetails.attributeTypeMap; + } +} + +export namespace MolPayDetails { + export enum TypeEnum { + FpxMy = 'molpay_ebanking_fpx_MY', + Th = 'molpay_ebanking_TH' + } +} diff --git a/src/typings/checkout/name.ts b/src/typings/checkout/name.ts new file mode 100644 index 0000000..ab3ff0b --- /dev/null +++ b/src/typings/checkout/name.ts @@ -0,0 +1,50 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class Name { + /** + * The first name. + */ + 'firstName': string; + /** + * The name\'s infix, if applicable. >A maximum length of twenty (20) characters is imposed. + */ + 'infix'?: string; + /** + * The last name. + */ + 'lastName': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "firstName", + "baseName": "firstName", + "type": "string" + }, + { + "name": "infix", + "baseName": "infix", + "type": "string" + }, + { + "name": "lastName", + "baseName": "lastName", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Name.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/openInvoiceDetails.ts b/src/typings/checkout/openInvoiceDetails.ts new file mode 100644 index 0000000..490f147 --- /dev/null +++ b/src/typings/checkout/openInvoiceDetails.ts @@ -0,0 +1,82 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class OpenInvoiceDetails { + /** + * The address where to send the invoice. + */ + 'billingAddress'?: string; + /** + * The address where the goods should be delivered. + */ + 'deliveryAddress'?: string; + /** + * Shopper name, date of birth, phone number, and email address. + */ + 'personalDetails'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * **openinvoice** + */ + 'type'?: OpenInvoiceDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "billingAddress", + "baseName": "billingAddress", + "type": "string" + }, + { + "name": "deliveryAddress", + "baseName": "deliveryAddress", + "type": "string" + }, + { + "name": "personalDetails", + "baseName": "personalDetails", + "type": "string" + }, + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "OpenInvoiceDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return OpenInvoiceDetails.attributeTypeMap; + } +} + +export namespace OpenInvoiceDetails { + export enum TypeEnum { + Openinvoice = 'openinvoice' + } +} diff --git a/src/typings/checkout/payPalDetails.ts b/src/typings/checkout/payPalDetails.ts new file mode 100644 index 0000000..a8dae0a --- /dev/null +++ b/src/typings/checkout/payPalDetails.ts @@ -0,0 +1,86 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class PayPalDetails { + /** + * The unique ID associated with the order. + */ + 'orderID'?: string; + /** + * The unique ID associated with the payer. + */ + 'payerID'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * The type of flow to initiate. + */ + 'subtype'?: PayPalDetails.SubtypeEnum; + /** + * **paypal** + */ + 'type': PayPalDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "orderID", + "baseName": "orderID", + "type": "string" + }, + { + "name": "payerID", + "baseName": "payerID", + "type": "string" + }, + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "subtype", + "baseName": "subtype", + "type": "PayPalDetails.SubtypeEnum" + }, + { + "name": "type", + "baseName": "type", + "type": "PayPalDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return PayPalDetails.attributeTypeMap; + } +} + +export namespace PayPalDetails { + export enum SubtypeEnum { + Redirect = 'redirect', + Sdk = 'sdk' + } + export enum TypeEnum { + Paypal = 'paypal' + } +} diff --git a/src/typings/checkout/payUUpiDetails.ts b/src/typings/checkout/payUUpiDetails.ts new file mode 100644 index 0000000..a4bbd69 --- /dev/null +++ b/src/typings/checkout/payUUpiDetails.ts @@ -0,0 +1,73 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class PayUUpiDetails { + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only. + */ + 'shopperNotificationReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * **payu_IN_upi** + */ + 'type': PayUUpiDetails.TypeEnum; + /** + * The virtual payment address for UPI. + */ + 'virtualPaymentAddress'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "shopperNotificationReference", + "baseName": "shopperNotificationReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "PayUUpiDetails.TypeEnum" + }, + { + "name": "virtualPaymentAddress", + "baseName": "virtualPaymentAddress", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PayUUpiDetails.attributeTypeMap; + } +} + +export namespace PayUUpiDetails { + export enum TypeEnum { + PayuInUpi = 'payu_IN_upi' + } +} diff --git a/src/typings/checkout/paymentCompletionDetails.ts b/src/typings/checkout/paymentCompletionDetails.ts new file mode 100644 index 0000000..c53ca58 --- /dev/null +++ b/src/typings/checkout/paymentCompletionDetails.ts @@ -0,0 +1,167 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class PaymentCompletionDetails { + /** + * A payment session identifier returned by the card issuer. + */ + 'mD'?: string; + /** + * (3D) Payment Authentication Request data for the card issuer. + */ + 'paReq'?: string; + /** + * (3D) Payment Authentication Response data by the card issuer. + */ + 'paRes'?: string; + /** + * PayPal-generated token for recurring payments. + */ + 'billingToken'?: string; + /** + * The SMS verification code collected from the shopper. + */ + 'cupsecureplusSmscode'?: string; + /** + * PayPal-generated third party access token. + */ + 'facilitatorAccessToken'?: string; + /** + * A random number sent to the mobile phone number of the shopper to verify the payment. + */ + 'oneTimePasscode'?: string; + /** + * PayPal-assigned ID for the order. + */ + 'orderID'?: string; + /** + * PayPal-assigned ID for the payer (shopper). + */ + 'payerID'?: string; + /** + * Payload appended to the `returnURL` as a result of the redirect. + */ + 'payload'?: string; + /** + * PayPal-generated ID for the payment. + */ + 'paymentID'?: string; + /** + * Value passed from the WeChat MiniProgram `wx.requestPayment` **complete** callback. Possible values: any value starting with `requestPayment:`. + */ + 'paymentStatus'?: string; + /** + * The result of the redirect as appended to the `returnURL`. + */ + 'redirectResult'?: string; + /** + * Base64-encoded string returned by the Component after the challenge flow. It contains the following parameters: `transStatus`, `authorisationToken`. + */ + 'threeDSResult'?: string; + /** + * Base64-encoded string returned by the Component after the challenge flow. It contains the following parameter: `transStatus`. + */ + 'threeds2ChallengeResult'?: string; + /** + * Base64-encoded string returned by the Component after the challenge flow. It contains the following parameter: `threeDSCompInd`. + */ + 'threeds2Fingerprint'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "mD", + "baseName": "MD", + "type": "string" + }, + { + "name": "paReq", + "baseName": "PaReq", + "type": "string" + }, + { + "name": "paRes", + "baseName": "PaRes", + "type": "string" + }, + { + "name": "billingToken", + "baseName": "billingToken", + "type": "string" + }, + { + "name": "cupsecureplusSmscode", + "baseName": "cupsecureplus.smscode", + "type": "string" + }, + { + "name": "facilitatorAccessToken", + "baseName": "facilitatorAccessToken", + "type": "string" + }, + { + "name": "oneTimePasscode", + "baseName": "oneTimePasscode", + "type": "string" + }, + { + "name": "orderID", + "baseName": "orderID", + "type": "string" + }, + { + "name": "payerID", + "baseName": "payerID", + "type": "string" + }, + { + "name": "payload", + "baseName": "payload", + "type": "string" + }, + { + "name": "paymentID", + "baseName": "paymentID", + "type": "string" + }, + { + "name": "paymentStatus", + "baseName": "paymentStatus", + "type": "string" + }, + { + "name": "redirectResult", + "baseName": "redirectResult", + "type": "string" + }, + { + "name": "threeDSResult", + "baseName": "threeDSResult", + "type": "string" + }, + { + "name": "threeds2ChallengeResult", + "baseName": "threeds2.challengeResult", + "type": "string" + }, + { + "name": "threeds2Fingerprint", + "baseName": "threeds2.fingerprint", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PaymentCompletionDetails.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/paymentDetails.ts b/src/typings/checkout/paymentDetails.ts new file mode 100644 index 0000000..13b8123 --- /dev/null +++ b/src/typings/checkout/paymentDetails.ts @@ -0,0 +1,78 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class PaymentDetails { + /** + * The payment method type. + */ + 'type'?: PaymentDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "PaymentDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return PaymentDetails.attributeTypeMap; + } +} + +export namespace PaymentDetails { + export enum TypeEnum { + Alipay = 'alipay', + Multibanco = 'multibanco', + BankTransferIban = 'bankTransfer_IBAN', + Paybright = 'paybright', + Affirm = 'affirm', + Oney = 'oney', + Facilypay = 'facilypay', + Facilypay3x = 'facilypay_3x', + Facilypay4x = 'facilypay_4x', + Facilypay6x = 'facilypay_6x', + Facilypay10x = 'facilypay_10x', + Facilypay12x = 'facilypay_12x', + Unionpay = 'unionpay', + KcpBanktransfer = 'kcp_banktransfer', + KcpPayco = 'kcp_payco', + KcpCreditcard = 'kcp_creditcard', + WechatpaySdk = 'wechatpaySDK', + WechatpayQr = 'wechatpayQR', + WechatpayWeb = 'wechatpayWeb', + PayuInCashcard = 'payu_IN_cashcard', + PayuInNb = 'payu_IN_nb', + MolpayEbankingVn = 'molpay_ebanking_VN', + OpenbankingUk = 'openbanking_UK', + EbankingFi = 'ebanking_FI', + MolpayEbankingMy = 'molpay_ebanking_MY', + MolpayEbankingDirectMy = 'molpay_ebanking_direct_MY', + Swish = 'swish', + Twint = 'twint', + Pix = 'pix', + MolpayFpx = 'molpay_fpx', + Konbini = 'konbini', + DirectEbanking = 'directEbanking', + Boletobancario = 'boletobancario', + Neteller = 'neteller', + Dana = 'dana', + Paysafecard = 'paysafecard', + Cashticket = 'cashticket', + Isracard = 'isracard', + Ikano = 'ikano', + Karenmillen = 'karenmillen', + Oasis = 'oasis', + Warehouse = 'warehouse' + } +} diff --git a/src/typings/checkout/paymentDetailsResponse.ts b/src/typings/checkout/paymentDetailsResponse.ts new file mode 100644 index 0000000..230516f --- /dev/null +++ b/src/typings/checkout/paymentDetailsResponse.ts @@ -0,0 +1,149 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Amount } from './amount'; +import { CheckoutOrderResponse } from './checkoutOrderResponse'; +import { FraudResult } from './fraudResult'; +import { ThreeDS2Result } from './threeDS2Result'; + +export class PaymentDetailsResponse { + /** + * Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Account** > **API URLs** > **Additional data settings**. + */ + 'additionalData'?: { [key: string]: string; }; + 'amount'?: Amount; + /** + * Donation Token containing payment details for Adyen Giving. + */ + 'donationToken'?: string; + 'fraudResult'?: FraudResult; + /** + * The reference used during the /payments request. + */ + 'merchantReference'?: string; + 'order'?: CheckoutOrderResponse; + /** + * The payment method used in the transaction. + */ + 'paymentMethod'?: string; + /** + * Adyen\'s 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. + */ + 'pspReference'?: string; + /** + * If the payment\'s authorisation is refused or an error occurs during authorisation, this field holds Adyen\'s mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). + */ + 'refusalReason'?: string; + /** + * Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). + */ + 'refusalReasonCode'?: string; + /** + * The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper\'s device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. + */ + 'resultCode'?: PaymentDetailsResponse.ResultCodeEnum; + /** + * The shopperLocale. + */ + 'shopperLocale'?: string; + 'threeDS2Result'?: ThreeDS2Result; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "additionalData", + "baseName": "additionalData", + "type": "{ [key: string]: string; }" + }, + { + "name": "amount", + "baseName": "amount", + "type": "Amount" + }, + { + "name": "donationToken", + "baseName": "donationToken", + "type": "string" + }, + { + "name": "fraudResult", + "baseName": "fraudResult", + "type": "FraudResult" + }, + { + "name": "merchantReference", + "baseName": "merchantReference", + "type": "string" + }, + { + "name": "order", + "baseName": "order", + "type": "CheckoutOrderResponse" + }, + { + "name": "paymentMethod", + "baseName": "paymentMethod", + "type": "string" + }, + { + "name": "pspReference", + "baseName": "pspReference", + "type": "string" + }, + { + "name": "refusalReason", + "baseName": "refusalReason", + "type": "string" + }, + { + "name": "refusalReasonCode", + "baseName": "refusalReasonCode", + "type": "string" + }, + { + "name": "resultCode", + "baseName": "resultCode", + "type": "PaymentDetailsResponse.ResultCodeEnum" + }, + { + "name": "shopperLocale", + "baseName": "shopperLocale", + "type": "string" + }, + { + "name": "threeDS2Result", + "baseName": "threeDS2Result", + "type": "ThreeDS2Result" + } ]; + + static getAttributeTypeMap() { + return PaymentDetailsResponse.attributeTypeMap; + } +} + +export namespace PaymentDetailsResponse { + export enum ResultCodeEnum { + AuthenticationFinished = 'AuthenticationFinished', + Authorised = 'Authorised', + Cancelled = 'Cancelled', + ChallengeShopper = 'ChallengeShopper', + Error = 'Error', + IdentifyShopper = 'IdentifyShopper', + Pending = 'Pending', + PresentToShopper = 'PresentToShopper', + Received = 'Received', + RedirectShopper = 'RedirectShopper', + Refused = 'Refused', + Success = 'Success' + } +} diff --git a/src/typings/checkout/paymentLinkResource.ts b/src/typings/checkout/paymentLinkResource.ts new file mode 100644 index 0000000..a4d1488 --- /dev/null +++ b/src/typings/checkout/paymentLinkResource.ts @@ -0,0 +1,278 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Address } from './address'; +import { Amount } from './amount'; +import { ApplicationInfo } from './applicationInfo'; +import { LineItem } from './lineItem'; +import { Name } from './name'; +import { RiskData } from './riskData'; +import { Split } from './split'; + +export class PaymentLinkResource { + /** + * List of payment methods to be presented to the shopper. To refer to payment methods, use their `paymentMethod.type` from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]` + */ + 'allowedPaymentMethods'?: Array; + 'amount': Amount; + 'applicationInfo'?: ApplicationInfo; + 'billingAddress'?: Address; + /** + * List of payment methods to be hidden from the shopper. To refer to payment methods, use their `paymentMethod.type` from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]` + */ + 'blockedPaymentMethods'?: Array; + /** + * The shopper\'s two-letter country code. + */ + 'countryCode'?: string; + /** + * The date and time the purchased goods should be delivered. In ISO 8601 format. For example `2019-11-23T12:25:28Z`, or `2020-05-27T20:25:28+08:00`. + */ + 'deliverAt'?: Date; + 'deliveryAddress'?: Address; + /** + * A short description visible on the payment page. Maximum length: 280 characters. + */ + 'description'?: string; + /** + * The date that the payment link expires, in ISO 8601 format. For example `2019-11-23T12:25:28Z`, or `2020-05-27T20:25:28+08:00`. Maximum expiry date should be 70 days from when the payment link is created. If not provided, the default expiry is set to 24 hours after the payment link is created. + */ + 'expiresAt'?: string; + /** + * A unique identifier of the payment link. + */ + 'id': string; + /** + * Price and product information about the purchased items, to be included on the invoice sent to the shopper. This parameter is required for open invoice (_buy now, pay later_) payment methods such AfterPay, Klarna, RatePay, and Zip. + */ + 'lineItems'?: Array; + /** + * The merchant account identifier for which the payment link is created. + */ + 'merchantAccount': string; + /** + * This reference allows linking multiple transactions to each other for reporting purposes (for example, order auth-rate). The reference should be unique per billing cycle. + */ + 'merchantOrderReference'?: string; + /** + * Defines a recurring payment type. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder\'s balance drops below a certain amount. + */ + 'recurringProcessingModel'?: PaymentLinkResource.RecurringProcessingModelEnum; + /** + * A reference that is used to uniquely identify the payment in future communications about the payment status. + */ + 'reference': string; + /** + * Website URL used for redirection after payment is completed. If provided, a **Continue** button will be shown on the payment page. If shoppers select the button, they are redirected to the specified URL. + */ + 'returnUrl'?: string; + /** + * Indicates whether the payment link can be reused for multiple payments. If not provided, this defaults to **false** which means the link can be used for one successful payment only. + */ + 'reusable'?: boolean; + 'riskData'?: RiskData; + /** + * The shopper\'s email address. + */ + 'shopperEmail'?: string; + /** + * The language to be used in the payment page, specified by a combination of a language and country code. For example, `en-US`. For a list of shopper locales that Pay by Link supports, refer to [Language and localization](https://docs.adyen.com/online-payments/pay-by-link#language-and-localization). + */ + 'shopperLocale'?: string; + 'shopperName'?: Name; + /** + * A unique identifier for the shopper (for example, user ID or account ID). + */ + 'shopperReference'?: string; + /** + * An array of objects specifying how the payment should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/platforms/processing-payments#providing-split-information). + */ + 'splits'?: Array; + /** + * Status of the payment link. Possible values: * **active** * **expired** * **completed** (v66 and above) * **paid** (v65 and below) + */ + 'status': PaymentLinkResource.StatusEnum; + /** + * The physical store, for which this payment is processed. + */ + 'store'?: string; + /** + * When this is set to **true** and the `shopperReference` is provided, the payment details will be stored. + */ + 'storePaymentMethod'?: boolean; + /** + * The URL at which the shopper can complete the payment. + */ + 'url': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "allowedPaymentMethods", + "baseName": "allowedPaymentMethods", + "type": "Array" + }, + { + "name": "amount", + "baseName": "amount", + "type": "Amount" + }, + { + "name": "applicationInfo", + "baseName": "applicationInfo", + "type": "ApplicationInfo" + }, + { + "name": "billingAddress", + "baseName": "billingAddress", + "type": "Address" + }, + { + "name": "blockedPaymentMethods", + "baseName": "blockedPaymentMethods", + "type": "Array" + }, + { + "name": "countryCode", + "baseName": "countryCode", + "type": "string" + }, + { + "name": "deliverAt", + "baseName": "deliverAt", + "type": "Date" + }, + { + "name": "deliveryAddress", + "baseName": "deliveryAddress", + "type": "Address" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "expiresAt", + "baseName": "expiresAt", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "lineItems", + "baseName": "lineItems", + "type": "Array" + }, + { + "name": "merchantAccount", + "baseName": "merchantAccount", + "type": "string" + }, + { + "name": "merchantOrderReference", + "baseName": "merchantOrderReference", + "type": "string" + }, + { + "name": "recurringProcessingModel", + "baseName": "recurringProcessingModel", + "type": "PaymentLinkResource.RecurringProcessingModelEnum" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string" + }, + { + "name": "returnUrl", + "baseName": "returnUrl", + "type": "string" + }, + { + "name": "reusable", + "baseName": "reusable", + "type": "boolean" + }, + { + "name": "riskData", + "baseName": "riskData", + "type": "RiskData" + }, + { + "name": "shopperEmail", + "baseName": "shopperEmail", + "type": "string" + }, + { + "name": "shopperLocale", + "baseName": "shopperLocale", + "type": "string" + }, + { + "name": "shopperName", + "baseName": "shopperName", + "type": "Name" + }, + { + "name": "shopperReference", + "baseName": "shopperReference", + "type": "string" + }, + { + "name": "splits", + "baseName": "splits", + "type": "Array" + }, + { + "name": "status", + "baseName": "status", + "type": "PaymentLinkResource.StatusEnum" + }, + { + "name": "store", + "baseName": "store", + "type": "string" + }, + { + "name": "storePaymentMethod", + "baseName": "storePaymentMethod", + "type": "boolean" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PaymentLinkResource.attributeTypeMap; + } +} + +export namespace PaymentLinkResource { + export enum RecurringProcessingModelEnum { + CardOnFile = 'CardOnFile', + Subscription = 'Subscription', + UnscheduledCardOnFile = 'UnscheduledCardOnFile' + } + export enum StatusEnum { + Active = 'active', + Completed = 'completed', + Expired = 'expired', + PaymentPending = 'paymentPending' + } +} diff --git a/src/typings/checkout/paymentMethod.ts b/src/typings/checkout/paymentMethod.ts new file mode 100644 index 0000000..b757364 --- /dev/null +++ b/src/typings/checkout/paymentMethod.ts @@ -0,0 +1,109 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { InputDetail } from './inputDetail'; +import { PaymentMethodGroup } from './paymentMethodGroup'; + +export class PaymentMethod { + /** + * Brand for the selected gift card. For example: plastix, hmclub. + */ + 'brand'?: string; + /** + * List of possible brands. For example: visa, mc. + */ + 'brands'?: Array; + /** + * The configuration of the payment method. + */ + 'configuration'?: { [key: string]: string; }; + /** + * All input details to be provided to complete the payment with this payment method. + */ + 'details'?: Array; + /** + * The funding source of the payment method. + */ + 'fundingSource'?: PaymentMethod.FundingSourceEnum; + 'group'?: PaymentMethodGroup; + /** + * All input details to be provided to complete the payment with this payment method. + */ + 'inputDetails'?: Array; + /** + * The displayable name of this payment method. + */ + 'name'?: string; + /** + * The unique payment method code. + */ + 'type'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "brand", + "baseName": "brand", + "type": "string" + }, + { + "name": "brands", + "baseName": "brands", + "type": "Array" + }, + { + "name": "configuration", + "baseName": "configuration", + "type": "{ [key: string]: string; }" + }, + { + "name": "details", + "baseName": "details", + "type": "Array" + }, + { + "name": "fundingSource", + "baseName": "fundingSource", + "type": "PaymentMethod.FundingSourceEnum" + }, + { + "name": "group", + "baseName": "group", + "type": "PaymentMethodGroup" + }, + { + "name": "inputDetails", + "baseName": "inputDetails", + "type": "Array" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PaymentMethod.attributeTypeMap; + } +} + +export namespace PaymentMethod { + export enum FundingSourceEnum { + Debit = 'debit' + } +} diff --git a/src/typings/checkout/paymentMethodGroup.ts b/src/typings/checkout/paymentMethodGroup.ts new file mode 100644 index 0000000..f2e8afa --- /dev/null +++ b/src/typings/checkout/paymentMethodGroup.ts @@ -0,0 +1,50 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class PaymentMethodGroup { + /** + * The name of the group. + */ + 'name'?: string; + /** + * Echo data to be used if the payment method is displayed as part of this group. + */ + 'paymentMethodData'?: string; + /** + * The unique code of the group. + */ + 'type'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "paymentMethodData", + "baseName": "paymentMethodData", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PaymentMethodGroup.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/paymentMethodsRequest.ts b/src/typings/checkout/paymentMethodsRequest.ts new file mode 100644 index 0000000..41aadaa --- /dev/null +++ b/src/typings/checkout/paymentMethodsRequest.ts @@ -0,0 +1,135 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Amount } from './amount'; +import { CheckoutOrder } from './checkoutOrder'; + +export class PaymentMethodsRequest { + /** + * This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. + */ + 'additionalData'?: { [key: string]: string; }; + /** + * List of payment methods to be presented to the shopper. To refer to payment methods, use their `paymentMethod.type` from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]` + */ + 'allowedPaymentMethods'?: Array; + 'amount'?: Amount; + /** + * List of payment methods to be hidden from the shopper. To refer to payment methods, use their `paymentMethod.type` from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]` + */ + 'blockedPaymentMethods'?: Array; + /** + * The platform where a payment transaction takes place. This field can be used for filtering out payment methods that are only available on specific platforms. Possible values: * iOS * Android * Web + */ + 'channel'?: PaymentMethodsRequest.ChannelEnum; + /** + * The shopper\'s country code. + */ + 'countryCode'?: string; + /** + * The merchant account identifier, with which you want to process the transaction. + */ + 'merchantAccount': string; + 'order'?: CheckoutOrder; + /** + * The combination of a language code and a country code to specify the language to be used in the payment. + */ + 'shopperLocale'?: string; + /** + * Your reference to uniquely identify this shopper (for example, user ID or account ID). Minimum length: 3 characters. > This field is required for recurring payments. + */ + 'shopperReference'?: string; + /** + * Boolean value indicating whether the card payment method should be split into separate debit and credit options. + */ + 'splitCardFundingSources'?: boolean; + /** + * The physical store, for which this payment is processed. + */ + 'store'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "additionalData", + "baseName": "additionalData", + "type": "{ [key: string]: string; }" + }, + { + "name": "allowedPaymentMethods", + "baseName": "allowedPaymentMethods", + "type": "Array" + }, + { + "name": "amount", + "baseName": "amount", + "type": "Amount" + }, + { + "name": "blockedPaymentMethods", + "baseName": "blockedPaymentMethods", + "type": "Array" + }, + { + "name": "channel", + "baseName": "channel", + "type": "PaymentMethodsRequest.ChannelEnum" + }, + { + "name": "countryCode", + "baseName": "countryCode", + "type": "string" + }, + { + "name": "merchantAccount", + "baseName": "merchantAccount", + "type": "string" + }, + { + "name": "order", + "baseName": "order", + "type": "CheckoutOrder" + }, + { + "name": "shopperLocale", + "baseName": "shopperLocale", + "type": "string" + }, + { + "name": "shopperReference", + "baseName": "shopperReference", + "type": "string" + }, + { + "name": "splitCardFundingSources", + "baseName": "splitCardFundingSources", + "type": "boolean" + }, + { + "name": "store", + "baseName": "store", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PaymentMethodsRequest.attributeTypeMap; + } +} + +export namespace PaymentMethodsRequest { + export enum ChannelEnum { + IOs = 'iOS', + Android = 'Android', + Web = 'Web' + } +} diff --git a/src/typings/checkout/paymentMethodsResponse.ts b/src/typings/checkout/paymentMethodsResponse.ts new file mode 100644 index 0000000..cb21352 --- /dev/null +++ b/src/typings/checkout/paymentMethodsResponse.ts @@ -0,0 +1,44 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { PaymentMethod } from './paymentMethod'; +import { StoredPaymentMethod } from './storedPaymentMethod'; + +export class PaymentMethodsResponse { + /** + * Detailed list of payment methods required to generate payment forms. + */ + 'paymentMethods'?: Array; + /** + * List of all stored payment methods. + */ + 'storedPaymentMethods'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "paymentMethods", + "baseName": "paymentMethods", + "type": "Array" + }, + { + "name": "storedPaymentMethods", + "baseName": "storedPaymentMethods", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return PaymentMethodsResponse.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/paymentRequest.ts b/src/typings/checkout/paymentRequest.ts new file mode 100644 index 0000000..2b803af --- /dev/null +++ b/src/typings/checkout/paymentRequest.ts @@ -0,0 +1,577 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AccountInfo } from './accountInfo'; +import { AchDetails } from './achDetails'; +import { Address } from './address'; +import { AfterpayDetails } from './afterpayDetails'; +import { AmazonPayDetails } from './amazonPayDetails'; +import { Amount } from './amount'; +import { AndroidPayDetails } from './androidPayDetails'; +import { ApplePayDetails } from './applePayDetails'; +import { ApplicationInfo } from './applicationInfo'; +import { BacsDirectDebitDetails } from './bacsDirectDebitDetails'; +import { BillDeskDetails } from './billDeskDetails'; +import { BlikDetails } from './blikDetails'; +import { BrowserInfo } from './browserInfo'; +import { CardDetails } from './cardDetails'; +import { CellulantDetails } from './cellulantDetails'; +import { CheckoutOrder } from './checkoutOrder'; +import { Company } from './company'; +import { DokuDetails } from './dokuDetails'; +import { DotpayDetails } from './dotpayDetails'; +import { DragonpayDetails } from './dragonpayDetails'; +import { EcontextVoucherDetails } from './econtextVoucherDetails'; +import { EntercashDetails } from './entercashDetails'; +import { ForexQuote } from './forexQuote'; +import { GenericIssuerPaymentMethodDetails } from './genericIssuerPaymentMethodDetails'; +import { GiropayDetails } from './giropayDetails'; +import { GooglePayDetails } from './googlePayDetails'; +import { IdealDetails } from './idealDetails'; +import { Installments } from './installments'; +import { KlarnaDetails } from './klarnaDetails'; +import { LianLianPayDetails } from './lianLianPayDetails'; +import { LineItem } from './lineItem'; +import { Mandate } from './mandate'; +import { MasterpassDetails } from './masterpassDetails'; +import { MbwayDetails } from './mbwayDetails'; +import { MerchantRiskIndicator } from './merchantRiskIndicator'; +import { MobilePayDetails } from './mobilePayDetails'; +import { MolPayDetails } from './molPayDetails'; +import { Name } from './name'; +import { OpenInvoiceDetails } from './openInvoiceDetails'; +import { PayPalDetails } from './payPalDetails'; +import { PayUUpiDetails } from './payUUpiDetails'; +import { PaymentDetails } from './paymentDetails'; +import { QiwiWalletDetails } from './qiwiWalletDetails'; +import { RatepayDetails } from './ratepayDetails'; +import { RiskData } from './riskData'; +import { SamsungPayDetails } from './samsungPayDetails'; +import { SepaDirectDebitDetails } from './sepaDirectDebitDetails'; +import { Split } from './split'; +import { StoredPaymentMethodDetails } from './storedPaymentMethodDetails'; +import { ThreeDS2RequestData } from './threeDS2RequestData'; +import { ThreeDSecureData } from './threeDSecureData'; +import { UpiDetails } from './upiDetails'; +import { VippsDetails } from './vippsDetails'; +import { VisaCheckoutDetails } from './visaCheckoutDetails'; +import { WeChatPayDetails } from './weChatPayDetails'; +import { WeChatPayMiniProgramDetails } from './weChatPayMiniProgramDetails'; +import { ZipDetails } from './zipDetails'; + +export class PaymentRequest { + 'accountInfo'?: AccountInfo; + /** + * This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. + */ + 'additionalData'?: { [key: string]: string; }; + 'amount': Amount; + 'applicationInfo'?: ApplicationInfo; + 'billingAddress'?: Address; + 'browserInfo'?: BrowserInfo; + /** + * The delay between the authorisation and scheduled auto-capture, specified in hours. + */ + 'captureDelayHours'?: number; + /** + * The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web + */ + 'channel'?: PaymentRequest.ChannelEnum; + 'company'?: Company; + /** + * Conversion ID that corresponds to the Id generated for tracking user payment journey. + */ + 'conversionId'?: string; + /** + * The shopper country. Format: [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) Example: NL or DE + */ + 'countryCode'?: string; + /** + * The shopper\'s date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD + */ + 'dateOfBirth'?: Date; + 'dccQuote'?: ForexQuote; + 'deliveryAddress'?: Address; + /** + * The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 + */ + 'deliveryDate'?: Date; + /** + * A string containing the shopper\'s device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). + */ + 'deviceFingerprint'?: string; + /** + * When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments. + */ + 'enableOneClick'?: boolean; + /** + * When true and `shopperReference` is provided, the payment details will be tokenized for payouts. + */ + 'enablePayOut'?: boolean; + /** + * When true and `shopperReference` is provided, the payment details will be tokenized for recurring payments. + */ + 'enableRecurring'?: boolean; + /** + * The type of the entity the payment is processed for. + */ + 'entityType'?: PaymentRequest.EntityTypeEnum; + /** + * An integer value that is added to the normal fraud score. The value can be either positive or negative. + */ + 'fraudOffset'?: number; + 'installments'?: Installments; + /** + * Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, AfterPay, Klarna, RatePay, and Zip. + */ + 'lineItems'?: Array; + 'mandate'?: Mandate; + /** + * The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. + */ + 'mcc'?: string; + /** + * The merchant account identifier, with which you want to process the transaction. + */ + 'merchantAccount': string; + /** + * This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. + */ + 'merchantOrderReference'?: string; + 'merchantRiskIndicator'?: MerchantRiskIndicator; + /** + * Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. + */ + 'metadata'?: { [key: string]: string; }; + 'mpiData'?: ThreeDSecureData; + 'order'?: CheckoutOrder; + /** + * When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. + */ + 'orderReference'?: string; + /** + * Required for the 3D Secure 2 `channel` **Web** integration. Set this parameter to the origin URL of the page that you are loading the 3D Secure Component from. + */ + 'origin'?: string; + /** + * The type and required details of a payment method to use. + */ + 'paymentMethod': AchDetails | AfterpayDetails | AmazonPayDetails | AndroidPayDetails | ApplePayDetails | BacsDirectDebitDetails | BillDeskDetails | BlikDetails | CardDetails | CellulantDetails | DokuDetails | DotpayDetails | DragonpayDetails | EcontextVoucherDetails | EntercashDetails | GenericIssuerPaymentMethodDetails | GiropayDetails | GooglePayDetails | IdealDetails | KlarnaDetails | LianLianPayDetails | MasterpassDetails | MbwayDetails | MobilePayDetails | MolPayDetails | OpenInvoiceDetails | PayPalDetails | PayUUpiDetails | PaymentDetails | QiwiWalletDetails | RatepayDetails | SamsungPayDetails | SepaDirectDebitDetails | StoredPaymentMethodDetails | UpiDetails | VippsDetails | VisaCheckoutDetails | WeChatPayDetails | WeChatPayMiniProgramDetails | ZipDetails; + /** + * Date after which no further authorisations shall be performed. Only for 3D Secure 2. + */ + 'recurringExpiry'?: string; + /** + * Minimum number of days between authorisations. Only for 3D Secure 2. + */ + 'recurringFrequency'?: string; + /** + * Defines a recurring payment type. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder\'s balance drops below a certain amount. + */ + 'recurringProcessingModel'?: PaymentRequest.RecurringProcessingModelEnum; + /** + * Specifies the redirect method (GET or POST) when redirecting back from the issuer. + */ + 'redirectFromIssuerMethod'?: string; + /** + * Specifies the redirect method (GET or POST) when redirecting to the issuer. + */ + 'redirectToIssuerMethod'?: string; + /** + * The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. + */ + 'reference': string; + /** + * The URL to return to in case of a redirection. The format depends on the channel. This URL can have a maximum of 1024 characters. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` + */ + 'returnUrl': string; + 'riskData'?: RiskData; + /** + * The date and time until when the session remains valid, in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format. For example: 2020-07-18T15:42:40.428+01:00 + */ + 'sessionValidity'?: string; + /** + * The shopper\'s email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations. + */ + 'shopperEmail'?: string; + /** + * The shopper\'s IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://support.adyen.com/hc/en-us/requests/new). + */ + 'shopperIP'?: string; + /** + * Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. + */ + 'shopperInteraction'?: PaymentRequest.ShopperInteractionEnum; + /** + * The combination of a language code and a country code to specify the language to be used in the payment. + */ + 'shopperLocale'?: string; + 'shopperName'?: Name; + /** + * Your reference to uniquely identify this shopper (for example, user ID or account ID). Minimum length: 3 characters. > This field is required for recurring payments. + */ + 'shopperReference'?: string; + /** + * The text to be shown on the shopper\'s bank statement. To enable this field, contact our [Support Team](https://support.adyen.com/hc/en-us/requests/new). We recommend sending a maximum of 25 characters, otherwise banks might truncate the string. + */ + 'shopperStatement'?: string; + /** + * The shopper\'s social security number. + */ + 'socialSecurityNumber'?: string; + /** + * An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). + */ + 'splits'?: Array; + /** + * The physical store, for which this payment is processed. + */ + 'store'?: string; + /** + * When true and `shopperReference` is provided, the payment details will be stored. + */ + 'storePaymentMethod'?: boolean; + /** + * The shopper\'s telephone number. + */ + 'telephoneNumber'?: string; + 'threeDS2RequestData'?: ThreeDS2RequestData; + /** + * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. + */ + 'threeDSAuthenticationOnly'?: boolean; + /** + * Set to true if the payment should be routed to a trusted MID. + */ + 'trustedShopper'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountInfo", + "baseName": "accountInfo", + "type": "AccountInfo" + }, + { + "name": "additionalData", + "baseName": "additionalData", + "type": "{ [key: string]: string; }" + }, + { + "name": "amount", + "baseName": "amount", + "type": "Amount" + }, + { + "name": "applicationInfo", + "baseName": "applicationInfo", + "type": "ApplicationInfo" + }, + { + "name": "billingAddress", + "baseName": "billingAddress", + "type": "Address" + }, + { + "name": "browserInfo", + "baseName": "browserInfo", + "type": "BrowserInfo" + }, + { + "name": "captureDelayHours", + "baseName": "captureDelayHours", + "type": "number" + }, + { + "name": "channel", + "baseName": "channel", + "type": "PaymentRequest.ChannelEnum" + }, + { + "name": "company", + "baseName": "company", + "type": "Company" + }, + { + "name": "conversionId", + "baseName": "conversionId", + "type": "string" + }, + { + "name": "countryCode", + "baseName": "countryCode", + "type": "string" + }, + { + "name": "dateOfBirth", + "baseName": "dateOfBirth", + "type": "Date" + }, + { + "name": "dccQuote", + "baseName": "dccQuote", + "type": "ForexQuote" + }, + { + "name": "deliveryAddress", + "baseName": "deliveryAddress", + "type": "Address" + }, + { + "name": "deliveryDate", + "baseName": "deliveryDate", + "type": "Date" + }, + { + "name": "deviceFingerprint", + "baseName": "deviceFingerprint", + "type": "string" + }, + { + "name": "enableOneClick", + "baseName": "enableOneClick", + "type": "boolean" + }, + { + "name": "enablePayOut", + "baseName": "enablePayOut", + "type": "boolean" + }, + { + "name": "enableRecurring", + "baseName": "enableRecurring", + "type": "boolean" + }, + { + "name": "entityType", + "baseName": "entityType", + "type": "PaymentRequest.EntityTypeEnum" + }, + { + "name": "fraudOffset", + "baseName": "fraudOffset", + "type": "number" + }, + { + "name": "installments", + "baseName": "installments", + "type": "Installments" + }, + { + "name": "lineItems", + "baseName": "lineItems", + "type": "Array" + }, + { + "name": "mandate", + "baseName": "mandate", + "type": "Mandate" + }, + { + "name": "mcc", + "baseName": "mcc", + "type": "string" + }, + { + "name": "merchantAccount", + "baseName": "merchantAccount", + "type": "string" + }, + { + "name": "merchantOrderReference", + "baseName": "merchantOrderReference", + "type": "string" + }, + { + "name": "merchantRiskIndicator", + "baseName": "merchantRiskIndicator", + "type": "MerchantRiskIndicator" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "{ [key: string]: string; }" + }, + { + "name": "mpiData", + "baseName": "mpiData", + "type": "ThreeDSecureData" + }, + { + "name": "order", + "baseName": "order", + "type": "CheckoutOrder" + }, + { + "name": "orderReference", + "baseName": "orderReference", + "type": "string" + }, + { + "name": "origin", + "baseName": "origin", + "type": "string" + }, + { + "name": "paymentMethod", + "baseName": "paymentMethod", + "type": "AchDetails | AfterpayDetails | AmazonPayDetails | AndroidPayDetails | ApplePayDetails | BacsDirectDebitDetails | BillDeskDetails | BlikDetails | CardDetails | CellulantDetails | DokuDetails | DotpayDetails | DragonpayDetails | EcontextVoucherDetails | EntercashDetails | GenericIssuerPaymentMethodDetails | GiropayDetails | GooglePayDetails | IdealDetails | KlarnaDetails | LianLianPayDetails | MasterpassDetails | MbwayDetails | MobilePayDetails | MolPayDetails | OpenInvoiceDetails | PayPalDetails | PayUUpiDetails | PaymentDetails | QiwiWalletDetails | RatepayDetails | SamsungPayDetails | SepaDirectDebitDetails | StoredPaymentMethodDetails | UpiDetails | VippsDetails | VisaCheckoutDetails | WeChatPayDetails | WeChatPayMiniProgramDetails | ZipDetails" + }, + { + "name": "recurringExpiry", + "baseName": "recurringExpiry", + "type": "string" + }, + { + "name": "recurringFrequency", + "baseName": "recurringFrequency", + "type": "string" + }, + { + "name": "recurringProcessingModel", + "baseName": "recurringProcessingModel", + "type": "PaymentRequest.RecurringProcessingModelEnum" + }, + { + "name": "redirectFromIssuerMethod", + "baseName": "redirectFromIssuerMethod", + "type": "string" + }, + { + "name": "redirectToIssuerMethod", + "baseName": "redirectToIssuerMethod", + "type": "string" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string" + }, + { + "name": "returnUrl", + "baseName": "returnUrl", + "type": "string" + }, + { + "name": "riskData", + "baseName": "riskData", + "type": "RiskData" + }, + { + "name": "sessionValidity", + "baseName": "sessionValidity", + "type": "string" + }, + { + "name": "shopperEmail", + "baseName": "shopperEmail", + "type": "string" + }, + { + "name": "shopperIP", + "baseName": "shopperIP", + "type": "string" + }, + { + "name": "shopperInteraction", + "baseName": "shopperInteraction", + "type": "PaymentRequest.ShopperInteractionEnum" + }, + { + "name": "shopperLocale", + "baseName": "shopperLocale", + "type": "string" + }, + { + "name": "shopperName", + "baseName": "shopperName", + "type": "Name" + }, + { + "name": "shopperReference", + "baseName": "shopperReference", + "type": "string" + }, + { + "name": "shopperStatement", + "baseName": "shopperStatement", + "type": "string" + }, + { + "name": "socialSecurityNumber", + "baseName": "socialSecurityNumber", + "type": "string" + }, + { + "name": "splits", + "baseName": "splits", + "type": "Array" + }, + { + "name": "store", + "baseName": "store", + "type": "string" + }, + { + "name": "storePaymentMethod", + "baseName": "storePaymentMethod", + "type": "boolean" + }, + { + "name": "telephoneNumber", + "baseName": "telephoneNumber", + "type": "string" + }, + { + "name": "threeDS2RequestData", + "baseName": "threeDS2RequestData", + "type": "ThreeDS2RequestData" + }, + { + "name": "threeDSAuthenticationOnly", + "baseName": "threeDSAuthenticationOnly", + "type": "boolean" + }, + { + "name": "trustedShopper", + "baseName": "trustedShopper", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return PaymentRequest.attributeTypeMap; + } +} + +export namespace PaymentRequest { + export enum ChannelEnum { + IOs = 'iOS', + Android = 'Android', + Web = 'Web' + } + export enum EntityTypeEnum { + NaturalPerson = 'NaturalPerson', + CompanyName = 'CompanyName' + } + export enum RecurringProcessingModelEnum { + CardOnFile = 'CardOnFile', + Subscription = 'Subscription', + UnscheduledCardOnFile = 'UnscheduledCardOnFile' + } + export enum ShopperInteractionEnum { + Ecommerce = 'Ecommerce', + ContAuth = 'ContAuth', + Moto = 'Moto', + Pos = 'POS' + } +} diff --git a/src/typings/checkout/paymentResponse.ts b/src/typings/checkout/paymentResponse.ts new file mode 100644 index 0000000..465cbec --- /dev/null +++ b/src/typings/checkout/paymentResponse.ts @@ -0,0 +1,149 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Amount } from './amount'; +import { CheckoutAwaitAction } from './checkoutAwaitAction'; +import { CheckoutBankTransferAction } from './checkoutBankTransferAction'; +import { CheckoutDonationAction } from './checkoutDonationAction'; +import { CheckoutOneTimePasscodeAction } from './checkoutOneTimePasscodeAction'; +import { CheckoutOrderResponse } from './checkoutOrderResponse'; +import { CheckoutQrCodeAction } from './checkoutQrCodeAction'; +import { CheckoutRedirectAction } from './checkoutRedirectAction'; +import { CheckoutSDKAction } from './checkoutSDKAction'; +import { CheckoutThreeDS2Action } from './checkoutThreeDS2Action'; +import { CheckoutVoucherAction } from './checkoutVoucherAction'; +import { FraudResult } from './fraudResult'; +import { ThreeDS2Result } from './threeDS2Result'; + +export class PaymentResponse { + /** + * Action to be taken for completing the payment. + */ + 'action'?: CheckoutAwaitAction | CheckoutBankTransferAction | CheckoutDonationAction | CheckoutOneTimePasscodeAction | CheckoutQrCodeAction | CheckoutRedirectAction | CheckoutSDKAction | CheckoutThreeDS2Action | CheckoutVoucherAction; + /** + * Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Account** > **API URLs** > **Additional data settings**. + */ + 'additionalData'?: { [key: string]: string; }; + 'amount'?: Amount; + /** + * Donation Token containing payment details for Adyen Giving. + */ + 'donationToken'?: string; + 'fraudResult'?: FraudResult; + /** + * The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. + */ + 'merchantReference'?: string; + 'order'?: CheckoutOrderResponse; + /** + * Adyen\'s 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. > For payment methods that require a redirect or additional action, you will get this value in the `/payments/details` response. + */ + 'pspReference'?: string; + /** + * If the payment\'s authorisation is refused or an error occurs during authorisation, this field holds Adyen\'s mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). + */ + 'refusalReason'?: string; + /** + * Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). + */ + 'refusalReasonCode'?: string; + /** + * The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper\'s device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. + */ + 'resultCode'?: PaymentResponse.ResultCodeEnum; + 'threeDS2Result'?: ThreeDS2Result; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "action", + "baseName": "action", + "type": "CheckoutAwaitAction | CheckoutBankTransferAction | CheckoutDonationAction | CheckoutOneTimePasscodeAction | CheckoutQrCodeAction | CheckoutRedirectAction | CheckoutSDKAction | CheckoutThreeDS2Action | CheckoutVoucherAction" + }, + { + "name": "additionalData", + "baseName": "additionalData", + "type": "{ [key: string]: string; }" + }, + { + "name": "amount", + "baseName": "amount", + "type": "Amount" + }, + { + "name": "donationToken", + "baseName": "donationToken", + "type": "string" + }, + { + "name": "fraudResult", + "baseName": "fraudResult", + "type": "FraudResult" + }, + { + "name": "merchantReference", + "baseName": "merchantReference", + "type": "string" + }, + { + "name": "order", + "baseName": "order", + "type": "CheckoutOrderResponse" + }, + { + "name": "pspReference", + "baseName": "pspReference", + "type": "string" + }, + { + "name": "refusalReason", + "baseName": "refusalReason", + "type": "string" + }, + { + "name": "refusalReasonCode", + "baseName": "refusalReasonCode", + "type": "string" + }, + { + "name": "resultCode", + "baseName": "resultCode", + "type": "PaymentResponse.ResultCodeEnum" + }, + { + "name": "threeDS2Result", + "baseName": "threeDS2Result", + "type": "ThreeDS2Result" + } ]; + + static getAttributeTypeMap() { + return PaymentResponse.attributeTypeMap; + } +} + +export namespace PaymentResponse { + export enum ResultCodeEnum { + AuthenticationFinished = 'AuthenticationFinished', + Authorised = 'Authorised', + Cancelled = 'Cancelled', + ChallengeShopper = 'ChallengeShopper', + Error = 'Error', + IdentifyShopper = 'IdentifyShopper', + Pending = 'Pending', + PresentToShopper = 'PresentToShopper', + Received = 'Received', + RedirectShopper = 'RedirectShopper', + Refused = 'Refused', + Success = 'Success' + } +} diff --git a/src/typings/checkout/paymentSetupRequest.ts b/src/typings/checkout/paymentSetupRequest.ts new file mode 100644 index 0000000..450d7be --- /dev/null +++ b/src/typings/checkout/paymentSetupRequest.ts @@ -0,0 +1,488 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Address } from './address'; +import { Amount } from './amount'; +import { ApplicationInfo } from './applicationInfo'; +import { Company } from './company'; +import { Configuration } from './configuration'; +import { ForexQuote } from './forexQuote'; +import { Installments } from './installments'; +import { LineItem } from './lineItem'; +import { Mandate } from './mandate'; +import { Name } from './name'; +import { RiskData } from './riskData'; +import { Split } from './split'; + +export class PaymentSetupRequest { + /** + * This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. + */ + 'additionalData'?: { [key: string]: string; }; + /** + * List of payment methods to be presented to the shopper. To refer to payment methods, use their `paymentMethod.type`from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]` + */ + 'allowedPaymentMethods'?: Array; + 'amount': Amount; + 'applicationInfo'?: ApplicationInfo; + 'billingAddress'?: Address; + /** + * List of payment methods to be hidden from the shopper. To refer to payment methods, use their `paymentMethod.type`from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]` + */ + 'blockedPaymentMethods'?: Array; + /** + * The delay between the authorisation and scheduled auto-capture, specified in hours. + */ + 'captureDelayHours'?: number; + /** + * The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web + */ + 'channel'?: PaymentSetupRequest.ChannelEnum; + 'company'?: Company; + 'configuration'?: Configuration; + /** + * Conversion ID that corresponds to the Id generated for tracking user payment journey. + */ + 'conversionId'?: string; + /** + * The shopper country. Format: [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) Example: NL or DE + */ + 'countryCode': string; + /** + * The shopper\'s date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD + */ + 'dateOfBirth'?: Date; + 'dccQuote'?: ForexQuote; + 'deliveryAddress'?: Address; + /** + * The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 + */ + 'deliveryDate'?: Date; + /** + * When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments. + */ + 'enableOneClick'?: boolean; + /** + * When true and `shopperReference` is provided, the payment details will be tokenized for payouts. + */ + 'enablePayOut'?: boolean; + /** + * When true and `shopperReference` is provided, the payment details will be tokenized for recurring payments. + */ + 'enableRecurring'?: boolean; + /** + * The type of the entity the payment is processed for. + */ + 'entityType'?: PaymentSetupRequest.EntityTypeEnum; + /** + * An integer value that is added to the normal fraud score. The value can be either positive or negative. + */ + 'fraudOffset'?: number; + 'installments'?: Installments; + /** + * Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, AfterPay, Klarna, RatePay, and Zip. + */ + 'lineItems'?: Array; + 'mandate'?: Mandate; + /** + * The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. + */ + 'mcc'?: string; + /** + * The merchant account identifier, with which you want to process the transaction. + */ + 'merchantAccount': string; + /** + * This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. + */ + 'merchantOrderReference'?: string; + /** + * Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. + */ + 'metadata'?: { [key: string]: string; }; + /** + * When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. + */ + 'orderReference'?: string; + /** + * Required for the Web integration. Set this parameter to the origin URL of the page that you are loading the SDK from. + */ + 'origin'?: string; + /** + * Date after which no further authorisations shall be performed. Only for 3D Secure 2. + */ + 'recurringExpiry'?: string; + /** + * Minimum number of days between authorisations. Only for 3D Secure 2. + */ + 'recurringFrequency'?: string; + /** + * The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. + */ + 'reference': string; + /** + * The URL to return to in case of a redirection. The format depends on the channel. This URL can have a maximum of 1024 characters. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` + */ + 'returnUrl': string; + 'riskData'?: RiskData; + /** + * The version of the SDK you are using (for Web SDK integrations only). + */ + 'sdkVersion'?: string; + /** + * The date and time until when the session remains valid, in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format. For example: 2020-07-18T15:42:40.428+01:00 + */ + 'sessionValidity'?: string; + /** + * The shopper\'s email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations. + */ + 'shopperEmail'?: string; + /** + * The shopper\'s IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://support.adyen.com/hc/en-us/requests/new). + */ + 'shopperIP'?: string; + /** + * Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. + */ + 'shopperInteraction'?: PaymentSetupRequest.ShopperInteractionEnum; + /** + * The combination of a language code and a country code to specify the language to be used in the payment. + */ + 'shopperLocale'?: string; + 'shopperName'?: Name; + /** + * Your reference to uniquely identify this shopper (for example, user ID or account ID). Minimum length: 3 characters. > This field is required for recurring payments. + */ + 'shopperReference'?: string; + /** + * The text to be shown on the shopper\'s bank statement. To enable this field, contact our [Support Team](https://support.adyen.com/hc/en-us/requests/new). We recommend sending a maximum of 25 characters, otherwise banks might truncate the string. + */ + 'shopperStatement'?: string; + /** + * The shopper\'s social security number. + */ + 'socialSecurityNumber'?: string; + /** + * An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). + */ + 'splits'?: Array; + /** + * The physical store, for which this payment is processed. + */ + 'store'?: string; + /** + * When true and `shopperReference` is provided, the payment details will be stored. + */ + 'storePaymentMethod'?: boolean; + /** + * The shopper\'s telephone number. + */ + 'telephoneNumber'?: string; + /** + * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. + */ + 'threeDSAuthenticationOnly'?: boolean; + /** + * The token obtained when initializing the SDK. > This parameter is required for iOS and Android; not required for Web. + */ + 'token'?: string; + /** + * Set to true if the payment should be routed to a trusted MID. + */ + 'trustedShopper'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "additionalData", + "baseName": "additionalData", + "type": "{ [key: string]: string; }" + }, + { + "name": "allowedPaymentMethods", + "baseName": "allowedPaymentMethods", + "type": "Array" + }, + { + "name": "amount", + "baseName": "amount", + "type": "Amount" + }, + { + "name": "applicationInfo", + "baseName": "applicationInfo", + "type": "ApplicationInfo" + }, + { + "name": "billingAddress", + "baseName": "billingAddress", + "type": "Address" + }, + { + "name": "blockedPaymentMethods", + "baseName": "blockedPaymentMethods", + "type": "Array" + }, + { + "name": "captureDelayHours", + "baseName": "captureDelayHours", + "type": "number" + }, + { + "name": "channel", + "baseName": "channel", + "type": "PaymentSetupRequest.ChannelEnum" + }, + { + "name": "company", + "baseName": "company", + "type": "Company" + }, + { + "name": "configuration", + "baseName": "configuration", + "type": "Configuration" + }, + { + "name": "conversionId", + "baseName": "conversionId", + "type": "string" + }, + { + "name": "countryCode", + "baseName": "countryCode", + "type": "string" + }, + { + "name": "dateOfBirth", + "baseName": "dateOfBirth", + "type": "Date" + }, + { + "name": "dccQuote", + "baseName": "dccQuote", + "type": "ForexQuote" + }, + { + "name": "deliveryAddress", + "baseName": "deliveryAddress", + "type": "Address" + }, + { + "name": "deliveryDate", + "baseName": "deliveryDate", + "type": "Date" + }, + { + "name": "enableOneClick", + "baseName": "enableOneClick", + "type": "boolean" + }, + { + "name": "enablePayOut", + "baseName": "enablePayOut", + "type": "boolean" + }, + { + "name": "enableRecurring", + "baseName": "enableRecurring", + "type": "boolean" + }, + { + "name": "entityType", + "baseName": "entityType", + "type": "PaymentSetupRequest.EntityTypeEnum" + }, + { + "name": "fraudOffset", + "baseName": "fraudOffset", + "type": "number" + }, + { + "name": "installments", + "baseName": "installments", + "type": "Installments" + }, + { + "name": "lineItems", + "baseName": "lineItems", + "type": "Array" + }, + { + "name": "mandate", + "baseName": "mandate", + "type": "Mandate" + }, + { + "name": "mcc", + "baseName": "mcc", + "type": "string" + }, + { + "name": "merchantAccount", + "baseName": "merchantAccount", + "type": "string" + }, + { + "name": "merchantOrderReference", + "baseName": "merchantOrderReference", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "{ [key: string]: string; }" + }, + { + "name": "orderReference", + "baseName": "orderReference", + "type": "string" + }, + { + "name": "origin", + "baseName": "origin", + "type": "string" + }, + { + "name": "recurringExpiry", + "baseName": "recurringExpiry", + "type": "string" + }, + { + "name": "recurringFrequency", + "baseName": "recurringFrequency", + "type": "string" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string" + }, + { + "name": "returnUrl", + "baseName": "returnUrl", + "type": "string" + }, + { + "name": "riskData", + "baseName": "riskData", + "type": "RiskData" + }, + { + "name": "sdkVersion", + "baseName": "sdkVersion", + "type": "string" + }, + { + "name": "sessionValidity", + "baseName": "sessionValidity", + "type": "string" + }, + { + "name": "shopperEmail", + "baseName": "shopperEmail", + "type": "string" + }, + { + "name": "shopperIP", + "baseName": "shopperIP", + "type": "string" + }, + { + "name": "shopperInteraction", + "baseName": "shopperInteraction", + "type": "PaymentSetupRequest.ShopperInteractionEnum" + }, + { + "name": "shopperLocale", + "baseName": "shopperLocale", + "type": "string" + }, + { + "name": "shopperName", + "baseName": "shopperName", + "type": "Name" + }, + { + "name": "shopperReference", + "baseName": "shopperReference", + "type": "string" + }, + { + "name": "shopperStatement", + "baseName": "shopperStatement", + "type": "string" + }, + { + "name": "socialSecurityNumber", + "baseName": "socialSecurityNumber", + "type": "string" + }, + { + "name": "splits", + "baseName": "splits", + "type": "Array" + }, + { + "name": "store", + "baseName": "store", + "type": "string" + }, + { + "name": "storePaymentMethod", + "baseName": "storePaymentMethod", + "type": "boolean" + }, + { + "name": "telephoneNumber", + "baseName": "telephoneNumber", + "type": "string" + }, + { + "name": "threeDSAuthenticationOnly", + "baseName": "threeDSAuthenticationOnly", + "type": "boolean" + }, + { + "name": "token", + "baseName": "token", + "type": "string" + }, + { + "name": "trustedShopper", + "baseName": "trustedShopper", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return PaymentSetupRequest.attributeTypeMap; + } +} + +export namespace PaymentSetupRequest { + export enum ChannelEnum { + IOs = 'iOS', + Android = 'Android', + Web = 'Web' + } + export enum EntityTypeEnum { + NaturalPerson = 'NaturalPerson', + CompanyName = 'CompanyName' + } + export enum ShopperInteractionEnum { + Ecommerce = 'Ecommerce', + ContAuth = 'ContAuth', + Moto = 'Moto', + Pos = 'POS' + } +} diff --git a/src/typings/checkout/paymentSetupResponse.ts b/src/typings/checkout/paymentSetupResponse.ts new file mode 100644 index 0000000..23a4c6f --- /dev/null +++ b/src/typings/checkout/paymentSetupResponse.ts @@ -0,0 +1,43 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RecurringDetail } from './recurringDetail'; + +export class PaymentSetupResponse { + /** + * The encoded payment session that you need to pass to the SDK. + */ + 'paymentSession'?: string; + /** + * The detailed list of stored payment details required to generate payment forms. Will be empty if oneClick is set to false in the request. + */ + 'recurringDetails'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "paymentSession", + "baseName": "paymentSession", + "type": "string" + }, + { + "name": "recurringDetails", + "baseName": "recurringDetails", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return PaymentSetupResponse.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/paymentVerificationRequest.ts b/src/typings/checkout/paymentVerificationRequest.ts new file mode 100644 index 0000000..7ebf558 --- /dev/null +++ b/src/typings/checkout/paymentVerificationRequest.ts @@ -0,0 +1,32 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class PaymentVerificationRequest { + /** + * Encrypted and signed payment result data. You should receive this value from the Checkout SDK after the shopper completes the payment. + */ + 'payload': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "payload", + "baseName": "payload", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PaymentVerificationRequest.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/paymentVerificationResponse.ts b/src/typings/checkout/paymentVerificationResponse.ts new file mode 100644 index 0000000..0578ce3 --- /dev/null +++ b/src/typings/checkout/paymentVerificationResponse.ts @@ -0,0 +1,133 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CheckoutOrderResponse } from './checkoutOrderResponse'; +import { FraudResult } from './fraudResult'; +import { ServiceError2 } from './serviceError2'; + +export class PaymentVerificationResponse { + /** + * Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Account** > **API URLs** > **Additional data settings**. + */ + 'additionalData'?: { [key: string]: string; }; + 'fraudResult'?: FraudResult; + /** + * A unique value that you provided in the initial `/paymentSession` request as a `reference` field. + */ + 'merchantReference': string; + 'order'?: CheckoutOrderResponse; + /** + * The payment method used in the transaction. + */ + 'paymentMethod': string; + /** + * Adyen\'s 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. + */ + 'pspReference'?: string; + /** + * If the payment\'s authorisation is refused or an error occurs during authorisation, this field holds Adyen\'s mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). + */ + 'refusalReason'?: string; + /** + * Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). + */ + 'refusalReasonCode'?: string; + /** + * The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper\'s device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. + */ + 'resultCode'?: PaymentVerificationResponse.ResultCodeEnum; + 'serviceError'?: ServiceError2; + /** + * The shopperLocale value provided in the payment request. + */ + 'shopperLocale': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "additionalData", + "baseName": "additionalData", + "type": "{ [key: string]: string; }" + }, + { + "name": "fraudResult", + "baseName": "fraudResult", + "type": "FraudResult" + }, + { + "name": "merchantReference", + "baseName": "merchantReference", + "type": "string" + }, + { + "name": "order", + "baseName": "order", + "type": "CheckoutOrderResponse" + }, + { + "name": "paymentMethod", + "baseName": "paymentMethod", + "type": "string" + }, + { + "name": "pspReference", + "baseName": "pspReference", + "type": "string" + }, + { + "name": "refusalReason", + "baseName": "refusalReason", + "type": "string" + }, + { + "name": "refusalReasonCode", + "baseName": "refusalReasonCode", + "type": "string" + }, + { + "name": "resultCode", + "baseName": "resultCode", + "type": "PaymentVerificationResponse.ResultCodeEnum" + }, + { + "name": "serviceError", + "baseName": "serviceError", + "type": "ServiceError2" + }, + { + "name": "shopperLocale", + "baseName": "shopperLocale", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PaymentVerificationResponse.attributeTypeMap; + } +} + +export namespace PaymentVerificationResponse { + export enum ResultCodeEnum { + AuthenticationFinished = 'AuthenticationFinished', + Authorised = 'Authorised', + Cancelled = 'Cancelled', + ChallengeShopper = 'ChallengeShopper', + Error = 'Error', + IdentifyShopper = 'IdentifyShopper', + Pending = 'Pending', + PresentToShopper = 'PresentToShopper', + Received = 'Received', + RedirectShopper = 'RedirectShopper', + Refused = 'Refused', + Success = 'Success' + } +} diff --git a/src/typings/checkout/qiwiWalletDetails.ts b/src/typings/checkout/qiwiWalletDetails.ts new file mode 100644 index 0000000..4742683 --- /dev/null +++ b/src/typings/checkout/qiwiWalletDetails.ts @@ -0,0 +1,43 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class QiwiWalletDetails { + 'telephoneNumber': string; + /** + * **qiwiwallet** + */ + 'type'?: QiwiWalletDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "telephoneNumber", + "baseName": "telephoneNumber", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "QiwiWalletDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return QiwiWalletDetails.attributeTypeMap; + } +} + +export namespace QiwiWalletDetails { + export enum TypeEnum { + Qiwiwallet = 'qiwiwallet' + } +} diff --git a/src/typings/checkout/ratepayDetails.ts b/src/typings/checkout/ratepayDetails.ts new file mode 100644 index 0000000..637260a --- /dev/null +++ b/src/typings/checkout/ratepayDetails.ts @@ -0,0 +1,82 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class RatepayDetails { + /** + * The address where to send the invoice. + */ + 'billingAddress'?: string; + /** + * The address where the goods should be delivered. + */ + 'deliveryAddress'?: string; + /** + * Shopper name, date of birth, phone number, and email address. + */ + 'personalDetails'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * **ratepay** + */ + 'type': RatepayDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "billingAddress", + "baseName": "billingAddress", + "type": "string" + }, + { + "name": "deliveryAddress", + "baseName": "deliveryAddress", + "type": "string" + }, + { + "name": "personalDetails", + "baseName": "personalDetails", + "type": "string" + }, + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "RatepayDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return RatepayDetails.attributeTypeMap; + } +} + +export namespace RatepayDetails { + export enum TypeEnum { + Ratepay = 'ratepay' + } +} diff --git a/src/typings/checkout/recurring.ts b/src/typings/checkout/recurring.ts new file mode 100644 index 0000000..f56898c --- /dev/null +++ b/src/typings/checkout/recurring.ts @@ -0,0 +1,79 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class Recurring { + /** + * The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). + */ + 'contract'?: Recurring.ContractEnum; + /** + * A descriptive name for this detail. + */ + 'recurringDetailName'?: string; + /** + * Date after which no further authorisations shall be performed. Only for 3D Secure 2. + */ + 'recurringExpiry'?: Date; + /** + * Minimum number of days between authorisations. Only for 3D Secure 2. + */ + 'recurringFrequency'?: string; + /** + * The name of the token service. + */ + 'tokenService'?: Recurring.TokenServiceEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "contract", + "baseName": "contract", + "type": "Recurring.ContractEnum" + }, + { + "name": "recurringDetailName", + "baseName": "recurringDetailName", + "type": "string" + }, + { + "name": "recurringExpiry", + "baseName": "recurringExpiry", + "type": "Date" + }, + { + "name": "recurringFrequency", + "baseName": "recurringFrequency", + "type": "string" + }, + { + "name": "tokenService", + "baseName": "tokenService", + "type": "Recurring.TokenServiceEnum" + } ]; + + static getAttributeTypeMap() { + return Recurring.attributeTypeMap; + } +} + +export namespace Recurring { + export enum ContractEnum { + Oneclick = 'ONECLICK', + Recurring = 'RECURRING', + Payout = 'PAYOUT' + } + export enum TokenServiceEnum { + Visatokenservice = 'VISATOKENSERVICE', + Mctokenservice = 'MCTOKENSERVICE' + } +} diff --git a/src/typings/checkout/recurringDetail.ts b/src/typings/checkout/recurringDetail.ts new file mode 100644 index 0000000..2aa03e9 --- /dev/null +++ b/src/typings/checkout/recurringDetail.ts @@ -0,0 +1,125 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { InputDetail } from './inputDetail'; +import { PaymentMethodGroup } from './paymentMethodGroup'; +import { StoredDetails } from './storedDetails'; + +export class RecurringDetail { + /** + * Brand for the selected gift card. For example: plastix, hmclub. + */ + 'brand'?: string; + /** + * List of possible brands. For example: visa, mc. + */ + 'brands'?: Array; + /** + * The configuration of the payment method. + */ + 'configuration'?: { [key: string]: string; }; + /** + * All input details to be provided to complete the payment with this payment method. + */ + 'details'?: Array; + /** + * The funding source of the payment method. + */ + 'fundingSource'?: RecurringDetail.FundingSourceEnum; + 'group'?: PaymentMethodGroup; + /** + * All input details to be provided to complete the payment with this payment method. + */ + 'inputDetails'?: Array; + /** + * The displayable name of this payment method. + */ + 'name'?: string; + /** + * The reference that uniquely identifies the recurring detail. + */ + 'recurringDetailReference'?: string; + 'storedDetails'?: StoredDetails; + /** + * The unique payment method code. + */ + 'type'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "brand", + "baseName": "brand", + "type": "string" + }, + { + "name": "brands", + "baseName": "brands", + "type": "Array" + }, + { + "name": "configuration", + "baseName": "configuration", + "type": "{ [key: string]: string; }" + }, + { + "name": "details", + "baseName": "details", + "type": "Array" + }, + { + "name": "fundingSource", + "baseName": "fundingSource", + "type": "RecurringDetail.FundingSourceEnum" + }, + { + "name": "group", + "baseName": "group", + "type": "PaymentMethodGroup" + }, + { + "name": "inputDetails", + "baseName": "inputDetails", + "type": "Array" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedDetails", + "baseName": "storedDetails", + "type": "StoredDetails" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return RecurringDetail.attributeTypeMap; + } +} + +export namespace RecurringDetail { + export enum FundingSourceEnum { + Debit = 'debit' + } +} diff --git a/src/typings/checkout/redirect.ts b/src/typings/checkout/redirect.ts new file mode 100644 index 0000000..2828000 --- /dev/null +++ b/src/typings/checkout/redirect.ts @@ -0,0 +1,56 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class Redirect { + /** + * When the redirect URL must be accessed via POST, use this data to post to the redirect URL. + */ + 'data'?: { [key: string]: string; }; + /** + * The web method that you must use to access the redirect URL. Possible values: GET, POST. + */ + 'method'?: Redirect.MethodEnum; + /** + * The URL, to which you must redirect a shopper to complete a payment. + */ + 'url'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "{ [key: string]: string; }" + }, + { + "name": "method", + "baseName": "method", + "type": "Redirect.MethodEnum" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Redirect.attributeTypeMap; + } +} + +export namespace Redirect { + export enum MethodEnum { + Get = 'GET', + Post = 'POST' + } +} diff --git a/src/typings/checkout/responseAdditionalData3DSecure.ts b/src/typings/checkout/responseAdditionalData3DSecure.ts new file mode 100644 index 0000000..c27c2bc --- /dev/null +++ b/src/typings/checkout/responseAdditionalData3DSecure.ts @@ -0,0 +1,41 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class ResponseAdditionalData3DSecure { + /** + * Information provided by the issuer to the cardholder. If this field is present, you need to display this information to the cardholder. + */ + 'cardHolderInfo'?: string; + /** + * Shows the [exemption type](https://docs.adyen.com/payments-fundamentals/psd2-sca-compliance-and-implementation-guide#specifypreferenceinyourapirequest) that Adyen requested for the payment. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** + */ + 'scaExemptionRequested'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "cardHolderInfo", + "baseName": "cardHolderInfo", + "type": "string" + }, + { + "name": "scaExemptionRequested", + "baseName": "scaExemptionRequested", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ResponseAdditionalData3DSecure.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/responseAdditionalDataBillingAddress.ts b/src/typings/checkout/responseAdditionalDataBillingAddress.ts new file mode 100644 index 0000000..5736671 --- /dev/null +++ b/src/typings/checkout/responseAdditionalDataBillingAddress.ts @@ -0,0 +1,77 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class ResponseAdditionalDataBillingAddress { + /** + * The billing address city passed in the payment request. + */ + 'billingAddressCity'?: string; + /** + * The billing address country passed in the payment request. Example: NL + */ + 'billingAddressCountry'?: string; + /** + * The billing address house number or name passed in the payment request. + */ + 'billingAddressHouseNumberOrName'?: string; + /** + * The billing address postal code passed in the payment request. Example: 1011 DJ + */ + 'billingAddressPostalCode'?: string; + /** + * The billing address state or province passed in the payment request. Example: NH + */ + 'billingAddressStateOrProvince'?: string; + /** + * The billing address street passed in the payment request. + */ + 'billingAddressStreet'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "billingAddressCity", + "baseName": "billingAddress.city", + "type": "string" + }, + { + "name": "billingAddressCountry", + "baseName": "billingAddress.country", + "type": "string" + }, + { + "name": "billingAddressHouseNumberOrName", + "baseName": "billingAddress.houseNumberOrName", + "type": "string" + }, + { + "name": "billingAddressPostalCode", + "baseName": "billingAddress.postalCode", + "type": "string" + }, + { + "name": "billingAddressStateOrProvince", + "baseName": "billingAddress.stateOrProvince", + "type": "string" + }, + { + "name": "billingAddressStreet", + "baseName": "billingAddress.street", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ResponseAdditionalDataBillingAddress.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/responseAdditionalDataCard.ts b/src/typings/checkout/responseAdditionalDataCard.ts new file mode 100644 index 0000000..1ac4f3f --- /dev/null +++ b/src/typings/checkout/responseAdditionalDataCard.ts @@ -0,0 +1,86 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class ResponseAdditionalDataCard { + /** + * The Bank Identification Number of a credit card, which is the first six digits of a card number. Example: 521234 + */ + 'cardBin'?: string; + /** + * The cardholder name passed in the payment request. + */ + 'cardHolderName'?: string; + /** + * The bank or the financial institution granting lines of credit through card association branded payment cards. This information can be included when available. + */ + 'cardIssuingBank'?: string; + /** + * The country where the card was issued. Example: US + */ + 'cardIssuingCountry'?: string; + /** + * The currency in which the card is issued, if this information is available. Provided as the currency code or currency number from the ISO-4217 standard. Example: USD + */ + 'cardIssuingCurrency'?: string; + /** + * The card payment method used for the transaction. Example: amex + */ + 'cardPaymentMethod'?: string; + /** + * The last four digits of a card number. > Returned only in case of a card payment. + */ + 'cardSummary'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "cardBin", + "baseName": "cardBin", + "type": "string" + }, + { + "name": "cardHolderName", + "baseName": "cardHolderName", + "type": "string" + }, + { + "name": "cardIssuingBank", + "baseName": "cardIssuingBank", + "type": "string" + }, + { + "name": "cardIssuingCountry", + "baseName": "cardIssuingCountry", + "type": "string" + }, + { + "name": "cardIssuingCurrency", + "baseName": "cardIssuingCurrency", + "type": "string" + }, + { + "name": "cardPaymentMethod", + "baseName": "cardPaymentMethod", + "type": "string" + }, + { + "name": "cardSummary", + "baseName": "cardSummary", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ResponseAdditionalDataCard.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/responseAdditionalDataCommon.ts b/src/typings/checkout/responseAdditionalDataCommon.ts new file mode 100644 index 0000000..3ec11b9 --- /dev/null +++ b/src/typings/checkout/responseAdditionalDataCommon.ts @@ -0,0 +1,453 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class ResponseAdditionalDataCommon { + /** + * The name of the Adyen acquirer account. Example: PayPalSandbox_TestAcquirer > Only relevant for PayPal transactions. + */ + 'acquirerAccountCode'?: string; + /** + * The name of the acquirer processing the payment request. Example: TestPmmAcquirer + */ + 'acquirerCode'?: string; + /** + * The reference number that can be used for reconciliation in case a non-Adyen acquirer is used for settlement. Example: 7C9N3FNBKT9 + */ + 'acquirerReference'?: string; + /** + * The Adyen alias of the card. Example: H167852639363479 + */ + 'alias'?: string; + /** + * The type of the card alias. Example: Default + */ + 'aliasType'?: string; + /** + * Authorisation code: * When the payment is authorised successfully, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. Example: 58747 + */ + 'authCode'?: string; + /** + * The currency of the authorised amount, as a three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + */ + 'authorisedAmountCurrency'?: string; + /** + * Value of the amount authorised. This amount is represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). + */ + 'authorisedAmountValue'?: string; + /** + * The AVS result code of the payment, which provides information about the outcome of the AVS check. For possible values, see [AVS](https://docs.adyen.com/risk-management/configure-standard-risk-rules/consistency-rules#billing-address-does-not-match-cardholder-address-avs). + */ + 'avsResult'?: string; + /** + * Raw AVS result received from the acquirer, where available. Example: D + */ + 'avsResultRaw'?: string; + /** + * BIC of a bank account. Example: TESTNL01 > Only relevant for SEPA Direct Debit transactions. + */ + 'bic'?: string; + /** + * The result of CVC verification. + */ + 'cvcResult'?: string; + /** + * The raw result of CVC verification. + */ + 'cvcResultRaw'?: string; + /** + * Supported for 3D Secure 2. The unique transaction identifier assigned by the DS to identify a single transaction. + */ + 'dsTransID'?: string; + /** + * The Electronic Commerce Indicator returned from the schemes for the 3DS payment session. Example: 02 + */ + 'eci'?: string; + /** + * The expiry date on the card. Example: 6/2016 > Returned only in case of a card payment. + */ + 'expiryDate'?: string; + /** + * The currency of the extra amount charged due to additional amounts set in the skin used in the HPP payment request. Example: EUR + */ + 'extraCostsCurrency'?: string; + /** + * The value of the extra amount charged due to additional amounts set in the skin used in the HPP payment request. The amount is in minor units. + */ + 'extraCostsValue'?: string; + /** + * The fraud score due to a particular fraud check. The fraud check name is found in the key of the key-value pair. + */ + 'fraudCheckItemNrFraudCheckname'?: string; + /** + * Information regarding the funding type of the card. The possible return values are: * CHARGE * CREDIT * DEBIT * PREPAID * PREPAID_RELOADABLE * PREPAID_NONRELOADABLE * DEFFERED_DEBIT > This functionality requires additional configuration on Adyen\'s end. To enable it, contact the Support Team. For receiving this field in the notification, enable **Include Funding Source** in **Notifications** > **Additional settings**. + */ + 'fundingSource'?: string; + /** + * Indicates availability of funds. Visa: * \"I\" (fast funds are supported) * \"N\" (otherwise) Mastercard: * \"I\" (product type is Prepaid or Debit, or issuing country is in CEE/HGEM list) * \"N\" (otherwise) > Returned when you verify a card BIN or estimate costs, and only if payoutEligible is \"Y\" or \"D\". + */ + 'fundsAvailability'?: string; + /** + * Provides the more granular indication of why a transaction was refused. When a transaction fails with either \"Refused\", \"Restricted Card\", \"Transaction Not Permitted\", \"Not supported\" or \"DeclinedNon Generic\" refusalReason from the issuer, Adyen cross references its PSP-wide data for extra insight into the refusal reason. If an inferred refusal reason is available, the `inferredRefusalReason`, field is populated and the `refusalReason`, is set to \"Not Supported\". Possible values: * 3D Secure Mandated * Closed Account * ContAuth Not Supported * CVC Mandated * Ecommerce Not Allowed * Crossborder Not Supported * Card Updated * Low Authrate Bin * Non-reloadable prepaid card + */ + 'inferredRefusalReason'?: string; + /** + * The issuing country of the card based on the BIN list that Adyen maintains. Example: JP + */ + 'issuerCountry'?: string; + /** + * The `mcBankNetReferenceNumber`, is a minimum of six characters and a maximum of nine characters long. > Contact Support Team to enable this field. + */ + 'mcBankNetReferenceNumber'?: string; + /** + * Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID. + */ + 'networkTxReference'?: string; + /** + * The owner name of a bank account. Only relevant for SEPA Direct Debit transactions. + */ + 'ownerName'?: string; + /** + * The Payment Account Reference (PAR) value links a network token with the underlying primary account number (PAN). The PAR value consists of 29 uppercase alphanumeric characters. + */ + 'paymentAccountReference'?: string; + /** + * The Adyen sub-variant of the payment method used for the payment request. For more information, refer to [PaymentMethodVariant](https://docs.adyen.com/development-resources/paymentmethodvariant). Example: mcpro + */ + 'paymentMethodVariant'?: string; + /** + * Indicates whether a payout is eligible or not for this card. Visa: * \"Y\" * \"N\" Mastercard: * \"Y\" (domestic and cross-border) * \"D\" (only domestic) * \"N\" (no MoneySend) * \"U\" (unknown) + */ + 'payoutEligible'?: string; + /** + * The response code from the Real Time Account Updater service. Possible return values are: * CardChanged * CardExpiryChanged * CloseAccount * ContactCardAccountHolder + */ + 'realtimeAccountUpdaterStatus'?: string; + /** + * Message to be displayed on the terminal. + */ + 'receiptFreeText'?: string; + /** + * The `pspReference`, of the first recurring payment that created the recurring detail. This functionality requires additional configuration on Adyen\'s end. To enable it, contact the Support Team. + */ + 'recurringFirstPspReference'?: string; + /** + * The reference that uniquely identifies the recurring transaction. + */ + 'recurringRecurringDetailReference'?: string; + /** + * The provided reference of the shopper for a recurring transaction. + */ + 'recurringShopperReference'?: string; + /** + * The processing model used for the recurring transaction. + */ + 'recurringProcessingModel'?: ResponseAdditionalDataCommon.RecurringProcessingModelEnum; + /** + * If the payment is referred, this field is set to true. This field is unavailable if the payment is referred and is usually not returned with ecommerce transactions. Example: true + */ + 'referred'?: string; + /** + * Raw refusal reason received from the acquirer, where available. Example: AUTHORISED + */ + 'refusalReasonRaw'?: string; + /** + * The shopper interaction type of the payment request. Example: Ecommerce + */ + 'shopperInteraction'?: string; + /** + * The shopperReference passed in the payment request. Example: AdyenTestShopperXX + */ + 'shopperReference'?: string; + /** + * The terminal ID used in a point-of-sale payment. Example: 06022622 + */ + 'terminalId'?: string; + /** + * A Boolean value indicating whether 3DS authentication was completed on this payment. Example: true + */ + 'threeDAuthenticated'?: string; + /** + * The raw 3DS authentication result from the card issuer. Example: N + */ + 'threeDAuthenticatedResponse'?: string; + /** + * A Boolean value indicating whether 3DS was offered for this payment. Example: true + */ + 'threeDOffered'?: string; + /** + * The raw enrollment result from the 3DS directory services of the card schemes. Example: Y + */ + 'threeDOfferedResponse'?: string; + /** + * The 3D Secure 2 version. + */ + 'threeDSVersion'?: string; + /** + * The `visaTransactionId`, has a fixed length of 15 numeric characters. > Contact Support Team to enable this field. + */ + 'visaTransactionId'?: string; + /** + * The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse \'N\' or \'Y\'. If you want to submit the xid in your 3D Secure 1 request, use the `mpiData.xid`, field. Example: ODgxNDc2MDg2MDExODk5MAAAAAA= + */ + 'xid'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "acquirerAccountCode", + "baseName": "acquirerAccountCode", + "type": "string" + }, + { + "name": "acquirerCode", + "baseName": "acquirerCode", + "type": "string" + }, + { + "name": "acquirerReference", + "baseName": "acquirerReference", + "type": "string" + }, + { + "name": "alias", + "baseName": "alias", + "type": "string" + }, + { + "name": "aliasType", + "baseName": "aliasType", + "type": "string" + }, + { + "name": "authCode", + "baseName": "authCode", + "type": "string" + }, + { + "name": "authorisedAmountCurrency", + "baseName": "authorisedAmountCurrency", + "type": "string" + }, + { + "name": "authorisedAmountValue", + "baseName": "authorisedAmountValue", + "type": "string" + }, + { + "name": "avsResult", + "baseName": "avsResult", + "type": "string" + }, + { + "name": "avsResultRaw", + "baseName": "avsResultRaw", + "type": "string" + }, + { + "name": "bic", + "baseName": "bic", + "type": "string" + }, + { + "name": "cvcResult", + "baseName": "cvcResult", + "type": "string" + }, + { + "name": "cvcResultRaw", + "baseName": "cvcResultRaw", + "type": "string" + }, + { + "name": "dsTransID", + "baseName": "dsTransID", + "type": "string" + }, + { + "name": "eci", + "baseName": "eci", + "type": "string" + }, + { + "name": "expiryDate", + "baseName": "expiryDate", + "type": "string" + }, + { + "name": "extraCostsCurrency", + "baseName": "extraCostsCurrency", + "type": "string" + }, + { + "name": "extraCostsValue", + "baseName": "extraCostsValue", + "type": "string" + }, + { + "name": "fraudCheckItemNrFraudCheckname", + "baseName": "fraudCheck-[itemNr]-[FraudCheckname]", + "type": "string" + }, + { + "name": "fundingSource", + "baseName": "fundingSource", + "type": "string" + }, + { + "name": "fundsAvailability", + "baseName": "fundsAvailability", + "type": "string" + }, + { + "name": "inferredRefusalReason", + "baseName": "inferredRefusalReason", + "type": "string" + }, + { + "name": "issuerCountry", + "baseName": "issuerCountry", + "type": "string" + }, + { + "name": "mcBankNetReferenceNumber", + "baseName": "mcBankNetReferenceNumber", + "type": "string" + }, + { + "name": "networkTxReference", + "baseName": "networkTxReference", + "type": "string" + }, + { + "name": "ownerName", + "baseName": "ownerName", + "type": "string" + }, + { + "name": "paymentAccountReference", + "baseName": "paymentAccountReference", + "type": "string" + }, + { + "name": "paymentMethodVariant", + "baseName": "paymentMethodVariant", + "type": "string" + }, + { + "name": "payoutEligible", + "baseName": "payoutEligible", + "type": "string" + }, + { + "name": "realtimeAccountUpdaterStatus", + "baseName": "realtimeAccountUpdaterStatus", + "type": "string" + }, + { + "name": "receiptFreeText", + "baseName": "receiptFreeText", + "type": "string" + }, + { + "name": "recurringFirstPspReference", + "baseName": "recurring.firstPspReference", + "type": "string" + }, + { + "name": "recurringRecurringDetailReference", + "baseName": "recurring.recurringDetailReference", + "type": "string" + }, + { + "name": "recurringShopperReference", + "baseName": "recurring.shopperReference", + "type": "string" + }, + { + "name": "recurringProcessingModel", + "baseName": "recurringProcessingModel", + "type": "ResponseAdditionalDataCommon.RecurringProcessingModelEnum" + }, + { + "name": "referred", + "baseName": "referred", + "type": "string" + }, + { + "name": "refusalReasonRaw", + "baseName": "refusalReasonRaw", + "type": "string" + }, + { + "name": "shopperInteraction", + "baseName": "shopperInteraction", + "type": "string" + }, + { + "name": "shopperReference", + "baseName": "shopperReference", + "type": "string" + }, + { + "name": "terminalId", + "baseName": "terminalId", + "type": "string" + }, + { + "name": "threeDAuthenticated", + "baseName": "threeDAuthenticated", + "type": "string" + }, + { + "name": "threeDAuthenticatedResponse", + "baseName": "threeDAuthenticatedResponse", + "type": "string" + }, + { + "name": "threeDOffered", + "baseName": "threeDOffered", + "type": "string" + }, + { + "name": "threeDOfferedResponse", + "baseName": "threeDOfferedResponse", + "type": "string" + }, + { + "name": "threeDSVersion", + "baseName": "threeDSVersion", + "type": "string" + }, + { + "name": "visaTransactionId", + "baseName": "visaTransactionId", + "type": "string" + }, + { + "name": "xid", + "baseName": "xid", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ResponseAdditionalDataCommon.attributeTypeMap; + } +} + +export namespace ResponseAdditionalDataCommon { + export enum RecurringProcessingModelEnum { + CardOnFile = 'CardOnFile', + Subscription = 'Subscription', + UnscheduledCardOnFile = 'UnscheduledCardOnFile' + } +} diff --git a/src/typings/checkout/responseAdditionalDataDeliveryAddress.ts b/src/typings/checkout/responseAdditionalDataDeliveryAddress.ts new file mode 100644 index 0000000..1d7e1e3 --- /dev/null +++ b/src/typings/checkout/responseAdditionalDataDeliveryAddress.ts @@ -0,0 +1,77 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class ResponseAdditionalDataDeliveryAddress { + /** + * The delivery address city passed in the payment request. + */ + 'deliveryAddressCity'?: string; + /** + * The delivery address country passed in the payment request. Example: NL + */ + 'deliveryAddressCountry'?: string; + /** + * The delivery address house number or name passed in the payment request. + */ + 'deliveryAddressHouseNumberOrName'?: string; + /** + * The delivery address postal code passed in the payment request. Example: 1011 DJ + */ + 'deliveryAddressPostalCode'?: string; + /** + * The delivery address state or province passed in the payment request. Example: NH + */ + 'deliveryAddressStateOrProvince'?: string; + /** + * The delivery address street passed in the payment request. + */ + 'deliveryAddressStreet'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "deliveryAddressCity", + "baseName": "deliveryAddress.city", + "type": "string" + }, + { + "name": "deliveryAddressCountry", + "baseName": "deliveryAddress.country", + "type": "string" + }, + { + "name": "deliveryAddressHouseNumberOrName", + "baseName": "deliveryAddress.houseNumberOrName", + "type": "string" + }, + { + "name": "deliveryAddressPostalCode", + "baseName": "deliveryAddress.postalCode", + "type": "string" + }, + { + "name": "deliveryAddressStateOrProvince", + "baseName": "deliveryAddress.stateOrProvince", + "type": "string" + }, + { + "name": "deliveryAddressStreet", + "baseName": "deliveryAddress.street", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ResponseAdditionalDataDeliveryAddress.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/responseAdditionalDataInstallments.ts b/src/typings/checkout/responseAdditionalDataInstallments.ts new file mode 100644 index 0000000..56efa05 --- /dev/null +++ b/src/typings/checkout/responseAdditionalDataInstallments.ts @@ -0,0 +1,131 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class ResponseAdditionalDataInstallments { + /** + * Type of installment. The value of `installmentType` should be **IssuerFinanced**. + */ + 'installmentPaymentDataInstallmentType'?: string; + /** + * Annual interest rate. + */ + 'installmentPaymentDataOptionItemNrAnnualPercentageRate'?: string; + /** + * First Installment Amount in minor units. + */ + 'installmentPaymentDataOptionItemNrFirstInstallmentAmount'?: string; + /** + * Installment fee amount in minor units. + */ + 'installmentPaymentDataOptionItemNrInstallmentFee'?: string; + /** + * Interest rate for the installment period. + */ + 'installmentPaymentDataOptionItemNrInterestRate'?: string; + /** + * Maximum number of installments possible for this payment. + */ + 'installmentPaymentDataOptionItemNrMaximumNumberOfInstallments'?: string; + /** + * Minimum number of installments possible for this payment. + */ + 'installmentPaymentDataOptionItemNrMinimumNumberOfInstallments'?: string; + /** + * Total number of installments possible for this payment. + */ + 'installmentPaymentDataOptionItemNrNumberOfInstallments'?: string; + /** + * Subsequent Installment Amount in minor units. + */ + 'installmentPaymentDataOptionItemNrSubsequentInstallmentAmount'?: string; + /** + * Total amount in minor units. + */ + 'installmentPaymentDataOptionItemNrTotalAmountDue'?: string; + /** + * Possible values: * PayInInstallmentsOnly * PayInFullOnly * PayInFullOrInstallments + */ + 'installmentPaymentDataPaymentOptions'?: string; + /** + * The number of installments that the payment amount should be charged with. Example: 5 > Only relevant for card payments in countries that support installments. + */ + 'installmentsValue'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "installmentPaymentDataInstallmentType", + "baseName": "installmentPaymentData.installmentType", + "type": "string" + }, + { + "name": "installmentPaymentDataOptionItemNrAnnualPercentageRate", + "baseName": "installmentPaymentData.option[itemNr].annualPercentageRate", + "type": "string" + }, + { + "name": "installmentPaymentDataOptionItemNrFirstInstallmentAmount", + "baseName": "installmentPaymentData.option[itemNr].firstInstallmentAmount", + "type": "string" + }, + { + "name": "installmentPaymentDataOptionItemNrInstallmentFee", + "baseName": "installmentPaymentData.option[itemNr].installmentFee", + "type": "string" + }, + { + "name": "installmentPaymentDataOptionItemNrInterestRate", + "baseName": "installmentPaymentData.option[itemNr].interestRate", + "type": "string" + }, + { + "name": "installmentPaymentDataOptionItemNrMaximumNumberOfInstallments", + "baseName": "installmentPaymentData.option[itemNr].maximumNumberOfInstallments", + "type": "string" + }, + { + "name": "installmentPaymentDataOptionItemNrMinimumNumberOfInstallments", + "baseName": "installmentPaymentData.option[itemNr].minimumNumberOfInstallments", + "type": "string" + }, + { + "name": "installmentPaymentDataOptionItemNrNumberOfInstallments", + "baseName": "installmentPaymentData.option[itemNr].numberOfInstallments", + "type": "string" + }, + { + "name": "installmentPaymentDataOptionItemNrSubsequentInstallmentAmount", + "baseName": "installmentPaymentData.option[itemNr].subsequentInstallmentAmount", + "type": "string" + }, + { + "name": "installmentPaymentDataOptionItemNrTotalAmountDue", + "baseName": "installmentPaymentData.option[itemNr].totalAmountDue", + "type": "string" + }, + { + "name": "installmentPaymentDataPaymentOptions", + "baseName": "installmentPaymentData.paymentOptions", + "type": "string" + }, + { + "name": "installmentsValue", + "baseName": "installments.value", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ResponseAdditionalDataInstallments.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/responseAdditionalDataNetworkTokens.ts b/src/typings/checkout/responseAdditionalDataNetworkTokens.ts new file mode 100644 index 0000000..5840def --- /dev/null +++ b/src/typings/checkout/responseAdditionalDataNetworkTokens.ts @@ -0,0 +1,50 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class ResponseAdditionalDataNetworkTokens { + /** + * Indicates whether a network token is available for the specified card. + */ + 'networkTokenAvailable'?: string; + /** + * The Bank Identification Number of a tokenized card, which is the first six digits of a card number. + */ + 'networkTokenBin'?: string; + /** + * The last four digits of a network token. + */ + 'networkTokenTokenSummary'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "networkTokenAvailable", + "baseName": "networkToken.available", + "type": "string" + }, + { + "name": "networkTokenBin", + "baseName": "networkToken.bin", + "type": "string" + }, + { + "name": "networkTokenTokenSummary", + "baseName": "networkToken.tokenSummary", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ResponseAdditionalDataNetworkTokens.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/responseAdditionalDataOpi.ts b/src/typings/checkout/responseAdditionalDataOpi.ts new file mode 100644 index 0000000..67d5db5 --- /dev/null +++ b/src/typings/checkout/responseAdditionalDataOpi.ts @@ -0,0 +1,32 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class ResponseAdditionalDataOpi { + /** + * Returned in the response if you included `opi.includeTransToken: true` in an ecommerce payment request. This contains an Oracle Payment Interface token that you can store in your Oracle Opera database to identify tokenized ecommerce transactions. For more information and required settings, see [Oracle Opera](https://docs.adyen.com/plugins/oracle-opera#opi-token-ecommerce). + */ + 'opiTransToken'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "opiTransToken", + "baseName": "opi.transToken", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ResponseAdditionalDataOpi.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/responseAdditionalDataPayPal.ts b/src/typings/checkout/responseAdditionalDataPayPal.ts new file mode 100644 index 0000000..21be419 --- /dev/null +++ b/src/typings/checkout/responseAdditionalDataPayPal.ts @@ -0,0 +1,68 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class ResponseAdditionalDataPayPal { + /** + * The buyer\'s PayPal account email address. Example: paypaltest@adyen.com + */ + 'paypalEmail'?: string; + /** + * The buyer\'s PayPal ID. Example: LF5HCWWBRV2KL + */ + 'paypalPayerId'?: string; + /** + * The buyer\'s country of residence. Example: NL + */ + 'paypalPayerResidenceCountry'?: string; + /** + * The status of the buyer\'s PayPal account. Example: unverified + */ + 'paypalPayerStatus'?: string; + /** + * The eligibility for PayPal Seller Protection for this payment. Example: Ineligible + */ + 'paypalProtectionEligibility'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "paypalEmail", + "baseName": "paypalEmail", + "type": "string" + }, + { + "name": "paypalPayerId", + "baseName": "paypalPayerId", + "type": "string" + }, + { + "name": "paypalPayerResidenceCountry", + "baseName": "paypalPayerResidenceCountry", + "type": "string" + }, + { + "name": "paypalPayerStatus", + "baseName": "paypalPayerStatus", + "type": "string" + }, + { + "name": "paypalProtectionEligibility", + "baseName": "paypalProtectionEligibility", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ResponseAdditionalDataPayPal.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/responseAdditionalDataSepa.ts b/src/typings/checkout/responseAdditionalDataSepa.ts new file mode 100644 index 0000000..4342202 --- /dev/null +++ b/src/typings/checkout/responseAdditionalDataSepa.ts @@ -0,0 +1,50 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class ResponseAdditionalDataSepa { + /** + * The transaction signature date. Format: yyyy-MM-dd + */ + 'sepadirectdebitDateOfSignature'?: string; + /** + * Its value corresponds to the pspReference value of the transaction. + */ + 'sepadirectdebitMandateId'?: string; + /** + * This field can take one of the following values: * OneOff: (OOFF) Direct debit instruction to initiate exactly one direct debit transaction. * First: (FRST) Initial/first collection in a series of direct debit instructions. * Recurring: (RCUR) Direct debit instruction to carry out regular direct debit transactions initiated by the creditor. * Final: (FNAL) Last/final collection in a series of direct debit instructions. Example: OOFF + */ + 'sepadirectdebitSequenceType'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "sepadirectdebitDateOfSignature", + "baseName": "sepadirectdebit.dateOfSignature", + "type": "string" + }, + { + "name": "sepadirectdebitMandateId", + "baseName": "sepadirectdebit.mandateId", + "type": "string" + }, + { + "name": "sepadirectdebitSequenceType", + "baseName": "sepadirectdebit.sequenceType", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ResponseAdditionalDataSepa.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/riskData.ts b/src/typings/checkout/riskData.ts new file mode 100644 index 0000000..39f1df0 --- /dev/null +++ b/src/typings/checkout/riskData.ts @@ -0,0 +1,59 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class RiskData { + /** + * Contains client-side data, like the device fingerprint, cookies, and specific browser settings. + */ + 'clientData'?: string; + /** + * Any custom fields used as part of the input to configured risk rules. + */ + 'customFields'?: { [key: string]: string; }; + /** + * An integer value that is added to the normal fraud score. The value can be either positive or negative. + */ + 'fraudOffset'?: number; + /** + * The risk profile to assign to this payment. When left empty, the merchant-level account\'s default risk profile will be applied. + */ + 'profileReference'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "clientData", + "baseName": "clientData", + "type": "string" + }, + { + "name": "customFields", + "baseName": "customFields", + "type": "{ [key: string]: string; }" + }, + { + "name": "fraudOffset", + "baseName": "fraudOffset", + "type": "number" + }, + { + "name": "profileReference", + "baseName": "profileReference", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return RiskData.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/sDKEphemPubKey.ts b/src/typings/checkout/sDKEphemPubKey.ts new file mode 100644 index 0000000..22af61b --- /dev/null +++ b/src/typings/checkout/sDKEphemPubKey.ts @@ -0,0 +1,59 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class SDKEphemPubKey { + /** + * The `crv` value as received from the 3D Secure 2 SDK. + */ + 'crv'?: string; + /** + * The `kty` value as received from the 3D Secure 2 SDK. + */ + 'kty'?: string; + /** + * The `x` value as received from the 3D Secure 2 SDK. + */ + 'x'?: string; + /** + * The `y` value as received from the 3D Secure 2 SDK. + */ + 'y'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "crv", + "baseName": "crv", + "type": "string" + }, + { + "name": "kty", + "baseName": "kty", + "type": "string" + }, + { + "name": "x", + "baseName": "x", + "type": "string" + }, + { + "name": "y", + "baseName": "y", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SDKEphemPubKey.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/samsungPayDetails.ts b/src/typings/checkout/samsungPayDetails.ts new file mode 100644 index 0000000..98172e7 --- /dev/null +++ b/src/typings/checkout/samsungPayDetails.ts @@ -0,0 +1,76 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class SamsungPayDetails { + /** + * The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + */ + 'fundingSource'?: SamsungPayDetails.FundingSourceEnum; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * The payload you received from the Samsung Pay SDK response. + */ + 'samsungPayToken': string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * **samsungpay** + */ + 'type'?: SamsungPayDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "fundingSource", + "baseName": "fundingSource", + "type": "SamsungPayDetails.FundingSourceEnum" + }, + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "samsungPayToken", + "baseName": "samsungPayToken", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "SamsungPayDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return SamsungPayDetails.attributeTypeMap; + } +} + +export namespace SamsungPayDetails { + export enum FundingSourceEnum { + Debit = 'debit' + } + export enum TypeEnum { + Samsungpay = 'samsungpay' + } +} diff --git a/src/typings/checkout/sepaDirectDebitDetails.ts b/src/typings/checkout/sepaDirectDebitDetails.ts new file mode 100644 index 0000000..71dd484 --- /dev/null +++ b/src/typings/checkout/sepaDirectDebitDetails.ts @@ -0,0 +1,73 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class SepaDirectDebitDetails { + /** + * The International Bank Account Number (IBAN). + */ + 'iban': string; + /** + * The name of the bank account holder. + */ + 'ownerName': string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * **sepadirectdebit** + */ + 'type'?: SepaDirectDebitDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "iban", + "baseName": "iban", + "type": "string" + }, + { + "name": "ownerName", + "baseName": "ownerName", + "type": "string" + }, + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "SepaDirectDebitDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return SepaDirectDebitDetails.attributeTypeMap; + } +} + +export namespace SepaDirectDebitDetails { + export enum TypeEnum { + Sepadirectdebit = 'sepadirectdebit' + } +} diff --git a/src/typings/checkout/serviceError.ts b/src/typings/checkout/serviceError.ts new file mode 100644 index 0000000..8fd92e7 --- /dev/null +++ b/src/typings/checkout/serviceError.ts @@ -0,0 +1,77 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class ServiceError { + /** + * Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Account** > **API URLs**. + */ + 'additionalData'?: { [key: string]: string; }; + /** + * The error code mapped to the error message. + */ + 'errorCode'?: string; + /** + * The category of the error. + */ + 'errorType'?: string; + /** + * A short explanation of the issue. + */ + 'message'?: string; + /** + * The PSP reference of the payment. + */ + 'pspReference'?: string; + /** + * The HTTP response status. + */ + 'status'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "additionalData", + "baseName": "additionalData", + "type": "{ [key: string]: string; }" + }, + { + "name": "errorCode", + "baseName": "errorCode", + "type": "string" + }, + { + "name": "errorType", + "baseName": "errorType", + "type": "string" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "pspReference", + "baseName": "pspReference", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return ServiceError.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/serviceError2.ts b/src/typings/checkout/serviceError2.ts new file mode 100644 index 0000000..c194f38 --- /dev/null +++ b/src/typings/checkout/serviceError2.ts @@ -0,0 +1,41 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class ServiceError2 { + 'errorCode'?: string; + 'errorType'?: string; + 'message'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "errorCode", + "baseName": "errorCode", + "type": "string" + }, + { + "name": "errorType", + "baseName": "errorType", + "type": "string" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ServiceError2.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/shopperInput.ts b/src/typings/checkout/shopperInput.ts new file mode 100644 index 0000000..d0fd895 --- /dev/null +++ b/src/typings/checkout/shopperInput.ts @@ -0,0 +1,67 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class ShopperInput { + /** + * Specifies visibility of billing address fields. Permitted values: * editable * hidden * readOnly + */ + 'billingAddress'?: ShopperInput.BillingAddressEnum; + /** + * Specifies visibility of delivery address fields. Permitted values: * editable * hidden * readOnly + */ + 'deliveryAddress'?: ShopperInput.DeliveryAddressEnum; + /** + * Specifies visibility of personal details. Permitted values: * editable * hidden * readOnly + */ + 'personalDetails'?: ShopperInput.PersonalDetailsEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "billingAddress", + "baseName": "billingAddress", + "type": "ShopperInput.BillingAddressEnum" + }, + { + "name": "deliveryAddress", + "baseName": "deliveryAddress", + "type": "ShopperInput.DeliveryAddressEnum" + }, + { + "name": "personalDetails", + "baseName": "personalDetails", + "type": "ShopperInput.PersonalDetailsEnum" + } ]; + + static getAttributeTypeMap() { + return ShopperInput.attributeTypeMap; + } +} + +export namespace ShopperInput { + export enum BillingAddressEnum { + Editable = 'editable', + Hidden = 'hidden', + ReadOnly = 'readOnly' + } + export enum DeliveryAddressEnum { + Editable = 'editable', + Hidden = 'hidden', + ReadOnly = 'readOnly' + } + export enum PersonalDetailsEnum { + Editable = 'editable', + Hidden = 'hidden', + ReadOnly = 'readOnly' + } +} diff --git a/src/typings/checkout/shopperInteractionDevice.ts b/src/typings/checkout/shopperInteractionDevice.ts new file mode 100644 index 0000000..04137fb --- /dev/null +++ b/src/typings/checkout/shopperInteractionDevice.ts @@ -0,0 +1,50 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class ShopperInteractionDevice { + /** + * Locale on the shopper interaction device. + */ + 'locale'?: string; + /** + * Operating system running on the shopper interaction device. + */ + 'os'?: string; + /** + * Version of the operating system on the shopper interaction device. + */ + 'osVersion'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "locale", + "baseName": "locale", + "type": "string" + }, + { + "name": "os", + "baseName": "os", + "type": "string" + }, + { + "name": "osVersion", + "baseName": "osVersion", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ShopperInteractionDevice.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/split.ts b/src/typings/checkout/split.ts new file mode 100644 index 0000000..0f7c7a6 --- /dev/null +++ b/src/typings/checkout/split.ts @@ -0,0 +1,78 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SplitAmount } from './splitAmount'; + +export class Split { + /** + * Unique identifier of the account where the split amount should be sent. This is required if `type` is **MarketPlace** or **BalanceAccount**. + */ + 'account'?: string; + 'amount': SplitAmount; + /** + * A description of this split. + */ + 'description'?: string; + /** + * Your reference for the split, which you can use to link the split to other operations such as captures and refunds. This is required if `type` is **MarketPlace** or **BalanceAccount**. For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. If the reference is not provided, the split is reported as part of the aggregated [TransferBalance record type](https://docs.adyen.com/reporting/marketpay-payments-accounting-report) in Adyen for Platforms. + */ + 'reference'?: string; + /** + * The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**. + */ + 'type': Split.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "account", + "baseName": "account", + "type": "string" + }, + { + "name": "amount", + "baseName": "amount", + "type": "SplitAmount" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "Split.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return Split.attributeTypeMap; + } +} + +export namespace Split { + export enum TypeEnum { + BalanceAccount = 'BalanceAccount', + Commission = 'Commission', + Default = 'Default', + MarketPlace = 'MarketPlace', + PaymentFee = 'PaymentFee', + Vat = 'VAT', + Verification = 'Verification' + } +} diff --git a/src/typings/checkout/splitAmount.ts b/src/typings/checkout/splitAmount.ts new file mode 100644 index 0000000..d7d61da --- /dev/null +++ b/src/typings/checkout/splitAmount.ts @@ -0,0 +1,41 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class SplitAmount { + /** + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). If this value is not provided, the currency in which the payment is made will be used. + */ + 'currency'?: string; + /** + * The amount in [minor units](https://docs.adyen.com/development-resources/currency-codes). + */ + 'value': number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "currency", + "baseName": "currency", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return SplitAmount.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/storedDetails.ts b/src/typings/checkout/storedDetails.ts new file mode 100644 index 0000000..3ef8f6a --- /dev/null +++ b/src/typings/checkout/storedDetails.ts @@ -0,0 +1,47 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { BankAccount } from './bankAccount'; +import { Card } from './card'; + +export class StoredDetails { + 'bank'?: BankAccount; + 'card'?: Card; + /** + * The email associated with stored payment details. + */ + 'emailAddress'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "bank", + "baseName": "bank", + "type": "BankAccount" + }, + { + "name": "card", + "baseName": "card", + "type": "Card" + }, + { + "name": "emailAddress", + "baseName": "emailAddress", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return StoredDetails.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/storedPaymentMethod.ts b/src/typings/checkout/storedPaymentMethod.ts new file mode 100644 index 0000000..7fafff0 --- /dev/null +++ b/src/typings/checkout/storedPaymentMethod.ts @@ -0,0 +1,131 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class StoredPaymentMethod { + /** + * The brand of the card. + */ + 'brand'?: string; + /** + * The month the card expires. + */ + 'expiryMonth'?: string; + /** + * The year the card expires. + */ + 'expiryYear'?: string; + /** + * The unique payment method code. + */ + 'holderName'?: string; + /** + * The IBAN of the bank account. + */ + 'iban'?: string; + /** + * A unique identifier of this stored payment method. + */ + 'id'?: string; + /** + * The last four digits of the PAN. + */ + 'lastFour'?: string; + /** + * The display name of the stored payment method. + */ + 'name'?: string; + /** + * The name of the bank account holder. + */ + 'ownerName'?: string; + /** + * The shopper’s email address. + */ + 'shopperEmail'?: string; + /** + * The supported shopper interactions for this stored payment method. + */ + 'supportedShopperInteractions'?: Array; + /** + * The type of payment method. + */ + 'type'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "brand", + "baseName": "brand", + "type": "string" + }, + { + "name": "expiryMonth", + "baseName": "expiryMonth", + "type": "string" + }, + { + "name": "expiryYear", + "baseName": "expiryYear", + "type": "string" + }, + { + "name": "holderName", + "baseName": "holderName", + "type": "string" + }, + { + "name": "iban", + "baseName": "iban", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "lastFour", + "baseName": "lastFour", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "ownerName", + "baseName": "ownerName", + "type": "string" + }, + { + "name": "shopperEmail", + "baseName": "shopperEmail", + "type": "string" + }, + { + "name": "supportedShopperInteractions", + "baseName": "supportedShopperInteractions", + "type": "Array" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return StoredPaymentMethod.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/storedPaymentMethodDetails.ts b/src/typings/checkout/storedPaymentMethodDetails.ts new file mode 100644 index 0000000..28bd4e6 --- /dev/null +++ b/src/typings/checkout/storedPaymentMethodDetails.ts @@ -0,0 +1,69 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class StoredPaymentMethodDetails { + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * The payment method type. + */ + 'type'?: StoredPaymentMethodDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "StoredPaymentMethodDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return StoredPaymentMethodDetails.attributeTypeMap; + } +} + +export namespace StoredPaymentMethodDetails { + export enum TypeEnum { + BcmcMobile = 'bcmc_mobile', + BcmcMobileQr = 'bcmc_mobile_QR', + BcmcMobileApp = 'bcmc_mobile_app', + MomoWallet = 'momo_wallet', + MomoWalletApp = 'momo_wallet_app', + PaymayaWallet = 'paymaya_wallet', + GrabpaySg = 'grabpay_SG', + GrabpayMy = 'grabpay_MY', + GrabpayTh = 'grabpay_TH', + GrabpayId = 'grabpay_ID', + GrabpayVn = 'grabpay_VN', + GrabpayPh = 'grabpay_PH', + Oxxo = 'oxxo', + Gcash = 'gcash', + Kakaopay = 'kakaopay' + } +} diff --git a/src/typings/checkout/subInputDetail.ts b/src/typings/checkout/subInputDetail.ts new file mode 100644 index 0000000..00e0cfe --- /dev/null +++ b/src/typings/checkout/subInputDetail.ts @@ -0,0 +1,79 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Item } from './item'; + +export class SubInputDetail { + /** + * Configuration parameters for the required input. + */ + 'configuration'?: { [key: string]: string; }; + /** + * In case of a select, the items to choose from. + */ + 'items'?: Array; + /** + * The value to provide in the result. + */ + 'key'?: string; + /** + * True if this input is optional to provide. + */ + 'optional'?: boolean; + /** + * The type of the required input. + */ + 'type'?: string; + /** + * The value can be pre-filled, if available. + */ + 'value'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "configuration", + "baseName": "configuration", + "type": "{ [key: string]: string; }" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "key", + "baseName": "key", + "type": "string" + }, + { + "name": "optional", + "baseName": "optional", + "type": "boolean" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SubInputDetail.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/threeDS2RequestData.ts b/src/typings/checkout/threeDS2RequestData.ts new file mode 100644 index 0000000..5d09667 --- /dev/null +++ b/src/typings/checkout/threeDS2RequestData.ts @@ -0,0 +1,233 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { DeviceRenderOptions } from './deviceRenderOptions'; +import { SDKEphemPubKey } from './sDKEphemPubKey'; + +export class ThreeDS2RequestData { + /** + * Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The acquiring BIN enrolled for 3D Secure 2. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. + */ + 'acquirerBIN'?: string; + /** + * Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchantId that is enrolled for 3D Secure 2 by the merchant\'s acquirer. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. + */ + 'acquirerMerchantID'?: string; + /** + * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. + */ + 'authenticationOnly'?: boolean; + /** + * Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` + */ + 'challengeIndicator'?: ThreeDS2RequestData.ChallengeIndicatorEnum; + /** + * The environment of the shopper. Allowed values: * `app` * `browser` + */ + 'deviceChannel': string; + 'deviceRenderOptions'?: DeviceRenderOptions; + /** + * Required for merchants that have been enrolled for 3D Secure 2 by another party than Adyen, mostly [authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The `mcc` is a four-digit code with which the previously given `acquirerMerchantID` is registered at the scheme. + */ + 'mcc'?: string; + /** + * Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchant name that the issuer presents to the shopper if they get a challenge. We recommend to use the same value that you will use in the authorization. Maximum length is 40 characters. > Optional for a [full 3D Secure 2 integration](https://docs.adyen.com/online-payments/3d-secure/native-3ds2/api-integration). Use this field if you are enrolled for 3D Secure 2 with us and want to override the merchant name already configured on your account. + */ + 'merchantName'?: string; + /** + * The `messageVersion` value indicating the 3D Secure 2 protocol version. + */ + 'messageVersion'?: string; + /** + * URL to where the issuer should send the `CRes`. Required if you are not using components for `channel` **Web** or if you are using classic integration `deviceChannel` **browser**. + */ + 'notificationURL'?: string; + /** + * The `sdkAppID` value as received from the 3D Secure 2 SDK. Required for `deviceChannel` set to **app**. + */ + 'sdkAppID'?: string; + /** + * The `sdkEncData` value as received from the 3D Secure 2 SDK. Required for `deviceChannel` set to **app**. + */ + 'sdkEncData'?: string; + 'sdkEphemPubKey'?: SDKEphemPubKey; + /** + * The maximum amount of time in minutes for the 3D Secure 2 authentication process. Optional and only for `deviceChannel` set to **app**. Defaults to **60** minutes. + */ + 'sdkMaxTimeout'?: number; + /** + * The `sdkReferenceNumber` value as received from the 3D Secure 2 SDK. Only for `deviceChannel` set to **app**. + */ + 'sdkReferenceNumber'?: string; + /** + * The `sdkTransID` value as received from the 3D Secure 2 SDK. Only for `deviceChannel` set to **app**. + */ + 'sdkTransID'?: string; + /** + * Completion indicator for the device fingerprinting. + */ + 'threeDSCompInd'?: string; + /** + * Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor identifier assigned by the Directory Server when you enrol for 3D Secure 2. + */ + 'threeDSRequestorID'?: string; + /** + * Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor name assigned by the Directory Server when you enrol for 3D Secure 2. + */ + 'threeDSRequestorName'?: string; + /** + * URL of the (customer service) website that will be shown to the shopper in case of technical errors during the 3D Secure 2 process. + */ + 'threeDSRequestorURL'?: string; + /** + * Identify the type of the transaction being authenticated. + */ + 'transactionType'?: ThreeDS2RequestData.TransactionTypeEnum; + /** + * The `whiteListStatus` value returned from a previous 3D Secure 2 transaction, only applicable for 3D Secure 2 protocol version 2.2.0. + */ + 'whiteListStatus'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "acquirerBIN", + "baseName": "acquirerBIN", + "type": "string" + }, + { + "name": "acquirerMerchantID", + "baseName": "acquirerMerchantID", + "type": "string" + }, + { + "name": "authenticationOnly", + "baseName": "authenticationOnly", + "type": "boolean" + }, + { + "name": "challengeIndicator", + "baseName": "challengeIndicator", + "type": "ThreeDS2RequestData.ChallengeIndicatorEnum" + }, + { + "name": "deviceChannel", + "baseName": "deviceChannel", + "type": "string" + }, + { + "name": "deviceRenderOptions", + "baseName": "deviceRenderOptions", + "type": "DeviceRenderOptions" + }, + { + "name": "mcc", + "baseName": "mcc", + "type": "string" + }, + { + "name": "merchantName", + "baseName": "merchantName", + "type": "string" + }, + { + "name": "messageVersion", + "baseName": "messageVersion", + "type": "string" + }, + { + "name": "notificationURL", + "baseName": "notificationURL", + "type": "string" + }, + { + "name": "sdkAppID", + "baseName": "sdkAppID", + "type": "string" + }, + { + "name": "sdkEncData", + "baseName": "sdkEncData", + "type": "string" + }, + { + "name": "sdkEphemPubKey", + "baseName": "sdkEphemPubKey", + "type": "SDKEphemPubKey" + }, + { + "name": "sdkMaxTimeout", + "baseName": "sdkMaxTimeout", + "type": "number" + }, + { + "name": "sdkReferenceNumber", + "baseName": "sdkReferenceNumber", + "type": "string" + }, + { + "name": "sdkTransID", + "baseName": "sdkTransID", + "type": "string" + }, + { + "name": "threeDSCompInd", + "baseName": "threeDSCompInd", + "type": "string" + }, + { + "name": "threeDSRequestorID", + "baseName": "threeDSRequestorID", + "type": "string" + }, + { + "name": "threeDSRequestorName", + "baseName": "threeDSRequestorName", + "type": "string" + }, + { + "name": "threeDSRequestorURL", + "baseName": "threeDSRequestorURL", + "type": "string" + }, + { + "name": "transactionType", + "baseName": "transactionType", + "type": "ThreeDS2RequestData.TransactionTypeEnum" + }, + { + "name": "whiteListStatus", + "baseName": "whiteListStatus", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ThreeDS2RequestData.attributeTypeMap; + } +} + +export namespace ThreeDS2RequestData { + export enum ChallengeIndicatorEnum { + NoPreference = 'noPreference', + RequestNoChallenge = 'requestNoChallenge', + RequestChallenge = 'requestChallenge', + RequestChallengeAsMandate = 'requestChallengeAsMandate' + } + export enum TransactionTypeEnum { + GoodsOrServicePurchase = 'goodsOrServicePurchase', + CheckAcceptance = 'checkAcceptance', + AccountFunding = 'accountFunding', + QuasiCashTransaction = 'quasiCashTransaction', + PrepaidActivationAndLoad = 'prepaidActivationAndLoad' + } +} diff --git a/src/typings/checkout/threeDS2Result.ts b/src/typings/checkout/threeDS2Result.ts new file mode 100644 index 0000000..b06b004 --- /dev/null +++ b/src/typings/checkout/threeDS2Result.ts @@ -0,0 +1,140 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class ThreeDS2Result { + /** + * The `authenticationValue` value as defined in the 3D Secure 2 specification. + */ + 'authenticationValue'?: string; + /** + * The algorithm used by the ACS to calculate the authentication value, only for CartesBancaires integrations. + */ + 'cavvAlgorithm'?: string; + /** + * Indicator informing the ACS and the DS that the authentication has been canceled. + */ + 'challengeCancel'?: string; + 'challengeIndicator'?: string; + /** + * The `dsTransID` value as defined in the 3D Secure 2 specification. + */ + 'dsTransID'?: string; + /** + * The `eci` value as defined in the 3D Secure 2 specification. + */ + 'eci'?: string; + 'exemptionIndicator'?: string; + /** + * The `messageVersion` value as defined in the 3D Secure 2 specification. + */ + 'messageVersion'?: string; + 'riskScore'?: string; + /** + * The `threeDSServerTransID` value as defined in the 3D Secure 2 specification. + */ + 'threeDSServerTransID'?: string; + /** + * The `timestamp` value of the 3D Secure 2 authentication. + */ + 'timestamp'?: string; + /** + * The `transStatus` value as defined in the 3D Secure 2 specification. + */ + 'transStatus'?: string; + /** + * The `transStatusReason` value as defined in the 3D Secure 2 specification. + */ + 'transStatusReason'?: string; + /** + * The `whiteListStatus` value as defined in the 3D Secure 2 specification. + */ + 'whiteListStatus'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "authenticationValue", + "baseName": "authenticationValue", + "type": "string" + }, + { + "name": "cavvAlgorithm", + "baseName": "cavvAlgorithm", + "type": "string" + }, + { + "name": "challengeCancel", + "baseName": "challengeCancel", + "type": "string" + }, + { + "name": "challengeIndicator", + "baseName": "challengeIndicator", + "type": "string" + }, + { + "name": "dsTransID", + "baseName": "dsTransID", + "type": "string" + }, + { + "name": "eci", + "baseName": "eci", + "type": "string" + }, + { + "name": "exemptionIndicator", + "baseName": "exemptionIndicator", + "type": "string" + }, + { + "name": "messageVersion", + "baseName": "messageVersion", + "type": "string" + }, + { + "name": "riskScore", + "baseName": "riskScore", + "type": "string" + }, + { + "name": "threeDSServerTransID", + "baseName": "threeDSServerTransID", + "type": "string" + }, + { + "name": "timestamp", + "baseName": "timestamp", + "type": "string" + }, + { + "name": "transStatus", + "baseName": "transStatus", + "type": "string" + }, + { + "name": "transStatusReason", + "baseName": "transStatusReason", + "type": "string" + }, + { + "name": "whiteListStatus", + "baseName": "whiteListStatus", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ThreeDS2Result.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/threeDSecureData.ts b/src/typings/checkout/threeDSecureData.ts new file mode 100644 index 0000000..7ef679f --- /dev/null +++ b/src/typings/checkout/threeDSecureData.ts @@ -0,0 +1,131 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class ThreeDSecureData { + /** + * In 3D Secure 1, the authentication response if the shopper was redirected. In 3D Secure 2, this is the `transStatus` from the challenge result. If the transaction was frictionless, omit this parameter. + */ + 'authenticationResponse'?: ThreeDSecureData.AuthenticationResponseEnum; + /** + * The cardholder authentication value (base64 encoded, 20 bytes in a decoded form). + */ + 'cavv'?: string; + /** + * The CAVV algorithm used. Include this only for 3D Secure 1. + */ + 'cavvAlgorithm'?: string; + 'challengeCancel'?: string; + /** + * In 3D Secure 1, this is the enrollment response from the 3D directory server. In 3D Secure 2, this is the `transStatus` from the `ARes`. + */ + 'directoryResponse'?: ThreeDSecureData.DirectoryResponseEnum; + /** + * Supported for 3D Secure 2. The unique transaction identifier assigned by the Directory Server (DS) to identify a single transaction. + */ + 'dsTransID'?: string; + /** + * The electronic commerce indicator. + */ + 'eci'?: string; + 'riskScore'?: string; + /** + * The version of the 3D Secure protocol. + */ + 'threeDSVersion'?: string; + 'transStatusReason'?: string; + /** + * Supported for 3D Secure 1. The transaction identifier (Base64-encoded, 20 bytes in a decoded form). + */ + 'xid'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "authenticationResponse", + "baseName": "authenticationResponse", + "type": "ThreeDSecureData.AuthenticationResponseEnum" + }, + { + "name": "cavv", + "baseName": "cavv", + "type": "string" + }, + { + "name": "cavvAlgorithm", + "baseName": "cavvAlgorithm", + "type": "string" + }, + { + "name": "challengeCancel", + "baseName": "challengeCancel", + "type": "string" + }, + { + "name": "directoryResponse", + "baseName": "directoryResponse", + "type": "ThreeDSecureData.DirectoryResponseEnum" + }, + { + "name": "dsTransID", + "baseName": "dsTransID", + "type": "string" + }, + { + "name": "eci", + "baseName": "eci", + "type": "string" + }, + { + "name": "riskScore", + "baseName": "riskScore", + "type": "string" + }, + { + "name": "threeDSVersion", + "baseName": "threeDSVersion", + "type": "string" + }, + { + "name": "transStatusReason", + "baseName": "transStatusReason", + "type": "string" + }, + { + "name": "xid", + "baseName": "xid", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ThreeDSecureData.attributeTypeMap; + } +} + +export namespace ThreeDSecureData { + export enum AuthenticationResponseEnum { + Y = 'Y', + N = 'N', + U = 'U', + A = 'A' + } + export enum DirectoryResponseEnum { + A = 'A', + C = 'C', + D = 'D', + I = 'I', + N = 'N', + R = 'R', + U = 'U', + Y = 'Y' + } +} diff --git a/src/typings/checkout/updatePaymentLinkRequest.ts b/src/typings/checkout/updatePaymentLinkRequest.ts new file mode 100644 index 0000000..815b79a --- /dev/null +++ b/src/typings/checkout/updatePaymentLinkRequest.ts @@ -0,0 +1,37 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class UpdatePaymentLinkRequest { + /** + * Status of the payment link. Possible values: * **expired** + */ + 'status': UpdatePaymentLinkRequest.StatusEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "UpdatePaymentLinkRequest.StatusEnum" + } ]; + + static getAttributeTypeMap() { + return UpdatePaymentLinkRequest.attributeTypeMap; + } +} + +export namespace UpdatePaymentLinkRequest { + export enum StatusEnum { + Expired = 'expired' + } +} diff --git a/src/typings/checkout/upiDetails.ts b/src/typings/checkout/upiDetails.ts new file mode 100644 index 0000000..aa0f4ff --- /dev/null +++ b/src/typings/checkout/upiDetails.ts @@ -0,0 +1,73 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class UpiDetails { + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only. + */ + 'shopperNotificationReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * **upi** + */ + 'type': UpiDetails.TypeEnum; + /** + * The virtual payment address for UPI. + */ + 'virtualPaymentAddress'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "shopperNotificationReference", + "baseName": "shopperNotificationReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "UpiDetails.TypeEnum" + }, + { + "name": "virtualPaymentAddress", + "baseName": "virtualPaymentAddress", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return UpiDetails.attributeTypeMap; + } +} + +export namespace UpiDetails { + export enum TypeEnum { + UpiCollect = 'upi_collect' + } +} diff --git a/src/typings/checkout/vippsDetails.ts b/src/typings/checkout/vippsDetails.ts new file mode 100644 index 0000000..d680c19 --- /dev/null +++ b/src/typings/checkout/vippsDetails.ts @@ -0,0 +1,61 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class VippsDetails { + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + 'telephoneNumber': string; + /** + * **vipps** + */ + 'type'?: VippsDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "telephoneNumber", + "baseName": "telephoneNumber", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "VippsDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return VippsDetails.attributeTypeMap; + } +} + +export namespace VippsDetails { + export enum TypeEnum { + Vipps = 'vipps' + } +} diff --git a/src/typings/checkout/visaCheckoutDetails.ts b/src/typings/checkout/visaCheckoutDetails.ts new file mode 100644 index 0000000..0c7104f --- /dev/null +++ b/src/typings/checkout/visaCheckoutDetails.ts @@ -0,0 +1,58 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class VisaCheckoutDetails { + /** + * The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + */ + 'fundingSource'?: VisaCheckoutDetails.FundingSourceEnum; + /** + * **visacheckout** + */ + 'type'?: VisaCheckoutDetails.TypeEnum; + /** + * The Visa Click to Pay Call ID value. When your shopper selects a payment and/or a shipping address from Visa Click to Pay, you will receive a Visa Click to Pay Call ID. + */ + 'visaCheckoutCallId': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "fundingSource", + "baseName": "fundingSource", + "type": "VisaCheckoutDetails.FundingSourceEnum" + }, + { + "name": "type", + "baseName": "type", + "type": "VisaCheckoutDetails.TypeEnum" + }, + { + "name": "visaCheckoutCallId", + "baseName": "visaCheckoutCallId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return VisaCheckoutDetails.attributeTypeMap; + } +} + +export namespace VisaCheckoutDetails { + export enum FundingSourceEnum { + Debit = 'debit' + } + export enum TypeEnum { + Visacheckout = 'visacheckout' + } +} diff --git a/src/typings/checkout/weChatPayDetails.ts b/src/typings/checkout/weChatPayDetails.ts new file mode 100644 index 0000000..77d1db7 --- /dev/null +++ b/src/typings/checkout/weChatPayDetails.ts @@ -0,0 +1,37 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class WeChatPayDetails { + /** + * **wechatpay** + */ + 'type'?: WeChatPayDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "WeChatPayDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return WeChatPayDetails.attributeTypeMap; + } +} + +export namespace WeChatPayDetails { + export enum TypeEnum { + Wechatpay = 'wechatpay' + } +} diff --git a/src/typings/checkout/weChatPayMiniProgramDetails.ts b/src/typings/checkout/weChatPayMiniProgramDetails.ts new file mode 100644 index 0000000..47f9a09 --- /dev/null +++ b/src/typings/checkout/weChatPayMiniProgramDetails.ts @@ -0,0 +1,49 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class WeChatPayMiniProgramDetails { + 'appId'?: string; + 'openid'?: string; + /** + * **wechatpayMiniProgram** + */ + 'type'?: WeChatPayMiniProgramDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "appId", + "baseName": "appId", + "type": "string" + }, + { + "name": "openid", + "baseName": "openid", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "WeChatPayMiniProgramDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return WeChatPayMiniProgramDetails.attributeTypeMap; + } +} + +export namespace WeChatPayMiniProgramDetails { + export enum TypeEnum { + WechatpayMiniProgram = 'wechatpayMiniProgram' + } +} diff --git a/src/typings/checkout/zipDetails.ts b/src/typings/checkout/zipDetails.ts new file mode 100644 index 0000000..9ee0a40 --- /dev/null +++ b/src/typings/checkout/zipDetails.ts @@ -0,0 +1,64 @@ +/** + * Adyen Checkout API + * Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ``` + * + * The version of the OpenAPI document: 67 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class ZipDetails { + /** + * Set this to **true** if the shopper would like to pick up and collect their order, instead of having the goods delivered to them. + */ + 'clickAndCollect'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * **zip** + */ + 'type'?: ZipDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "clickAndCollect", + "baseName": "clickAndCollect", + "type": "string" + }, + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "ZipDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return ZipDetails.attributeTypeMap; + } +} + +export namespace ZipDetails { + export enum TypeEnum { + Zip = 'zip' + } +} diff --git a/src/typings/index.ts b/src/typings/index.ts index 47b46fb..d953d34 100644 --- a/src/typings/index.ts +++ b/src/typings/index.ts @@ -21,7 +21,6 @@ /// /// /// -/// /// /// /// From 7e1010f0e0e8332e87838c73f6d64897bd715743 Mon Sep 17 00:00:00 2001 From: Sam Cottle <30656767+samcottle@users.noreply.github.com> Date: Thu, 29 Apr 2021 20:48:47 +0200 Subject: [PATCH 41/45] Added Terminal API to supported APIs --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4433ac8..5d8a871 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ The Library supports all APIs under the following services: * [x] recurring * [x] notifications * [x] BIN lookup +* [x] Terminal API ## Requirements From 086cf3767a599cc3aa9fd5f7be490319214bb75f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 Apr 2021 04:04:31 +0000 Subject: [PATCH 42/45] Bump acorn from 8.2.1 to 8.2.2 Bumps [acorn](https://github.com/acornjs/acorn) from 8.2.1 to 8.2.2. - [Release notes](https://github.com/acornjs/acorn/releases) - [Commits](https://github.com/acornjs/acorn/compare/8.2.1...8.2.2) Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- yarn.lock | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7df54d3..252d6df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@adyen/api-library", - "version": "7.0.0", + "version": "8.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1185,9 +1185,9 @@ "dev": true }, "acorn": { - "version": "8.2.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.2.1.tgz", - "integrity": "sha512-z716cpm5TX4uzOzILx8PavOE6C6DKshHDw1aQN52M/yNSqE9s5O8SMfyhCCfCJ3HmTL0NkVOi+8a/55T7YB3bg==", + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.2.2.tgz", + "integrity": "sha512-VrMS8kxT0e7J1EX0p6rI/E0FbfOVcvBpbIqHThFv+f8YrZIlMfVotYcXKVPmTvPW8sW5miJzfUFrrvthUZg8VQ==", "dev": true }, "acorn-globals": { diff --git a/yarn.lock b/yarn.lock index cb524b2..4b41122 100644 --- a/yarn.lock +++ b/yarn.lock @@ -908,9 +908,9 @@ acorn@^7.1.0, acorn@^7.1.1: integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w== acorn@^8.0.1: - version "8.2.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.2.1.tgz#0d36af126fb6755095879c1dc6fd7edf7d60a5fb" - integrity sha512-z716cpm5TX4uzOzILx8PavOE6C6DKshHDw1aQN52M/yNSqE9s5O8SMfyhCCfCJ3HmTL0NkVOi+8a/55T7YB3bg== + version "8.2.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.2.2.tgz#c4574e4fea298d6e6ed4b85ab844b06dd59f26d6" + integrity sha512-VrMS8kxT0e7J1EX0p6rI/E0FbfOVcvBpbIqHThFv+f8YrZIlMfVotYcXKVPmTvPW8sW5miJzfUFrrvthUZg8VQ== agent-base@6: version "6.0.1" From 92a5495fd805d74d370de6a40c84c77c68649210 Mon Sep 17 00:00:00 2001 From: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com> Date: Fri, 30 Apr 2021 11:07:53 +0200 Subject: [PATCH 43/45] shopperlocale added to GetOnboardingUrlRequest (#670) Co-authored-by: wouterboe --- src/typings/platformsHostedOnboardingPage.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/typings/platformsHostedOnboardingPage.ts b/src/typings/platformsHostedOnboardingPage.ts index 92a605c..69c2730 100644 --- a/src/typings/platformsHostedOnboardingPage.ts +++ b/src/typings/platformsHostedOnboardingPage.ts @@ -69,6 +69,10 @@ declare namespace IPlatformsHostedOnboardingPage { * The URL where the sub-merchant will be redirected back to after they complete the onboarding, or if their session times out. Maximum length of 500 characters. If you don't provide this, the sub-merchant will be redirected back to the default return URL configured in your platform account. */ returnUrl?: string; + /** + * The language to be used in the page, specified by a combination of a language and country code. For example, **pt-BR**. If not specified in the request or if the language is not supported, the page uses the browser language. If the browser language is not supported, the page uses **en-US** by default. For a list supported languages, refer to [Change the page language](https://docs.adyen.com/platforms/hosted-onboarding-page#change-page-language). + */ + shopperLocale?: string; } export interface GetOnboardingUrlResponse { /** From 9090dd5746dddcb0b322aa5a467b97f27aed1aed Mon Sep 17 00:00:00 2001 From: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com> Date: Fri, 30 Apr 2021 12:56:38 +0200 Subject: [PATCH 44/45] Update sonar-project.properties removed test files from Sonarcloud analysis --- sonar-project.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index 5474834..bb73699 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -7,7 +7,7 @@ sonar.projectKey=Adyen_adyen-node-api-library # Path to sources #sonar.sources=. -sonar.exclusions=src/__mocks__/**/* , src/typings/**/* +sonar.exclusions=src/__mocks__/**/* , src/typings/**/* , src/__tests__/**/* #sonar.inclusions= # Path to tests From 867649debfa271774feeda7292d8394cab19bad8 Mon Sep 17 00:00:00 2001 From: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com> Date: Fri, 30 Apr 2021 14:51:56 +0200 Subject: [PATCH 45/45] Update .github/dependabot.yml wboereboom added Co-authored-by: Peter Ojo --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7f7f7e6..094fd1b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,4 +12,4 @@ updates: msilvagarcia AlexandrosMor peterojo - + wboereboom