diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..3e6385529 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,10 @@ +* @adam-young-cko @weronika-castiglione-cko + +/abc_spec/ @cko-web/docs-writers +/nas_spec/ @cko-web/docs-writers + +/abc_spec/components/schemas/Payments/ @cko-web/gateway-product-cko +/nas_spec/components/schemas/Payments/ @cko-web/gateway-product-cko + +/nas_spec/components/schemas/PaymentLinks/ @cko-web/payment-experience-cko +/nas_spec/components/schemas/HostedPayments/ @cko-web/payment-experience-cko \ No newline at end of file diff --git a/.github/actions/push-to-another-repository/Dockerfile b/.github/actions/push-to-another-repository/Dockerfile new file mode 100644 index 000000000..db90a79d9 --- /dev/null +++ b/.github/actions/push-to-another-repository/Dockerfile @@ -0,0 +1,7 @@ +FROM alpine:latest + +RUN apk add --no-cache git git-lfs openssh-client + +COPY entrypoint.sh /entrypoint.sh + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/.github/actions/push-to-another-repository/README.md b/.github/actions/push-to-another-repository/README.md new file mode 100644 index 000000000..748dc07f3 --- /dev/null +++ b/.github/actions/push-to-another-repository/README.md @@ -0,0 +1,3 @@ +Based on [push-to-another-repository](https://github.com/marketplace/actions/push-directory-to-another-repository) action. + +See [documentation](https://cpina.github.io/push-to-another-repository-docs/overview.html) \ No newline at end of file diff --git a/.github/actions/push-to-another-repository/action.yml b/.github/actions/push-to-another-repository/action.yml new file mode 100644 index 000000000..815415f45 --- /dev/null +++ b/.github/actions/push-to-another-repository/action.yml @@ -0,0 +1,69 @@ +name: Push directory to another repository +description: >- + Useful to push files to another repository to be used, for example, via github + pages +inputs: + source-before-directory: + description: Source before directory from the origin directory + required: false + source-directory: + description: Source directory from the origin directory + required: true + destination-github-username: + description: Name of the destination username/organization + required: true + destination-repository-name: + description: Destination repository + required: true + user-email: + description: Email for the git commit + required: true + github-server: + description: 'Github server' + default: 'github.com' + required: false + user-name: + description: >- + [Optional] Name for the git commit. Defaults to the destination + username/organization name + required: false + default: '' + destination-repository-username: + description: '[Optional] Username/organization for the destination repository' + required: false + default: '' + target-branch: + description: >- + [Optional] set target branch name for the destination repository. Defaults + to "main" + default: main + required: false + commit-message: + description: >- + [Optional] commit message for the output repository. ORIGIN_COMMIT is + replaced by the URL@commit in the origin repo + default: Update from ORIGIN_COMMIT + required: false + target-directory: + description: '[Optional] The directory to wipe and replace in the target repository' + default: '' + required: false + +runs: + using: docker + image: Dockerfile + args: + - '${{ inputs.source-before-directory }}' + - '${{ inputs.source-directory }}' + - '${{ inputs.destination-github-username }}' + - '${{ inputs.destination-repository-name }}' + - '${{ inputs.github-server }}' + - '${{ inputs.user-email }}' + - '${{ inputs.user-name }}' + - '${{ inputs.destination-repository-username }}' + - '${{ inputs.target-branch }}' + - '${{ inputs.commit-message }}' + - '${{ inputs.target-directory }}' +branding: + icon: git-commit + color: green diff --git a/.github/actions/push-to-another-repository/entrypoint.sh b/.github/actions/push-to-another-repository/entrypoint.sh new file mode 100755 index 000000000..80d003eaa --- /dev/null +++ b/.github/actions/push-to-another-repository/entrypoint.sh @@ -0,0 +1,152 @@ +#!/bin/sh -l + +set -e # if a command fails it stops the execution +set -u # script fails if trying to access to an undefined variable + +echo "[+] Action start" +SOURCE_BEFORE_DIRECTORY="${1}" +SOURCE_DIRECTORY="${2}" +DESTINATION_GITHUB_USERNAME="${3}" +DESTINATION_REPOSITORY_NAME="${4}" +GITHUB_SERVER="${5}" +USER_EMAIL="${6}" +USER_NAME="${7}" +DESTINATION_REPOSITORY_USERNAME="${8}" +TARGET_BRANCH="${9}" +COMMIT_MESSAGE="${10}" +TARGET_DIRECTORY="${11}" + +if [ -z "$DESTINATION_REPOSITORY_USERNAME" ] +then + DESTINATION_REPOSITORY_USERNAME="$DESTINATION_GITHUB_USERNAME" +fi + +if [ -z "$USER_NAME" ] +then + USER_NAME="$DESTINATION_GITHUB_USERNAME" +fi + +# Verify that there (potentially) some access to the destination repository +# and set up git (with GIT_CMD variable) and GIT_CMD_REPOSITORY +if [ -n "${SSH_DEPLOY_KEY:=}" ] +then + echo "[+] Using SSH_DEPLOY_KEY" + + # Inspired by https://github.com/leigholiver/commit-with-deploy-key/blob/main/entrypoint.sh , thanks! + mkdir --parents "$HOME/.ssh" + DEPLOY_KEY_FILE="$HOME/.ssh/deploy_key" + echo "${SSH_DEPLOY_KEY}" > "$DEPLOY_KEY_FILE" + chmod 600 "$DEPLOY_KEY_FILE" + + SSH_KNOWN_HOSTS_FILE="$HOME/.ssh/known_hosts" + ssh-keyscan -H "$GITHUB_SERVER" > "$SSH_KNOWN_HOSTS_FILE" + + export GIT_SSH_COMMAND="ssh -i "$DEPLOY_KEY_FILE" -o UserKnownHostsFile=$SSH_KNOWN_HOSTS_FILE" + + GIT_CMD_REPOSITORY="git@$GITHUB_SERVER:$DESTINATION_REPOSITORY_USERNAME/$DESTINATION_REPOSITORY_NAME.git" + +elif [ -n "${API_TOKEN_GITHUB:=}" ] +then + echo "[+] Using API_TOKEN_GITHUB" + GIT_CMD_REPOSITORY="https://$DESTINATION_REPOSITORY_USERNAME:$API_TOKEN_GITHUB@$GITHUB_SERVER/$DESTINATION_REPOSITORY_USERNAME/$DESTINATION_REPOSITORY_NAME.git" +else + echo "::error::API_TOKEN_GITHUB and SSH_DEPLOY_KEY are empty. Please fill one (recommended the SSH_DEPLOY_KEY)" + exit 1 +fi + + +CLONE_DIR=$(mktemp -d) + +echo "[+] Git version" +git --version + +echo "[+] Enable git lfs" +git lfs install + +echo "[+] Cloning destination git repository $DESTINATION_REPOSITORY_NAME" +# Setup git +git config --global user.email "$USER_EMAIL" +git config --global user.name "$USER_NAME" + +{ + git clone --single-branch --depth 1 --branch "$TARGET_BRANCH" "$GIT_CMD_REPOSITORY" "$CLONE_DIR" +} || { + echo "::error::Could not clone the destination repository. Command:" + echo "::error::git clone --single-branch --branch $TARGET_BRANCH $GIT_CMD_REPOSITORY $CLONE_DIR" + echo "::error::(Note that if they exist USER_NAME and API_TOKEN is redacted by GitHub)" + echo "::error::Please verify that the target repository exist AND that it contains the destination branch name, and is accesible by the API_TOKEN_GITHUB OR SSH_DEPLOY_KEY" + exit 1 + +} +ls -la "$CLONE_DIR" + +TEMP_DIR=$(mktemp -d) +# This mv has been the easier way to be able to remove files that were there +# but not anymore. Otherwise we had to remove the files from "$CLONE_DIR", +# including "." and with the exception of ".git/" +mv "$CLONE_DIR/.git" "$TEMP_DIR/.git" + +# $TARGET_DIRECTORY is '' by default +ABSOLUTE_TARGET_DIRECTORY="$CLONE_DIR/$TARGET_DIRECTORY/" + +echo "[+] Deleting $ABSOLUTE_TARGET_DIRECTORY" +rm -rf "$ABSOLUTE_TARGET_DIRECTORY" + +echo "[+] Creating (now empty) $ABSOLUTE_TARGET_DIRECTORY" +mkdir -p "$ABSOLUTE_TARGET_DIRECTORY" + +echo "[+] Listing Current Directory Location" +ls -al + +echo "[+] Listing root Location" +ls -al / + +mv "$TEMP_DIR/.git" "$CLONE_DIR/.git" + +echo "[+] List contents of $SOURCE_DIRECTORY" +ls "$SOURCE_DIRECTORY" + +echo "[+] Checking if local $SOURCE_DIRECTORY exist" +if [ ! -d "$SOURCE_DIRECTORY" ] +then + echo "ERROR: $SOURCE_DIRECTORY does not exist" + echo "This directory needs to exist when push-to-another-repository is executed" + echo + echo "In the example it is created by ./build.sh: https://github.com/cpina/push-to-another-repository-example/blob/main/.github/workflows/ci.yml#L19" + echo + echo "If you want to copy a directory that exist in the source repository" + echo "to the target repository: you need to clone the source repository" + echo "in a previous step in the same build section. For example using" + echo "actions/checkout@v2. See: https://github.com/cpina/push-to-another-repository-example/blob/main/.github/workflows/ci.yml#L16" + exit 1 +fi + +echo "[+] Copying contents of source repository folder $SOURCE_DIRECTORY to folder $TARGET_DIRECTORY in git repo $DESTINATION_REPOSITORY_NAME" +cp -ra "$SOURCE_DIRECTORY"/. "$CLONE_DIR/$TARGET_DIRECTORY" +cd "$CLONE_DIR" + +echo "[+] Files that will be pushed" +ls -la + +ORIGIN_COMMIT="https://$GITHUB_SERVER/$GITHUB_REPOSITORY/commit/$GITHUB_SHA" +COMMIT_MESSAGE="${COMMIT_MESSAGE/ORIGIN_COMMIT/$ORIGIN_COMMIT}" +COMMIT_MESSAGE="${COMMIT_MESSAGE/\$GITHUB_REF/$GITHUB_REF}" + +echo "[+] Set directory is safe ($CLONE_DIR)" +# Related to https://github.com/cpina/github-action-push-to-another-repository/issues/64 and https://github.com/cpina/github-action-push-to-another-repository/issues/64 +# TODO: review before releasing it as a version +git config --global --add safe.directory "$CLONE_DIR" + +echo "[+] Adding git commit" +git add . + +echo "[+] git status:" +git status + +echo "[+] git diff-index:" +# git diff-index : to avoid doing the git commit failing if there are no changes to be commit +git diff-index --quiet HEAD || git commit --message "$COMMIT_MESSAGE" + +echo "[+] Pushing git commit" +# --set-upstream: sets de branch when pushing to a branch that does not exist +git push "$GIT_CMD_REPOSITORY" --set-upstream "$TARGET_BRANCH" diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..631b2f95a --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,10 @@ +# Description of changes in PR + +[//]: # 'Please add your description here' + +## Checklist + +- [ ] Added a changelog entry to the `changelog.md` file in either `abc_spec` or `nas_spec` +- [ ] Contacted the Tech Docs team about any corresponding guides that need to be updated for www.checkout.com/docs + +**Contributing options**: Look at [our documentation](https://checkout.atlassian.net/wiki/spaces/PD/pages/2169506663/API+ref+publication+process) for options to contribute to the API reference. diff --git a/.github/workflows/actions.yaml b/.github/workflows/actions.yaml new file mode 100644 index 000000000..4d6d2a42d --- /dev/null +++ b/.github/workflows/actions.yaml @@ -0,0 +1,33 @@ +name: Node.js CI + +on: [ pull_request ] + +env: + CI: true + +jobs: + run-checks: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 16.x + + - name: Install node modules + run: npm ci --ignore-scripts + + - name: Build ABC & NAS specs + run: npm run build:all + + - name: Validate schema + run: | + npm run test:abc + npm run test:nas + + - uses: actions/upload-artifact@master + with: + name: my-artifact + path: web_deploy \ No newline at end of file diff --git a/.github/workflows/apm-pr.yaml b/.github/workflows/apm-pr.yaml new file mode 100644 index 000000000..126402faf --- /dev/null +++ b/.github/workflows/apm-pr.yaml @@ -0,0 +1,90 @@ +# This is a basic workflow to help you get started with Actions + +name: Creates a PR for APM changes in documentation around APM + +on: + push: + branches: + - 'main' + +env: + CI: true + PAT: ${{ secrets.PAT }} + +jobs: + upload-spec: + runs-on: ubuntu-latest + steps: + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + id: extract_branch + + - uses: actions/checkout@v3 + with: + persist-credentials: true + repository: your_team/checkout-api-reference + ref: ${{ steps.extract_branch.outputs.branch }} + + - name: Delete non-Demo files + run: | + echo ********** Listing contents of spec/ ************ + ls spec/*/** + echo ********** Created an empty folder ************ + mkdir newspec + echo ********** Copying over what we need into the new folder ************ + mkdir -p newspec/components/schemas + cp -r spec/components/**/Demo newspec/components/schemas + mkdir -p newspec/paths + cp spec/paths/demo*.* newspec/paths + echo ********** Listing contents of newspec/ ************ + ls spec/*/** + echo ********** Creating copies of spec for ABC and NAS ************ + cp -r newspec/ nas_spec/ + cp -r newspec/ abc_spec/ + echo ********** Ready to upload specs ************ + + - uses: actions/upload-artifact@v3 + with: + name: specification + path: newspec/ + + publish-spec: + runs-on: ubuntu-latest + needs: upload-spec + steps: + - uses: actions/download-artifact@v3 + with: + name: specification + path: src_spec + + - name: Fetch Checkout Api Reference repository + uses: actions/checkout@v3 + with: + repository: checkout/checkout-api-reference + ref: master + token: ${{ env.PAT }} + path: src + + - name: Commit Api specification + working-directory: src + run: | + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" && git config user.name "$GITHUB_ACTOR" + git branch -m "{{team}}/Api-Spec" + rsync -a ../src_spec/ abc_spec/ + rsync -a ../src_spec/ nas_spec/ + git add . + git commit -m 'Publish new API Specification' + git push origin HEAD + + - uses: actions/github-script@v4 + with: + github-token: ${{ env.PAT }} + script: | + await github.pulls.create({ + owner: 'checkout', + repo: 'checkout-api-reference', + head: "{{team}}/Api-Spec", + base: 'master', + title: "{team}: Update API Specification" + }); diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 000000000..fe25cf031 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,60 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] + schedule: + - cron: '34 2 * * 0' + +jobs: + analyze: + name: Analyze + runs-on: [ ubuntu-latest ] + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'python', 'csharp', 'javascript' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + queries: security-and-quality + + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/copy-changelog.yaml b/.github/workflows/copy-changelog.yaml new file mode 100644 index 000000000..74e911631 --- /dev/null +++ b/.github/workflows/copy-changelog.yaml @@ -0,0 +1,30 @@ +name: CI + +on: + push: + branches: + - 'master' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Fetch Checkout Api Reference repository + uses: actions/checkout@v3 + - name: Copy ABC and NAS changelogs to output/ using rsync + shell: bash + run: | + mkdir output + rsync -av nas_spec/changelog.md output/nas_spec/ + rsync -av abc_spec/changelog.md output/abc_spec/ + - name: Pushes to another repository + id: push_directory + uses: ./.github/actions/push-to-another-repository + env: + SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} + with: + source-directory: output/ + user-email: "checkout-api-reference-action@users.noreply.github.com" + user-name: "checkout-api-reference-action" + destination-repository-username: checkout + destination-repository-name: 'checkout-api-reference-changelog' \ No newline at end of file diff --git a/.github/workflows/release-pr-post.yml b/.github/workflows/release-pr-post.yml new file mode 100644 index 000000000..3c5b99b39 --- /dev/null +++ b/.github/workflows/release-pr-post.yml @@ -0,0 +1,29 @@ +name: ReleasePRPost + +on: + pull_request: + branches: [master] + +env: + CI: true + +jobs: + confluence_release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.4 + - uses: actions/setup-node@v2.1.5 + with: + node-version: 16 + - name: Post the release PR to Slack + id: slack + uses: slackapi/slack-github-action@v1.16.0 + with: + channel-id: 'C03MDGXV0KT' + payload: | + { + "type": "mrkdwn", + "text": "New release PR for the API reference: ${{ github.event.pull_request.html_url}}" + } + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} diff --git a/.gitignore b/.gitignore index b42ec8911..81e762fd2 100644 --- a/.gitignore +++ b/.gitignore @@ -32,9 +32,15 @@ node_modules # Optional REPL history .node_repl_history -package-lock\.json +# Postman collection +cko_collection_beta.json src/OpenApiGenerator/bin/* - src/OpenApiGenerator/obj/* -.DS_Store \ No newline at end of file +/src/OpenApiGenerator/.vs/ + +.DS_Store + +.idea +*.iml +.vscode/settings.json diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..4fd021952 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +engine-strict=true \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 58ad4fb87..000000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: csharp -mono: none -dotnet: 2.1 -script: - - npm install - - npm run build - - npm test -node_js: - - "8.11.3" -deploy: - - skip_cleanup: true - provider: script - script: npm run deploy - on: - branch: master - - skip_cleanup: true - provider: script - script: npm run deploy-branch - on: - all_branches: true - condition: '"$TRAVIS_BRANCH" != "master" && "$TRAVIS_BRANCH" != "gh-pages"' - diff --git a/.vscode/launch.json b/.vscode/launch.json index bd02e27e0..939e58565 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,28 +1,28 @@ { - // Use IntelliSense to find out which attributes exist for C# debugging - // Use hover for the description of the existing attributes - // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md - "version": "0.2.0", - "configurations": [ - { - "name": ".NET Core Launch (console)", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/src/OpenApiGenerator/bin/Debug/netcoreapp2.0/OpenApiGenerator.dll", - "args": [], - "cwd": "${workspaceFolder}/src/OpenApiGenerator", - // For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window - "console": "internalConsole", - "stopAtEntry": false, - "internalConsoleOptions": "openOnSessionStart" - }, - { - "name": ".NET Core Attach", - "type": "coreclr", - "request": "attach", - "processId": "${command:pickProcess}" - } - ,] -} \ No newline at end of file + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md + "version": "0.2.0", + "configurations": [ + { + "name": ".NET Core Launch (console)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + // If you have changed target frameworks, make sure to update the program path. + "program": "${workspaceFolder}/src/OpenApiGenerator/bin/Debug/netcoreapp2.0/OpenApiGenerator.dll", + "args": [], + "cwd": "${workspaceFolder}/src/OpenApiGenerator", + // For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window + "console": "internalConsole", + "stopAtEntry": false, + "internalConsoleOptions": "openOnSessionStart" + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach", + "processId": "${command:pickProcess}" + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 304bf5894..016c51974 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,15 +1,12 @@ { - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "command": "dotnet", - "type": "process", - "args": [ - "build", - "${workspaceFolder}/src/OpenApiGenerator/OpenApiGenerator.csproj" - ], - "problemMatcher": "$msCompile" - } - ] -} \ No newline at end of file + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": ["build", "${workspaceFolder}/src/OpenApiGenerator/OpenApiGenerator.csproj"], + "problemMatcher": "$msCompile" + } + ] +} diff --git a/README.md b/README.md index b206f4503..3409d6f54 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,80 @@ -# Checkout.com API Reference -[![Build Status](https://travis-ci.org/checkout/checkout-api-reference.svg?branch=master)](https://travis-ci.org/checkout/checkout-api-reference) +# Checkout.com API reference +Our ABC and NAS API references are intended as comprehensive guides to Checkout.com's ABC and NAS REST APIs, respectively. They are available publicly from our API reference sites, and can be downloaded by merchants. -## Links +The [NAS API reference](https://api-reference.checkout.com/) is built from the specifications defined within the `nas_spec` folder. The [ABC API reference](https://api-reference.checkout.com/previous) is built from the specifications defined within the `abc_spec` folder. -- Documentation: https://api-reference.checkout.com -- SwaggerUI: https://api-reference.checkout.com/swagger-ui/ -- Look full spec: - + JSON https://api-reference.checkout.com/swagger.json - + YAML https://api-reference.checkout.com/swagger.yaml -- Preview spec version for branch `[branch]`: https://api-reference.checkout.com/preview/[branch] +Both specifications are written in accordance with the [OpenAPI specification](https://swagger.io/specification/). -**Warning:** All above links are updated only after Travis CI finishes deployment +As the API reference specifications are maintained separately to the various APIs (Unified Payments, Risk, Reports, etc), we rely on our product peers to update the API reference specifications when they add, update, or deprecate functionality. -## Working on specification -### Install +--- -1. Install [Node JS](https://nodejs.org/) -2. Clone repo and `cd` - + Run `npm install` +## Tooling + +We use [Redocly](https://redocly.com/) to generate the API reference sites from the specifications in the repository, and [Vercel](https://vercel.com/) to deploy the sites. + +--- + +## Release cycle + +The API reference is released weekly, on Wednesdays. This mirrors the release of our documentation sites. + +--- + +## Contribute to the API reference + +To contribute to the API reference, you must first be added to the correct GitHub org and team: + +1. [Submit a ticket](https://checkoutsupport.freshservice.com/support/catalog/items/52) for GitHub access on FreshService. +2. In the _Organisation_ dropdown, select _Existing Organisations_. +3. In the _GitHub Organisation_ dropdown, select _cko-web_. +4. In the _Additional notes_ field, request to be added to the `API Ref Collaborators` team in the `CKO Web` org. + + +Once you've been added: + +1. Clone the repository. +2. Create a new feature branch that branches off of `staging`. +3. Edit the API spec in your feature branch. The spec for the NAS API is found within `nas_spec`. The spec for the ABC API is found within `abc_spec`. +4. Add a new entry documenting your change to the `nas_spec/changelog.md` or `abc_spec/changelog.md` file, depending on which spec you updated. The changelog entries are public-facing – do not include references to any private or internal details, or internal Checkout.com products or implementations. +5. Raise a pull request (PR) against `staging`. +6. Request a documentation review from the tech writers in the #ask-docs Slack channel. + +A tech writer will pick up your PR and leave comments for documentation updates throughout your PR. + +Once you've applied the changes, the tech writer will approve your PR. You may also need to request approval if you have touched a file with a defined [code owner](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners). + +When you have the required approvals, merge your PR using the _Squash and Merge_ option. + +When your change is in `staging`, it will be included in the next API reference release. + +For more information, see [here](https://checkout.atlassian.net/wiki/spaces/PD/pages/5716771206/GitHub+access+and+contributing+for+the+APIRef). + +--- + +## Preview changes locally + +Do not request Vercel access. Vercel preview sites are no longer generated for new API reference PRs. However, you can still run the project locally to preview your changes: + +1. From your command-line, `cd` into the directory where you cloned the project. +2. Run `npm i` to install the required dependencies. +3. Run `npm run build:nas` to build the NAS API reference site, or `npm run build:abc` to build the ABC API reference site. To build both, run `npm run build:all` +4. Run `npm run start` to run the project locally. + +The project will be available at port `3001`. Use the following URLs to access the preview sites: + +- `localhost:3001`, for the NAS API reference site +- `localhost:3001/previous`, for the ABC API reference site + +You can find more detailed steps [here](https://checkout.atlassian.net/wiki/spaces/PD/pages/5352161454/Building+the+CKO+API+reference+locally). + +--- + +## Code samples + +The code samples used across the API reference are written and maintained by our partner agency, Parser. + +NAS API reference samples are located within the `nas_spec/code_samples` directory. ABC API reference samples are located within the `abc_spec/code_samples` directory. -### Usage -1. Run `npm start` -2. Checkout console output to see where local server is started. -3. Make changes using your favorite editor or `swagger-editor` (look for URL in console output) -4. All changes are immediately propagated to your local server, moreover all documentation pages will be automagically refreshed in a browser after each change -**TIP:** you can open `swagger-editor`, documentation and `swagger-ui` in parallel -5. Once you finish with the changes you can run tests using: `npm test` diff --git a/abc_spec/README.md b/abc_spec/README.md new file mode 100644 index 000000000..4170ed190 --- /dev/null +++ b/abc_spec/README.md @@ -0,0 +1,25 @@ +## Global headers + +In order to minimize duplications you can use `headers` global object (similar to `definitions`, `responses`). +During build process all references to global `headers` will be inlined and `headers` will be removed form resulting spec so spec will be valid (global `headers` is not allowed by Swagger spec): + +Example: + +```yaml +--- +headers: + Rate-Limit-Limit: + description: The number of allowed requests in the current period + type: integer +--- +paths: + /api-keys: + get: + summary: Retrieve a list of api keys + responses: + 200: + description: A list of api keys was retrieved successfully + headers: + Rate-Limit-Limit: + $ref: '#/components/schemas/Rate-Limit-Limit' +``` diff --git a/abc_spec/changelog.md b/abc_spec/changelog.md new file mode 100644 index 000000000..bafc3501f --- /dev/null +++ b/abc_spec/changelog.md @@ -0,0 +1,43 @@ +# Changelog + +| Date | Description of change | +|------------|-----------------------------------------------------------------------------------------------------------------------------------------| +| 2023/07/03 | Removed `charge id`, `track id`, and `reference` from Retrieve Events endpoint | +| 2023/06/26 | Added `optimization` object to Authentication request and responses | +| 2023/03/07 | Updated `recipient.account_number` max length to 34 and amended description | +| 2023/03/08 | Added `Go` code samples for both ABC and NAS | +| 2023/02/24 | Removed `to` and `from` fields from Notifications > Events | +| 2023/02/24 | Removed XML support for Notifications > Webhooks | +| 2023/02/22 | Added `3ds.exemption` and `3ds.allow_upgrade` to Hosted Payments Page and Payment Links | +| 2023/02/10 | Added `resolved_reason` to get all disputes response for NAS and MBC. | +| 2023/02/07 | Added Portuguese and Greek locale options to Hosted Payments Page and Payment Links | +| 2023/01/25 | Added `Unscheduled` payment_type to payment request | +| 2023/01/24 | Added `WebhookRequestPut` & `WebhookRequestPatch` to distinguish between the required parameters for each request | +| 2023/01/16 | Added `recipient.first_name` to ABC API Spec. | +| 2022/09/29 | Added new GET Payments endpoint | +| 2022/09/21 | Added the `3ds.allow_upgrade` to payment requests & `3ds.upgrade_reason` to the 202 accepted & GET endpoint responses | +| 2022/09/12 | Amended paymentrequest/payout sender state field to have validation of <= 2 chars rather than <= 3 and fixed text description to match. | +| 2022/09/08 | Update PaymentRequest `processing` object to add `senderInformation` property | +| 2022/08/11 | Update Klarna Payment Request & Response source. | +| 2022/08/03 | Add missing `token_format` to Google Pay and Apple Pay token responses. | +| 2022/08/01 | Deprecated `baloto` payment method | +| 2022/07/29 | Update Java, C#, PHP & Python code samples to match new SDK Version. | +| 2022/07/14 | Add `locale` property to Get Payment Link details response | +| 2022/05/11 | Added Arabic locale option to Hosted Payments Page and Payment Links. | +| 2022/05/10 | Added `3ds.challenge_indicator` to Hosted Payments Page and Payment Links. | +| 2022/04/27 | Added Scandinavian locale options to Hosted Payments Page and Payment Links. | +| 2022/03/30 | Adds new locale options to Hosted Payments Page and Payment Links. | +| 2022/03/28 | Update PHP code samples | +| 2022/03/08 | Change C# samples to suggest the usage of `await` instead of `.Result` | +| 2022/02/23 | Added `allow_payment_methods` to Payment Links and Hosted Payments Page. | +| 2022/02/18 | Improved and added missing reporting code samples for Java & C# | +| 2022/01/26 | Update code samples for Java. | +| 2022/01/25 | Update code samples for C#. | +| 2022/01/13 | Update code samples for Node JS. | +| 2021/12/17 | Added `payment_type`, `payment_ip` and `billing_descriptor` to Hosted Payments and Payment Links Get endpoints. | +| 2021/12/14 | Removed upper limit for `products.price` | +| 2021/11/19 | Added specification for "Get Hosted Payments Page details" endpoint. | +| 2021/11/11 | Added `3ds.challenge_indicator` to card payment requests. | +| 2021/10/18 | Added `processing.purpose` to card payouts. | +| 2021/10/18 | Added `recommendation_code` to payment response. | +| 2022/11/09 | Removed the `risk` endpoints | diff --git a/abc_spec/code_samples/C#/customers/post.cs b/abc_spec/code_samples/C#/customers/post.cs new file mode 100644 index 000000000..91b87b721 --- /dev/null +++ b/abc_spec/code_samples/C#/customers/post.cs @@ -0,0 +1,39 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using CustomerRequest = Checkout.Customers.Previous.CustomerRequest; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +CustomerRequest request = new CustomerRequest +{ + Email = "email@docs.checkout.com", + Name = "FirstName LastName", + Phone = new Phone {CountryCode = "1", Number = "4155552671"}, + Metadata = new Dictionary() {{"coupon_code", "NY2018"}, {"partner_id", "123989"}} +}; + +try +{ + IdResponse response = await api.CustomersClient().Create(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/customers@{identifier}/delete.cs b/abc_spec/code_samples/C#/customers@{identifier}/delete.cs new file mode 100644 index 000000000..6b40e82fc --- /dev/null +++ b/abc_spec/code_samples/C#/customers@{identifier}/delete.cs @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + EmptyResponse response = await api.CustomersClient().Delete("customer_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/customers@{identifier}/get.cs b/abc_spec/code_samples/C#/customers@{identifier}/get.cs new file mode 100644 index 000000000..29414bd9b --- /dev/null +++ b/abc_spec/code_samples/C#/customers@{identifier}/get.cs @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Customers.Previous; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + CustomerDetailsResponse response = await api.CustomersClient().Get("customer_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/customers@{identifier}/patch.cs b/abc_spec/code_samples/C#/customers@{identifier}/patch.cs new file mode 100644 index 000000000..5d1837832 --- /dev/null +++ b/abc_spec/code_samples/C#/customers@{identifier}/patch.cs @@ -0,0 +1,47 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using CustomerRequest = Checkout.Customers.Previous.CustomerRequest; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +CustomerRequest request = new CustomerRequest +{ + Email = "email@docs.checkout.com", + Name = "FirstName LastName", + Phone = new Phone + { + CountryCode = "1", + Number = "4155552671" + }, + Metadata = new Dictionary() + { + {"coupon_code", "NY2018"}, + {"partner_id", "123989"} + } +}; + +try +{ + EmptyResponse response = await api.CustomersClient().Update("customer_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/disputes/get.cs b/abc_spec/code_samples/C#/disputes/get.cs new file mode 100644 index 000000000..8a49f8ea1 --- /dev/null +++ b/abc_spec/code_samples/C#/disputes/get.cs @@ -0,0 +1,36 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Disputes; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +DisputesQueryFilter request = new DisputesQueryFilter +{ + Limit = 250, + To = DateTime.Now, +}; + +try +{ + DisputesQueryResponse response = await api.DisputesClient().Query(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/disputes@{dispute_id}/get.cs b/abc_spec/code_samples/C#/disputes@{dispute_id}/get.cs new file mode 100644 index 000000000..c9cc3ce0f --- /dev/null +++ b/abc_spec/code_samples/C#/disputes@{dispute_id}/get.cs @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Disputes; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + DisputeDetailsResponse response = await api.DisputesClient().GetDisputeDetails("disputes_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/disputes@{dispute_id}@accept/post.cs b/abc_spec/code_samples/C#/disputes@{dispute_id}@accept/post.cs new file mode 100644 index 000000000..34725da13 --- /dev/null +++ b/abc_spec/code_samples/C#/disputes@{dispute_id}@accept/post.cs @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + EmptyResponse response = await api.DisputesClient().Accept("disputes_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/disputes@{dispute_id}@evidence/get.cs b/abc_spec/code_samples/C#/disputes@{dispute_id}@evidence/get.cs new file mode 100644 index 000000000..108f1f5bc --- /dev/null +++ b/abc_spec/code_samples/C#/disputes@{dispute_id}@evidence/get.cs @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Disputes; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + DisputeEvidenceResponse response = await api.DisputesClient().GetEvidence("disputes_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/disputes@{dispute_id}@evidence/post.cs b/abc_spec/code_samples/C#/disputes@{dispute_id}@evidence/post.cs new file mode 100644 index 000000000..6d761a89b --- /dev/null +++ b/abc_spec/code_samples/C#/disputes@{dispute_id}@evidence/post.cs @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + EmptyResponse response = await api.DisputesClient().SubmitEvidence("disputes_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/disputes@{dispute_id}@evidence/put.cs b/abc_spec/code_samples/C#/disputes@{dispute_id}@evidence/put.cs new file mode 100644 index 000000000..37d8ec1f0 --- /dev/null +++ b/abc_spec/code_samples/C#/disputes@{dispute_id}@evidence/put.cs @@ -0,0 +1,43 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Disputes; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .PublicKey("public_key") + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +DisputeEvidenceRequest request = new DisputeEvidenceRequest() +{ + ProofOfDeliveryOrServiceFile = "file_xxxxxx", + ProofOfDeliveryOrServiceText = "proof of delivery or service text", + InvoiceOrReceiptFile = "file_xxxxxx", + InvoiceOrReceiptText = "Copy of the invoice", + CustomerCommunicationFile = "file_xxxxxx", + CustomerCommunicationText = "Copy of an email exchange with the cardholder", + AdditionalEvidenceFile = "file_xxxxxx", + AdditionalEvidenceText = "Scanned document" +}; + +try +{ + EmptyResponse response = await api.DisputesClient().PutEvidence("disputes_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/event-types/get.cs b/abc_spec/code_samples/C#/event-types/get.cs new file mode 100644 index 000000000..582bb9f9f --- /dev/null +++ b/abc_spec/code_samples/C#/event-types/get.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Events.Previous; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + /* + Specify API version: + "1.0" => Legacy API + "2.0" => Unified Payments API + null => all versions + */ + + ItemsResponse response = await api.EventsClient().RetrieveAllEventTypes(); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/events/get.cs b/abc_spec/code_samples/C#/events/get.cs new file mode 100644 index 000000000..282136f96 --- /dev/null +++ b/abc_spec/code_samples/C#/events/get.cs @@ -0,0 +1,33 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Events.Previous; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .PublicKey("public_key") + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +RetrieveEventsRequest request = new RetrieveEventsRequest() {PaymentId = "payment_id"}; + +try +{ + EventsPageResponse response = await api.EventsClient().RetrieveEvents(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/events@{eventId}/get.cs b/abc_spec/code_samples/C#/events@{eventId}/get.cs new file mode 100644 index 000000000..0898aa8e7 --- /dev/null +++ b/abc_spec/code_samples/C#/events@{eventId}/get.cs @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Events.Previous; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + EventResponse response = await api.EventsClient().RetrieveEvent("event_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/events@{eventId}@notifications@{notificationId}/get.cs b/abc_spec/code_samples/C#/events@{eventId}@notifications@{notificationId}/get.cs new file mode 100644 index 000000000..5d229274d --- /dev/null +++ b/abc_spec/code_samples/C#/events@{eventId}@notifications@{notificationId}/get.cs @@ -0,0 +1,31 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Events.Previous; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + EventNotificationResponse response = + await api.EventsClient().RetrieveEventNotification("event_id", "notification_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/events@{eventId}@webhooks@retry/post.cs b/abc_spec/code_samples/C#/events@{eventId}@webhooks@retry/post.cs new file mode 100644 index 000000000..dafd3e592 --- /dev/null +++ b/abc_spec/code_samples/C#/events@{eventId}@webhooks@retry/post.cs @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + EmptyResponse response = await api.EventsClient().RetryAllWebhooks("event_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/events@{eventId}@webhooks@{webhookId}@retry/post.cs b/abc_spec/code_samples/C#/events@{eventId}@webhooks@{webhookId}@retry/post.cs new file mode 100644 index 000000000..90440e1b1 --- /dev/null +++ b/abc_spec/code_samples/C#/events@{eventId}@webhooks@{webhookId}@retry/post.cs @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + EmptyResponse response = await api.EventsClient().RetryWebhook("event_id", "webhook_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/files/post.cs b/abc_spec/code_samples/C#/files/post.cs new file mode 100644 index 000000000..33ccfb44d --- /dev/null +++ b/abc_spec/code_samples/C#/files/post.cs @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + IdResponse response = await api.DisputesClient().SubmitFile("file_path", "dispute_evidence"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/files@{file_id}/get.cs b/abc_spec/code_samples/C#/files@{file_id}/get.cs new file mode 100644 index 000000000..b0561d22d --- /dev/null +++ b/abc_spec/code_samples/C#/files@{file_id}/get.cs @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Files; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + FileDetailsResponse response = await api.DisputesClient().GetFileDetails("file_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/hosted-payments/post.cs b/abc_spec/code_samples/C#/hosted-payments/post.cs new file mode 100644 index 000000000..f0bd6df85 --- /dev/null +++ b/abc_spec/code_samples/C#/hosted-payments/post.cs @@ -0,0 +1,89 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Payments; +using Checkout.Payments.Hosted; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +HostedPaymentRequest request = new HostedPaymentRequest() +{ + Amount = 10, + Currency = Currency.GBP, + PaymentType = PaymentType.Regular, + PaymentIp = "192.168.0.1", + BillingDescriptor = new BillingDescriptor() {Name = "Name", City = "City"}, + Reference = "reference", + Description = "Payment for Gold Necklace", + Customer = new CustomerRequest() {Email = "email@docs.checkout.com", Name = "FirstName LastName"}, + Shipping = + new ShippingDetails() + { + Address = new Address() + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + }, + Phone = new Phone() {Number = "4155552671", CountryCode = "1"} + }, + Billing = + new BillingInformation() + { + Address = new Address() + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + }, + Phone = new Phone() {Number = "4155552671", CountryCode = "1"} + }, + Recipient = + new PaymentRecipient() + { + DateOfBirth = "1985-05-15", AccountNumber = "5555554444", Zip = "WIT", LastName = "LastName", + }, + Processing = new ProcessingSettings() {Aft = true}, + Products = new List() {new Product() {Name = "Gold Necklace", Quantity = 1, Price = 1000}}, + Risk = new RiskRequest() {Enabled = false}, + SuccessUrl = "https://example.com/payments/success", + CancelUrl = "https://example.com/payments/cancel", + FailureUrl = "https://example.com/payments/failure", + Metadata = new Dictionary(), + Locale = "en-GB", + ThreeDs = new ThreeDsRequest() {Enabled = false, AttemptN3D = false}, + Capture = true, + CaptureOn = new DateTime() +}; + +try +{ + HostedPaymentResponse response = + await api.HostedPaymentsClient().CreateHostedPaymentsPageSession(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/hosted-payments@{id}/get.cs b/abc_spec/code_samples/C#/hosted-payments@{id}/get.cs new file mode 100644 index 000000000..0a120f3d2 --- /dev/null +++ b/abc_spec/code_samples/C#/hosted-payments@{id}/get.cs @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Payments.Hosted; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + HostedPaymentDetailsResponse response = await api.HostedPaymentsClient().GetHostedPaymentsPageDetails("hosted_payment_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/instruments/post.cs b/abc_spec/code_samples/C#/instruments/post.cs new file mode 100644 index 000000000..5d37eee5a --- /dev/null +++ b/abc_spec/code_samples/C#/instruments/post.cs @@ -0,0 +1,64 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Instruments.Previous; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +CreateInstrumentRequest request = new CreateInstrumentRequest +{ + Token = "tok_asoto22g2fsu7prwomy12sgfsa", + AccountHolder = new InstrumentAccountHolder() + { + BillingAddress = new Address() + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + }, + Phone = new Phone() + { + Number = "4155552671", + CountryCode = "1" + } + }, + Customer = new InstrumentCustomerRequest() + { + Email = "email@docs.checkout.com", + Name = "FirstName LastName", + Phone = new Phone() + { + CountryCode = "1", + Number = "4155552671" + }, + Default = true + } +}; + +try +{ + CreateInstrumentResponse response = await api.InstrumentsClient().Create(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/instruments@{id}/delete.cs b/abc_spec/code_samples/C#/instruments@{id}/delete.cs new file mode 100644 index 000000000..b8797e6a1 --- /dev/null +++ b/abc_spec/code_samples/C#/instruments@{id}/delete.cs @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + EmptyResponse response = await api.InstrumentsClient().Delete("instrument_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/instruments@{id}/get.cs b/abc_spec/code_samples/C#/instruments@{id}/get.cs new file mode 100644 index 000000000..139f7b94d --- /dev/null +++ b/abc_spec/code_samples/C#/instruments@{id}/get.cs @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Instruments.Previous; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + RetrieveInstrumentResponse response = await api.InstrumentsClient().Get("instrument_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/instruments@{id}/patch.cs b/abc_spec/code_samples/C#/instruments@{id}/patch.cs new file mode 100644 index 000000000..eae0dd005 --- /dev/null +++ b/abc_spec/code_samples/C#/instruments@{id}/patch.cs @@ -0,0 +1,60 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Instruments.Previous; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +UpdateInstrumentRequest request = new UpdateInstrumentRequest +{ + ExpiryMonth = 10, + ExpiryYear = 2027, + Name = "FirstName LastName", + AccountHolder = new InstrumentAccountHolder() + { + BillingAddress = new Address() + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + }, + Phone = new Phone() + { + Number = "4155552671", + CountryCode = "1" + }, + }, + Customer = new UpdateInstrumentRequest.UpdateInstrumentCustomer() + { + Id = "cus_gajmdgunwwlehbctuj6a3sifpm", + Default = true + } +}; + +try +{ + UpdateInstrumentResponse response = await api.InstrumentsClient().Update("instrument_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/payment-links/post.cs b/abc_spec/code_samples/C#/payment-links/post.cs new file mode 100644 index 000000000..1960f329f --- /dev/null +++ b/abc_spec/code_samples/C#/payment-links/post.cs @@ -0,0 +1,90 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Payments; +using Checkout.Payments.Links; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +PaymentLinkRequest request = new PaymentLinkRequest +{ + Amount = 10, + Currency = Currency.GBP, + PaymentType = PaymentType.Regular, + PaymentIp = "192.168.0.1", + BillingDescriptor = new BillingDescriptor() {Name = "string", City = "string"}, + Reference = "reference", + Description = "Payment for Gold Necklace", + ExpiresIn = 604800, + Customer = new CustomerRequest() {Email = "email@docs.checkout.com", Name = "FirstName LastName"}, + Shipping = + new ShippingDetails() + { + Address = new Address() + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + }, + Phone = new Phone() {Number = "4155552671", CountryCode = "1"} + }, + Billing = + new BillingInformation() + { + Address = new Address() + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + }, + Phone = new Phone() {Number = "4155552671", CountryCode = "1"} + }, + Recipient = + new PaymentRecipient() + { + DateOfBirth = "1985-05-15", + AccountNumber = "5555554444", + Zip = "WIT", + LastName = "LastName", + }, + Processing = new ProcessingSettings() {Aft = true}, + Products = new List() {new Product() {Name = "Gold Necklace", Quantity = 1, Price = 1000}}, + Metadata = new Dictionary(), + ThreeDs = new ThreeDsRequest() {Enabled = false, AttemptN3D = false}, + Risk = new RiskRequest() {Enabled = false}, + ReturnUrl = "https://example.com/payments/success", + Locale = "en-GB", + Capture = true, + CaptureOn = new DateTime() +}; + +try +{ + PaymentLinkResponse response = await api.PaymentLinksClient().Create(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/payment-links@{id}/get.cs b/abc_spec/code_samples/C#/payment-links@{id}/get.cs new file mode 100644 index 000000000..5ff4f3eaf --- /dev/null +++ b/abc_spec/code_samples/C#/payment-links@{id}/get.cs @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Payments.Links; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + PaymentLinkDetailsResponse response = await api.PaymentLinksClient().Get("payment_link_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/payments/post.cs b/abc_spec/code_samples/C#/payments/post.cs new file mode 100644 index 000000000..fa03e6fdc --- /dev/null +++ b/abc_spec/code_samples/C#/payments/post.cs @@ -0,0 +1,92 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Payments; +using Checkout.Payments.Previous.Request; +using Checkout.Payments.Previous.Request.Source; +using Checkout.Payments.Previous.Response; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + + +PaymentRequest request = new PaymentRequest +{ + Source = new RequestTokenSource() {Token = "tok_4gzeau5o2uqubbk6fufs3m7p54"}, + Amount = 10, + Currency = Currency.USD, + PaymentType = PaymentType.Recurring, + Reference = "reference", + Description = "Set of 3 masks", + Capture = true, + CaptureOn = new DateTime(), + Customer = + new CustomerRequest() + { + Id = "cus_udst2tfldj6upmye2reztkmm4i", + Email = "email@docs.checkout.com", + Name = "FirstName LastName" + }, + BillingDescriptor = new BillingDescriptor() {Name = "SUPERHEROES.COM", City = "GOTHAM"}, + Shipping = + new ShippingDetails() + { + Address = new Address() + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + }, + Phone = new Phone() {Number = "4155552671", CountryCode = "1"} + }, + ThreeDs = + new ThreeDsRequest() + { + Enabled = true, + AttemptN3D = true, + Eci = "05", + Cryptogram = "AgAAAAAAAIR8CQrXcIhbQAAAAAA=", + Xid = "MDAwMDAwMDAwMDAwMDAwMzIyNzY=", + Version = "2.0.1" + }, + PreviousPaymentId = "pay_fun26akvvjjerahhctaq2uzhu4", + Risk = new RiskRequest() {Enabled = false}, + SuccessUrl = "https://example.com/payments/success", + FailureUrl = "https://example.com/payments/failure", + PaymentIp = "192.168.0.1", + Recipient = new PaymentRecipient() + { + DateOfBirth = "1985-05-15", + AccountNumber = "5555554444", + Zip = "WIT", + LastName = "LastName", + }, + Metadata = new Dictionary() {{"coupon_code", "NY2018"}, {"partner_id", 123989}} +}; + +try +{ + PaymentResponse response = await api.PaymentsClient().RequestPayment(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/payments@{id}/get.cs b/abc_spec/code_samples/C#/payments@{id}/get.cs new file mode 100644 index 000000000..5c95ca2df --- /dev/null +++ b/abc_spec/code_samples/C#/payments@{id}/get.cs @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Payments.Previous.Response; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + GetPaymentResponse response = await api.PaymentsClient().GetPaymentDetails("payment_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/payments@{id}@actions/get.cs b/abc_spec/code_samples/C#/payments@{id}@actions/get.cs new file mode 100644 index 000000000..3831110f8 --- /dev/null +++ b/abc_spec/code_samples/C#/payments@{id}@actions/get.cs @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Payments.Previous; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + ItemsResponse response = await api.PaymentsClient().GetPaymentActions("payment_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/payments@{id}@captures/post.cs b/abc_spec/code_samples/C#/payments@{id}@captures/post.cs new file mode 100644 index 000000000..e3d7b5eb8 --- /dev/null +++ b/abc_spec/code_samples/C#/payments@{id}@captures/post.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Payments; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +CaptureRequest request = new CaptureRequest +{ + Amount = 10, + Reference = "reference", + Metadata = new Dictionary() {{"coupon_code", "NY2018"}, {"partner_id", "123989"}} +}; + +try +{ + CaptureResponse response = await api.PaymentsClient().CapturePayment("payment_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/payments@{id}@refunds/post.cs b/abc_spec/code_samples/C#/payments@{id}@refunds/post.cs new file mode 100644 index 000000000..069d0ecc8 --- /dev/null +++ b/abc_spec/code_samples/C#/payments@{id}@refunds/post.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Payments; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +RefundRequest request = new RefundRequest() +{ + Amount = 10, + Reference = "reference", + Metadata = new Dictionary() {{"coupon_code", "NY2018"}, {"partner_id", "123989"}} +}; + +try +{ + RefundResponse response = await api.PaymentsClient().RefundPayment("payment_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/payments@{id}@voids/post.cs b/abc_spec/code_samples/C#/payments@{id}@voids/post.cs new file mode 100644 index 000000000..d98e68019 --- /dev/null +++ b/abc_spec/code_samples/C#/payments@{id}@voids/post.cs @@ -0,0 +1,36 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Payments; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +VoidRequest request = new VoidRequest() +{ + Reference = "reference", + Metadata = new Dictionary() {{"coupon_code", "NY2018"}, {"partner_id", "123989"}} +}; + +try +{ + VoidResponse response = await api.PaymentsClient().VoidPayment("payment_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/reporting@payments/get.cs b/abc_spec/code_samples/C#/reporting@payments/get.cs new file mode 100644 index 000000000..a05a27d59 --- /dev/null +++ b/abc_spec/code_samples/C#/reporting@payments/get.cs @@ -0,0 +1,32 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Reconciliation.Previous; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +ReconciliationQueryPaymentsFilter request = new ReconciliationQueryPaymentsFilter() {Limit = 50}; + +try +{ + ReconciliationPaymentReportResponse response = await api.ReconciliationClient().QueryPaymentsReport(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/reporting@payments@download/get.cs b/abc_spec/code_samples/C#/reporting@payments@download/get.cs new file mode 100644 index 000000000..f94addd43 --- /dev/null +++ b/abc_spec/code_samples/C#/reporting@payments@download/get.cs @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Reconciliation; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +QueryFilterDateRange queryFilterDateRange = new QueryFilterDateRange +{ + From = DateTime.Now.Subtract(TimeSpan.FromDays(30)), To = DateTime.Now +}; + +try +{ + ContentsResponse retrieveCsvPaymentReport = await api.ReconciliationClient().RetrieveCsvPaymentReport(queryFilterDateRange); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/reporting@payments@{paymentId}/get.cs b/abc_spec/code_samples/C#/reporting@payments@{paymentId}/get.cs new file mode 100644 index 000000000..5dfa55c2b --- /dev/null +++ b/abc_spec/code_samples/C#/reporting@payments@{paymentId}/get.cs @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Reconciliation.Previous; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + ReconciliationPaymentReportResponse response = await api.ReconciliationClient().SinglePaymentReport("payment_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/reporting@statements/get.cs b/abc_spec/code_samples/C#/reporting@statements/get.cs new file mode 100644 index 000000000..35add671b --- /dev/null +++ b/abc_spec/code_samples/C#/reporting@statements/get.cs @@ -0,0 +1,33 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Reconciliation.Previous; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +QueryFilterDateRange request = new QueryFilterDateRange() {To = DateTime.Now}; + +try +{ + StatementReportResponse response = await api.ReconciliationClient().QueryStatementsReport(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/reporting@statements@download/get.cs b/abc_spec/code_samples/C#/reporting@statements@download/get.cs new file mode 100644 index 000000000..bf9fdb32b --- /dev/null +++ b/abc_spec/code_samples/C#/reporting@statements@download/get.cs @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +QueryFilterDateRange queryFilterDateRange = new QueryFilterDateRange +{ + From = DateTime.Now.Subtract(TimeSpan.FromDays(30)), To = DateTime.Now +}; + +try +{ + ContentsResponse response = await api.ReconciliationClient().RetrieveCsvStatementsReport(queryFilterDateRange); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/reporting@statements@{statementId}@payments@download/get.cs b/abc_spec/code_samples/C#/reporting@statements@{statementId}@payments@download/get.cs new file mode 100644 index 000000000..8be70e8f8 --- /dev/null +++ b/abc_spec/code_samples/C#/reporting@statements@{statementId}@payments@download/get.cs @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + ContentsResponse response = await api.ReconciliationClient().RetrieveCsvSingleStatementReport("id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/risk@assessments@pre-authentication/post.cs b/abc_spec/code_samples/C#/risk@assessments@pre-authentication/post.cs new file mode 100644 index 000000000..1d0142553 --- /dev/null +++ b/abc_spec/code_samples/C#/risk@assessments@pre-authentication/post.cs @@ -0,0 +1,74 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Risk; +using Checkout.Risk.PreAuthentication; +using Checkout.Risk.source; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +PreAuthenticationAssessmentRequest request = new PreAuthenticationAssessmentRequest() +{ + Date = DateTime.Now, + Source = new CardSourcePrism(), + Customer = new CustomerRequest() {Name = "FirstName LastName", Email = "email@docs.checkout.com",}, + Payment = new RiskPayment() {Psp = "Checkout.com", Id = "78453878"}, + Shipping = new RiskShippingDetails() + { + Address = new Address() + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + } + }, + Reference = "reference", + Description = "Set of 3 masks", + Amount = 10, + Currency = Currency.GBP, + Device = new Device() + { + Ip = "90.197.169.245", + Location = new Location() {Latitude = "51.5107", Longitude = "0.01313"}, + Os = "ISO", + Type = "Phone", + Model = "IPHone X", + Date = DateTime.Now, + UserAgent = + "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", + Fingerprint = "34304a9e3fg09302" + }, + Metadata = new Dictionary() + { + {"VoucherCode", "loyalty_10"}, {"discountApplied", "10"}, {"customer_id", "2190EF321"} + } +}; + +try +{ + PreAuthenticationAssessmentResponse response = + await api.RiskClient().RequestPreAuthenticationRiskScan(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/risk@assessments@pre-capture/post.cs b/abc_spec/code_samples/C#/risk@assessments@pre-capture/post.cs new file mode 100644 index 000000000..91dbb8b14 --- /dev/null +++ b/abc_spec/code_samples/C#/risk@assessments@pre-capture/post.cs @@ -0,0 +1,100 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Risk; +using Checkout.Risk.PreCapture; +using Checkout.Risk.source; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +PreCaptureAssessmentRequest request = new PreCaptureAssessmentRequest() +{ + AssessmentId = "string", + Date = DateTime.Now, + Source = new CardSourcePrism(), + Customer = new CustomerRequest() + { + Name = "FirstName LastName", + Email = "email@docs.checkout.com", + }, + Amount = 10, + Currency = Currency.GBP, + Payment = new RiskPayment() + { + Psp = "Checkout.com", + Id = "78453878" + }, + Shipping = new RiskShippingDetails() + { + Address = new Address() + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + } + }, + Device = new Device() + { + Ip = "90.197.169.245", + Location = new Location() + { + Latitude = "51.5107", + Longitude = "0.01313" + }, + Os = "ISO", + Type = "Phone", + Model = "IPHone X", + Date = DateTime.Now, + UserAgent = + "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", + Fingerprint = "34304a9e3fg09302" + }, + Metadata = new Dictionary() + { + {"VoucherCode", "loyalty_10"}, + {"discountApplied", "10"}, + {"customer_id", "2190EF321"} + }, + AuthenticationResult = new AuthenticationResult() + { + Attempted = true, + Challenged = true, + Succeeded = true, + LiabilityShifted = true, + Method = "3ds", + Version = "2.0" + }, + AuthorizationResult = new AuthorizationResult() + { + AvsCode = "V", + CvvResult = "N" + } +}; + +try +{ + PreCaptureAssessmentResponse response = await api.RiskClient().RequestPreCaptureRiskScan(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/sources/post.cs b/abc_spec/code_samples/C#/sources/post.cs new file mode 100644 index 000000000..fd8bda114 --- /dev/null +++ b/abc_spec/code_samples/C#/sources/post.cs @@ -0,0 +1,63 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Sources.Previous; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +SepaSourceRequest request = new SepaSourceRequest() +{ + Reference = "reference", + Phone = new Phone() {Number = "4155552671", CountryCode = "1"}, + Customer = + new CustomerRequest() + { + Id = "cus_y3oqhf46pyzuxjbcn2giaqnb44", + Email = "email@docs.checkout.com", + Name = "FirstName LastName" + }, + BillingAddress = + new Address() + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + }, + SourceData = new SourceData() + { + FirstName = "FirstName", + LastName = "LastName", + AccountIban = "DE25100100101234567893", + Bic = "PBNKDEFFXXX", + BillingDescriptor = "ExampleCompany.com", + MandateType = MandateType.Recurring + } +}; + +try +{ + SepaSourceResponse response = await api.SourcesClient().CreateSepaSource(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/tokens/post.cs b/abc_spec/code_samples/C#/tokens/post.cs new file mode 100644 index 000000000..2aa2ac979 --- /dev/null +++ b/abc_spec/code_samples/C#/tokens/post.cs @@ -0,0 +1,50 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Tokens; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .PublicKey("public_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +CardTokenRequest request = new CardTokenRequest +{ + Number = "4543474002249996", + ExpiryMonth = 10, + ExpiryYear = 2027, + Name = "FirstName LastName", + Cvv = "123", + BillingAddress = new Address() + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + }, + Phone = new Phone() {Number = "4155552671", CountryCode = "1"} +}; + +try +{ + CardTokenResponse response = await api.TokensClient().Request(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/webhooks/get.cs b/abc_spec/code_samples/C#/webhooks/get.cs new file mode 100644 index 000000000..ec02ceec5 --- /dev/null +++ b/abc_spec/code_samples/C#/webhooks/get.cs @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Webhooks.Previous; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + ItemsResponse response = await api.WebhooksClient().RetrieveWebhooks(); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/webhooks/post.cs b/abc_spec/code_samples/C#/webhooks/post.cs new file mode 100644 index 000000000..f08c812b7 --- /dev/null +++ b/abc_spec/code_samples/C#/webhooks/post.cs @@ -0,0 +1,57 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Webhooks.Previous; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +WebhookRequest request = new WebhookRequest() +{ + Url = "https://example.com/webhooks", + Active = true, + Headers = new Dictionary() + { + {"authorization", "1234"} + }, + ContentType = WebhookContentType.Json, + EventTypes = new List() + { + "payment_approved", + "payment_pending", + "payment_declined", + "payment_expired", + "payment_canceled", + "payment_voided", + "payment_void_declined", + "payment_captured", + "payment_capture_declined", + "payment_capture_pending", + "payment_refunded", + "payment_refund_declined", + "payment_refund_pending" + } +}; + +try +{ + WebhookResponse response = await api.WebhooksClient().RegisterWebhook(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/webhooks@{id}/delete.cs b/abc_spec/code_samples/C#/webhooks@{id}/delete.cs new file mode 100644 index 000000000..aa0eefa00 --- /dev/null +++ b/abc_spec/code_samples/C#/webhooks@{id}/delete.cs @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + EmptyResponse response = await api.WebhooksClient().RemoveWebhook("webhook_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/webhooks@{id}/get.cs b/abc_spec/code_samples/C#/webhooks@{id}/get.cs new file mode 100644 index 000000000..ec9f0939f --- /dev/null +++ b/abc_spec/code_samples/C#/webhooks@{id}/get.cs @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Webhooks.Previous; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + WebhookResponse response = await api.WebhooksClient().RetrieveWebhook("webhook_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/webhooks@{id}/patch.cs b/abc_spec/code_samples/C#/webhooks@{id}/patch.cs new file mode 100644 index 000000000..ed12b06df --- /dev/null +++ b/abc_spec/code_samples/C#/webhooks@{id}/patch.cs @@ -0,0 +1,54 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Webhooks.Previous; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +WebhookRequest request = new WebhookRequest() +{ + Url = "https://example.com/webhooks", + Active = true, + Headers = new Dictionary() {{"authorization", "1234"}}, + ContentType = WebhookContentType.Json, + EventTypes = new List() + { + "payment_approved", + "payment_pending", + "payment_declined", + "payment_expired", + "payment_canceled", + "payment_voided", + "payment_void_declined", + "payment_captured", + "payment_capture_declined", + "payment_capture_pending", + "payment_refunded", + "payment_refund_declined", + "payment_refund_pending" + } +}; + +try +{ + WebhookResponse response = await api.WebhooksClient().PatchWebhook("webhook_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/C#/webhooks@{id}/put.cs b/abc_spec/code_samples/C#/webhooks@{id}/put.cs new file mode 100644 index 000000000..4e5d9ac54 --- /dev/null +++ b/abc_spec/code_samples/C#/webhooks@{id}/put.cs @@ -0,0 +1,54 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Webhooks.Previous; + +Previous.ICheckoutApi api = CheckoutSdk.Builder() + .Previous() + .StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +WebhookRequest request = new WebhookRequest() +{ + Url = "https://example.com/webhooks", + Active = true, + Headers = new Dictionary() {{"authorization", "1234"}}, + ContentType = WebhookContentType.Json, + EventTypes = new List() + { + "payment_approved", + "payment_pending", + "payment_declined", + "payment_expired", + "payment_canceled", + "payment_voided", + "payment_void_declined", + "payment_captured", + "payment_capture_declined", + "payment_capture_pending", + "payment_refunded", + "payment_refund_declined", + "payment_refund_pending" + } +}; + +try +{ + WebhookResponse response = await api.WebhooksClient().UpdateWebhook("webhook_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/Go/customers/post.go b/abc_spec/code_samples/Go/customers/post.go new file mode 100644 index 000000000..df9faf57b --- /dev/null +++ b/abc_spec/code_samples/Go/customers/post.go @@ -0,0 +1,33 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/customers" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := customers.CustomerRequest{ + Email: "email@docs.checkout.com", + Name: "Name", + Phone: &common.Phone{ + CountryCode: "44", + Number: "4155552671", + }, + } + +response, err := api.Customers.Create(request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/customers@{identifier}/delete.go b/abc_spec/code_samples/Go/customers@{identifier}/delete.go new file mode 100644 index 000000000..83c87fa30 --- /dev/null +++ b/abc_spec/code_samples/Go/customers@{identifier}/delete.go @@ -0,0 +1,23 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( +"github.com/checkout/checkout-sdk-go" +"github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Customers.Delete("customer_id") +if err != nil { + return nil, err +} + +return response, nil + diff --git a/abc_spec/code_samples/Go/customers@{identifier}/get.go b/abc_spec/code_samples/Go/customers@{identifier}/get.go new file mode 100644 index 000000000..52bb885ec --- /dev/null +++ b/abc_spec/code_samples/Go/customers@{identifier}/get.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( +"github.com/checkout/checkout-sdk-go" +"github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Customers.Get("customer_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/customers@{identifier}/patch.go b/abc_spec/code_samples/Go/customers@{identifier}/patch.go new file mode 100644 index 000000000..68e468f03 --- /dev/null +++ b/abc_spec/code_samples/Go/customers@{identifier}/patch.go @@ -0,0 +1,33 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/customers" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := customers.CustomerRequest{ + Email: "email@docs.checkout.com", + Name: "Name", + Phone: &common.Phone{ + CountryCode: "44", + Number: "4155552671", + }, + } + +response, err := api.Customers.Update("customer_id", request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/disputes/get.go b/abc_spec/code_samples/Go/disputes/get.go new file mode 100644 index 000000000..20f623f73 --- /dev/null +++ b/abc_spec/code_samples/Go/disputes/get.go @@ -0,0 +1,36 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/disputes" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +query := disputes.QueryFilter{ + Limit: 10, + Skip: 5, + From: time.Parse("2006-01-02T15:04:05Z", time.Now().AddDate(0, -1, 0).Format("2006-01-02T15:04:05Z")), + To: time.Parse("2006-01-02T15:04:05Z", time.Now().Format("2006-01-02T15:04:05Z")), + Statuses: strings.Join([]string{disputes.EvidenceRequired, disputes.Accepted}[:], ","), + PaymentId: "payment_id", + PaymentReference: "payment_reference", + PaymentArn: "payment_arn", +} + +response, err := api.Disputes.Query(query) +if err != nil { + return nil, err +} + +return response, nil + + diff --git a/abc_spec/code_samples/Go/disputes@{dispute_id}/get.go b/abc_spec/code_samples/Go/disputes@{dispute_id}/get.go new file mode 100644 index 000000000..41e8fd496 --- /dev/null +++ b/abc_spec/code_samples/Go/disputes@{dispute_id}/get.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Disputes.GetDisputeDetails("dispute_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/disputes@{dispute_id}@accept/post.go b/abc_spec/code_samples/Go/disputes@{dispute_id}@accept/post.go new file mode 100644 index 000000000..81ab448a8 --- /dev/null +++ b/abc_spec/code_samples/Go/disputes@{dispute_id}@accept/post.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( +"github.com/checkout/checkout-sdk-go" +"github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Disputes.Accept("dispute_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/disputes@{dispute_id}@evidence/get.go b/abc_spec/code_samples/Go/disputes@{dispute_id}@evidence/get.go new file mode 100644 index 000000000..8faf3321b --- /dev/null +++ b/abc_spec/code_samples/Go/disputes@{dispute_id}@evidence/get.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Disputes.GetEvidence("dispute_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/disputes@{dispute_id}@evidence/post.go b/abc_spec/code_samples/Go/disputes@{dispute_id}@evidence/post.go new file mode 100644 index 000000000..1eae001c5 --- /dev/null +++ b/abc_spec/code_samples/Go/disputes@{dispute_id}@evidence/post.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Disputes.SubmitEvidence("dispute_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/disputes@{dispute_id}@evidence/put.go b/abc_spec/code_samples/Go/disputes@{dispute_id}@evidence/put.go new file mode 100644 index 000000000..7476be558 --- /dev/null +++ b/abc_spec/code_samples/Go/disputes@{dispute_id}@evidence/put.go @@ -0,0 +1,42 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/disputes" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := disputes.Evidence{ + ProofOfDeliveryOrServiceFile: "file_id", + ProofOfDeliveryOrServiceText: "proof of delivery or service text", + InvoiceOrReceiptFile: "file_id", + InvoiceOrReceiptText: "proof of receipt text", + InvoiceShowingDistinctTransactionsFile: "file_id", + InvoiceShowingDistinctTransactionsText: "invoice showing distinct transactions text", + CustomerCommunicationFile: "file_id", + CustomerCommunicationText: "customer communication text", + RefundOrCancellationPolicyFile: "file_id", + RefundOrCancellationPolicyText: "refund or cancellation policy text", + RecurringTransactionAgreementFile: "file_id", + RecurringTransactionAgreementText: "recurring transaction agreement text", + AdditionalEvidenceFile: "file_id", + AdditionalEvidenceText: "additional evidence text", + ProofOfDeliveryOrServiceDateFile: "file_id", + ProofOfDeliveryOrServiceDateText: "proof of delivery or service date text", +} + +response, err := api.Disputes.PutEvidence("dispute_id", request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/disputes@{dispute_id}@schemefiles/get.go b/abc_spec/code_samples/Go/disputes@{dispute_id}@schemefiles/get.go new file mode 100644 index 000000000..2c4fa7f7b --- /dev/null +++ b/abc_spec/code_samples/Go/disputes@{dispute_id}@schemefiles/get.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Disputes.GetDisputeSchemeFiles("dispute_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/event-types/get.go b/abc_spec/code_samples/Go/event-types/get.go new file mode 100644 index 000000000..b3d3d07d2 --- /dev/null +++ b/abc_spec/code_samples/Go/event-types/get.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Events.RetrieveAllEventTypes() +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/events/get.go b/abc_spec/code_samples/Go/events/get.go new file mode 100644 index 000000000..cece6711e --- /dev/null +++ b/abc_spec/code_samples/Go/events/get.go @@ -0,0 +1,31 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + events "github.com/checkout/checkout-sdk-go/events/abc" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +query := events.QueryRetrieveEvents{ + PaymentId: "payment_id", + Skip: 0, + Limit: 10, + From: time.Now().AddDate(0, -2, 0).String(), + To: time.Now().String(), +} + +response, err := api.Events.RetrieveEventsQuery(query) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/events@{eventId}/get.go b/abc_spec/code_samples/Go/events@{eventId}/get.go new file mode 100644 index 000000000..84ae3f97f --- /dev/null +++ b/abc_spec/code_samples/Go/events@{eventId}/get.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Events.RetrieveEvent("event_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/events@{eventId}@notifications@{notificationId}/get.go b/abc_spec/code_samples/Go/events@{eventId}@notifications@{notificationId}/get.go new file mode 100644 index 000000000..8c40642f7 --- /dev/null +++ b/abc_spec/code_samples/Go/events@{eventId}@notifications@{notificationId}/get.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Events.RetrieveEventNotification("event_id", "notification_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/events@{eventId}@webhooks@retry/post.go b/abc_spec/code_samples/Go/events@{eventId}@webhooks@retry/post.go new file mode 100644 index 000000000..be4ad3e5b --- /dev/null +++ b/abc_spec/code_samples/Go/events@{eventId}@webhooks@retry/post.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Events.RetryAllWebhooks("event_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/events@{eventId}@webhooks@{webhookId}@retry/post.go b/abc_spec/code_samples/Go/events@{eventId}@webhooks@{webhookId}@retry/post.go new file mode 100644 index 000000000..9fd1909bf --- /dev/null +++ b/abc_spec/code_samples/Go/events@{eventId}@webhooks@{webhookId}@retry/post.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Events.RetryWebhook("event_id", "webhook_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/files/post.go b/abc_spec/code_samples/Go/files/post.go new file mode 100644 index 000000000..c4bdf7501 --- /dev/null +++ b/abc_spec/code_samples/Go/files/post.go @@ -0,0 +1,28 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := common.File{ + File: "evidence.pdf", + Purpose: common.DisputesEvidence, +} + +response, err := api.Disputes.UploadFile(request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/files@{file_id}/get.go b/abc_spec/code_samples/Go/files@{file_id}/get.go new file mode 100644 index 000000000..ebb54b94b --- /dev/null +++ b/abc_spec/code_samples/Go/files@{file_id}/get.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Disputes.GetFileDetails("file_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/hosted-payments/post.go b/abc_spec/code_samples/Go/hosted-payments/post.go new file mode 100644 index 000000000..51d713f63 --- /dev/null +++ b/abc_spec/code_samples/Go/hosted-payments/post.go @@ -0,0 +1,89 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/payments" + "github.com/checkout/checkout-sdk-go/payments/hosted" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +address := common.Address{ + AddressLine1: "Checkout.com", + AddressLine2: "90 Tottenham Court Road", + City: "London", + State: "London", + Zip: "W1T 4TJ", + Country: common.GB, +} + +phone := common.Phone{ + CountryCode: "1", + Number: "415 555 2671", +} + +request := hosted.HostedPaymentRequest{ + Amount: 10, + Currency: common.GBP, + PaymentType: payments.Regular, + BillingDescriptor: &payments.BillingDescriptor{ + Name: "Name", + City: "London", + }, + Reference: "Reference", + Description: "Description", + Customer: &common.CustomerRequest{ + Email: "email@docs.checkout.com", + Name: "Name", + }, + Shipping: &payments.ShippingDetails{ + Address: &address, + Phone: &phone, + }, + Billing: &payments.BillingInformation{ + Address: &address, + Phone: &phone, + }, + Recipient: &payments.PaymentRecipient{ + DateOfBirth: "1985-05-15", + AccountNumber: "999999999", + Zip: "12345", + LastName: "LastName", + }, + Processing: &payments.ProcessingSettings{Aft: true}, + Products: []payments.Product{ + { + Name: "name", + Quantity: 1, + Price: 200, + }, + }, + Risk: &payments.RiskRequest{Enabled: false}, + SuccessUrl: "https://docs.checkout.com/payments/success", + CancelUrl: "https://docs.checkout.com/payments/cancel", + FailureUrl: "https://docs.checkout.com/payments/failure", + Locale: "en-GB", + ThreeDs: &payments.ThreeDsRequest{ + Enabled: false, + AttemptN3D: false, + ChallengeIndicator: common.NoChallengeRequested, + }, + Capture: true, + CaptureOn: time.Now().AddDate(0, 0, 30), +} + +response, err := api.Hosted.CreateHostedPaymentsPageSession(request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/hosted-payments@{id}/get.go b/abc_spec/code_samples/Go/hosted-payments@{id}/get.go new file mode 100644 index 000000000..2cbe19402 --- /dev/null +++ b/abc_spec/code_samples/Go/hosted-payments@{id}/get.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Hosted.GetHostedPaymentsPageDetails("hosted_payment_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/instruments/post.go b/abc_spec/code_samples/Go/instruments/post.go new file mode 100644 index 000000000..c523b2a3c --- /dev/null +++ b/abc_spec/code_samples/Go/instruments/post.go @@ -0,0 +1,44 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/instruments" + "github.com/checkout/checkout-sdk-go/instruments/abc" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := abc.CreateInstrumentRequest{ + Type: instruments.Token, + Token: "token", + AccountHolder: &abc.InstrumentAccountHolder{ + BillingAddress: &common.Address{ + AddressLine1: "Checkout.com", + AddressLine2: "90 Tottenham Court Road", + City: "London", + State: "London", + Zip: "W1T 4TJ", + Country: common.GB, + }, + Phone: &common.Phone{ + CountryCode: "1", + Number: "415 555 2671", + }, + }, +} + +response, err := api.Instruments.Create(request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/instruments@{id}/delete.go b/abc_spec/code_samples/Go/instruments@{id}/delete.go new file mode 100644 index 000000000..395261946 --- /dev/null +++ b/abc_spec/code_samples/Go/instruments@{id}/delete.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Instruments.Delete("instrument_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/instruments@{id}/get.go b/abc_spec/code_samples/Go/instruments@{id}/get.go new file mode 100644 index 000000000..5ee69d340 --- /dev/null +++ b/abc_spec/code_samples/Go/instruments@{id}/get.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Instruments.Get("instrument_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/instruments@{id}/patch.go b/abc_spec/code_samples/Go/instruments@{id}/patch.go new file mode 100644 index 000000000..0c65a5f96 --- /dev/null +++ b/abc_spec/code_samples/Go/instruments@{id}/patch.go @@ -0,0 +1,48 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/instruments/abc" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := abc.UpdateInstrumentRequest{ + ExpiryMonth: 10, + ExpiryYear: 2025, + Name: "New Name", + AccountHolder: &abc.InstrumentAccountHolder{ + BillingAddress: &common.Address{ + AddressLine1: "Checkout.com", + AddressLine2: "90 Tottenham Court Road", + City: "London", + State: "London", + Zip: "W1T 4TJ", + Country: common.GB, + }, + Phone: &common.Phone{ + CountryCode: "1", + Number: "415 555 2671", + }, + }, + Customer: &abc.InstrumentCustomerUpdateRequest{ + Id: "customer_id", + IsDefault: false, + }, +} + +response, err := api.Instruments.Update("instrument_id", request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/payment-links/post.go b/abc_spec/code_samples/Go/payment-links/post.go new file mode 100644 index 000000000..95846a943 --- /dev/null +++ b/abc_spec/code_samples/Go/payment-links/post.go @@ -0,0 +1,88 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/payments" + "github.com/checkout/checkout-sdk-go/payments/links" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +address := common.Address{ + AddressLine1: "Checkout.com", + AddressLine2: "90 Tottenham Court Road", + City: "London", + State: "London", + Zip: "W1T 4TJ", + Country: common.GB, +} + +phone := common.Phone{ + CountryCode: "1", + Number: "415 555 2671", +} + +request := links.PaymentLinkRequest{ + Amount: 10, + Currency: common.GBP, + PaymentType: payments.Regular, + BillingDescriptor: &payments.BillingDescriptor{ + Name: "Name", + City: "London", + }, + Reference: "Reference", + Description: "Description", + ExpiresIn: 604800, + Customer: &common.CustomerRequest{ + Email: "email@docs.checkout.com", + Name: "Name", + }, + Shipping: &payments.ShippingDetails{ + Address: &address, + Phone: &phone, + }, + Billing: &payments.BillingInformation{ + Address: &address, + Phone: &phone, + }, + Recipient: &payments.PaymentRecipient{ + DateOfBirth: "1985-05-15", + AccountNumber: "999999999", + Zip: "12345", + LastName: "LastName", + }, + Processing: &payments.ProcessingSettings{Aft: true}, + Products: []payments.Product{ + { + Name: "name", + Quantity: 1, + Price: 200, + }, + }, + Risk: &payments.RiskRequest{Enabled: false}, + ReturnUrl: "https://docs.checkout.com/return", + Locale: "en-GB", + ThreeDs: &payments.ThreeDsRequest{ + Enabled: false, + AttemptN3D: false, + ChallengeIndicator: common.NoChallengeRequested, + }, + Capture: true, + CaptureOn: time.Now().AddDate(0, 0, 30), +} + +response, err := api.Links.CreatePaymentLink(request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/payment-links@{id}/get.go b/abc_spec/code_samples/Go/payment-links@{id}/get.go new file mode 100644 index 000000000..a76acdc8a --- /dev/null +++ b/abc_spec/code_samples/Go/payment-links@{id}/get.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Links.GetPaymentLink("request_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/payments/get.go b/abc_spec/code_samples/Go/payments/get.go new file mode 100644 index 000000000..44e31e1d2 --- /dev/null +++ b/abc_spec/code_samples/Go/payments/get.go @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/payments" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +query := payments.QueryRequest{ + Limit: 10, + Skip: 0, + Reference: "reference", +} + +response, err := api.Payments.RequestPaymentList(query) +if err != nil { + return nil, err +} + +return response, nil + diff --git a/abc_spec/code_samples/Go/payments/post.go b/abc_spec/code_samples/Go/payments/post.go new file mode 100644 index 000000000..a7b369a6b --- /dev/null +++ b/abc_spec/code_samples/Go/payments/post.go @@ -0,0 +1,53 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/payments/abc" + "github.com/checkout/checkout-sdk-go/payments/abc/sources" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +source := sources.NewRequestCardSource() +source.Name = "name" +source.Number = "number" +source.ExpiryMonth = 12 +source.ExpiryYear = 2025 +source.Cvv = "123" +source.Stored = false +source.BillingAddress = &common.Address{ + AddressLine1: "Checkout.com", + AddressLine2: "90 Tottenham Court Road", + City: "London", + State: "London", + Zip: "W1T 4TJ", + Country: common.GB, +} +source.Phone = &common.Phone{ + CountryCode: "1", + Number: "415 555 2671", +} + +request := abc.PaymentRequest{ + Source: source, + Amount: 10, + Currency: common.GBP, + Reference: "Reference", + Capture: true, +} + +response, err := api.Payments.RequestPayment(request, nil) // or "RequestPayout(request PayoutRequest, idempotencyKey *string)" +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/payments@{id}/get.go b/abc_spec/code_samples/Go/payments@{id}/get.go new file mode 100644 index 000000000..0010c5038 --- /dev/null +++ b/abc_spec/code_samples/Go/payments@{id}/get.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Payments.GetPaymentDetails("payment_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/payments@{id}@actions/get.go b/abc_spec/code_samples/Go/payments@{id}@actions/get.go new file mode 100644 index 000000000..dd4334c89 --- /dev/null +++ b/abc_spec/code_samples/Go/payments@{id}@actions/get.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Payments.GetPaymentActions("payment_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/payments@{id}@captures/post.go b/abc_spec/code_samples/Go/payments@{id}@captures/post.go new file mode 100644 index 000000000..70c4440fc --- /dev/null +++ b/abc_spec/code_samples/Go/payments@{id}@captures/post.go @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/payments/abc" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := abc.CaptureRequest{ + Amount: 10, + Reference: "partial capture", + Metadata: map[string]interface{}{}, +} + +response, err := api.Payments.CapturePayment("payment_id", request, nil) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/payments@{id}@refunds/post.go b/abc_spec/code_samples/Go/payments@{id}@refunds/post.go new file mode 100644 index 000000000..31b5e815e --- /dev/null +++ b/abc_spec/code_samples/Go/payments@{id}@refunds/post.go @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/payments" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := payments.RefundRequest{ + Amount: 10, + Reference: "partial refund", + Metadata: map[string]interface{}{}, +} + +response, err := api.Payments.RefundPayment("payment_id", request, nil) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/payments@{id}@voids/post.go b/abc_spec/code_samples/Go/payments@{id}@voids/post.go new file mode 100644 index 000000000..22bdf09c0 --- /dev/null +++ b/abc_spec/code_samples/Go/payments@{id}@voids/post.go @@ -0,0 +1,28 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/payments" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := payments.VoidRequest{ + Reference: "reference", + Metadata: map[string]interface{}{}, +} + +response, err := api.Payments.VoidPayment("payment_id", request, nil) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/reporting@payments/get.go b/abc_spec/code_samples/Go/reporting@payments/get.go new file mode 100644 index 000000000..b8c58932d --- /dev/null +++ b/abc_spec/code_samples/Go/reporting@payments/get.go @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/reconciliation" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +query := reconciliation.PaymentReportsQuery{ + Reference: "reference", + From: time.Parse("2006-01-02T15:04:05Z", time.Now().AddDate(0, -1, 0).Format("2006-01-02T15:04:05Z")), + To: time.Parse("2006-01-02T15:04:05Z", time.Now().Format("2006-01-02T15:04:05Z")), +} + +response, err := api.Reconciliation.QueryPaymentsReport(query) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/reporting@payments@download/get.go b/abc_spec/code_samples/Go/reporting@payments@download/get.go new file mode 100644 index 000000000..a6a176189 --- /dev/null +++ b/abc_spec/code_samples/Go/reporting@payments@download/get.go @@ -0,0 +1,28 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +query := common.DateRangeQuery{ + From: time.Parse("2006-01-02T15:04:05Z", time.Now().AddDate(0, -1, 0).Format("2006-01-02T15:04:05Z")), + To: time.Parse("2006-01-02T15:04:05Z", time.Now().Format("2006-01-02T15:04:05Z")), +} + +response, err := api.Reconciliation.RetrieveCVSPaymentsReport(query) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/reporting@payments@{paymentId}/get.go b/abc_spec/code_samples/Go/reporting@payments@{paymentId}/get.go new file mode 100644 index 000000000..058e71d31 --- /dev/null +++ b/abc_spec/code_samples/Go/reporting@payments@{paymentId}/get.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Reconciliation.GetSinglePaymentReport("payment_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/reporting@statements/get.go b/abc_spec/code_samples/Go/reporting@statements/get.go new file mode 100644 index 000000000..2bfe59eab --- /dev/null +++ b/abc_spec/code_samples/Go/reporting@statements/get.go @@ -0,0 +1,28 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +query := common.DateRangeQuery{ + From: time.Parse("2006-01-02T15:04:05Z", time.Now().AddDate(0, -1, 0).Format("2006-01-02T15:04:05Z")), + To: time.Parse("2006-01-02T15:04:05Z", time.Now().Format("2006-01-02T15:04:05Z")), +} + +response, err := api.Reconciliation.QueryStatementsReport(query) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/reporting@statements@download/get.go b/abc_spec/code_samples/Go/reporting@statements@download/get.go new file mode 100644 index 000000000..cc8851287 --- /dev/null +++ b/abc_spec/code_samples/Go/reporting@statements@download/get.go @@ -0,0 +1,28 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +query := common.DateRangeQuery{ + From: time.Parse("2006-01-02T15:04:05Z", time.Now().AddDate(0, -1, 0).Format("2006-01-02T15:04:05Z")), + To: time.Parse("2006-01-02T15:04:05Z", time.Now().Format("2006-01-02T15:04:05Z")), +} + +response, err := api.Reconciliation.RetrieveCVSStatementsReport(query) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/reporting@statements@{statementId}@payments@download/get.go b/abc_spec/code_samples/Go/reporting@statements@{statementId}@payments@download/get.go new file mode 100644 index 000000000..ef8d44f36 --- /dev/null +++ b/abc_spec/code_samples/Go/reporting@statements@{statementId}@payments@download/get.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Reconciliation.RetrieveCVSSingleStatementReport("statement_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/sources/post.go b/abc_spec/code_samples/Go/sources/post.go new file mode 100644 index 000000000..fbeab2dc6 --- /dev/null +++ b/abc_spec/code_samples/Go/sources/post.go @@ -0,0 +1,47 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/sources" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := sources.NewSepaSourceRequest() +request.BillingAddress = &common.Address{ + AddressLine1: "Checkout.com", + AddressLine2: "90 Tottenham Court Road", + City: "London", + State: "London", + Zip: "W1T 4TJ", + Country: common.GB, +} +request.SourceData = &sources.SourceData{ + FirstName: "first name", + LastName: "last name", + AccountIban: "account iban", + Bic: "bic", + BillingDescriptor: "billing descriptor", + MandateType: "mandate type", +} +request.Reference = "reference" +request.Phone = &common.Phone{ + CountryCode: "1", + Number: "415 555 2671", +} + +response, err := api.Sources.CreateSepaSource(request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/tokens/post.go b/abc_spec/code_samples/Go/tokens/post.go new file mode 100644 index 000000000..663c47624 --- /dev/null +++ b/abc_spec/code_samples/Go/tokens/post.go @@ -0,0 +1,45 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/tokens" +) + +api, err := checkout. + Builder(). + Previous(). + WithPublicKey("public_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := tokens.CardTokenRequest{ + Type: tokens.Card, + Number: "123456789", + ExpiryMonth: 10, + ExpiryYear: 2025, + Name: "Name", + CVV: "123", + BillingAddress: &common.Address{ + AddressLine1: "Checkout.com", + AddressLine2: "90 Tottenham Court Road", + City: "London", + State: "London", + Zip: "W1T 4TJ", + Country: common.GB, + }, + Phone: &common.Phone{ + CountryCode: "1", + Number: "415 555 2671", + }, +} + +response, err := api.Tokens.RequestCardToken(request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/webhooks/get.go b/abc_spec/code_samples/Go/webhooks/get.go new file mode 100644 index 000000000..73d27a96f --- /dev/null +++ b/abc_spec/code_samples/Go/webhooks/get.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Webhooks.RetrieveWebhooks() +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/webhooks/post.go b/abc_spec/code_samples/Go/webhooks/post.go new file mode 100644 index 000000000..2fe361805 --- /dev/null +++ b/abc_spec/code_samples/Go/webhooks/post.go @@ -0,0 +1,28 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + webhooks "github.com/checkout/checkout-sdk-go/webhooks/abc" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := webhooks.WebhookRequest{ + Url: "https://docs.checkout.com/webhook", + EventTypes: []string{"payment_captured", "payment_approved", "payment_declined"}, +} + +response, err := api.Webhooks.RegisterWebhook(request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/webhooks@{id}/delete.go b/abc_spec/code_samples/Go/webhooks@{id}/delete.go new file mode 100644 index 000000000..795a3de2b --- /dev/null +++ b/abc_spec/code_samples/Go/webhooks@{id}/delete.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Webhooks.RemoveWebhook("webhook_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/webhooks@{id}/get.go b/abc_spec/code_samples/Go/webhooks@{id}/get.go new file mode 100644 index 000000000..f1b9f6119 --- /dev/null +++ b/abc_spec/code_samples/Go/webhooks@{id}/get.go @@ -0,0 +1,22 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Webhooks.RetrieveWebhook("webhook_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/webhooks@{id}/patch.go b/abc_spec/code_samples/Go/webhooks@{id}/patch.go new file mode 100644 index 000000000..77def2bc4 --- /dev/null +++ b/abc_spec/code_samples/Go/webhooks@{id}/patch.go @@ -0,0 +1,28 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + webhooks "github.com/checkout/checkout-sdk-go/webhooks/abc" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := webhooks.WebhookRequest{ + Url: "https://docs.checkout.com/webhook", + EventTypes: []string{"payment_captured", "payment_approved", "payment_declined"}, +} + +response, err := api.Webhooks.PartiallyUpdateWebhook("webhook_id", request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Go/webhooks@{id}/put.go b/abc_spec/code_samples/Go/webhooks@{id}/put.go new file mode 100644 index 000000000..01c5de277 --- /dev/null +++ b/abc_spec/code_samples/Go/webhooks@{id}/put.go @@ -0,0 +1,27 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + webhooks "github.com/checkout/checkout-sdk-go/webhooks/abc" +) + +api, err := checkout. + Builder(). + Previous(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := webhooks.WebhookRequest{ + Url: "https://docs.checkout.com/updated", +} + +response, err := api.Webhooks.UpdateWebhook("webhook_id", request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/abc_spec/code_samples/Java/customers/post.java b/abc_spec/code_samples/Java/customers/post.java new file mode 100644 index 000000000..68cc3119e --- /dev/null +++ b/abc_spec/code_samples/Java/customers/post.java @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.common.IdResponse; +import com.checkout.common.Phone; +import com.checkout.customers.previous.CustomerRequest; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +CustomerRequest request = CustomerRequest.builder() + .email("email@docs.checkout.com") + .name("name") + .phone(Phone.builder().countryCode("1").number("415 555 2671").build()) + .build(); + +try { + IdResponse response = api.customersClient().create(request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/Java/customers@{identifier}/delete.java b/abc_spec/code_samples/Java/customers@{identifier}/delete.java new file mode 100644 index 000000000..ed6b10a99 --- /dev/null +++ b/abc_spec/code_samples/Java/customers@{identifier}/delete.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.EmptyResponse; +import com.checkout.Environment; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + EmptyResponse response = api.customersClient().delete("customer_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/customers@{identifier}/get.java b/abc_spec/code_samples/Java/customers@{identifier}/get.java new file mode 100644 index 000000000..f5e45354b --- /dev/null +++ b/abc_spec/code_samples/Java/customers@{identifier}/get.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.customers.previous.CustomerDetailsResponse; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + CustomerDetailsResponse response = api.customersClient().get("customer_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/customers@{identifier}/patch.java b/abc_spec/code_samples/Java/customers@{identifier}/patch.java new file mode 100644 index 000000000..fe28bb6d5 --- /dev/null +++ b/abc_spec/code_samples/Java/customers@{identifier}/patch.java @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.EmptyResponse; +import com.checkout.Environment; +import com.checkout.common.Phone; +import com.checkout.customers.previous.CustomerRequest; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +CustomerRequest request = CustomerRequest.builder() + .email("email@docs.checkout.com") + .name("name") + .phone(Phone.builder().countryCode("1").number("415 555 2671").build()) + .build(); + +try { + EmptyResponse response = api.customersClient().update("customer_id", request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/disputes/get.java b/abc_spec/code_samples/Java/disputes/get.java new file mode 100644 index 000000000..395a35bda --- /dev/null +++ b/abc_spec/code_samples/Java/disputes/get.java @@ -0,0 +1,42 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.disputes.DisputeStatus; +import com.checkout.disputes.DisputesQueryFilter; +import com.checkout.disputes.DisputesQueryResponse; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +DisputesQueryFilter query = DisputesQueryFilter.builder() + .paymentId("payment_id") + .from(Instant.parse(LocalDateTime.now().minusMonths(2).toInstant(ZoneOffset.UTC).toString())) + .to(Instant.parse(LocalDateTime.now().toString())) + .paymentArn("payment_arn") + .paymentReference("payment_reference") + .statuses(String.join(",", DisputeStatus.EVIDENCE_REQUIRED.getStatus(), DisputeStatus.ACCEPTED.getStatus())) + .limit(10) + .skip(5) + .build(); + +try { + DisputesQueryResponse response = api.disputesClient().query(query).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/disputes@{dispute_id}/get.java b/abc_spec/code_samples/Java/disputes@{dispute_id}/get.java new file mode 100644 index 000000000..ba9d252e7 --- /dev/null +++ b/abc_spec/code_samples/Java/disputes@{dispute_id}/get.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.disputes.DisputeDetailsResponse; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + DisputeDetailsResponse response = api.disputesClient().getDisputeDetails("dispute_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/disputes@{dispute_id}@accept/post.java b/abc_spec/code_samples/Java/disputes@{dispute_id}@accept/post.java new file mode 100644 index 000000000..14efad6e8 --- /dev/null +++ b/abc_spec/code_samples/Java/disputes@{dispute_id}@accept/post.java @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.EmptyResponse; +import com.checkout.Environment; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + EmptyResponse response = api.disputesClient().accept("dispute_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} + diff --git a/abc_spec/code_samples/Java/disputes@{dispute_id}@evidence/get.java b/abc_spec/code_samples/Java/disputes@{dispute_id}@evidence/get.java new file mode 100644 index 000000000..018f174c5 --- /dev/null +++ b/abc_spec/code_samples/Java/disputes@{dispute_id}@evidence/get.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.disputes.DisputeEvidenceResponse; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + DisputeEvidenceResponse response = api.disputesClient().getEvidence("dispute_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/disputes@{dispute_id}@evidence/post.java b/abc_spec/code_samples/Java/disputes@{dispute_id}@evidence/post.java new file mode 100644 index 000000000..a48d1094f --- /dev/null +++ b/abc_spec/code_samples/Java/disputes@{dispute_id}@evidence/post.java @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.EmptyResponse; +import com.checkout.Environment; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + EmptyResponse response = api.disputesClient().submitEvidence("evidence_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} + diff --git a/abc_spec/code_samples/Java/disputes@{dispute_id}@evidence/put.java b/abc_spec/code_samples/Java/disputes@{dispute_id}@evidence/put.java new file mode 100644 index 000000000..e9320260c --- /dev/null +++ b/abc_spec/code_samples/Java/disputes@{dispute_id}@evidence/put.java @@ -0,0 +1,49 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.EmptyResponse; +import com.checkout.Environment; +import com.checkout.disputes.DisputeEvidenceRequest; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +DisputeEvidenceRequest evidenceRequest = DisputeEvidenceRequest.builder() + .proofOfDeliveryOrServiceFile("file_id") + .proofOfDeliveryOrServiceText("proof of delivery or service text") + .invoiceOrReceiptFile("file_id") + .invoiceOrReceiptText("Copy of the invoice") + .invoiceShowingDistinctTransactionsFile("") + .invoiceShowingDistinctTransactionsText("Copy of invoice #1244 showing two transactions") + .customerCommunicationFile("file_id") + .customerCommunicationText("Copy of an email exchange with the cardholder") + .refundOrCancellationPolicyFile("file_id") + .refundOrCancellationPolicyText("Copy of the refund policy") + .recurringTransactionAgreementFile("file_id") + .recurringTransactionAgreementText("Copy of the recurring transaction agreement") + .additionalEvidenceFile("file_id") + .additionalEvidenceText("Scanned document") + .proofOfDeliveryOrServiceDateFile("file_id") + .proofOfDeliveryOrServiceDateText("Copy of the customer receipt showing the merchandise was delivered on 2018-12-20") + .build(); + +try { + EmptyResponse response = api.disputesClient().putEvidence("dispute_id", evidenceRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/event-types/get.java b/abc_spec/code_samples/Java/event-types/get.java new file mode 100644 index 000000000..dfef10f33 --- /dev/null +++ b/abc_spec/code_samples/Java/event-types/get.java @@ -0,0 +1,36 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.ItemsResponse; +import com.checkout.events.previous.EventTypes; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + /* + Specify API version: + "1.0" => Legacy API + "2.0" => Unified Payments API + null => all versions + */ + ItemsResponse response = api.eventsClient().retrieveAllEventTypes(null).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/events/get.java b/abc_spec/code_samples/Java/events/get.java new file mode 100644 index 000000000..5040a9c00 --- /dev/null +++ b/abc_spec/code_samples/Java/events/get.java @@ -0,0 +1,36 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.events.previous.EventsPageResponse; +import com.checkout.events.previous.RetrieveEventsRequest; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +RetrieveEventsRequest retrieveEventsRequest = RetrieveEventsRequest.builder() + .limit(15) + .skip(0) + //.paymentId("payment_id") + .build(); + +try { + EventsPageResponse response = api.eventsClient().retrieveEvents(retrieveEventsRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/events@{eventId}/get.java b/abc_spec/code_samples/Java/events@{eventId}/get.java new file mode 100644 index 000000000..e4d3661ec --- /dev/null +++ b/abc_spec/code_samples/Java/events@{eventId}/get.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.events.previous.EventResponse; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + EventResponse response = api.eventsClient().retrieveEvent("event_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/events@{eventId}@notifications@{notificationId}/get.java b/abc_spec/code_samples/Java/events@{eventId}@notifications@{notificationId}/get.java new file mode 100644 index 000000000..66fbc2b6b --- /dev/null +++ b/abc_spec/code_samples/Java/events@{eventId}@notifications@{notificationId}/get.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.events.previous.EventNotificationResponse; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + EventNotificationResponse response = api.eventsClient().retrieveEventNotification("event_id", "notification_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/events@{eventId}@webhooks@retry/post.java b/abc_spec/code_samples/Java/events@{eventId}@webhooks@retry/post.java new file mode 100644 index 000000000..8b56a86f9 --- /dev/null +++ b/abc_spec/code_samples/Java/events@{eventId}@webhooks@retry/post.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.EmptyResponse; +import com.checkout.Environment; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + EmptyResponse response = api.eventsClient().retryAllWebhooks("event_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/Java/events@{eventId}@webhooks@{webhookId}@retry/post.java b/abc_spec/code_samples/Java/events@{eventId}@webhooks@{webhookId}@retry/post.java new file mode 100644 index 000000000..e691e3699 --- /dev/null +++ b/abc_spec/code_samples/Java/events@{eventId}@webhooks@{webhookId}@retry/post.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.EmptyResponse; +import com.checkout.Environment; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + EmptyResponse response = api.eventsClient().retryWebhook("event_id", "webhook_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/files/post.java b/abc_spec/code_samples/Java/files/post.java new file mode 100644 index 000000000..2dc317e2e --- /dev/null +++ b/abc_spec/code_samples/Java/files/post.java @@ -0,0 +1,38 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.common.FilePurpose; +import com.checkout.common.FileRequest; +import com.checkout.common.IdResponse; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +File file = new File("evidence.pdf"); +FileRequest fileRequest = FileRequest.builder() + .file(file) + .contentType(ContentType.create("application/pdf")) + .purpose(FilePurpose.DISPUTE_EVIDENCE) + .build(); + +try { + IdResponse response = api.disputesClient().uploadFile(fileRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/files@{file_id}/get.java b/abc_spec/code_samples/Java/files@{file_id}/get.java new file mode 100644 index 000000000..1b4765271 --- /dev/null +++ b/abc_spec/code_samples/Java/files@{file_id}/get.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.common.FileDetailsResponse; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + FileDetailsResponse response = api.disputesClient().getFileDetails("file_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/hosted-payments/post.java b/abc_spec/code_samples/Java/hosted-payments/post.java new file mode 100644 index 000000000..24568bcc9 --- /dev/null +++ b/abc_spec/code_samples/Java/hosted-payments/post.java @@ -0,0 +1,107 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.common.Address; +import com.checkout.common.ChallengeIndicator; +import com.checkout.common.CountryCode; +import com.checkout.common.Currency; +import com.checkout.common.CustomerRequest; +import com.checkout.common.Phone; +import com.checkout.common.Product; +import com.checkout.payments.BillingDescriptor; +import com.checkout.payments.BillingInformation; +import com.checkout.payments.PaymentRecipient; +import com.checkout.payments.PaymentType; +import com.checkout.payments.ProcessingSettings; +import com.checkout.payments.RiskRequest; +import com.checkout.payments.ShippingDetails; +import com.checkout.payments.ThreeDSRequest; +import com.checkout.payments.hosted.HostedPaymentRequest; +import com.checkout.payments.hosted.HostedPaymentResponse; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +HostedPaymentRequest request = HostedPaymentRequest.builder() + .amount(10L) + .reference("reference") + .currency(Currency.GBP) + .description("Payment") + .customer(new CustomerRequest(null, "email@docs.checkout.com", "Name", null)) + .shippingDetails(ShippingDetails.builder() + .address(Address.builder() + .addressLine1("Checkout") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build()) + .phone(Phone.builder().countryCode("1").number("415 555 2671").build()) + .build()) + .billing(BillingInformation.builder() + .address(Address.builder() + .addressLine1("Checkout") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build()) + .phone(Phone.builder().countryCode("1").number("415 555 2671").build()) + .build()) + .recipient(PaymentRecipient.builder() + .accountNumber("999999999") + .dateOfBirth("1985-05-15") + .lastName("LastName") + .zip("12345") + .build()) + .processing(ProcessingSettings.builder() + .aft(true) + .build()) + .products(Collections.singletonList(Product.builder() + .name("name") + .quantity(1L) + .price(200L) + .build())) + .risk(new RiskRequest(Boolean.FALSE)) + .locale("en-GB") + .threeDS(ThreeDSRequest.builder() + .enabled(Boolean.FALSE) + .attemptN3D(Boolean.FALSE) + .challengeIndicator(ChallengeIndicator.NO_CHALLENGE_REQUESTED) + .build()) + .capture(true) + .captureOn(Instant.now().plus(30, ChronoUnit.DAYS)) + .paymentType(PaymentType.REGULAR) + .billingDescriptor(BillingDescriptor.builder() + .city("London") + .name("name") + .build()) + .successUrl("https://docs.checkout.com/payments/success") + .failureUrl("https://docs.checkout.com/payments/success") + .cancelUrl("https://docs.checkout.com/payments/success") + .build(); + +try { + HostedPaymentResponse response = api.hostedPaymentsClient().createHostedPaymentsPageSession(request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} + diff --git a/abc_spec/code_samples/Java/hosted-payments@{id}/get.java b/abc_spec/code_samples/Java/hosted-payments@{id}/get.java new file mode 100644 index 000000000..135fcd2a3 --- /dev/null +++ b/abc_spec/code_samples/Java/hosted-payments@{id}/get.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.payments.hosted.HostedPaymentDetailsResponse; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + HostedPaymentDetailsResponse response = api.hostedPaymentsClient().getHostedPaymentsPageDetails("hosted_payment_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/instruments/post.java b/abc_spec/code_samples/Java/instruments/post.java new file mode 100644 index 000000000..727a69404 --- /dev/null +++ b/abc_spec/code_samples/Java/instruments/post.java @@ -0,0 +1,51 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.common.Address; +import com.checkout.common.CountryCode; +import com.checkout.common.InstrumentType; +import com.checkout.common.Phone; +import com.checkout.instruments.previous.CreateInstrumentRequest; +import com.checkout.instruments.previous.CreateInstrumentResponse; +import com.checkout.instruments.previous.InstrumentAccountHolder; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +CreateInstrumentRequest request = CreateInstrumentRequest.builder() + .type(InstrumentType.TOKEN) + .token("token") + .accountHolder(InstrumentAccountHolder.builder() + .billingAddress(Address.builder() + .addressLine1("Checkout") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build()) + .phone(Phone.builder().countryCode("1").number("415 555 2671").build()) + .build()) + .build(); + +try { + CreateInstrumentResponse response = api.instrumentsClient().create(request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/instruments@{id}/delete.java b/abc_spec/code_samples/Java/instruments@{id}/delete.java new file mode 100644 index 000000000..885a80ca7 --- /dev/null +++ b/abc_spec/code_samples/Java/instruments@{id}/delete.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.EmptyResponse; +import com.checkout.Environment; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + EmptyResponse response = api.instrumentsClient().delete("instrument_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/instruments@{id}/get.java b/abc_spec/code_samples/Java/instruments@{id}/get.java new file mode 100644 index 000000000..f13ec74f2 --- /dev/null +++ b/abc_spec/code_samples/Java/instruments@{id}/get.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.instruments.previous.InstrumentDetailsResponse; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + InstrumentDetailsResponse response = api.instrumentsClient().get("instrument_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/instruments@{id}/patch.java b/abc_spec/code_samples/Java/instruments@{id}/patch.java new file mode 100644 index 000000000..a1355852e --- /dev/null +++ b/abc_spec/code_samples/Java/instruments@{id}/patch.java @@ -0,0 +1,55 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.common.Address; +import com.checkout.common.CountryCode; +import com.checkout.common.Phone; +import com.checkout.instruments.previous.InstrumentAccountHolder; +import com.checkout.instruments.previous.UpdateInstrumentRequest; +import com.checkout.instruments.previous.UpdateInstrumentResponse; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +UpdateInstrumentRequest updateRequest = UpdateInstrumentRequest.builder() + .name("New name") + .expiryMonth(10) + .expiryYear(2025) + .accountHolder(InstrumentAccountHolder.builder() + .billingAddress(Address.builder() + .addressLine1("Checkout") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build()) + .phone(Phone.builder().countryCode("1").number("415 555 2671").build()) + .build()) + .customer(UpdateInstrumentRequest.Customer.builder() + .id("customer_id") + .isDefault(true) + .build()) + .build(); + +try { + UpdateInstrumentResponse response = api.instrumentsClient().update("instrument_id", updateRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/payment-links/post.java b/abc_spec/code_samples/Java/payment-links/post.java new file mode 100644 index 000000000..716496eca --- /dev/null +++ b/abc_spec/code_samples/Java/payment-links/post.java @@ -0,0 +1,105 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.common.Address; +import com.checkout.common.ChallengeIndicator; +import com.checkout.common.CountryCode; +import com.checkout.common.Currency; +import com.checkout.common.CustomerRequest; +import com.checkout.common.Phone; +import com.checkout.common.Product; +import com.checkout.payments.BillingDescriptor; +import com.checkout.payments.BillingInformation; +import com.checkout.payments.PaymentRecipient; +import com.checkout.payments.PaymentType; +import com.checkout.payments.ProcessingSettings; +import com.checkout.payments.RiskRequest; +import com.checkout.payments.ShippingDetails; +import com.checkout.payments.ThreeDSRequest; +import com.checkout.payments.links.PaymentLinkRequest; +import com.checkout.payments.links.PaymentLinkResponse; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +PaymentLinkRequest paymentLinksRequest = PaymentLinkRequest.builder() + .amount(10L) + .currency(Currency.GBP) + .reference("reference") + .description("description") + .expiresIn(604800) + .customer(new CustomerRequest(null, "email@docs.checkout.com", "Name", null)) + .shipping(ShippingDetails.builder() + .address(Address.builder() + .addressLine1("Checkout") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build()) + .phone(Phone.builder().countryCode("1").number("415 555 2671").build()) + .build()) + .billing(BillingInformation.builder() + .address(Address.builder() + .addressLine1("Checkout") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build()) + .phone(Phone.builder().countryCode("1").number("415 555 2671").build()) + .build()) + .recipient(PaymentRecipient.builder() + .accountNumber("999999999") + .dateOfBirth("1985-05-15") + .lastName("LastName") + .zip("12345") + .build()) + .processing(ProcessingSettings.builder() + .aft(true) + .build()) + .capture(true) + .captureOn(Instant.now().plus(30, ChronoUnit.DAYS)) + .products(Collections.singletonList(Product.builder() + .name("name") + .quantity(1L) + .price(200L) + .build())) + .threeDS(ThreeDSRequest.builder() + .enabled(Boolean.FALSE) + .attemptN3D(Boolean.FALSE) + .challengeIndicator(ChallengeIndicator.NO_CHALLENGE_REQUESTED) + .build()) + .risk(new RiskRequest(Boolean.FALSE)) + .returnUrl("https://docs.checkout.com/success") + .locale("en-GB") + .paymentType(PaymentType.REGULAR) + .billingDescriptor(BillingDescriptor.builder() + .city("London") + .name("name") + .build()) + .build(); + +try { + PaymentLinkResponse response = api.paymentLinksClient().createPaymentLink(paymentLinksRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/payment-links@{id}/get.java b/abc_spec/code_samples/Java/payment-links@{id}/get.java new file mode 100644 index 000000000..d8afda3fc --- /dev/null +++ b/abc_spec/code_samples/Java/payment-links@{id}/get.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.payments.links.PaymentLinkDetailsResponse; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + PaymentLinkDetailsResponse response = api.paymentLinksClient().getPaymentLink("payment_link_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/payments/post.java b/abc_spec/code_samples/Java/payments/post.java new file mode 100644 index 000000000..94d49b888 --- /dev/null +++ b/abc_spec/code_samples/Java/payments/post.java @@ -0,0 +1,61 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.common.Address; +import com.checkout.common.CountryCode; +import com.checkout.common.Currency; +import com.checkout.common.Phone; +import com.checkout.payments.previous.request.PaymentRequest; +import com.checkout.payments.previous.request.source.RequestCardSource; +import com.checkout.payments.previous.response.PaymentResponse; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +RequestCardSource source = RequestCardSource.builder() + .name("name") + .number("number") + .expiryMonth(12) + .expiryYear(2025) + .cvv("123") + .stored(false) + .billingAddress(Address.builder() + .addressLine1("Checkout") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build()) + .phone(Phone.builder().countryCode("1").number("415 555 2671").build()) + .build(); + +PaymentRequest paymentRequest = PaymentRequest.builder() + .source(source) + .capture(true) + .reference("reference") + .amount(10L) + .currency(Currency.GBP) + .build(); + +try { + PaymentResponse response = api.paymentsClient().requestPayment(paymentRequest).get(); // or "requestPayout" +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/payments@{id}/get.java b/abc_spec/code_samples/Java/payments@{id}/get.java new file mode 100644 index 000000000..a44243dd0 --- /dev/null +++ b/abc_spec/code_samples/Java/payments@{id}/get.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.payments.previous.response.GetPaymentResponse; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + GetPaymentResponse response = api.paymentsClient().getPayment("payment_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/payments@{id}@actions/get.java b/abc_spec/code_samples/Java/payments@{id}@actions/get.java new file mode 100644 index 000000000..f14e27ca5 --- /dev/null +++ b/abc_spec/code_samples/Java/payments@{id}@actions/get.java @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.ItemsResponse; +import com.checkout.payments.previous.PaymentAction; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + ItemsResponse response = api.paymentsClient().getPaymentActions("payment_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/payments@{id}@captures/post.java b/abc_spec/code_samples/Java/payments@{id}@captures/post.java new file mode 100644 index 000000000..07df01055 --- /dev/null +++ b/abc_spec/code_samples/Java/payments@{id}@captures/post.java @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.payments.CaptureRequest; +import com.checkout.payments.CaptureResponse; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +CaptureRequest captureRequest = CaptureRequest.builder() + .reference("partial capture") + .amount(10L) + .metadata(new HashMap<>()) + .build(); + +try { + // or, capturePayment("payment_id") for a full capture + CaptureResponse response = api.paymentsClient().capturePayment("payment_id", captureRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/payments@{id}@refunds/post.java b/abc_spec/code_samples/Java/payments@{id}@refunds/post.java new file mode 100644 index 000000000..948f87c1e --- /dev/null +++ b/abc_spec/code_samples/Java/payments@{id}@refunds/post.java @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.payments.RefundRequest; +import com.checkout.payments.RefundResponse; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +RefundRequest refundRequest = RefundRequest.builder() + .reference("partial refund") + .amount(10L) + .metadata(new HashMap<>()) + .build(); + +try { + // or, refundPayment("payment_id") for a full refund + RefundResponse response = api.paymentsClient().refundPayment("payment_id", refundRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/payments@{id}@voids/post.java b/abc_spec/code_samples/Java/payments@{id}@voids/post.java new file mode 100644 index 000000000..d96fe61c5 --- /dev/null +++ b/abc_spec/code_samples/Java/payments@{id}@voids/post.java @@ -0,0 +1,36 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.payments.VoidRequest; +import com.checkout.payments.VoidResponse; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +VoidRequest voidRequest = VoidRequest.builder() + .reference("reference") + .metadata(new HashMap<>()) + .build(); + +try { + // or, voidPayment("payment_id") + VoidResponse response = api.paymentsClient().voidPayment("payment_id", voidRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/reporting@payments/get.java b/abc_spec/code_samples/Java/reporting@payments/get.java new file mode 100644 index 000000000..212324bcc --- /dev/null +++ b/abc_spec/code_samples/Java/reporting@payments/get.java @@ -0,0 +1,38 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.previous.CheckoutApi; +import com.checkout.reconciliation.previous.ReconciliationPaymentReportResponse; +import com.checkout.reconciliation.previous.ReconciliationQueryPaymentsFilter; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +ReconciliationQueryPaymentsFilter filter = ReconciliationQueryPaymentsFilter + .builder() + .from(Instant.parse(LocalDateTime.now().minusMonths(2).toInstant(ZoneOffset.UTC).toString())) + .to(Instant.parse(LocalDateTime.now().toInstant(ZoneOffset.UTC).toString())) + .reference("reference") + .limit(1) + .build(); + +try { + ReconciliationPaymentReportResponse response = api.reconciliationClient().queryPaymentsReport(filter).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/reporting@payments@download/get.java b/abc_spec/code_samples/Java/reporting@payments@download/get.java new file mode 100644 index 000000000..cb1aa678a --- /dev/null +++ b/abc_spec/code_samples/Java/reporting@payments@download/get.java @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.ContentResponse; +import com.checkout.Environment; +import com.checkout.common.QueryFilterDateRange; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +QueryFilterDateRange queryFilterDateRange = QueryFilterDateRange.builder() + .from(LocalDateTime.now().minus(1, ChronoUnit.MONTHS).toInstant(ZoneOffset.UTC)) + .to(Instant.now()) + .build(); + +try { + // The second parameter is optional. Specifies the path where a file with the content returned is saved. If the file + // does not exist, the client will attempt to create a new one, otherwise the existing file will be rewritten. + ContentResponse response = api.reconciliationClient().retrieveCSVPaymentReport(queryFilterDateRange, "/path/to/file.csv").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/reporting@payments@{paymentId}/get.java b/abc_spec/code_samples/Java/reporting@payments@{paymentId}/get.java new file mode 100644 index 000000000..5fa232d54 --- /dev/null +++ b/abc_spec/code_samples/Java/reporting@payments@{paymentId}/get.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.previous.CheckoutApi; +import com.checkout.reconciliation.previous.ReconciliationPaymentReportResponse; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + ReconciliationPaymentReportResponse response = api.reconciliationClient().singlePaymentReportAsync("payment_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/reporting@statements/get.java b/abc_spec/code_samples/Java/reporting@statements/get.java new file mode 100644 index 000000000..20a9e324e --- /dev/null +++ b/abc_spec/code_samples/Java/reporting@statements/get.java @@ -0,0 +1,36 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.common.QueryFilterDateRange; +import com.checkout.previous.CheckoutApi; +import com.checkout.reconciliation.previous.StatementReportResponse; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +QueryFilterDateRange filter = QueryFilterDateRange + .builder() + .from(Instant.parse(LocalDateTime.now().minusMonths(2).toInstant(ZoneOffset.UTC).toString())) + .to(Instant.parse(LocalDateTime.now().toInstant(ZoneOffset.UTC).toString())) + .build(); + +try { + StatementReportResponse response = api.reconciliationClient().queryStatementsReport(filter).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/reporting@statements@download/get.java b/abc_spec/code_samples/Java/reporting@statements@download/get.java new file mode 100644 index 000000000..3406055b9 --- /dev/null +++ b/abc_spec/code_samples/Java/reporting@statements@download/get.java @@ -0,0 +1,38 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.ContentResponse; +import com.checkout.Environment; +import com.checkout.common.QueryFilterDateRange; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +QueryFilterDateRange filter = QueryFilterDateRange + .builder() + .from(Instant.parse(LocalDateTime.now().minusMonths(2).toInstant(ZoneOffset.UTC).toString())) + .to(Instant.parse(LocalDateTime.now().toInstant(ZoneOffset.UTC).toString())) + .build(); + +try { + // The second parameter is optional. Specifies the path where a file with the content returned is saved. If the file + // does not exist, the client will attempt to create a new one, otherwise the existing file will be rewritten. + ContentResponse response = api.reconciliationClient().retrieveCSVStatementsReport(filter, "path/to/download").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/reporting@statements@{statementId}@payments@download/get.java b/abc_spec/code_samples/Java/reporting@statements@{statementId}@payments@download/get.java new file mode 100644 index 000000000..c85233245 --- /dev/null +++ b/abc_spec/code_samples/Java/reporting@statements@{statementId}@payments@download/get.java @@ -0,0 +1,31 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.ContentResponse; +import com.checkout.Environment; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + // The second parameter is optional. Specifies the path where a file with the content returned is saved. If the file + // does not exist, the client will attempt to create a new one, otherwise the existing file will be rewritten. + ContentResponse response = api.reconciliationClient().retrieveCSVSingleStatementReport("id", "/path/to/file.csv").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/risk@assessments@pre-authentication/post.java b/abc_spec/code_samples/Java/risk@assessments@pre-authentication/post.java new file mode 100644 index 000000000..427118487 --- /dev/null +++ b/abc_spec/code_samples/Java/risk@assessments@pre-authentication/post.java @@ -0,0 +1,91 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.common.Address; +import com.checkout.common.CountryCode; +import com.checkout.common.Currency; +import com.checkout.common.CustomerRequest; +import com.checkout.common.Phone; +import com.checkout.previous.CheckoutApi; +import com.checkout.risk.Device; +import com.checkout.risk.Location; +import com.checkout.risk.RiskPayment; +import com.checkout.risk.RiskShippingDetails; +import com.checkout.risk.preauthentication.PreAuthenticationAssessmentRequest; +import com.checkout.risk.preauthentication.PreAuthenticationAssessmentResponse; +import com.checkout.risk.source.CardSourcePrism; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +CardSourcePrism cardSourcePrism = CardSourcePrism.builder() + .billingAddress(Address.builder() + .addressLine1("Checkout") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build()) + .expiryMonth(10) + .expiryYear(2025) + .number("123456789") + .phone(Phone.builder().countryCode("1").number("415 555 2671").build()) + .build(); + +PreAuthenticationAssessmentRequest request = PreAuthenticationAssessmentRequest.builder() + .date(Instant.now()) + .source(cardSourcePrism) + .customer(new CustomerRequest(null, "email@docs.checkout.com", "Name", null)) + .payment(RiskPayment.builder().psp("checkout").id("123456789").build()) + .shipping(RiskShippingDetails.builder() + .address(Address.builder() + .addressLine1("Checkout") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build()) + .build()) + .reference("reference") + .description("description") + .amount(10L) + .currency(Currency.GBP) + .device(Device.builder() + .ip("90.197.169.245") + .location(Location.builder().longitude("0.1313").latitude("51.5107").build()) + .type("Phone") + .os("iOS") + .model("iPhone X") + .date(Instant.now()) + .userAgent("Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1") + .fingerprint("34304a9e3fg09302") + .build()) + .metadata(Stream.of( + new AbstractMap.SimpleImmutableEntry<>("VoucherCode", "loyalty_10"), + new AbstractMap.SimpleImmutableEntry<>("discountApplied", "10"), + new AbstractMap.SimpleImmutableEntry<>("customer_id", "2190EF321")) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue))) + .build(); + +try { + PreAuthenticationAssessmentResponse response = api.riskClient().requestPreAuthenticationRiskScan(request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/risk@assessments@pre-capture/post.java b/abc_spec/code_samples/Java/risk@assessments@pre-capture/post.java new file mode 100644 index 000000000..4eccdadb4 --- /dev/null +++ b/abc_spec/code_samples/Java/risk@assessments@pre-capture/post.java @@ -0,0 +1,62 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.common.Currency; +import com.checkout.common.CustomerRequest; +import com.checkout.previous.CheckoutApi; +import com.checkout.risk.Device; +import com.checkout.risk.RiskPayment; +import com.checkout.risk.RiskShippingDetails; +import com.checkout.risk.precapture.AuthenticationResult; +import com.checkout.risk.precapture.AuthorizationResult; +import com.checkout.risk.precapture.PreCaptureAssessmentRequest; +import com.checkout.risk.precapture.PreCaptureAssessmentResponse; +import com.checkout.risk.source.CustomerSourcePrism; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +PreCaptureAssessmentRequest request = PreCaptureAssessmentRequest.builder() + .date(Instant.MAX) + .source(CustomerSourcePrism.builder().build()) + .customer(new CustomerRequest(null, "email@docs.checkout.com", "Name", null)) + .payment(RiskPayment.builder().build()) + .shipping(RiskShippingDetails.builder().build()) + .amount(10L) + .currency(Currency.GBP) + .device(Device.builder().build()) + .metadata(new HashMap<>()) + .authenticationResult(AuthenticationResult.builder() + .attempted(true) + .challenged(true) + .liabilityShifted(true) + .method("3ds") + .succeeded(true) + .version("2.0") + .build()) + .authorizationResult(AuthorizationResult.builder() + .avsCode("V") + .cvvResult("N") + .build()) + .build(); + +try { + PreCaptureAssessmentResponse response = api.riskClient().requestPreCaptureRiskScan(request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/sources/post.java b/abc_spec/code_samples/Java/sources/post.java new file mode 100644 index 000000000..200337d94 --- /dev/null +++ b/abc_spec/code_samples/Java/sources/post.java @@ -0,0 +1,58 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.common.Address; +import com.checkout.common.CountryCode; +import com.checkout.common.Phone; +import com.checkout.previous.CheckoutApi; +import com.checkout.sources.previous.SepaSourceRequest; +import com.checkout.sources.previous.SourceData; +import com.checkout.sources.previous.SourceResponse; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +Address billingAddress = Address.builder() + .addressLine1("Checkout") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build(); + +SourceData sourceData = new SourceData(); + sourceData.put("first_name", "firstName"); + sourceData.put("last_name", "lastName"); + sourceData.put("account_iban", "iban"); + sourceData.put("bic", "bic"); + sourceData.put("billing_descriptor", "billingDescriptor"); + sourceData.put("mandate_type", "single"); + +SepaSourceRequest request = SepaSourceRequest.builder() + .billingAddress(billingAddress) + .phone(Phone.builder().countryCode("1").number("4155552671").build()) + .reference("reference") + .sourceData(sourceData) + .build(); + +try { + SourceResponse response = api.sourcesClient().createSepaSource(request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/Java/tokens/post.java b/abc_spec/code_samples/Java/tokens/post.java new file mode 100644 index 000000000..1c3ed4b9e --- /dev/null +++ b/abc_spec/code_samples/Java/tokens/post.java @@ -0,0 +1,48 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.common.Address; +import com.checkout.common.CountryCode; +import com.checkout.previous.CheckoutApi; +import com.checkout.tokens.CardTokenRequest; +import com.checkout.tokens.CardTokenResponse; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .publicKey("public_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +CardTokenRequest request = CardTokenRequest.builder() + .number("123456789") + .expiryMonth(10) + .expiryYear(2025) + .cvv("123") + .name("name") + .billingAddress(Address.builder() + .addressLine1("Checkout") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build()) + .build(); + +try { + CardTokenResponse response = api.tokensClient().requestCardToken(request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/webhooks/get.java b/abc_spec/code_samples/Java/webhooks/get.java new file mode 100644 index 000000000..3fef12d86 --- /dev/null +++ b/abc_spec/code_samples/Java/webhooks/get.java @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.ItemsResponse; +import com.checkout.previous.CheckoutApi; +import com.checkout.webhooks.previous.WebhookResponse; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + ItemsResponse response = api.webhooksClient().retrieveWebhooks().get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/webhooks/post.java b/abc_spec/code_samples/Java/webhooks/post.java new file mode 100644 index 000000000..1dcde5eba --- /dev/null +++ b/abc_spec/code_samples/Java/webhooks/post.java @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.previous.CheckoutApi; +import com.checkout.webhooks.previous.WebhookRequest; +import com.checkout.webhooks.previous.WebhookResponse; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +WebhookRequest webhookRequest = WebhookRequest.builder() + .url("https://docs.checkout.com/webhook") + .eventTypes(Arrays.asList("payment_captured", "payment_approved", "payment_declined")) + .build(); + +try { + WebhookResponse response = api.webhooksClient().registerWebhook(webhookRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/webhooks@{id}/delete.java b/abc_spec/code_samples/Java/webhooks@{id}/delete.java new file mode 100644 index 000000000..9b42fb723 --- /dev/null +++ b/abc_spec/code_samples/Java/webhooks@{id}/delete.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.EmptyResponse; +import com.checkout.Environment; +import com.checkout.previous.CheckoutApi; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + EmptyResponse response = api.webhooksClient().removeWebhook("webhook_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/webhooks@{id}/get.java b/abc_spec/code_samples/Java/webhooks@{id}/get.java new file mode 100644 index 000000000..904cc99a6 --- /dev/null +++ b/abc_spec/code_samples/Java/webhooks@{id}/get.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.previous.CheckoutApi; +import com.checkout.webhooks.previous.WebhookResponse; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + WebhookResponse response = api.webhooksClient().retrieveWebhook("webhook_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/webhooks@{id}/patch.java b/abc_spec/code_samples/Java/webhooks@{id}/patch.java new file mode 100644 index 000000000..9c8be60e4 --- /dev/null +++ b/abc_spec/code_samples/Java/webhooks@{id}/patch.java @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.previous.CheckoutApi; +import com.checkout.webhooks.previous.WebhookRequest; +import com.checkout.webhooks.previous.WebhookResponse; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +WebhookRequest webhookRequest = WebhookRequest.builder() + .url("https://docs.checkout.com/webhooks/updated") + .eventTypes(Arrays.asList("payment_captured", "payment_approved", "payment_declined")) + .build(); + +try { + WebhookResponse response = api.webhooksClient().updateWebhook("webhookId", webhookRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Java/webhooks@{id}/put.java b/abc_spec/code_samples/Java/webhooks@{id}/put.java new file mode 100644 index 000000000..4b1a57fba --- /dev/null +++ b/abc_spec/code_samples/Java/webhooks@{id}/put.java @@ -0,0 +1,33 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.previous.CheckoutApi; +import com.checkout.webhooks.previous.WebhookRequest; +import com.checkout.webhooks.previous.WebhookResponse; + +CheckoutApi api = CheckoutSdk + .builder() + .previous() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +WebhookRequest webhookRequest = WebhookRequest.builder().build(); +webhookRequest.setUrl("https://docs.checkout.com/webhooks/updated"); + +try { + WebhookResponse response = api.webhooksClient().updateWebhook("webhook_id", webhookRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/abc_spec/code_samples/Node/customers/post.js b/abc_spec/code_samples/Node/customers/post.js new file mode 100644 index 000000000..51ea5d0aa --- /dev/null +++ b/abc_spec/code_samples/Node/customers/post.js @@ -0,0 +1,20 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const customerResponse = await cko.customers.create({ + email: 'JohnTest@test.com', + name: 'John Test', + phone: { + country_code: '+1', + number: '4155552671', + }, + metadata: { + coupon_code: 'NY2018', + partner_id: 123989, + }, + }); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/customers@{identifier}/delete.js b/abc_spec/code_samples/Node/customers@{identifier}/delete.js new file mode 100644 index 000000000..07de38978 --- /dev/null +++ b/abc_spec/code_samples/Node/customers@{identifier}/delete.js @@ -0,0 +1,9 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const customerResponse = await cko.customers.delete('cus_zbgrqmm6s5ne7lszegj5iu4lci'); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/customers@{identifier}/get.js b/abc_spec/code_samples/Node/customers@{identifier}/get.js new file mode 100644 index 000000000..01506251d --- /dev/null +++ b/abc_spec/code_samples/Node/customers@{identifier}/get.js @@ -0,0 +1,9 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const customerResponse = await cko.customers.get('cus_2tvaccfvs3lulevzg42vgyvtdq'); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/customers@{identifier}/patch.js b/abc_spec/code_samples/Node/customers@{identifier}/patch.js new file mode 100644 index 000000000..a44daafdf --- /dev/null +++ b/abc_spec/code_samples/Node/customers@{identifier}/patch.js @@ -0,0 +1,11 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const customerResponse = await cko.customers.update('cus_2tvaccfvs3lulevzg42vgyvtdq', { + name: 'James Bond', + }); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/customers@{identifier}/update.js b/abc_spec/code_samples/Node/customers@{identifier}/update.js new file mode 100644 index 000000000..01506251d --- /dev/null +++ b/abc_spec/code_samples/Node/customers@{identifier}/update.js @@ -0,0 +1,9 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const customerResponse = await cko.customers.get('cus_2tvaccfvs3lulevzg42vgyvtdq'); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/customers@{id}/delete.js b/abc_spec/code_samples/Node/customers@{id}/delete.js new file mode 100644 index 000000000..62b9c5de9 --- /dev/null +++ b/abc_spec/code_samples/Node/customers@{id}/delete.js @@ -0,0 +1,9 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const customerResponse = await cko.customers.delete('cus_2tvaccfvs3lulevzg42vgyvtdq'); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/disputes/get.js b/abc_spec/code_samples/Node/disputes/get.js new file mode 100644 index 000000000..ddc5848e6 --- /dev/null +++ b/abc_spec/code_samples/Node/disputes/get.js @@ -0,0 +1,8 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const disputes = await cko.disputes.get({ + limit: 5, + id: 'dsp_bc94ebda8d275i461229', +}); diff --git a/abc_spec/code_samples/Node/disputes@{dispute_id}/get.js b/abc_spec/code_samples/Node/disputes@{dispute_id}/get.js new file mode 100644 index 000000000..7bb47b340 --- /dev/null +++ b/abc_spec/code_samples/Node/disputes@{dispute_id}/get.js @@ -0,0 +1,5 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const disputeDetails = await cko.disputes.getDetails('dsp_bc94ebda8d275i461229'); diff --git a/abc_spec/code_samples/Node/disputes@{dispute_id}@accept/post.js b/abc_spec/code_samples/Node/disputes@{dispute_id}@accept/post.js new file mode 100644 index 000000000..006f9fcef --- /dev/null +++ b/abc_spec/code_samples/Node/disputes@{dispute_id}@accept/post.js @@ -0,0 +1,5 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const accept = await cko.disputes.accept('dsp_bc94ebda8d275i461229'); diff --git a/abc_spec/code_samples/Node/disputes@{dispute_id}@evidence/get.js b/abc_spec/code_samples/Node/disputes@{dispute_id}@evidence/get.js new file mode 100644 index 000000000..c19c4265f --- /dev/null +++ b/abc_spec/code_samples/Node/disputes@{dispute_id}@evidence/get.js @@ -0,0 +1,5 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const getEvidence = await cko.disputes.getEvidence('dsp_bc94ebda8d275i461229'); diff --git a/abc_spec/code_samples/Node/disputes@{dispute_id}@evidence/post.js b/abc_spec/code_samples/Node/disputes@{dispute_id}@evidence/post.js new file mode 100644 index 000000000..3727fff9d --- /dev/null +++ b/abc_spec/code_samples/Node/disputes@{dispute_id}@evidence/post.js @@ -0,0 +1,5 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const submitEvidence = await cko.disputes.submit('dsp_bc94ebda8d275i461229'); diff --git a/abc_spec/code_samples/Node/disputes@{dispute_id}@evidence/put.js b/abc_spec/code_samples/Node/disputes@{dispute_id}@evidence/put.js new file mode 100644 index 000000000..18d3b0cad --- /dev/null +++ b/abc_spec/code_samples/Node/disputes@{dispute_id}@evidence/put.js @@ -0,0 +1,7 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const evidence = await cko.disputes.provideEvidence('dsp_bc94ebda8d275i461229', { + proof_of_delivery_or_service_text: 'http://checkout.com/document.pdf', +}); diff --git a/abc_spec/code_samples/Node/event-types/get.js b/abc_spec/code_samples/Node/event-types/get.js new file mode 100644 index 000000000..2d22a8df0 --- /dev/null +++ b/abc_spec/code_samples/Node/event-types/get.js @@ -0,0 +1,5 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const events = await cko.events.retrieveEventTypes(); diff --git a/abc_spec/code_samples/Node/events/get.js b/abc_spec/code_samples/Node/events/get.js new file mode 100644 index 000000000..171c96681 --- /dev/null +++ b/abc_spec/code_samples/Node/events/get.js @@ -0,0 +1,11 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const events = await cko.events.retrieveEvents({ + reference: 'ORD-5023-4E89', + }); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/events@{eventId}/get.js b/abc_spec/code_samples/Node/events@{eventId}/get.js new file mode 100644 index 000000000..d886a50cd --- /dev/null +++ b/abc_spec/code_samples/Node/events@{eventId}/get.js @@ -0,0 +1,5 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const event = await cko.events.retrieveEvent('evt_c2qelfixai2u3es3ksovngkx3e'); diff --git a/abc_spec/code_samples/Node/events@{eventId}@notifications@{notificationId}/get.js b/abc_spec/code_samples/Node/events@{eventId}@notifications@{notificationId}/get.js new file mode 100644 index 000000000..2bc087028 --- /dev/null +++ b/abc_spec/code_samples/Node/events@{eventId}@notifications@{notificationId}/get.js @@ -0,0 +1,8 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const notification = await cko.events.retrieveEventNotification({ + eventId: 'evt_c2qelfixai2u3es3ksovngkx3e', + notificationId: 'ntf_wqjkqpgjy33uxoywcej4fnw6qm', +}); diff --git a/abc_spec/code_samples/Node/events@{eventId}@webhooks@retry/post.js b/abc_spec/code_samples/Node/events@{eventId}@webhooks@retry/post.js new file mode 100644 index 000000000..d661f77b8 --- /dev/null +++ b/abc_spec/code_samples/Node/events@{eventId}@webhooks@retry/post.js @@ -0,0 +1,5 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const retryAll = await cko.events.retryAll('evt_c2qelfixai2u3es3ksovngkx3e'); diff --git a/abc_spec/code_samples/Node/events@{eventId}@webhooks@{webhookId}@retry/post.js b/abc_spec/code_samples/Node/events@{eventId}@webhooks@{webhookId}@retry/post.js new file mode 100644 index 000000000..1cae1638e --- /dev/null +++ b/abc_spec/code_samples/Node/events@{eventId}@webhooks@{webhookId}@retry/post.js @@ -0,0 +1,8 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const retry = await cko.events.retry({ + eventId: 'evt_c2qelfixai2u3es3ksovngkx3e', + webhookId: 'wh_mpkyioafmajulnhjvwmrklenb4', +}); diff --git a/abc_spec/code_samples/Node/files/post.js b/abc_spec/code_samples/Node/files/post.js new file mode 100644 index 000000000..bc2a82821 --- /dev/null +++ b/abc_spec/code_samples/Node/files/post.js @@ -0,0 +1,8 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const file = await cko.files.upload({ + path: fs.createReadStream('./test/files/evidence.jpg'), + purpose: 'dispute_evidence', +}); diff --git a/abc_spec/code_samples/Node/files@{file_id}/get.js b/abc_spec/code_samples/Node/files@{file_id}/get.js new file mode 100644 index 000000000..a8a273c9e --- /dev/null +++ b/abc_spec/code_samples/Node/files@{file_id}/get.js @@ -0,0 +1,5 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const getFile = await cko.files.getFile('file_zna32sccqbwevd3ldmejtplbhu'); diff --git a/abc_spec/code_samples/Node/hosted-payments/post.js b/abc_spec/code_samples/Node/hosted-payments/post.js new file mode 100644 index 000000000..087b0936f --- /dev/null +++ b/abc_spec/code_samples/Node/hosted-payments/post.js @@ -0,0 +1,25 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const hosted = await cko.hostedPayments.create({ + amount: 10, + currency: 'USD', + billing: { + address: { + address_line1: 'Checkout.com', + address_line2: '90 Tottenham Court Road', + city: 'London', + state: 'London', + zip: 'W1T 4TJ', + country: 'GB', + }, + }, + success_url: 'https://example.com/success', + cancel_url: 'https://example.com/cancel', + failure_url: 'https://example.com/failure', + }); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/hosted-payments@{id}/get.js b/abc_spec/code_samples/Node/hosted-payments@{id}/get.js new file mode 100644 index 000000000..ed32e5585 --- /dev/null +++ b/abc_spec/code_samples/Node/hosted-payments@{id}/get.js @@ -0,0 +1,9 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const hosted = await cko.hostedPayments.get('hpp_kQhs_fI9b8oQ'); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/instruments/post.js b/abc_spec/code_samples/Node/instruments/post.js new file mode 100644 index 000000000..52c127845 --- /dev/null +++ b/abc_spec/code_samples/Node/instruments/post.js @@ -0,0 +1,12 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const instrument = await cko.instruments.create({ + // infered type "token", + token: 'tok_bzi43qc6jeee5mmnfo4gnsnera', // Generated by Checkout.Frames + }); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/instruments@{id}/delete.js b/abc_spec/code_samples/Node/instruments@{id}/delete.js new file mode 100644 index 000000000..ea7222b89 --- /dev/null +++ b/abc_spec/code_samples/Node/instruments@{id}/delete.js @@ -0,0 +1,9 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const deleteOutcome = await cko.instruments.delete(instrument.id); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/instruments@{id}/get.js b/abc_spec/code_samples/Node/instruments@{id}/get.js new file mode 100644 index 000000000..ab12c6903 --- /dev/null +++ b/abc_spec/code_samples/Node/instruments@{id}/get.js @@ -0,0 +1,9 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const instrument = await cko.instruments.get('src_udfsqsgpjykutgs26fiejgizau'); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/instruments@{id}/patch.js b/abc_spec/code_samples/Node/instruments@{id}/patch.js new file mode 100644 index 000000000..f66fd58ba --- /dev/null +++ b/abc_spec/code_samples/Node/instruments@{id}/patch.js @@ -0,0 +1,11 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const instrumentResponse = await cko.instruments.update('src_udfsqsgpjykutgs26fiejgizau', { + expiry_year: 2030, + }); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/payment-links/post.js b/abc_spec/code_samples/Node/payment-links/post.js new file mode 100644 index 000000000..6a2a54362 --- /dev/null +++ b/abc_spec/code_samples/Node/payment-links/post.js @@ -0,0 +1,30 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const linksResponse = await cko.paymentLinks.create({ + amount: 10359, + currency: 'EUR', + billing: { + address: { + country: 'DE', + }, + }, + products: [ + { + name: 'Moonlight blue lightsaber', + quantity: 2, + price: 3999, + }, + { + name: 'Stainless steel watch strap', + quantity: 1, + price: 2361, + }, + ], + return_url: 'https://pay.sandbox.checkout.com/link/examples/docs', + }); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/payment-links@{id}/get.js b/abc_spec/code_samples/Node/payment-links@{id}/get.js new file mode 100644 index 000000000..07073c0be --- /dev/null +++ b/abc_spec/code_samples/Node/payment-links@{id}/get.js @@ -0,0 +1,5 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const payment = await cko.paymentLinks.get('pl_XXXX'); diff --git a/abc_spec/code_samples/Node/payments/post.js b/abc_spec/code_samples/Node/payments/post.js new file mode 100644 index 000000000..daf38a458 --- /dev/null +++ b/abc_spec/code_samples/Node/payments/post.js @@ -0,0 +1,38 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const payment = await cko.payments.request({ + source: { + // inferred type: "token" + token: 'tok_bzi43qc6jeee5mmnfo4gnsnera', // Generated by Checkout.Frames + billing_address: { + address_line1: 'Wall Street', + address_line2: 'Dollar Avenue', + city: 'London', + state: 'London', + zip: 'W1W W1W', + country: 'GB', + }, + phone: { + country_code: '44', + number: '7123456789', + }, + }, + currency: 'USD', + amount: 1000, + payment_type: 'Regular', + reference: 'ORDER 1234', + description: 'Mint Tea', + customer: { + email: 'new_user@email.com', + name: 'John Smith', + }, + metadata: { + value: 'My value', + }, + }); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/payments@{id}/get.js b/abc_spec/code_samples/Node/payments@{id}/get.js new file mode 100644 index 000000000..113a4ad64 --- /dev/null +++ b/abc_spec/code_samples/Node/payments@{id}/get.js @@ -0,0 +1,5 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const payment = await cko.payments.get('pay_je5hbbb4u3oe7k4u3lbwlu3zkq'); diff --git a/abc_spec/code_samples/Node/payments@{id}@actions/get.js b/abc_spec/code_samples/Node/payments@{id}@actions/get.js new file mode 100644 index 000000000..7327dd0d2 --- /dev/null +++ b/abc_spec/code_samples/Node/payments@{id}@actions/get.js @@ -0,0 +1,5 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const payment = await cko.payments.getActions('pay_je5hbbb4u3oe7k4u3lbwlu3zkq'); diff --git a/abc_spec/code_samples/Node/payments@{id}@captures/post.js b/abc_spec/code_samples/Node/payments@{id}@captures/post.js new file mode 100644 index 000000000..37610640d --- /dev/null +++ b/abc_spec/code_samples/Node/payments@{id}@captures/post.js @@ -0,0 +1,11 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const payment = await cko.payments.capture('pay_je5hbbb4u3oe7k4u3lbwlu3zkq', { + amount: 1000, + reference: 'CAPTURE ORDER 1234', + metadata: { + value: 'my value', + }, +}); diff --git a/abc_spec/code_samples/Node/payments@{id}@refunds/post.js b/abc_spec/code_samples/Node/payments@{id}@refunds/post.js new file mode 100644 index 000000000..2c45ee747 --- /dev/null +++ b/abc_spec/code_samples/Node/payments@{id}@refunds/post.js @@ -0,0 +1,11 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const payment = await cko.payments.refund('pay_je5hbbb4u3oe7k4u3lbwlu3zkq', { + amount: 1000, + reference: 'REFUND ORDER 1234', + metadata: { + value: 'my value', + }, +}); diff --git a/abc_spec/code_samples/Node/payments@{id}@voids/post.js b/abc_spec/code_samples/Node/payments@{id}@voids/post.js new file mode 100644 index 000000000..858d4d200 --- /dev/null +++ b/abc_spec/code_samples/Node/payments@{id}@voids/post.js @@ -0,0 +1,11 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const payment = await cko.payments.void('pay_je5hbbb4u3oe7k4u3lbwlu3zkq', { + amount: 1000, + reference: 'VOID ORDER 1234', + metadata: { + value: 'my value', + }, +}); diff --git a/abc_spec/code_samples/Node/reporting@payments/get.js b/abc_spec/code_samples/Node/reporting@payments/get.js new file mode 100644 index 000000000..a41644d0b --- /dev/null +++ b/abc_spec/code_samples/Node/reporting@payments/get.js @@ -0,0 +1,12 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const reconciliation = await cko.reconciliation.getPayments({ + from: '2019-05-17T16:48:52Z', + to: '2019-06-17T16:48:52Z', + }); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/reporting@payments@download/get.js b/abc_spec/code_samples/Node/reporting@payments@download/get.js new file mode 100644 index 000000000..d6a16dd21 --- /dev/null +++ b/abc_spec/code_samples/Node/reporting@payments@download/get.js @@ -0,0 +1,12 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const reconciliation = await cko.reconciliation.getPaymentsCsv({ + from: '2019-05-17T16:48:52Z', + to: '2019-06-17T16:48:52Z', + }); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/reporting@payments@{paymentId}/get.js b/abc_spec/code_samples/Node/reporting@payments@{paymentId}/get.js new file mode 100644 index 000000000..5548cbc41 --- /dev/null +++ b/abc_spec/code_samples/Node/reporting@payments@{paymentId}/get.js @@ -0,0 +1,9 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const reconciliation = await cko.reconciliation.getPayment('pay_nezg6bx2k22utmk4xm5s2ughxi'); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/reporting@statements/get.js b/abc_spec/code_samples/Node/reporting@statements/get.js new file mode 100644 index 000000000..5b86929fa --- /dev/null +++ b/abc_spec/code_samples/Node/reporting@statements/get.js @@ -0,0 +1,12 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const statements = await cko.reconciliation.getStatements({ + from: '2019-05-17T16:48:52Z', + to: '2019-06-17T16:48:52Z', + }); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/reporting@statements@download/get.js b/abc_spec/code_samples/Node/reporting@statements@download/get.js new file mode 100644 index 000000000..ec5e09efe --- /dev/null +++ b/abc_spec/code_samples/Node/reporting@statements@download/get.js @@ -0,0 +1,9 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const statement = await cko.reconciliation.getStatementCsv('155613B100981'); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/risk@assessments@pre-authentication/post.js b/abc_spec/code_samples/Node/risk@assessments@pre-authentication/post.js new file mode 100644 index 000000000..0b29cf260 --- /dev/null +++ b/abc_spec/code_samples/Node/risk@assessments@pre-authentication/post.js @@ -0,0 +1,14 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const risk = await cko.risk.requestPreAuthentication({ + source: { + type: 'token', + token: 'tok_XXX', + }, + }); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/risk@assessments@pre-capture/post.js b/abc_spec/code_samples/Node/risk@assessments@pre-capture/post.js new file mode 100644 index 000000000..467f61857 --- /dev/null +++ b/abc_spec/code_samples/Node/risk@assessments@pre-capture/post.js @@ -0,0 +1,14 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const risk = await cko.risk.requestPreCapture({ + source: { + type: 'token', + token: 'tok_XXX', + }, + }); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/sources/post.js b/abc_spec/code_samples/Node/sources/post.js new file mode 100644 index 000000000..901454da5 --- /dev/null +++ b/abc_spec/code_samples/Node/sources/post.js @@ -0,0 +1,33 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +try { + const payment = await cko.sources.add({ + // infered type: "sepa" + reference: 'X-080957-N34', + source_data: { + first_name: 'Sophie', + last_name: 'Bonneville', + account_iban: 'DE25100100101234567893', + bic: 'PBNKDEFFXXX', + billing_descriptor: 'Thanks for shopping', + mandate_type: 'recurring', + }, + billing_address: { + address_line1: '101 Avenue de Gaulle', + city: 'Paris', + zip: '75013', + country: 'FR', + }, + phone: { + country_code: '+33', + number: '6 78 91 01 11', + }, + customer: { + email: 'sophie.bonneville@ckomail.com', + }, + }); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/tokens/post.js b/abc_spec/code_samples/Node/tokens/post.js new file mode 100644 index 000000000..3330fb965 --- /dev/null +++ b/abc_spec/code_samples/Node/tokens/post.js @@ -0,0 +1,21 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX', { pk: 'pk_YYYY' }); + +try { + const token = await cko.tokens.request({ + // infered type: "applepay" + token_data: { + version: 'EC_v1', + data: 't7GeajLB9skXB6QSWfEpPA4WPhDqB7ekdd+F7588arLzve...', + signature: 'MIAGCSqGbGUg...', + header: { + ephemeralPublicKey: 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgA...', + publicKeyHash: 'tqYV+tmG9aMh+l/K6cicUnPqkb1gUiLjSTM9gEz6...', + transactionId: '3cee89679130a4b...', + }, + }, + }); +} catch (err) { + console.log(err.name); +} diff --git a/abc_spec/code_samples/Node/webhooks/get.js b/abc_spec/code_samples/Node/webhooks/get.js new file mode 100644 index 000000000..349f87c18 --- /dev/null +++ b/abc_spec/code_samples/Node/webhooks/get.js @@ -0,0 +1,5 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const webhooks = await cko.webhooks.retrieveWebhooks(); diff --git a/abc_spec/code_samples/Node/webhooks/post.js b/abc_spec/code_samples/Node/webhooks/post.js new file mode 100644 index 000000000..8c122560f --- /dev/null +++ b/abc_spec/code_samples/Node/webhooks/post.js @@ -0,0 +1,13 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const webhook = await cko.webhooks.registerWebhook({ + url: 'https://example.com/webhook', + active: true, + headers: { + authorization: '1234', + }, + content_type: 'json', + event_types: ['payment_approved', 'payment_captured'], +}); diff --git a/abc_spec/code_samples/Node/webhooks@{id}/delete.js b/abc_spec/code_samples/Node/webhooks@{id}/delete.js new file mode 100644 index 000000000..638da1465 --- /dev/null +++ b/abc_spec/code_samples/Node/webhooks@{id}/delete.js @@ -0,0 +1,5 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const webhook = await cko.webhooks.removeWebhook('wh_ahun3lg7bf4e3lohbhni65335u'); diff --git a/abc_spec/code_samples/Node/webhooks@{id}/get.js b/abc_spec/code_samples/Node/webhooks@{id}/get.js new file mode 100644 index 000000000..9840283de --- /dev/null +++ b/abc_spec/code_samples/Node/webhooks@{id}/get.js @@ -0,0 +1,5 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const webhook = await cko.webhooks.retrieveWebhook('wh_tdt72zlbe7cudogxdgit6nwk6i'); diff --git a/abc_spec/code_samples/Node/webhooks@{id}/patch.js b/abc_spec/code_samples/Node/webhooks@{id}/patch.js new file mode 100644 index 000000000..73363f84c --- /dev/null +++ b/abc_spec/code_samples/Node/webhooks@{id}/patch.js @@ -0,0 +1,7 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const webhook = await cko.webhooks.partiallyUpdateWebhook('wh_ahun3lg7bf4e3lohbhni65335u', { + url: 'https://example.com/webhooks/updated', +}); diff --git a/abc_spec/code_samples/Node/webhooks@{id}/put.js b/abc_spec/code_samples/Node/webhooks@{id}/put.js new file mode 100644 index 000000000..c418ceaf3 --- /dev/null +++ b/abc_spec/code_samples/Node/webhooks@{id}/put.js @@ -0,0 +1,13 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const webhook = await cko.webhooks.updateWebhook('wh_ahun3lg7bf4e3lohbhni65335u', { + url: 'https://example.com/webhooks/updated', + active: true, + headers: { + authorization: '1234', + }, + content_type: 'json', + event_types: ['payment_approved', 'payment_captured'], +}); diff --git a/abc_spec/code_samples/PHP/customers/post.php b/abc_spec/code_samples/PHP/customers/post.php new file mode 100644 index 000000000..4f617cd3f --- /dev/null +++ b/abc_spec/code_samples/PHP/customers/post.php @@ -0,0 +1,35 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$phone = new Phone(); +$phone->country_code = "1"; +$phone->number = "4155552671"; + +$customerRequest = new CustomerRequest(); +$customerRequest->email = "email@docs.checkout.com"; +$customerRequest->name = "name"; +$customerRequest->phone = $phone; + +try { + $response = $api->getCustomersClient()->create($customerRequest); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/PHP/customers@{identifier}/delete.php b/abc_spec/code_samples/PHP/customers@{identifier}/delete.php new file mode 100644 index 000000000..f0abb158f --- /dev/null +++ b/abc_spec/code_samples/PHP/customers@{identifier}/delete.php @@ -0,0 +1,25 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getCustomersClient()->delete("customer_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/PHP/customers@{identifier}/get.php b/abc_spec/code_samples/PHP/customers@{identifier}/get.php new file mode 100644 index 000000000..c9b4e3d6b --- /dev/null +++ b/abc_spec/code_samples/PHP/customers@{identifier}/get.php @@ -0,0 +1,25 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getCustomersClient()->get("customer_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/customers@{identifier}/patch.php b/abc_spec/code_samples/PHP/customers@{identifier}/patch.php new file mode 100644 index 000000000..f837c6784 --- /dev/null +++ b/abc_spec/code_samples/PHP/customers@{identifier}/patch.php @@ -0,0 +1,36 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$phone = new Phone(); +$phone->country_code = "1"; +$phone->number = "4155552671"; + +$customerRequest = new CustomerRequest(); +$customerRequest->email = "email@docs.checkout.com"; +$customerRequest->name = "name"; +$customerRequest->phone = $phone; + +try { + $response = $api->getCustomersClient()->update("customer_id", $customerRequest); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/PHP/disputes/get.php b/abc_spec/code_samples/PHP/disputes/get.php new file mode 100644 index 000000000..f8945ca90 --- /dev/null +++ b/abc_spec/code_samples/PHP/disputes/get.php @@ -0,0 +1,41 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$query = new DisputesQueryFilter(); +$query->payment_id = "payment_id"; +$query->payment_arn = "payment_arn"; +$query->payment_reference = "payment_reference"; +$query->statuses = "comma,separated,list,statuses"; +$query->limit = 10; +$query->skip = 5; +$query->to = new DateTime(); // UTC, now + +$from = new DateTime(); +$from->setTimezone(new DateTimeZone("America/Mexico_City")); +$from->sub(new DateInterval("P1M")); +$query->from = $from; + +try { + $response = $api->getDisputesClient()->query($query); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/disputes@{dispute_id}/get.php b/abc_spec/code_samples/PHP/disputes@{dispute_id}/get.php new file mode 100644 index 000000000..6bb9439be --- /dev/null +++ b/abc_spec/code_samples/PHP/disputes@{dispute_id}/get.php @@ -0,0 +1,25 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getDisputesClient()->getDisputeDetails("dispute_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/PHP/disputes@{dispute_id}@accept/post.php b/abc_spec/code_samples/PHP/disputes@{dispute_id}@accept/post.php new file mode 100644 index 000000000..ce2f6999a --- /dev/null +++ b/abc_spec/code_samples/PHP/disputes@{dispute_id}@accept/post.php @@ -0,0 +1,26 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getDisputesClient()->accept("dispute_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} + diff --git a/abc_spec/code_samples/PHP/disputes@{dispute_id}@evidence/get.php b/abc_spec/code_samples/PHP/disputes@{dispute_id}@evidence/get.php new file mode 100644 index 000000000..1942254df --- /dev/null +++ b/abc_spec/code_samples/PHP/disputes@{dispute_id}@evidence/get.php @@ -0,0 +1,25 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getDisputesClient()->getEvidence("dispute_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/disputes@{dispute_id}@evidence/post.php b/abc_spec/code_samples/PHP/disputes@{dispute_id}@evidence/post.php new file mode 100644 index 000000000..2f3276270 --- /dev/null +++ b/abc_spec/code_samples/PHP/disputes@{dispute_id}@evidence/post.php @@ -0,0 +1,26 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getDisputesClient()->submitEvidence("evidence_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} + diff --git a/abc_spec/code_samples/PHP/disputes@{dispute_id}@evidence/put.php b/abc_spec/code_samples/PHP/disputes@{dispute_id}@evidence/put.php new file mode 100644 index 000000000..69518ad38 --- /dev/null +++ b/abc_spec/code_samples/PHP/disputes@{dispute_id}@evidence/put.php @@ -0,0 +1,36 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$request = new DisputeEvidenceRequest(); +$request->proof_of_delivery_or_service_file = "file_id"; +$request->proof_of_delivery_or_service_text = "proof of delivery or service text"; +$request->invoice_or_receipt_file = "file_id"; +$request->invoice_or_receipt_text = "Copy of the invoice"; +$request->customer_communication_file = "file_id"; +$request->customer_communication_text = "Copy of an email exchange with the cardholder"; +$request->additional_evidence_file = "file_id"; +$request->additional_evidence_text = "Scanned document"; + +try { + $response = $api->getDisputesClient()->putEvidence("dispute_id", $request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/event-types/get.php b/abc_spec/code_samples/PHP/event-types/get.php new file mode 100644 index 000000000..7e34a162f --- /dev/null +++ b/abc_spec/code_samples/PHP/event-types/get.php @@ -0,0 +1,31 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + /* + Specify API version: + "1.0" => Legacy API + "2.0" => Unified Payments API + null => all versions + */ + $response = $api->getEventsClient()->retrieveAllEventTypes(); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/events/get.php b/abc_spec/code_samples/PHP/events/get.php new file mode 100644 index 000000000..110c7eb65 --- /dev/null +++ b/abc_spec/code_samples/PHP/events/get.php @@ -0,0 +1,33 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$request = new RetrieveEventsRequest(); +$request->payment_id = "payment_id"; +$request->charge_id = "payment_arn"; +$request->reference = "reference"; +$request->limit = 10; +$request->skip = 5; + +try { + $response = $api->getEventsClient()->retrieveEvents($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/events@{eventId}/get.php b/abc_spec/code_samples/PHP/events@{eventId}/get.php new file mode 100644 index 000000000..7d41e11d8 --- /dev/null +++ b/abc_spec/code_samples/PHP/events@{eventId}/get.php @@ -0,0 +1,25 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getEventsClient()->retrieveEvent("event_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/events@{eventId}@notifications@{notificationId}/get.php b/abc_spec/code_samples/PHP/events@{eventId}@notifications@{notificationId}/get.php new file mode 100644 index 000000000..8a6203202 --- /dev/null +++ b/abc_spec/code_samples/PHP/events@{eventId}@notifications@{notificationId}/get.php @@ -0,0 +1,26 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getEventsClient()->retrieveEventNotification("event_id", "notification_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} + diff --git a/abc_spec/code_samples/PHP/events@{eventId}@webhooks@retry/post.php b/abc_spec/code_samples/PHP/events@{eventId}@webhooks@retry/post.php new file mode 100644 index 000000000..64ea7229b --- /dev/null +++ b/abc_spec/code_samples/PHP/events@{eventId}@webhooks@retry/post.php @@ -0,0 +1,25 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getEventsClient()->retryAllWebhooks("event_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/PHP/events@{eventId}@webhooks@{webhookId}@retry/post.php b/abc_spec/code_samples/PHP/events@{eventId}@webhooks@{webhookId}@retry/post.php new file mode 100644 index 000000000..13af8a67a --- /dev/null +++ b/abc_spec/code_samples/PHP/events@{eventId}@webhooks@{webhookId}@retry/post.php @@ -0,0 +1,25 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getEventsClient()->retryWebhook("event_id", "webhook_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/files/post.php b/abc_spec/code_samples/PHP/files/post.php new file mode 100644 index 000000000..f89370cd9 --- /dev/null +++ b/abc_spec/code_samples/PHP/files/post.php @@ -0,0 +1,30 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$fileRequest = new FileRequest(); +$fileRequest->file = "path/to/file"; +$fileRequest->purpose = "dispute_evidence"; + +try { + $response = $api->getDisputesClient()->uploadFile($fileRequest); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/files@{file_id}/get.php b/abc_spec/code_samples/PHP/files@{file_id}/get.php new file mode 100644 index 000000000..792107c3c --- /dev/null +++ b/abc_spec/code_samples/PHP/files@{file_id}/get.php @@ -0,0 +1,25 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getDisputesClient()->getFileDetails("file_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/hosted-payments/post.php b/abc_spec/code_samples/PHP/hosted-payments/post.php new file mode 100644 index 000000000..91b91f86f --- /dev/null +++ b/abc_spec/code_samples/PHP/hosted-payments/post.php @@ -0,0 +1,114 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$phone = new Phone(); +$phone->country_code = "+1"; +$phone->number = "415 555 2671"; + +$address = new Address(); +$address->address_line1 = "CheckoutSdk.com"; +$address->address_line2 = "90 Tottenham Court Road"; +$address->city = "London"; +$address->state = "London"; +$address->zip = "W1T 4TJ"; +$address->country = Country::$GB; + +$customerRequest = new CustomerRequest(); +$customerRequest->email = "email@docs.checkout.com"; +$customerRequest->name = "Name"; + +$billingInformation = new BillingInformation(); +$billingInformation->address = $address; +$billingInformation->phone = $phone; + +$shippingDetails = new ShippingDetails(); +$shippingDetails->address = $address; +$shippingDetails->phone = $phone; + +$recipient = new PaymentRecipient(); +$recipient->account_number = "1234567"; +$recipient->dob = "1985-05-15"; +$recipient->last_name = "LastName"; +$recipient->zip = "12345"; + +$product = new Product(); +$product->name = "Product"; +$product->quantity = 1; +$product->price = 10; + +$products = array($product); + +$theeDsRequest = new ThreeDsRequest(); +$theeDsRequest->enabled = false; +$theeDsRequest->attempt_n3d = false; + +$processing = new ProcessingSettings(); +$processing->aft = true; + +$risk = new RiskRequest(); +$risk->enabled = false; + +$billingDescriptor = new BillingDescriptor(); +$billingDescriptor->city = "London"; +$billingDescriptor->name = "Awesome name"; + +$request = new HostedPaymentsSessionRequest(); +$request->amount = 100; +$request->reference = "reference"; +$request->currency = Currency::$GBP; +$request->description = "Payment for Gold Necklace"; +$request->customer = $customerRequest; +$request->shipping = $shippingDetails; +$request->billing = $billingInformation; +$request->recipient = $recipient; +$request->processing = $processing; +$request->products = $products; +$request->risk = $risk; +$request->success_url = "https://example.com/payments/success"; +$request->cancel_url = "https://example.com/payments/cancel"; +$request->failure_url = "https://example.com/payments/failure"; +$request->locale = "en-GB"; +$request->three_ds = $theeDsRequest; +$request->capture = true; +$request->payment_type = PaymentType::$regular; +$request->billing_descriptor = $billingDescriptor; +$request->allow_payment_methods = array(PaymentSourceType::$card, PaymentSourceType::$ideal); + +try { + $response = $api->getHostedPaymentsClient()->createHostedPaymentsPageSession($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} + diff --git a/abc_spec/code_samples/PHP/hosted-payments@{id}/get.php b/abc_spec/code_samples/PHP/hosted-payments@{id}/get.php new file mode 100644 index 000000000..4725fa671 --- /dev/null +++ b/abc_spec/code_samples/PHP/hosted-payments@{id}/get.php @@ -0,0 +1,22 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getHostedPaymentsClient()->getHostedPaymentsPageDetails("hosted_payment_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/instruments/post.php b/abc_spec/code_samples/PHP/instruments/post.php new file mode 100644 index 000000000..f079900ab --- /dev/null +++ b/abc_spec/code_samples/PHP/instruments/post.php @@ -0,0 +1,59 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$address = new Address(); +$address->address_line1 = "CheckoutSdk.com"; +$address->address_line2 = "90 Tottenham Court Road"; +$address->city = "London"; +$address->state = "London"; +$address->zip = "W1T 4TJ"; +$address->country = Country::$GB; + +$phone = new Phone(); +$phone->country_code = "+1"; +$phone->number = "415 555 2671"; + +$instrumentAccountHolder = new InstrumentAccountHolder(); +$instrumentAccountHolder->billing_address = $address; +$instrumentAccountHolder->phone = $phone; + +$customer = new InstrumentCustomerRequest(); +$customer->email = "email@docs.checkout.com"; +$customer->name = "Name"; +$customer->phone = $phone; +$customer->default = true; + +$request = new CreateInstrumentRequest(); +$request->type = InstrumentType::$token; +$request->token = "token"; +$request->account_holder = $instrumentAccountHolder; +$request->customer = $customer; + +try { + $response = $api->getInstrumentsClient()->create($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/instruments@{id}/delete.php b/abc_spec/code_samples/PHP/instruments@{id}/delete.php new file mode 100644 index 000000000..d06eb2e9d --- /dev/null +++ b/abc_spec/code_samples/PHP/instruments@{id}/delete.php @@ -0,0 +1,25 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + + +try { + $response = $api->getInstrumentsClient()->delete("instrument_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/instruments@{id}/get.php b/abc_spec/code_samples/PHP/instruments@{id}/get.php new file mode 100644 index 000000000..616d85051 --- /dev/null +++ b/abc_spec/code_samples/PHP/instruments@{id}/get.php @@ -0,0 +1,24 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getInstrumentsClient()->get("instrument_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/instruments@{id}/patch.php b/abc_spec/code_samples/PHP/instruments@{id}/patch.php new file mode 100644 index 000000000..42b3f86e4 --- /dev/null +++ b/abc_spec/code_samples/PHP/instruments@{id}/patch.php @@ -0,0 +1,51 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$address = new Address(); +$address->address_line1 = "CheckoutSdk.com"; +$address->address_line2 = "90 Tottenham Court Road"; +$address->city = "London"; +$address->state = "London"; +$address->zip = "W1T 4TJ"; +$address->country = Country::$GB; + +$phone = new Phone(); +$phone->country_code = "+1"; +$phone->number = "415 555 2671"; + +$instrumentAccountHolder = new InstrumentAccountHolder(); +$instrumentAccountHolder->billing_address = $address; +$instrumentAccountHolder->phone = $phone; + +$request = new UpdateInstrumentRequest(); +$request->expiry_month = 10; +$request->expiry_year = 2027; +$request->name = "FirstName LastName"; +$request->account_holder = $instrumentAccountHolder; + +try { + $response = $api->getInstrumentsClient()->update("instrument_id", $request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/payment-links/post.php b/abc_spec/code_samples/PHP/payment-links/post.php new file mode 100644 index 000000000..47d5cb0ef --- /dev/null +++ b/abc_spec/code_samples/PHP/payment-links/post.php @@ -0,0 +1,100 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$phone = new Phone(); +$phone->country_code = "+1"; +$phone->number = "415 555 2671"; + +$address = new Address(); +$address->address_line1 = "CheckoutSdk.com"; +$address->address_line2 = "90 Tottenham Court Road"; +$address->city = "London"; +$address->state = "London"; +$address->zip = "W1T 4TJ"; +$address->country = Country::$GB; + +$customerRequest = new CustomerRequest(); +$customerRequest->email = ""; +$customerRequest->name = "Name"; + +$billingInformation = new BillingInformation(); +$billingInformation->address = $address; +$billingInformation->phone = $phone; + +$shippingDetails = new ShippingDetails(); +$shippingDetails->address = $address; +$shippingDetails->phone = $phone; + +$recipient = new PaymentRecipient(); +$recipient->account_number = "1234567"; +$recipient->dob = "1985-05-15"; +$recipient->last_name = "Last"; +$recipient->zip = "12345"; + +$product = new Product(); +$product->name = "Product"; +$product->quantity = 1; +$product->price = 10; + +$products = array($product); + +$theeDsRequest = new ThreeDsRequest(); +$theeDsRequest->enabled = false; +$theeDsRequest->attempt_n3d = false; + +$processing = new ProcessingSettings(); +$processing->aft = true; + +$risk = new RiskRequest(); +$risk->enabled = false; + +$request = new PaymentLinkRequest(); +$request->amount = 1000; +$request->reference = "reference"; +$request->currency = Currency::$GBP; +$request->description = "Description"; +$request->customer = $customerRequest; +$request->shipping = $shippingDetails; +$request->billing = $billingInformation; +$request->recipient = $recipient; +$request->processing = $processing; +$request->products = $products; +$request->risk = $risk; +$request->locale = "en-GB"; +$request->three_ds = $theeDsRequest; +$request->capture = true; + +try { + $response = $api->getPaymentLinksClient()->createPaymentLink($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/payment-links@{id}/get.php b/abc_spec/code_samples/PHP/payment-links@{id}/get.php new file mode 100644 index 000000000..235b9d0de --- /dev/null +++ b/abc_spec/code_samples/PHP/payment-links@{id}/get.php @@ -0,0 +1,24 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getPaymentLinksClient()->getPaymentLink("payment_link_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/payments/post.php b/abc_spec/code_samples/PHP/payments/post.php new file mode 100644 index 000000000..a88abdc63 --- /dev/null +++ b/abc_spec/code_samples/PHP/payments/post.php @@ -0,0 +1,58 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$billingAddress = new Address(); +$billingAddress->address_line1 = "CheckoutSdk.com"; +$billingAddress->address_line2 = "90 Tottenham Court Road"; +$billingAddress->city = "London"; +$billingAddress->state = "London"; +$billingAddress->zip = "W1T 4TJ"; +$billingAddress->country = Country::$GB; + +$phone = new Phone(); +$phone->country_code = "+1"; +$phone->number = "415 555 2671"; + +$requestCardSource = new RequestCardSource(); +$requestCardSource->name = "Name"; +$requestCardSource->number = "Number"; +$requestCardSource->expiry_year = 2026; +$requestCardSource->expiry_month = 10; +$requestCardSource->cvv = "123"; +$requestCardSource->billing_address = $billingAddress; +$requestCardSource->phone = $phone; + +$request = new PaymentRequest(); +$request->source = $requestCardSource; +$request->capture = true; +$request->reference = "reference"; +$request->amount = 10; +$request->currency = Currency::$GBP; + +try { + $response = $api->getPaymentsClient()->requestPayment($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/payments@{id}/get.php b/abc_spec/code_samples/PHP/payments@{id}/get.php new file mode 100644 index 000000000..dc00b5615 --- /dev/null +++ b/abc_spec/code_samples/PHP/payments@{id}/get.php @@ -0,0 +1,24 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getPaymentsClient()->getPaymentDetails("payment_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/payments@{id}@actions/get.php b/abc_spec/code_samples/PHP/payments@{id}@actions/get.php new file mode 100644 index 000000000..426c0478e --- /dev/null +++ b/abc_spec/code_samples/PHP/payments@{id}@actions/get.php @@ -0,0 +1,24 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getPaymentsClient()->getPaymentActions("payment_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/payments@{id}@captures/post.php b/abc_spec/code_samples/PHP/payments@{id}@captures/post.php new file mode 100644 index 000000000..7670b917b --- /dev/null +++ b/abc_spec/code_samples/PHP/payments@{id}@captures/post.php @@ -0,0 +1,30 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$request = new CaptureRequest(); +$request->reference = "reference"; +$request->amount = 5; + +try { + // or, capturePayment("payment_id") for a full capture + $response = $api->getPaymentsClient()->capturePayment("payment_id", $request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/payments@{id}@refunds/post.php b/abc_spec/code_samples/PHP/payments@{id}@refunds/post.php new file mode 100644 index 000000000..c94c20306 --- /dev/null +++ b/abc_spec/code_samples/PHP/payments@{id}@refunds/post.php @@ -0,0 +1,30 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$request = new RefundRequest(); +$request->reference = "reference"; +$request->amount = 10; + +try { + // or, refundPayment("payment_id") for a full refund + $response = $api->getPaymentsClient()->refundPayment("payment_id", $request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/payments@{id}@voids/post.php b/abc_spec/code_samples/PHP/payments@{id}@voids/post.php new file mode 100644 index 000000000..0e3535190 --- /dev/null +++ b/abc_spec/code_samples/PHP/payments@{id}@voids/post.php @@ -0,0 +1,29 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$request = new VoidRequest(); +$request->reference = "reference"; + +try { + // or, voidPayment("payment_id") + $response = $api->getPaymentsClient()->voidPayment("payment_id", $request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/reporting@payments/get.php b/abc_spec/code_samples/PHP/reporting@payments/get.php new file mode 100644 index 000000000..f90efb790 --- /dev/null +++ b/abc_spec/code_samples/PHP/reporting@payments/get.php @@ -0,0 +1,33 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$from = new DateTime(); +$from->setTimezone(new DateTimeZone("America/Mexico_City")); +$from->sub(new DateInterval("P1M")); + +$filter = new ReconciliationQueryPaymentsFilter(); +$filter->from = $from; +$filter->to = new DateTime(); + +try { + $response = $api->getReconciliationClient()->queryPaymentsReport($filter); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/reporting@payments@download/get.php b/abc_spec/code_samples/PHP/reporting@payments@download/get.php new file mode 100644 index 000000000..2c311e9b5 --- /dev/null +++ b/abc_spec/code_samples/PHP/reporting@payments@download/get.php @@ -0,0 +1,33 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$from = new DateTime(); +$from->setTimezone(new DateTimeZone("America/Mexico_City")); +$from->sub(new DateInterval("P1M")); + +$filter = new ReconciliationQueryPaymentsFilter(); +$filter->from = $from; +$filter->to = new DateTime(); + +try { + $response = $api->getReconciliationClient()->retrieveCsvPaymentReport($filter); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/reporting@payments@{paymentId}/get.php b/abc_spec/code_samples/PHP/reporting@payments@{paymentId}/get.php new file mode 100644 index 000000000..3383a5b5f --- /dev/null +++ b/abc_spec/code_samples/PHP/reporting@payments@{paymentId}/get.php @@ -0,0 +1,24 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getReconciliationClient()->singlePaymentReport("payment_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/reporting@statements/get.php b/abc_spec/code_samples/PHP/reporting@statements/get.php new file mode 100644 index 000000000..b21bfb9c8 --- /dev/null +++ b/abc_spec/code_samples/PHP/reporting@statements/get.php @@ -0,0 +1,34 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$from = new DateTime(); +$from->setTimezone(new DateTimeZone("America/Mexico_City")); +$from->sub(new DateInterval("P1M")); + +$filter = new QueryFilterDateRange(); +$filter->from = $from; +$filter->to = new DateTime(); + + +try { + $response = $api->getReconciliationClient()->queryStatementsReport($filter); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/reporting@statements@download/get.php b/abc_spec/code_samples/PHP/reporting@statements@download/get.php new file mode 100644 index 000000000..8af15bf66 --- /dev/null +++ b/abc_spec/code_samples/PHP/reporting@statements@download/get.php @@ -0,0 +1,34 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$from = new DateTime(); +$from->setTimezone(new DateTimeZone("America/Mexico_City")); +$from->sub(new DateInterval("P1M")); + +$filter = new QueryFilterDateRange(); +$filter->from = $from; +$filter->to = new DateTime(); + + +try { + $response = $api->getReconciliationClient()->retrieveCsvStatementsReport($filter); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/reporting@statements@{statementId}@payments@download/get.php b/abc_spec/code_samples/PHP/reporting@statements@{statementId}@payments@download/get.php new file mode 100644 index 000000000..df1d3cb46 --- /dev/null +++ b/abc_spec/code_samples/PHP/reporting@statements@{statementId}@payments@download/get.php @@ -0,0 +1,24 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getReconciliationClient()->retrieveCsvSingleStatementReport("statement_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/risk@assessments@pre-authentication/post.php b/abc_spec/code_samples/PHP/risk@assessments@pre-authentication/post.php new file mode 100644 index 000000000..cd340ccc8 --- /dev/null +++ b/abc_spec/code_samples/PHP/risk@assessments@pre-authentication/post.php @@ -0,0 +1,85 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$address = new Address(); +$address->address_line1 = "CheckoutSdk.com"; +$address->address_line2 = "90 Tottenham Court Road"; +$address->city = "London"; +$address->state = "London"; +$address->zip = "W1T 4TJ"; +$address->country = Country::$GB; + +$cardSourcePrism = new CardSourcePrism(); +$cardSourcePrism->billing_address = $address; +$cardSourcePrism->expiry_month = 10; +$cardSourcePrism->expiry_year = 2027; +$cardSourcePrism->number = "number"; + +$customerRequest = new CustomerRequest(); +$customerRequest->email = "email@docs.checkout.com"; +$customerRequest->name = "Name"; + +$riskPayment = new RiskPayment(); +$riskPayment->psp = "psp"; +$riskPayment->id = "78453878"; + +$riskShippingDetails = new RiskShippingDetails(); +$riskShippingDetails->address = $address; + +$location = new Location(); +$location->latitude = "51.5107"; +$location->longitude = "0.1313"; + +$device = new Device(); +$device->location = $location; +$device->type = "Phone"; +$device->os = "ISO"; +$device->model = "iPhone X"; +$device->date = new DateTime(); +$device->user_agent = "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1"; +$device->fingerprint = "34304a9e3fg09302"; + +$request = new PreAuthenticationAssessmentRequest(); +$request->date = new DateTime(); +$request->source = $cardSourcePrism; +$request->customer = $customerRequest; +$request->payment = $riskPayment; +$request->shipping = $riskShippingDetails; +$request->reference = "ORD-1011-87AH"; +$request->description = "Set of 3 masks"; +$request->amount = 10; +$request->currency = Currency::$GBP; +$request->device = $device; +$request->metadata = array("VoucherCode" => "loyalty_10", "discountApplied" => "10", "customer_id" => "2190EF321"); + +try { + $response = $api->getRiskClient()->requestPreAuthenticationRiskScan($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/risk@assessments@pre-capture/post.php b/abc_spec/code_samples/PHP/risk@assessments@pre-capture/post.php new file mode 100644 index 000000000..a587612b8 --- /dev/null +++ b/abc_spec/code_samples/PHP/risk@assessments@pre-capture/post.php @@ -0,0 +1,93 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$address = new Address(); +$address->address_line1 = "CheckoutSdk.com"; +$address->address_line2 = "90 Tottenham Court Road"; +$address->city = "London"; +$address->state = "London"; +$address->zip = "W1T 4TJ"; +$address->country = Country::$GB; + +$customerRequest = new CustomerRequest(); +$customerRequest->email = "email@docs.checkout.com"; +$customerRequest->name = "name"; + +$riskPayment = new RiskPayment(); +$riskPayment->psp = "psp"; +$riskPayment->id = "78453878"; + +$riskShippingDetails = new RiskShippingDetails(); +$riskShippingDetails->address = $address; + +$authenticationResult = new AuthenticationResult(); +$authenticationResult->attempted = true; +$authenticationResult->challenged = true; +$authenticationResult->liability_shifted = true; +$authenticationResult->method = "3ds"; +$authenticationResult->succeeded = true; +$authenticationResult->version = "2.0"; + +$authorizationResult = new AuthorizationResult(); +$authorizationResult->avs_code = "V"; +$authorizationResult->cvv_result = "N"; + +$location = new Location(); +$location->latitude = "51.5107"; +$location->longitude = "0.1313"; + +$device = new Device(); +$device->location = $location; +$device->type = "Phone"; +$device->os = "ISO"; +$device->model = "iPhone X"; +$device->date = new DateTime(); +$device->user_agent = "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1"; +$device->fingerprint = "34304a9e3fg09302"; + +$request = new PreCaptureAssessmentRequest(); +$request->date = new DateTime(); +$request->source = new CardSourcePrism(); +$request->customer = $customerRequest; +$request->payment = $riskPayment; +$request->shipping = $riskShippingDetails; +$request->amount = 6540; +$request->currency = Currency::$GBP; +$request->device = $device; +$request->metadata = array("VoucherCode" => "loyalty_10", "discountApplied" => "10", "customer_id" => "2190EF321"); +$request->authentication_result = $authenticationResult; +$request->authorization_result = $authorizationResult; + +try { + $response = $api->getRiskClient()->requestPreCaptureRiskScan($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/sources/post.php b/abc_spec/code_samples/PHP/sources/post.php new file mode 100644 index 000000000..922e9d006 --- /dev/null +++ b/abc_spec/code_samples/PHP/sources/post.php @@ -0,0 +1,55 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$phone = new Phone(); +$phone->country_code = "44"; +$phone->number = "020 222333"; + +$address = new Address(); +$address->address_line1 = "CheckoutSdk.com"; +$address->address_line2 = "90 Tottenham Court Road"; +$address->city = "London"; +$address->state = "London"; +$address->zip = "W1T 4TJ"; +$address->country = Country::$GB; + +$sourceData = new SourceData(); +$sourceData->first_name = "FirstName"; +$sourceData->last_name = "LastName"; +$sourceData->account_iban = "IBAN"; +$sourceData->bic = "BIC"; +$sourceData->billing_descriptor = "descriptor"; +$sourceData->mandate_type = "single"; + +$request = new SepaSourceRequest(); +$request->billing_address = $address; +$request->phone = $phone; +$request->reference = "reference"; +$request->source_data = $sourceData; + +try { + $response = $api->getSourcesClient()->createSepaSource($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/abc_spec/code_samples/PHP/tokens/post.php b/abc_spec/code_samples/PHP/tokens/post.php new file mode 100644 index 000000000..f57853174 --- /dev/null +++ b/abc_spec/code_samples/PHP/tokens/post.php @@ -0,0 +1,49 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->publicKey("public_ey") + ->build(); + +$phone = new Phone(); +$phone->country_code = "+1"; +$phone->number = "415 555 2671"; + +$address = new Address(); +$address->address_line1 = "CheckoutSdk.com"; +$address->address_line2 = "90 Tottenham Court Road"; +$address->city = "London"; +$address->state = "London"; +$address->zip = "W1T 4TJ"; +$address->country = Country::$GB; + +$request = new CardTokenRequest(); +$request->name = "Name"; +$request->number = "123456789"; +$request->expiry_year = 2027; +$request->expiry_month = 10; +$request->cvv = "123"; +$request->billing_address = $address; +$request->phone = $phone; + +try { + $response = $api->getTokensClient()->requestCardToken($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/webhooks/get.php b/abc_spec/code_samples/PHP/webhooks/get.php new file mode 100644 index 000000000..e1744a430 --- /dev/null +++ b/abc_spec/code_samples/PHP/webhooks/get.php @@ -0,0 +1,24 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getWebhooksClient()->retrieveWebhooks(); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/webhooks/post.php b/abc_spec/code_samples/PHP/webhooks/post.php new file mode 100644 index 000000000..eb9bb0e08 --- /dev/null +++ b/abc_spec/code_samples/PHP/webhooks/post.php @@ -0,0 +1,31 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$request = new WebhookRequest(); +$request->url = "https://test.checkout.com/webhooks"; +$request->content_type = "json"; +$request->event_types = array("invoice.cancelled", "card.updated"); +$request->active = true; + +try { + $response = $api->getWebhooksClient()->registerWebhook($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/webhooks@{id}/delete.php b/abc_spec/code_samples/PHP/webhooks@{id}/delete.php new file mode 100644 index 000000000..3afb2d333 --- /dev/null +++ b/abc_spec/code_samples/PHP/webhooks@{id}/delete.php @@ -0,0 +1,24 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getWebhooksClient()->removeWebhook("webhook_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/webhooks@{id}/get.php b/abc_spec/code_samples/PHP/webhooks@{id}/get.php new file mode 100644 index 000000000..8012b5b9a --- /dev/null +++ b/abc_spec/code_samples/PHP/webhooks@{id}/get.php @@ -0,0 +1,24 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getWebhooksClient()->retrieveWebhook("webhook_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/webhooks@{id}/patch.php b/abc_spec/code_samples/PHP/webhooks@{id}/patch.php new file mode 100644 index 000000000..059db71d1 --- /dev/null +++ b/abc_spec/code_samples/PHP/webhooks@{id}/patch.php @@ -0,0 +1,32 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$request = new WebhookRequest(); +$request->url = "https://test.checkout.com/webhooks/changed"; +$request->headers = []; +$request->content_type = "json"; +$request->event_types = array("source_updated"); +$request->active = true; + +try { + $response = $api->getWebhooksClient()->patchWebhook("webhookId", $request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/PHP/webhooks@{id}/put.php b/abc_spec/code_samples/PHP/webhooks@{id}/put.php new file mode 100644 index 000000000..2a1c4e2ee --- /dev/null +++ b/abc_spec/code_samples/PHP/webhooks@{id}/put.php @@ -0,0 +1,32 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$request = new WebhookRequest(); +$request->url = "https://test.checkout.com/webhooks/changed"; +$request->headers = []; +$request->content_type = "json"; +$request->event_types = array("source_updated"); +$request->active = true; + +try { + $response = $api->getWebhooksClient()->updateWebhook("webhook_id", $request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/abc_spec/code_samples/Python/customers/post.py b/abc_spec/code_samples/Python/customers/post.py new file mode 100644 index 000000000..3eeb05497 --- /dev/null +++ b/abc_spec/code_samples/Python/customers/post.py @@ -0,0 +1,37 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone +from checkout_sdk.customers.customers import CustomerRequest +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +customer_request = CustomerRequest() +customer_request.email = 'email@docs.checkout.com' +customer_request.name = 'Name' +customer_request.phone = phone + +try: + response = api.customers.create(customer_request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/abc_spec/code_samples/Python/customers@{identifier}/delete.py b/abc_spec/code_samples/Python/customers@{identifier}/delete.py new file mode 100644 index 000000000..06d2fb37f --- /dev/null +++ b/abc_spec/code_samples/Python/customers@{identifier}/delete.py @@ -0,0 +1,26 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.customers.delete('customer_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/customers@{identifier}/get.py b/abc_spec/code_samples/Python/customers@{identifier}/get.py new file mode 100644 index 000000000..7e42dc52f --- /dev/null +++ b/abc_spec/code_samples/Python/customers@{identifier}/get.py @@ -0,0 +1,26 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.customers.get('customer_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/customers@{identifier}/patch.py b/abc_spec/code_samples/Python/customers@{identifier}/patch.py new file mode 100644 index 000000000..f2d50eba7 --- /dev/null +++ b/abc_spec/code_samples/Python/customers@{identifier}/patch.py @@ -0,0 +1,37 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone +from checkout_sdk.customers.customers import CustomerRequest +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +customer_request = CustomerRequest() +customer_request.email = 'email@docs.checkout.com' +customer_request.name = 'Name' +customer_request.phone = phone + +try: + response = api.customers.update('customer_id', customer_request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/disputes/get.py b/abc_spec/code_samples/Python/disputes/get.py new file mode 100644 index 000000000..f30200ab9 --- /dev/null +++ b/abc_spec/code_samples/Python/disputes/get.py @@ -0,0 +1,38 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.disputes.disputes import DisputesQueryFilter +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from datetime import datetime, timezone +from dateutil.relativedelta import relativedelta + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +query = DisputesQueryFilter() +now = datetime.now(timezone.utc) +query.from_ = now - relativedelta(months=6) +query.to = now +query.payment_arn = 'payment_arn' +query.payment_reference = 'payment_reference' +query.limit = 10 +query.skip = 5 + +try: + response = api.disputes.query(query) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/disputes@{dispute_id}/get.py b/abc_spec/code_samples/Python/disputes@{dispute_id}/get.py new file mode 100644 index 000000000..8f46d15ab --- /dev/null +++ b/abc_spec/code_samples/Python/disputes@{dispute_id}/get.py @@ -0,0 +1,26 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.disputes.get_dispute_details('dispute_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/disputes@{dispute_id}@accept/post.py b/abc_spec/code_samples/Python/disputes@{dispute_id}@accept/post.py new file mode 100644 index 000000000..b2c2566d0 --- /dev/null +++ b/abc_spec/code_samples/Python/disputes@{dispute_id}@accept/post.py @@ -0,0 +1,27 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.disputes.accept('dispute_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization + diff --git a/abc_spec/code_samples/Python/disputes@{dispute_id}@evidence/get.py b/abc_spec/code_samples/Python/disputes@{dispute_id}@evidence/get.py new file mode 100644 index 000000000..2aedf25d4 --- /dev/null +++ b/abc_spec/code_samples/Python/disputes@{dispute_id}@evidence/get.py @@ -0,0 +1,26 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.disputes.get_evidence('dispute_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/disputes@{dispute_id}@evidence/post.py b/abc_spec/code_samples/Python/disputes@{dispute_id}@evidence/post.py new file mode 100644 index 000000000..aae03ff75 --- /dev/null +++ b/abc_spec/code_samples/Python/disputes@{dispute_id}@evidence/post.py @@ -0,0 +1,27 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.disputes.submit_evidence('dispute_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization + diff --git a/abc_spec/code_samples/Python/disputes@{dispute_id}@evidence/put.py b/abc_spec/code_samples/Python/disputes@{dispute_id}@evidence/put.py new file mode 100644 index 000000000..b0773e498 --- /dev/null +++ b/abc_spec/code_samples/Python/disputes@{dispute_id}@evidence/put.py @@ -0,0 +1,37 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.disputes.disputes import DisputeEvidenceRequest +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +evidence_request = DisputeEvidenceRequest() +evidence_request.proof_of_delivery_or_service_file = 'proof_of_delivery_or_service_file' +evidence_request.proof_of_delivery_or_service_text = 'proof of delivery or service text' +evidence_request.invoice_or_receipt_file = 'invoice_or_receipt_file' +evidence_request.invoice_or_receipt_text = 'invoice_or_receipt_text' +evidence_request.customer_communication_file = 'customer_communication_file' +evidence_request.customer_communication_text = 'customer_communication_text' +evidence_request.additional_evidence_file = 'additional_evidence_file' +evidence_request.additional_evidence_text = 'additional_evidence_text' + +try: + response = api.disputes.put_evidence('dispute_id', evidence_request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/event-types/get.py b/abc_spec/code_samples/Python/event-types/get.py new file mode 100644 index 000000000..d2491641f --- /dev/null +++ b/abc_spec/code_samples/Python/event-types/get.py @@ -0,0 +1,30 @@ +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + # Specify API version: + # "1.0" = > Legacy API + # "2.0" = > Unified Payments API + # null = > all versions + + response = api.events.retrieve_all_event_types("version") +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/abc_spec/code_samples/Python/events/get.py b/abc_spec/code_samples/Python/events/get.py new file mode 100644 index 000000000..a7df70d76 --- /dev/null +++ b/abc_spec/code_samples/Python/events/get.py @@ -0,0 +1,34 @@ +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.events.events import RetrieveEventsRequest +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +request = RetrieveEventsRequest() +request.payment_id = "pay_ok2ynq6ubn3ufmo6jsdfmdvy5q" +request.charge_id = "charge_FC1919EE547L23CC6BE1" +request.track_id = "TRK12345" +request.reference = "ORD-5023-4E89" +request.skip = "0" +request.limit = "5" + +try: + response = api.events.retrieve_events(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/abc_spec/code_samples/Python/events@{eventId}/get.py b/abc_spec/code_samples/Python/events@{eventId}/get.py new file mode 100644 index 000000000..1a7edb024 --- /dev/null +++ b/abc_spec/code_samples/Python/events@{eventId}/get.py @@ -0,0 +1,25 @@ +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.events.retrieve_event("event_id") +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/abc_spec/code_samples/Python/events@{eventId}@notifications@{notificationId}/get.py b/abc_spec/code_samples/Python/events@{eventId}@notifications@{notificationId}/get.py new file mode 100644 index 000000000..197f05005 --- /dev/null +++ b/abc_spec/code_samples/Python/events@{eventId}@notifications@{notificationId}/get.py @@ -0,0 +1,25 @@ +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.events.retrieve_event_notification("event_id", "notification_id") +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/abc_spec/code_samples/Python/events@{eventId}@webhooks@retry/post.py b/abc_spec/code_samples/Python/events@{eventId}@webhooks@retry/post.py new file mode 100644 index 000000000..b294569b5 --- /dev/null +++ b/abc_spec/code_samples/Python/events@{eventId}@webhooks@retry/post.py @@ -0,0 +1,25 @@ +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.events.retry_all_webhooks("event_id") +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/abc_spec/code_samples/Python/events@{eventId}@webhooks@{webhookId}@retry/post.py b/abc_spec/code_samples/Python/events@{eventId}@webhooks@{webhookId}@retry/post.py new file mode 100644 index 000000000..dbdd4a500 --- /dev/null +++ b/abc_spec/code_samples/Python/events@{eventId}@webhooks@{webhookId}@retry/post.py @@ -0,0 +1,25 @@ +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.events.retry_webhook("event_id", "webhook_id") +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/abc_spec/code_samples/Python/files/post.py b/abc_spec/code_samples/Python/files/post.py new file mode 100644 index 000000000..f941ddfd2 --- /dev/null +++ b/abc_spec/code_samples/Python/files/post.py @@ -0,0 +1,31 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.files.files import FileRequest + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +request = FileRequest() +request.file = 'path/to/file' +request.purpose = 'dispute_evidence' + +try: + response = api.disputes.upload_file(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/files@{file_id}/get.py b/abc_spec/code_samples/Python/files@{file_id}/get.py new file mode 100644 index 000000000..148d6b3b3 --- /dev/null +++ b/abc_spec/code_samples/Python/files@{file_id}/get.py @@ -0,0 +1,26 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.disputes.get_file_details('file_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/hosted-payments/post.py b/abc_spec/code_samples/Python/hosted-payments/post.py new file mode 100644 index 000000000..6d782ec77 --- /dev/null +++ b/abc_spec/code_samples/Python/hosted-payments/post.py @@ -0,0 +1,98 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone, Address, CustomerRequest, Product +from checkout_sdk.common.enums import Country, Currency, PaymentSourceType +from checkout_sdk.payments.hosted.hosted_payments import HostedPaymentsSessionRequest +from checkout_sdk.payments.payments import ThreeDsRequest, ProcessingSettings, RiskRequest, ShippingDetails, PaymentRecipient +from checkout_sdk.payments.payments_previous import BillingInformation +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +address = Address() +address.address_line1 = 'CheckoutSdk.com' +address.address_line2 = '90 Tottenham Court Road' +address.city = 'London' +address.state = 'London' +address.zip = 'W1T 4TJ' +address.country = Country.GB + +customer_request = CustomerRequest() +customer_request.email = 'email@docs.checkout.com' +customer_request.name = 'Name' + +billing_information = BillingInformation() +billing_information.address = address +billing_information.phone = phone + +shipping_details = ShippingDetails() +shipping_details.address = address +shipping_details.phone = phone + +recipient = PaymentRecipient() +recipient.account_number = '123456789' +recipient.country = Country.ES +recipient.dob = '1985-05-18' +recipient.first_name = 'First' +recipient.last_name = 'Last' +recipient.zip = '12345' + +product = Product() +product.name = 'Name' +product.quantity = 1 +product.price = 10 + +three_ds_request = ThreeDsRequest() +three_ds_request.enabled = True +three_ds_request.attempt_n3d = False + +processing_settings = ProcessingSettings() +processing_settings.aft = True + +risk_request = RiskRequest() +risk_request.enabled = True + +request = HostedPaymentsSessionRequest() +request.amount = 10 +request.reference = 'reference' +request.currency = Currency.GBP +request.description = 'Payment for Gold Necklace' +request.customer = customer_request +request.shipping = shipping_details +request.billing = billing_information +request.recipient = recipient +request.processing = processing_settings +request.products = [product] +request.risk = risk_request +request.success_url = 'https://docs.checkout.com/payments/success' +request.failure_url = 'https://docs.checkout.com/payments/failure' +request.cancel_url = 'https://docs.checkout.com/payments/cancel' +request.locale = 'en-GB' +request.three_ds = three_ds_request +request.capture = True +request.allow_payment_methods = [PaymentSourceType.CARD, PaymentSourceType.KLARNA] + +try: + response = api.hosted_payments.create_hosted_payments_page_session(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/hosted-payments@{id}/get.py b/abc_spec/code_samples/Python/hosted-payments@{id}/get.py new file mode 100644 index 000000000..0c14f7bb5 --- /dev/null +++ b/abc_spec/code_samples/Python/hosted-payments@{id}/get.py @@ -0,0 +1,26 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.hosted_payments.get_hosted_payments_page_details('hosted_payment_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/instruments/post.py b/abc_spec/code_samples/Python/instruments/post.py new file mode 100644 index 000000000..bb12e055c --- /dev/null +++ b/abc_spec/code_samples/Python/instruments/post.py @@ -0,0 +1,42 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.instruments.instruments_previous import InstrumentCustomerRequest, CreateInstrumentRequest + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +customer = InstrumentCustomerRequest() +customer.email = 'email@docs.checkout.com' +customer.name = 'Name' +customer.default = True +customer.phone = phone + +create_instrument_request = CreateInstrumentRequest() +create_instrument_request.token = 'token' +create_instrument_request.customer = customer + +try: + response = api.instruments.create(create_instrument_request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/instruments@{id}/delete.py b/abc_spec/code_samples/Python/instruments@{id}/delete.py new file mode 100644 index 000000000..38fe4f6fc --- /dev/null +++ b/abc_spec/code_samples/Python/instruments@{id}/delete.py @@ -0,0 +1,26 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.instruments.delete('instrument_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/instruments@{id}/get.py b/abc_spec/code_samples/Python/instruments@{id}/get.py new file mode 100644 index 000000000..cef856358 --- /dev/null +++ b/abc_spec/code_samples/Python/instruments@{id}/get.py @@ -0,0 +1,26 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.instruments.get('instrument_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/instruments@{id}/patch.py b/abc_spec/code_samples/Python/instruments@{id}/patch.py new file mode 100644 index 000000000..e034eb7e8 --- /dev/null +++ b/abc_spec/code_samples/Python/instruments@{id}/patch.py @@ -0,0 +1,56 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone, Address +from checkout_sdk.common.enums import Country +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.instruments.instruments_previous import UpdateInstrumentCustomer, InstrumentAccountHolder, UpdateInstrumentRequest + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +address = Address() +address.address_line1 = 'CheckoutSdk.com' +address.address_line2 = '90 Tottenham Court Road' +address.city = 'London' +address.state = 'London' +address.zip = 'W1T 4TJ' +address.country = Country.GB + +update_instrument_customer = UpdateInstrumentCustomer() +update_instrument_customer.id = 'id' +update_instrument_customer.default = True + +account_holder = InstrumentAccountHolder() +account_holder.billing_address = address +account_holder.phone = phone + +update_instrument_request = UpdateInstrumentRequest() +update_instrument_request.name = 'New Name' +update_instrument_request.expiry_year = 2027 +update_instrument_request.expiry_month = 12 +update_instrument_request.customer = update_instrument_customer +update_instrument_request.account_holder = account_holder + +try: + response = api.instruments.update('instrument_id', update_instrument_request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/payment-links/post.py b/abc_spec/code_samples/Python/payment-links/post.py new file mode 100644 index 000000000..817c839cc --- /dev/null +++ b/abc_spec/code_samples/Python/payment-links/post.py @@ -0,0 +1,97 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone, Address, CustomerRequest, Product +from checkout_sdk.common.enums import Country, Currency, PaymentSourceType +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.payments.links.payments_links import PaymentLinkRequest +from checkout_sdk.payments.payments import ThreeDsRequest, ProcessingSettings, RiskRequest, ShippingDetails, PaymentRecipient +from checkout_sdk.payments.payments_previous import BillingInformation + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +address = Address() +address.address_line1 = 'CheckoutSdk.com' +address.address_line2 = '90 Tottenham Court Road' +address.city = 'London' +address.state = 'London' +address.zip = 'W1T 4TJ' +address.country = Country.GB + +customer_request = CustomerRequest() +customer_request.email = 'email@docs.checkout.com' +customer_request.name = 'Name' + +billing_information = BillingInformation() +billing_information.address = address +billing_information.phone = phone + +shipping_details = ShippingDetails() +shipping_details.address = address +shipping_details.phone = phone + +recipient = PaymentRecipient() +recipient.account_number = '123456789' +recipient.country = Country.ES +recipient.dob = '1985-05-18' +recipient.first_name = 'First' +recipient.last_name = 'Last' +recipient.zip = '12345' + +product = Product() +product.name = 'Product Name' +product.quantity = 1 +product.price = 10 + +three_ds_request = ThreeDsRequest() +three_ds_request.enabled = True +three_ds_request.attempt_n3d = False + +processing_settings = ProcessingSettings() +processing_settings.aft = True + +risk_request = RiskRequest() +risk_request.enabled = True + +request = PaymentLinkRequest() +request.amount = 10 +request.reference = 'reference' +request.currency = Currency.GBP +request.description = 'Payment for Gold Necklace' +request.customer = customer_request +request.shipping = shipping_details +request.billing = billing_information +request.recipient = recipient +request.processing = processing_settings +request.products = [product] +request.risk = risk_request +request.return_url = 'https://docs.checkout.com/payments/return' +request.locale = 'en-GB' +request.three_ds = three_ds_request +request.expires_in = 6400 +request.capture = True +request.allow_payment_methods = [PaymentSourceType.CARD, PaymentSourceType.IDEAL] + +try: + response = api.payments_links.create_payment_link(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/payment-links@{id}/get.py b/abc_spec/code_samples/Python/payment-links@{id}/get.py new file mode 100644 index 000000000..11ec5267a --- /dev/null +++ b/abc_spec/code_samples/Python/payment-links@{id}/get.py @@ -0,0 +1,26 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.payments_links.get_payment_link('payment_link_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/payments/post.py b/abc_spec/code_samples/Python/payments/post.py new file mode 100644 index 000000000..eacaa6ffa --- /dev/null +++ b/abc_spec/code_samples/Python/payments/post.py @@ -0,0 +1,58 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Address, Phone +from checkout_sdk.common.enums import Country, Currency +from checkout_sdk.payments.payments_previous import RequestCardSource, PaymentRequest +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +address = Address() +address.address_line1 = 'CheckoutSdk.com' +address.address_line2 = '90 Tottenham Court Road' +address.city = 'London' +address.state = 'London' +address.zip = 'W1T 4TJ' +address.country = Country.GB + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +request_card_source = RequestCardSource() +request_card_source.number = 'number' +request_card_source.expiry_month = 10 +request_card_source.expiry_year = 2027 +request_card_source.cvv = 123 +request_card_source.name = 'Name' +request_card_source.billing_address = address +request_card_source.phone = phone + +payment_request = PaymentRequest() +payment_request.source = request_card_source + +payment_request.reference = 'reference' +payment_request.amount = 10 +payment_request.currency = Currency.GBP +payment_request.capture = False + +try: + response = api.payments.request_payment(payment_request) # or 'request_payout' +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/payments@{id}/get.py b/abc_spec/code_samples/Python/payments@{id}/get.py new file mode 100644 index 000000000..6aab7a803 --- /dev/null +++ b/abc_spec/code_samples/Python/payments@{id}/get.py @@ -0,0 +1,26 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.payments.get_payment_details('payment_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/payments@{id}@actions/get.py b/abc_spec/code_samples/Python/payments@{id}@actions/get.py new file mode 100644 index 000000000..c18909ed8 --- /dev/null +++ b/abc_spec/code_samples/Python/payments@{id}@actions/get.py @@ -0,0 +1,26 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.payments.get_payment_actions('payment_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/payments@{id}@captures/post.py b/abc_spec/code_samples/Python/payments@{id}@captures/post.py new file mode 100644 index 000000000..8931482e8 --- /dev/null +++ b/abc_spec/code_samples/Python/payments@{id}@captures/post.py @@ -0,0 +1,32 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.payments.payments_previous import CaptureRequest +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +capture_request = CaptureRequest() +capture_request.reference = 'reference' +capture_request.amount = 10 + +try: + # or, capture_payment('payment_id') for a full capture + response = api.payments.capture_payment('payment_id', capture_request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/payments@{id}@refunds/post.py b/abc_spec/code_samples/Python/payments@{id}@refunds/post.py new file mode 100644 index 000000000..1be84d763 --- /dev/null +++ b/abc_spec/code_samples/Python/payments@{id}@refunds/post.py @@ -0,0 +1,32 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.payments.payments import RefundRequest +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +refund_request = RefundRequest() +refund_request.reference = 'reference' +refund_request.amount = 2 + +try: + # or, refund_payment('payment_id') for a full refund + response = api.payments.refund_payment('payment_id', refund_request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/payments@{id}@voids/post.py b/abc_spec/code_samples/Python/payments@{id}@voids/post.py new file mode 100644 index 000000000..e00ac6980 --- /dev/null +++ b/abc_spec/code_samples/Python/payments@{id}@voids/post.py @@ -0,0 +1,31 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.payments.payments import VoidRequest +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +void_request = VoidRequest() +void_request.reference = 'reference' + +try: + # or, void_payment('payment_id') + response = api.payments.void_payment('payment_id', void_request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/risk@assessments@pre-authentication/post.py b/abc_spec/code_samples/Python/risk@assessments@pre-authentication/post.py new file mode 100644 index 000000000..49484072f --- /dev/null +++ b/abc_spec/code_samples/Python/risk@assessments@pre-authentication/post.py @@ -0,0 +1,89 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone, Address, CustomerRequest +from checkout_sdk.common.enums import Country, Currency +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.risk.risk import RiskRequestTokenSource, RiskPayment, RiskShippingDetails, Location, Device, \\ + PreAuthenticationAssessmentRequest +from datetime import datetime, timezone + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +address = Address() +address.address_line1 = 'CheckoutSdk.com' +address.address_line2 = '90 Tottenham Court Road' +address.city = 'London' +address.state = 'London' +address.zip = 'W1T 4TJ' +address.country = Country.GB + +token_source = RiskRequestTokenSource() +token_source.token = 'token' +token_source.phone = phone +token_source.billing_address = address + +customer_request = CustomerRequest() +customer_request.email = 'email@docs.checkout.com' +customer_request.name = 'Name' + +risk_payment = RiskPayment() +risk_payment.psp = 'CheckoutSdk.com' +risk_payment.id = '78453878' + +shipping_details = RiskShippingDetails() +shipping_details.address = address + +location = Location() +location.longitude = '0.1313' +location.latitude = '51.5107' + +device = Device() +device.location = location +device.type = 'Phone' +device.os = 'ISO' +device.model = 'iPhone X' +device.date = datetime.now(timezone.utc) +device.user_agent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, ' \\\\ + 'like Gecko) Version/11.0 Mobile/15A372 Safari/604.1 ' +device.fingerprint = '34304a9e3fg09302' + +request = PreAuthenticationAssessmentRequest() +request.date = datetime.now(timezone.utc) +request.source = token_source +request.customer = customer_request +request.payment = risk_payment +request.shipping = shipping_details +request.reference = 'reference' +request.description = 'description' +request.amount = 10 +request.currency = Currency.GBP +request.device = device +request.metadata = { + 'VoucherCode': 'loyalty_10', + 'discountApplied': '10', + 'customer_id': '2190EF321'} + +try: + response = api.risk.request_pre_authentication_risk_scan(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/risk@assessments@pre-capture/post.py b/abc_spec/code_samples/Python/risk@assessments@pre-capture/post.py new file mode 100644 index 000000000..e37977d95 --- /dev/null +++ b/abc_spec/code_samples/Python/risk@assessments@pre-capture/post.py @@ -0,0 +1,101 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone, Address, CustomerRequest +from checkout_sdk.common.enums import Country, Currency +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.risk.risk import RiskRequestTokenSource, RiskPayment, RiskShippingDetails, Location, Device, \\ + AuthenticationResult, AuthorizationResult, PreCaptureAssessmentRequest +from datetime import datetime, timezone + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +address = Address() +address.address_line1 = 'CheckoutSdk.com' +address.address_line2 = '90 Tottenham Court Road' +address.city = 'London' +address.state = 'London' +address.zip = 'W1T 4TJ' +address.country = Country.GB + +token_source = RiskRequestTokenSource() +token_source.token = 'token' +token_source.phone = phone +token_source.billing_address = address + +customer_request = CustomerRequest() +customer_request.email = 'email@docs.checkout.com' +customer_request.name = 'Name' + +risk_payment = RiskPayment() +risk_payment.psp = 'CheckoutSdk.com' +risk_payment.id = '78453878' + +shipping_details = RiskShippingDetails() +shipping_details.address = address + +location = Location() +location.longitude = '0.1313' +location.latitude = '51.5107' + +device = Device() +device.location = location +device.type = 'Phone' +device.os = 'ISO' +device.model = 'iPhone X' +device.date = datetime.now(timezone.utc) +device.user_agent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, ' \\\\ + 'like Gecko) Version/11.0 Mobile/15A372 Safari/604.1 ' +device.fingerprint = '34304a9e3fg09302' + +authentication_result = AuthenticationResult() +authentication_result.attempted = True +authentication_result.challenged = True +authentication_result.liability_shifted = True +authentication_result.method = '3ds' +authentication_result.succeeded = True +authentication_result.version = '2.0' + +authorization_result = AuthorizationResult() +authorization_result.avs_code = 'Y' +authorization_result.cvv_result = 'N' + +request = PreCaptureAssessmentRequest() +request.date = datetime.now(timezone.utc) +request.source = token_source +request.customer = customer_request +request.payment = risk_payment +request.shipping = shipping_details +request.amount = 10 +request.currency = Currency.GBP +request.device = device +request.authentication_result = authentication_result +request.authorization_result = authorization_result +request.metadata = { + 'VoucherCode': 'loyalty_10', + 'discountApplied': '10', + 'customer_id': '2190EF321'} + +try: + response = api.risk.request_pre_capture_risk_scan(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/sources/post.py b/abc_spec/code_samples/Python/sources/post.py new file mode 100644 index 000000000..fdcbf97a9 --- /dev/null +++ b/abc_spec/code_samples/Python/sources/post.py @@ -0,0 +1,55 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone, Address +from checkout_sdk.common.enums import Country +from checkout_sdk.sources.sources import SourceData, SepaSourceRequest, MandateType +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +address = Address() +address.address_line1 = 'CheckoutSdk.com' +address.address_line2 = '90 Tottenham Court Road' +address.city = 'London' +address.state = 'London' +address.zip = 'W1T 4TJ' +address.country = Country.GB + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +source_data = SourceData() +source_data.first_name = 'First' +source_data.last_name = 'Last' +source_data.account_iban = 'iban' +source_data.bic = 'PBNKDEFFXXX' +source_data.billing_descriptor = 'descriptor' +source_data.mandate_type = MandateType.SINGLE + +sepa_source_request = SepaSourceRequest() +sepa_source_request.billing_address = address +sepa_source_request.reference = 'reference' +sepa_source_request.phone = phone +sepa_source_request.source_data = source_data + +try: + response = api.sources.create_sepa_source(sepa_source_request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/abc_spec/code_samples/Python/tokens/post.py b/abc_spec/code_samples/Python/tokens/post.py new file mode 100644 index 000000000..5f60b5c3b --- /dev/null +++ b/abc_spec/code_samples/Python/tokens/post.py @@ -0,0 +1,50 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone, Address +from checkout_sdk.common.enums import Country +from checkout_sdk.tokens.tokens import CardTokenRequest +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .public_key('public_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +address = Address() +address.address_line1 = 'CheckoutSdk.com' +address.address_line2 = '90 Tottenham Court Road' +address.city = 'London' +address.state = 'London' +address.zip = 'W1T 4TJ' +address.country = Country.GB + +card_token_request = CardTokenRequest() +card_token_request.number = 'number' +card_token_request.expiry_month = 10 +card_token_request.expiry_year = 2027 +card_token_request.cvv = 123 +card_token_request.name = 'Name' +card_token_request.billing_address = address +card_token_request.phone = phone + +try: + response = api.tokens.request_card_token(card_token_request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/abc_spec/code_samples/Python/webhooks/get.py b/abc_spec/code_samples/Python/webhooks/get.py new file mode 100644 index 000000000..7f406d41b --- /dev/null +++ b/abc_spec/code_samples/Python/webhooks/get.py @@ -0,0 +1,25 @@ +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.webhooks.retrieve_webhooks("webhook_id") +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/abc_spec/code_samples/Python/webhooks/post.py b/abc_spec/code_samples/Python/webhooks/post.py new file mode 100644 index 000000000..951238e79 --- /dev/null +++ b/abc_spec/code_samples/Python/webhooks/post.py @@ -0,0 +1,37 @@ +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.webhooks.webhooks import WebhookRequest, WebhookContentType + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +request = WebhookRequest() +request.url = "https://example.com/webhooks" +request.active = True +request.content_type = WebhookContentType.JSON +request.event_types = ["payment_approved", "payment_pending", "payment_declined", "payment_expired", "payment_canceled", \\ + "payment_voided", "payment_void_declined", "payment_captured", "payment_capture_declined", "payment_capture_pending", \\ + "payment_refunded", "payment_refund_declined", "payment_refund_pending"] +request.headers = { + "authorization": "1234" +} + +try: + response = api.webhooks.register_webhook(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/abc_spec/code_samples/Python/webhooks@{id}/delete.py b/abc_spec/code_samples/Python/webhooks@{id}/delete.py new file mode 100644 index 000000000..219e99c28 --- /dev/null +++ b/abc_spec/code_samples/Python/webhooks@{id}/delete.py @@ -0,0 +1,25 @@ +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.webhooks.remove_webhook("webhook_id") +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/abc_spec/code_samples/Python/webhooks@{id}/get.py b/abc_spec/code_samples/Python/webhooks@{id}/get.py new file mode 100644 index 000000000..1701412cd --- /dev/null +++ b/abc_spec/code_samples/Python/webhooks@{id}/get.py @@ -0,0 +1,25 @@ +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.webhooks.retrieve_webhook("webhook_id") +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/abc_spec/code_samples/Python/webhooks@{id}/patch.py b/abc_spec/code_samples/Python/webhooks@{id}/patch.py new file mode 100644 index 000000000..33ddd418d --- /dev/null +++ b/abc_spec/code_samples/Python/webhooks@{id}/patch.py @@ -0,0 +1,37 @@ +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.webhooks.webhooks import WebhookRequest, WebhookContentType + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() +# or Environment.production() + +request = WebhookRequest() +request.url = "https://example.com/webhooks" +request.active = True +request.content_type = WebhookContentType.JSON +request.event_types = ["payment_approved", "payment_pending", "payment_declined", "payment_expired", "payment_canceled", \\ + "payment_voided", "payment_void_declined", "payment_captured", "payment_capture_declined", "payment_capture_pending", \\ + "payment_refunded", "payment_refund_declined", "payment_refund_pending"] +request.headers = { + "authorization": "1234" +} + +try: + response = api.webhooks.patch_webhook("webhook_id", request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: +# Bad arguments + +except CheckoutAuthorizationException as err: +# Invalid authorization \ No newline at end of file diff --git a/abc_spec/code_samples/Python/webhooks@{id}/put.py b/abc_spec/code_samples/Python/webhooks@{id}/put.py new file mode 100644 index 000000000..946ae883a --- /dev/null +++ b/abc_spec/code_samples/Python/webhooks@{id}/put.py @@ -0,0 +1,37 @@ +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.webhooks.webhooks import WebhookRequest, WebhookContentType + +api = CheckoutSdk.builder() \\ + .previous() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() +# or Environment.production() + +request = WebhookRequest() +request.url = "https://example.com/webhooks" +request.active = True +request.content_type = WebhookContentType.JSON +request.event_types = ["payment_approved", "payment_pending", "payment_declined", "payment_expired", "payment_canceled", \\ + "payment_voided", "payment_void_declined", "payment_captured", "payment_capture_declined", "payment_capture_pending", \\ + "payment_refunded", "payment_refund_declined", "payment_refund_pending"] +request.headers = { + "authorization": "1234" +} + +try: + response = api.webhooks.update_webhook("webhook_id", request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: +# Bad arguments + +except CheckoutAuthorizationException as err: +# Invalid authorization \ No newline at end of file diff --git a/abc_spec/code_samples/README.md b/abc_spec/code_samples/README.md new file mode 100644 index 000000000..feae70233 --- /dev/null +++ b/abc_spec/code_samples/README.md @@ -0,0 +1,9 @@ +# Code samples + +Generate [x-code-samples](https://github.com/Rebilly/ReDoc/blob/master/docs/redoc-vendor-extensions.md#x-code-samples) +Path `//.` where: + +- `` - name of the language from [this](https://github.com/github/linguist/blob/master/lib/linguist/popular.yml) list. +- `` - path of target method, where all slashes replaced with `@` sign. +- `` - verb of target method. +- `` - ignored. diff --git a/abc_spec/code_samples/cURL/events/get.sh b/abc_spec/code_samples/cURL/events/get.sh new file mode 100644 index 000000000..71dfb1da2 --- /dev/null +++ b/abc_spec/code_samples/cURL/events/get.sh @@ -0,0 +1,2 @@ +curl --location --request GET 'https://api.checkout.com/broadcast/events?payment_id=pay_ok2ynq6ubn3ufmo6jsdfmdvy5q' + --header 'Authorization: secret_key_broadcast' \ No newline at end of file diff --git a/abc_spec/components/headers/Cko-Request-Id.yaml b/abc_spec/components/headers/Cko-Request-Id.yaml new file mode 100644 index 000000000..329bee12b --- /dev/null +++ b/abc_spec/components/headers/Cko-Request-Id.yaml @@ -0,0 +1,3 @@ +description: The unique identifier of the request +schema: + type: string diff --git a/abc_spec/components/headers/Cko-Version.yaml b/abc_spec/components/headers/Cko-Version.yaml new file mode 100644 index 000000000..9757c9654 --- /dev/null +++ b/abc_spec/components/headers/Cko-Version.yaml @@ -0,0 +1,3 @@ +description: The version of the API +schema: + type: string diff --git a/abc_spec/components/parameters/ckoIdempotencyKey.yaml b/abc_spec/components/parameters/ckoIdempotencyKey.yaml new file mode 100644 index 000000000..e87d8a44d --- /dev/null +++ b/abc_spec/components/parameters/ckoIdempotencyKey.yaml @@ -0,0 +1,6 @@ +in: header +name: Cko-Idempotency-Key +schema: + type: string +required: false +description: An optional idempotency key for safely retrying payment requests diff --git a/abc_spec/components/parameters/collectionCriteria.yaml b/abc_spec/components/parameters/collectionCriteria.yaml new file mode 100644 index 000000000..ba182328b --- /dev/null +++ b/abc_spec/components/parameters/collectionCriteria.yaml @@ -0,0 +1,5 @@ +name: criteria +in: query +schema: + type: string +description: The json criteria for collection diff --git a/abc_spec/components/parameters/collectionExpand.yaml b/abc_spec/components/parameters/collectionExpand.yaml new file mode 100644 index 000000000..ca67a11b1 --- /dev/null +++ b/abc_spec/components/parameters/collectionExpand.yaml @@ -0,0 +1,7 @@ +name: expand +in: query +schema: + type: string +description: >- + Expand response to get full related object intead of ID. See the expand + guide for more info. diff --git a/abc_spec/components/parameters/collectionFields.yaml b/abc_spec/components/parameters/collectionFields.yaml new file mode 100644 index 000000000..341a9e1e3 --- /dev/null +++ b/abc_spec/components/parameters/collectionFields.yaml @@ -0,0 +1,7 @@ +name: fields +in: query +schema: + type: string +description: >- + Limit the returned fields to the list specified, separated by comma. Note + that id is always returned. diff --git a/abc_spec/components/parameters/collectionFilter.yaml b/abc_spec/components/parameters/collectionFilter.yaml new file mode 100644 index 000000000..33fcc2937 --- /dev/null +++ b/abc_spec/components/parameters/collectionFilter.yaml @@ -0,0 +1,8 @@ +name: filter +in: query +schema: + type: string +description: | + The collection items filter requires a special format. + Use "," for multiple allowed values. Use ";" for multiple fields. + See the filter guide for more options and examples about this format. diff --git a/abc_spec/components/parameters/collectionLimit.yaml b/abc_spec/components/parameters/collectionLimit.yaml new file mode 100644 index 000000000..d4f085dde --- /dev/null +++ b/abc_spec/components/parameters/collectionLimit.yaml @@ -0,0 +1,7 @@ +name: limit +in: query +description: The collection items limit +schema: + type: integer + minimum: 0 + maximum: 1000 diff --git a/abc_spec/components/parameters/collectionOffset.yaml b/abc_spec/components/parameters/collectionOffset.yaml new file mode 100644 index 000000000..56ff20102 --- /dev/null +++ b/abc_spec/components/parameters/collectionOffset.yaml @@ -0,0 +1,6 @@ +name: offset +in: query +description: The collection items offset +schema: + type: integer + minimum: 0 diff --git a/abc_spec/components/parameters/collectionQuery.yaml b/abc_spec/components/parameters/collectionQuery.yaml new file mode 100644 index 000000000..b6f3c3716 --- /dev/null +++ b/abc_spec/components/parameters/collectionQuery.yaml @@ -0,0 +1,5 @@ +name: q +in: query +schema: + type: string +description: The partial search of the text fields. diff --git a/spec/components/parameters/collectionSort.yaml b/abc_spec/components/parameters/collectionSort.yaml similarity index 100% rename from spec/components/parameters/collectionSort.yaml rename to abc_spec/components/parameters/collectionSort.yaml diff --git a/abc_spec/components/parameters/hash.yaml b/abc_spec/components/parameters/hash.yaml new file mode 100644 index 000000000..2584ba0ad --- /dev/null +++ b/abc_spec/components/parameters/hash.yaml @@ -0,0 +1,6 @@ +name: hash +in: path +description: The token identifier string +schema: + type: string +required: true diff --git a/abc_spec/components/parameters/mediaType.yaml b/abc_spec/components/parameters/mediaType.yaml new file mode 100644 index 000000000..55cda33e8 --- /dev/null +++ b/abc_spec/components/parameters/mediaType.yaml @@ -0,0 +1,8 @@ +name: Accept +in: header +schema: + type: string + enum: + - application/json + default: application/json +description: The response media type diff --git a/abc_spec/components/parameters/resourceId.yaml b/abc_spec/components/parameters/resourceId.yaml new file mode 100644 index 000000000..f22fc2c8f --- /dev/null +++ b/abc_spec/components/parameters/resourceId.yaml @@ -0,0 +1,6 @@ +name: id +in: path +description: The resource identifier string +schema: + type: string +required: true diff --git a/abc_spec/components/parameters/rulesVersion.yaml b/abc_spec/components/parameters/rulesVersion.yaml new file mode 100644 index 000000000..a4cb6d722 --- /dev/null +++ b/abc_spec/components/parameters/rulesVersion.yaml @@ -0,0 +1,9 @@ +name: version +in: path +schema: + type: integer + minimum: 1 +required: true +description: >- + The rule set version. Expand response to get full related object instead + of ID. See the expand guide for more info. diff --git a/abc_spec/components/parameters/systemEventType.yaml b/abc_spec/components/parameters/systemEventType.yaml new file mode 100644 index 000000000..c59c351fc --- /dev/null +++ b/abc_spec/components/parameters/systemEventType.yaml @@ -0,0 +1,6 @@ +name: eventType +in: path +description: The event type +schema: + type: string +required: true diff --git a/abc_spec/components/responses/AccessForbidden.yaml b/abc_spec/components/responses/AccessForbidden.yaml new file mode 100644 index 000000000..b9747e8ea --- /dev/null +++ b/abc_spec/components/responses/AccessForbidden.yaml @@ -0,0 +1,5 @@ +description: 'Access forbidden, invalid API-KEY was used' +content: + application/json: + schema: + $ref: '#/components/schemas/Error' diff --git a/abc_spec/components/responses/Conflict.yaml b/abc_spec/components/responses/Conflict.yaml new file mode 100644 index 000000000..05e9b98ef --- /dev/null +++ b/abc_spec/components/responses/Conflict.yaml @@ -0,0 +1,5 @@ +description: Conflict +content: + application/json: + schema: + $ref: '#/components/schemas/Error' diff --git a/abc_spec/components/responses/InvalidDataError.yaml b/abc_spec/components/responses/InvalidDataError.yaml new file mode 100644 index 000000000..d0201c8a7 --- /dev/null +++ b/abc_spec/components/responses/InvalidDataError.yaml @@ -0,0 +1,5 @@ +description: Invalid data was sent +content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' diff --git a/abc_spec/components/responses/NotFound.yaml b/abc_spec/components/responses/NotFound.yaml new file mode 100644 index 000000000..b944fcf81 --- /dev/null +++ b/abc_spec/components/responses/NotFound.yaml @@ -0,0 +1,5 @@ +description: Resource was not found +content: + application/json: + schema: + $ref: '#/components/schemas/Error' diff --git a/abc_spec/components/schemas/01_SepaAddress.yaml b/abc_spec/components/schemas/01_SepaAddress.yaml new file mode 100644 index 000000000..ad35efb49 --- /dev/null +++ b/abc_spec/components/schemas/01_SepaAddress.yaml @@ -0,0 +1,33 @@ +type: object +required: + - address_line1 + - city + - zip + - country +properties: + address_line1: + type: string + description: The first line of the address + example: Brandenburger Tor + address_line2: + type: string + description: The second line of the address + example: Pariser Platz + city: + type: string + description: The address city + example: Berlin + state: + type: string + description: The address state + example: Berlin + zip: + type: string + description: The address zip/postal code + example: 10117 + country: + type: string + description: The two-letter ISO country code of the address + example: DE + maxLength: 2 + minLength: 2 diff --git a/abc_spec/components/schemas/Address.yaml b/abc_spec/components/schemas/Address.yaml new file mode 100644 index 000000000..1e643748a --- /dev/null +++ b/abc_spec/components/schemas/Address.yaml @@ -0,0 +1,33 @@ +type: object +properties: + address_line1: + type: string + description: The first line of the address + maxLength: 200 + example: Checkout.com + address_line2: + type: string + description: The second line of the address + maxLength: 200 + example: 90 Tottenham Court Road + city: + type: string + description: The address city + maxLength: 50 + example: London + state: + type: string + description: The address state + maxLength: 50 + example: London + zip: + type: string + description: The address zip/postal code + maxLength: 50 + example: W1T 4TJ + country: + type: string + description: The two-letter ISO country code of the address + example: GB + maxLength: 2 + minLength: 2 diff --git a/abc_spec/components/schemas/Batches/Batch.yaml b/abc_spec/components/schemas/Batches/Batch.yaml new file mode 100644 index 000000000..354a3a113 --- /dev/null +++ b/abc_spec/components/schemas/Batches/Batch.yaml @@ -0,0 +1,27 @@ +type: object +required: + - id + - status + - _links +properties: + id: + type: string + description: Batch identifier + pattern: "^bat_(\\w{26})$" + example: bat_cyukd74c4xoezfuarvuwdcpzou + status: + type: string + description: The status of the batch + example: Processing + _links: + type: object + required: + - self + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the batch + example: + href: 'https://api.checkout.com/batches/bat_fa72f568492b4d3eb6d81e0645e320f6' diff --git a/abc_spec/components/schemas/Batches/SubmitBatchRequest.yaml b/abc_spec/components/schemas/Batches/SubmitBatchRequest.yaml new file mode 100644 index 000000000..f4edb7567 --- /dev/null +++ b/abc_spec/components/schemas/Batches/SubmitBatchRequest.yaml @@ -0,0 +1,21 @@ +type: object +description: The batch request +required: + - file_id + - action +properties: + file_id: + type: string + pattern: "^file_(\\w{26})$" + description: The identifier of the batch file previously uploaded via the [Files API](#tag/Files) + example: 'file_6lbss42ezvoufcb2beo76rvwly' + action: + type: string + description: The action to be performed against the batch + enum: + - payment + example: 'payment' + reference: + type: string + description: Your reference for the batch. If provided, this will be validated against the batch file's header + example: payments-20180701 diff --git a/abc_spec/components/schemas/Batches/SubmitBatchResponse.yaml b/abc_spec/components/schemas/Batches/SubmitBatchResponse.yaml new file mode 100644 index 000000000..66795fe32 --- /dev/null +++ b/abc_spec/components/schemas/Batches/SubmitBatchResponse.yaml @@ -0,0 +1,27 @@ +type: object +required: + - id + - status + - _links +properties: + id: + type: string + description: Batch identifier + pattern: "^bat_(\\w{26})$" + example: bat_cyukd74c4xoezfuarvuwdcpzou + status: + type: string + description: The batch status + example: Processing + _links: + type: object + required: + - self + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the batch + example: + href: 'https://api.checkout.com/batches/bat_fa72f568492b4d3eb6d81e0645e320f6' diff --git a/abc_spec/components/schemas/Customers/CustomerCreateRequest.yaml b/abc_spec/components/schemas/Customers/CustomerCreateRequest.yaml new file mode 100644 index 000000000..05eb61a55 --- /dev/null +++ b/abc_spec/components/schemas/Customers/CustomerCreateRequest.yaml @@ -0,0 +1,27 @@ +type: object +description: The customer details +required: + - email +properties: + email: + type: string + format: email + description: The customer's email address + maxLength: 255 + example: JohnTest@test.com + name: + type: string + description: The customer's name + maxLength: 255 + example: John Test + phone: + type: object + description: The customer's phone number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + metadata: + type: object + description: Allows you to store additional information about a customer. You can include a maximum of 10 key-value pairs. Each key and value can be up to 100 characters long. + example: + coupon_code: 'NY2018' + partner_id: 123989 diff --git a/abc_spec/components/schemas/Customers/CustomerCreateResponse.yaml b/abc_spec/components/schemas/Customers/CustomerCreateResponse.yaml new file mode 100644 index 000000000..4d3bf8f17 --- /dev/null +++ b/abc_spec/components/schemas/Customers/CustomerCreateResponse.yaml @@ -0,0 +1,9 @@ +type: object +description: Customer +required: + - id +properties: + id: + type: string + description: The customer's unique identifier + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' diff --git a/abc_spec/components/schemas/Customers/CustomerGetInstrumentResponse.yaml b/abc_spec/components/schemas/Customers/CustomerGetInstrumentResponse.yaml new file mode 100644 index 000000000..fd6737ff5 --- /dev/null +++ b/abc_spec/components/schemas/Customers/CustomerGetInstrumentResponse.yaml @@ -0,0 +1,99 @@ +type: object +required: + - id + - type + - fingerprint + - expiry_month + - expiry_year + - last4 + - bin +properties: + id: + description: The ID of the retrieved instrument + type: string + example: src_lmyvsjadlxxu7kqlgevt6ebkra + type: + description: The instrument type + type: string + example: card + fingerprint: + type: string + description: A token that can uniquely identify this card across all customers + pattern: ^([a-z0-9]{26})$ + example: vnsdrvikkvre3dtrjjvlm5du4q + expiry_month: + type: integer + description: The expiry month + minimum: 1 + example: 6 + maxLength: 2 + expiry_year: + type: integer + description: The expiry year + example: 2025 + minLength: 4 + maxLength: 4 + name: + description: The name of the cardholder + type: string + example: John Test + scheme: + type: string + description: The card scheme + example: VISA + last4: + type: string + description: The last four digits of the card number + example: '9996' + minLength: 4 + maxLength: 4 + bin: + type: string + description: The card issuer's bank identification number (BIN) + example: '454347' + card_type: + type: string + description: The card type + enum: + - Credit + - Debit + - Prepaid + - Charge + example: Credit + card_category: + type: string + description: The card category + enum: + - Consumer + - Commercial + example: Consumer + issuer: + type: string + description: The name of the card issuer + example: 'GOTHAM STATE BANK' + issuer_country: + type: string + maxLength: 2 + minLength: 2 + description: The card issuer's country (two-letter ISO code) + example: 'US' + product_id: + type: string + description: The issuer/card scheme product identifier + example: 'F' + product_type: + type: string + description: The issuer/card scheme product type + example: CLASSIC + account_holder: + type: object + description: The account holder details + properties: + billing_address: + description: The billing address of the account holder + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The phone number of the account holder + allOf: + - $ref: '#/components/schemas/Phone' diff --git a/abc_spec/components/schemas/Customers/CustomerGetResponse.yaml b/abc_spec/components/schemas/Customers/CustomerGetResponse.yaml new file mode 100644 index 000000000..8475e0171 --- /dev/null +++ b/abc_spec/components/schemas/Customers/CustomerGetResponse.yaml @@ -0,0 +1,40 @@ +type: object +description: The customer details +required: + - id + - email +properties: + id: + type: string + description: The customer's unique identifier + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' + email: + type: string + format: email + description: The customer's email address + example: JohnTest@test.com + default: + description: The ID for this customer's default instrument + type: string + example: src_imu3wifxfvlebpqqq5usjrze6y + name: + type: string + description: The customer's name + example: Jack Test + phone: + type: object + description: The customer's phone number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + metadata: + type: object + description: A set of key-value pairs that is attached to a customer + example: + coupon_code: 'NY2018' + partner_id: 123989 + instruments: + type: array + title: Instrument + description: The details of the instruments linked to this customer + items: + $ref: '#/components/schemas/CustomerGetInstrumentResponse' diff --git a/abc_spec/components/schemas/Customers/UpdateCustomerRequest.yaml b/abc_spec/components/schemas/Customers/UpdateCustomerRequest.yaml new file mode 100644 index 000000000..58f38331e --- /dev/null +++ b/abc_spec/components/schemas/Customers/UpdateCustomerRequest.yaml @@ -0,0 +1,26 @@ +type: object +description: The customer attached to the instrument +properties: + email: + description: The email address of the customer + type: string + example: JohnTest@test.com + name: + description: The name of the customer + type: string + example: John Test + default: + description: The instrument ID for this customer’s default instrument + type: string + example: src_imu3wifxfvlebpqqq5usjrze6y + phone: + type: object + description: The customer's phone number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + metadata: + type: object + description: Allows you to store additional information about a customer. You can include a maximum of 10 key-value pairs. Each key and value can be up to 100 characters long. + example: + coupon_code: 'NY2018' + partner_id: 123989 diff --git a/abc_spec/components/schemas/Disputes/Dispute.yaml b/abc_spec/components/schemas/Disputes/Dispute.yaml new file mode 100644 index 000000000..9df9c8abc --- /dev/null +++ b/abc_spec/components/schemas/Disputes/Dispute.yaml @@ -0,0 +1,130 @@ +type: object +properties: + id: + type: string + pattern: "^(dsp)_(\\w{22})$" + description: The dispute identifier. This is the same as the payment action ID + example: 'dsp_rbhwd2qrg13uhrp2newf' + category: + type: string + description: The reason for the dispute. [Find out more](https://www.checkout.com/docs/previous/risk-management/disputes/responding-to-disputes/dispute-reasons-and-recommended-evidence) + enum: + [ + fraudulent, + unrecognized, + canceled_recurring, + product_service_not_received, + not_as_described, + credit_not_issued, + duplicate, + incorrect_amount, + general, + ] + example: 'fraudulent' + amount: + type: number + description: The amount that is being disputed, in the processing currency + example: 999 + currency: + type: string + description: The processing currency + example: 'GBP' + reason_code: + type: string + description: The reason code provided by the card scheme + example: '10.4' + status: + type: string + description: The current status of the dispute + enum: + [ + evidence_required, + evidence_under_review, + resolved, + won, + lost, + canceled, + expired, + accepted, + arbitration_under_review, + arbitration_won, + arbitration_lost, + ] + example: 'evidence_required' + resolved_reason: + type: string + description: If the dispute is automatically resolved, `resolved_reason` will contain the reason it was resolved + enum: [ rapid_dispute_resolution, negative_amount, already_refunded ] + example: 'already_refunded' + relevant_evidence: + type: array + description: This list and the dispute categories will change over time. Your evidence logic should be informed by this field, not hard coded. + items: + type: string + enum: + [ + proof_of_delivery_or_service, + invoice_or_receipt, + invoice_showing_distinct_transactions, + customer_communication, + refund_or_cancellation_policy, + recurring_transaction_agreement, + additional_evidence, + ] + example: 'proof_of_delivery_or_service' + evidence_required_by: + type: string + format: date-time + description: The deadline by which to respond to the dispute. This corresponds to `received_on` + `n`, where `n` is a number of calendar days set by the scheme/acquirer + example: '2018-08-21T00:00:00Z' + received_on: + type: string + format: date-time + description: The date and time at which the dispute was issued + example: '2018-08-01T04:00:10Z' + last_update: + type: string + format: date-time + description: The date and time at which the dispute was last updated + example: '2018-08-04T10:53:13Z' + payment: + type: object + properties: + id: + type: string + description: The payment identifier + example: 'pay_88cb4e671m1da22e9bbbyx' + amount: + type: number + description: The amount that is being disputed, in the processing currency + example: 999 + currency: + type: string + description: The payment currency + example: 'GBP' + method: + type: string + description: The payment method used + example: 'Visa' + arn: + type: string + description: The acquirer reference number (ARN) + example: 'AA246873253573571073808' + processed_on: + type: string + format: date-time + description: The date and time at which the payment was requested + example: '2018-08-01T08:18:10Z' + _links: + type: object + properties: + self: + description: The dispute retrieval endpoint + properties: + href: + example: 'https://api.checkout.com/disputes/dsp_rbhwd2qrg13uhrp2newf' + evidence: + description: The dispute evidence retrieval endopint + properties: + href: + example: 'https://api.checkout.com/disputes/dsp_rbhwd2qrg13uhrp2newf/evidence' diff --git a/abc_spec/components/schemas/Disputes/DisputePaged.yaml b/abc_spec/components/schemas/Disputes/DisputePaged.yaml new file mode 100644 index 000000000..ef9118854 --- /dev/null +++ b/abc_spec/components/schemas/Disputes/DisputePaged.yaml @@ -0,0 +1,55 @@ +type: object +properties: + limit: + type: integer + description: The numbers of items to return + example: 10 + skip: + type: integer + description: The number of results to skip + example: 10 + from: + type: string + format: date-time + description: The date and time from which to filter disputes, based on the dispute's `last_update` field + example: '2018-08-12T01:15:56Z' + to: + type: string + format: date-time + description: The date and time until which to filter disputes, based on the dispute's `last_update` field + example: '2018-08-13T11:09:01Z' + statuses: + type: string + description: One or more comma-separated statuses. This works like a logical *OR* operator + example: 'evidence_required,evidence_under_review' + id: + type: string + pattern: "^(dsp)_(\\w{22})$" + description: The unique identifier of the dispute + example: 'dsp_rbhwd2qrg13uhrp2newf' + payment_id: + type: string + pattern: "^(pay)_(\\w{26})$" + description: The unique identifier of the payment + example: 'pay_88cb4e671m1da22e9bbbyx' + payment_reference: + type: string + description: An optional reference (such as an order ID) that you can use later to identify the payment. Previously known as `TrackId` + example: 'th7zxa1kcnqmes8' + payment_arn: + type: string + description: The acquirer reference number (ARN) that you can use to query the issuing bank + example: '74548998294293193445538' + this_channel_only: + type: boolean + description: If `true`, only returns disputes of the specific channel that the secret key is associated with. Otherwise, returns all disputes for that business + example: true + total_count: + type: integer + description: The total number of disputes retrieved (without taking into consideration skip and limit parameters) + example: 1 + data: + type: array + description: The list of disputes + items: + $ref: '#/components/schemas/DisputeSummary' diff --git a/abc_spec/components/schemas/Disputes/DisputeSummary.yaml b/abc_spec/components/schemas/Disputes/DisputeSummary.yaml new file mode 100644 index 000000000..23452aa03 --- /dev/null +++ b/abc_spec/components/schemas/Disputes/DisputeSummary.yaml @@ -0,0 +1,97 @@ +type: object +properties: + id: + type: string + pattern: "^(dsp)_(\\w{22})$" + description: The dispute identifier. This is the same as the action ID in the reconciliation API or the charge ID in the Hub. + example: 'dsp_rbhwd2qrg13uhrp2newf' + category: + type: string + description: The reason for the dispute. [Find out more](https://www.checkout.com/docs/previous/disputes) + enum: + [ + fraudulent, + unrecognized, + canceled_recurring, + product_service_not_received, + not_as_described, + credit_not_issued, + duplicate, + incorrect_amount, + general, + ] + example: 'fraudulent' + status: + type: string + description: The current status of the dispute + enum: + [ + evidence_required, + evidence_under_review, + resolved, + won, + lost, + canceled, + expired, + accepted, + arbitration_under_review, + arbitration_won, + arbitration_lost, + ] + example: 'evidence_required' + amount: + type: number + description: The amount that is being disputed, in the processing currency + example: 999 + currency: + type: string + description: The currency the payment was made in + example: 'GBP' + reason_code: + type: string + description: The reason code provided by the card scheme + example: '12.4' + payment_id: + type: string + description: The unique payment identifier + example: 'pay_88cb4e671m1da22e9bbbyx' + payment_reference: + type: string + description: An optional reference (such as an order ID) a merchant can use to later identify the charge. Previously known as TrackId + example: 'th7zxa1kcnqmes8' + payment_arn: + type: string + description: The acquirer reference number that can be used to query the issuing bank + example: '74548998294293193445538' + payment_method: + type: string + description: The payment method/card scheme + example: VISA + evidence_required_by: + type: string + format: date-time + description: The deadline by which to respond to the dispute. This corresponds to `received_on` + `n`, where `n` is a number of calendar days set by the scheme/acquirer + example: '2018-08-22T00:00:00Z' + received_on: + type: string + format: date-time + description: The date and time at which the dispute was issued + example: '2018-08-01T01:15:56Z' + last_update: + type: string + format: date-time + description: The date and time at which the dispute was last updated + example: '2018-08-12T04:15:56Z' + resolved_reason: + type: string + description: If the dispute is automatically resolved, `resolved_reason` will contain the reason it was resolved + enum: [ rapid_dispute_resolution, negative_amount, already_refunded ] + example: 'already_refunded' + _links: + type: object + properties: + self: + description: The dispute retrieval endpoint + properties: + href: + example: 'https://api.checkout.com/disputes/dsp_rbhwd2qrg13uhrp2newf' diff --git a/abc_spec/components/schemas/Disputes/Evidence.yaml b/abc_spec/components/schemas/Disputes/Evidence.yaml new file mode 100644 index 000000000..1eeb0fe79 --- /dev/null +++ b/abc_spec/components/schemas/Disputes/Evidence.yaml @@ -0,0 +1,14 @@ +type: object +properties: + proof_of_delivery_or_service_file: + type: string + description: The file ID of the file you uploaded as a proof of delivery or service + example: 'file_jmbfgkjromvcrn9t4qu4' + proof_of_delivery_or_service_text: + type: string + description: A brief text description of the file. You can also use this field to provide a link + example: 'Delivery slip signed by the customer' + proof_of_delivery_or_service_date_text: + type: string + description: The date on which the item was delivered. You can also use this field to provide a link + example: 'Merchandise was delivered on 2018-12-30' diff --git a/abc_spec/components/schemas/Disputes/File.yaml b/abc_spec/components/schemas/Disputes/File.yaml new file mode 100644 index 000000000..5fae59d66 --- /dev/null +++ b/abc_spec/components/schemas/Disputes/File.yaml @@ -0,0 +1,13 @@ +type: object +required: + - file + - purpose +properties: + file: + type: string + description: The path of the file to upload, and its type.
This must be a local path. + example: 'file=@/path/receipt.png;type=image/png' + purpose: + type: string + description: The purpose of the file upload. You must set this to `dispute_evidence` + example: 'dispute_evidence' diff --git a/abc_spec/components/schemas/Disputes/FilePurpose.yaml b/abc_spec/components/schemas/Disputes/FilePurpose.yaml new file mode 100644 index 000000000..d57933dc4 --- /dev/null +++ b/abc_spec/components/schemas/Disputes/FilePurpose.yaml @@ -0,0 +1,5 @@ +type: string +description: The list of file upload purposes. Currently this is only `dispute_evidence` +example: 'dispute_evidence' +enum: + - dispute_evidence diff --git a/abc_spec/components/schemas/Disputes/FileResult.yaml b/abc_spec/components/schemas/Disputes/FileResult.yaml new file mode 100644 index 000000000..4f08a23cd --- /dev/null +++ b/abc_spec/components/schemas/Disputes/FileResult.yaml @@ -0,0 +1,35 @@ +type: object +description: File was retrieved successfully +properties: + id: + type: string + description: The file identifier + example: 'file_6lbss42ezvoufcb2beo76rvwly' + filename: + type: string + description: The filename, including its extension + example: 'receipt.jpg' + purpose: + $ref: '#/components/schemas/FilePurpose' + size: + type: integer + description: The size of the file upload object (in bytes) + example: 1024 + uploaded_on: + type: string + format: date-time + description: The date and time file was uploaded (in UTC) + example: '2019-05-17T16:48:52Z' + _links: + type: object + properties: + self: + description: The file information retrieval URL + properties: + href: + example: 'https://api.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly' + download: + description: The temporary file download URL. This expires after 60 minutes + properties: + href: + example: 'https://file-bucket.s3.eu-west-1.amazonaws.com/ucdac/ucdac/6lbss42ezvoufcb2beo76rvwly?X-Amz-Expires=3600&x-amz-security-token=FQoDYXdzENL%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEa' diff --git a/abc_spec/components/schemas/Disputes/FileUploadResponse.yaml b/abc_spec/components/schemas/Disputes/FileUploadResponse.yaml new file mode 100644 index 000000000..a832445b3 --- /dev/null +++ b/abc_spec/components/schemas/Disputes/FileUploadResponse.yaml @@ -0,0 +1,15 @@ +type: object +description: File uploaded successfully +properties: + id: + type: string + description: The file identifier + example: 'file_6lbss42ezvoufcb2beo76rvwly' + _links: + type: object + properties: + self: + description: The file information retrieval URL + properties: + href: + example: 'https://api.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly' diff --git a/abc_spec/components/schemas/Disputes/ProvideEvidenceRequest.yaml b/abc_spec/components/schemas/Disputes/ProvideEvidenceRequest.yaml new file mode 100644 index 000000000..46770788e --- /dev/null +++ b/abc_spec/components/schemas/Disputes/ProvideEvidenceRequest.yaml @@ -0,0 +1,74 @@ +type: object +properties: + proof_of_delivery_or_service_file: + type: string + description: A file containing proof of delivery of goods or services + example: 'file_jmbfgkjromvcrn9t4qu4' + proof_of_delivery_or_service_text: + type: string + maximum: 500 + description: A brief text description of the file. You can also use this field to provide a link + example: 'http://checkout.com/document.pdf' + invoice_or_receipt_file: + type: string + description: A file containing an invoice/receipt + example: 'file_jmbfgkjromvcrn9t4qu4' + invoice_or_receipt_text: + type: string + maximum: 500 + description: A brief text description of the file. You can also use this field to provide a link + example: 'Copy of the invoice' + invoice_showing_distinct_transactions_file: + type: string + description: A file containing invoice showing two distinct transactions + example: 'file_jmbfgkjromvcrn9t4qu4' + invoice_showing_distinct_transactions_text: + type: string + maximum: 500 + description: A brief text description of the file. You can also use this field to provide a link + example: 'Copy of invoice #1244 showing two transactions' + customer_communication_file: + type: string + description: A file containing customer communication + example: 'file_jmbfgkjromvcrn9t4qu4' + customer_communication_text: + type: string + maximum: 500 + description: A brief text description of the file. You can also use this field to provide a link + example: 'Copy of an email exchange with the cardholder' + refund_or_cancellation_policy_file: + type: string + description: A file containing refund/cancellation policy + example: 'file_jmbfgkjromvcrn9t4qu4' + refund_or_cancellation_policy_text: + type: string + maximum: 500 + description: A brief text description of the file. You can also use this field to provide a link + example: 'Copy of the refund policy' + recurring_transaction_agreement_file: + type: string + description: A file containing the recurring transaction agreement + example: 'file_jmbfgkjromvcrn9t4qu4' + recurring_transaction_agreement_text: + type: string + maximum: 500 + description: A brief text description of the file. You can also use this field to provide a link + example: 'Copy of the recurring transaction agreement' + additional_evidence_file: + type: string + description: A file containing additional supporting documents + example: 'file_jmbfgkjromvcrn9t4qu4' + additional_evidence_text: + type: string + maximum: 500 + description: A brief text description of the file. You can also use this field to provide a link + example: 'Scanned document' + proof_of_delivery_or_service_date_file: + type: string + description: A file showing the delivery date of the provided service/merchandise + example: 'file_jmbfgkjromvcrn9t4qu4' + proof_of_delivery_or_service_date_text: + type: string + maximum: 500 + description: A brief text description of the file. You can also use this field to provide a link + example: 'Copy of the customer receipt showing the merchandise was delivered on 2018-12-20' diff --git a/abc_spec/components/schemas/Disputes/SchemeFileResponse.yaml b/abc_spec/components/schemas/Disputes/SchemeFileResponse.yaml new file mode 100644 index 000000000..1d3ac5fa1 --- /dev/null +++ b/abc_spec/components/schemas/Disputes/SchemeFileResponse.yaml @@ -0,0 +1,29 @@ +type: object +properties: + id: + type: string + pattern: "^(dsp)_(\\w{22})$" + description: The dispute identifier + example: 'dsp_rbhwd2qrg13uhrp2newf' + files: + type: array + description: The scheme files of a dispute + items: + type: object + properties: + dispute_status: + type: string + description: The dispute status of the scheme file + example: 'dispute_lost' + file: + type: string + description: The scheme file identifier + example: file_6lbss42ezvoufcb2beo76rvwly + _links: + type: object + properties: + self: + description: The dispute scheme files retrieval endpoint + properties: + href: + example: 'https://api.checkout.com/disputes/dsp_rbhwd2qrg13uhrp2newf/schemefiles' \ No newline at end of file diff --git a/abc_spec/components/schemas/Error.yaml b/abc_spec/components/schemas/Error.yaml new file mode 100644 index 000000000..7890829aa --- /dev/null +++ b/abc_spec/components/schemas/Error.yaml @@ -0,0 +1,8 @@ +type: object +properties: + request_id: + type: string + example: 0HL80RJLS76I7 + error_type: + type: string + example: request_malformed diff --git a/abc_spec/components/schemas/Events/BillingDetails.yaml b/abc_spec/components/schemas/Events/BillingDetails.yaml new file mode 100644 index 000000000..70ade7fec --- /dev/null +++ b/abc_spec/components/schemas/Events/BillingDetails.yaml @@ -0,0 +1,22 @@ +type: object +properties: + address_line_1: + type: string + example: 372 Weimann Lane + address_line_2: + type: string + example: Rolfson Alley + post_code: + type: string + example: ew1 7zb + country: + type: string + example: SJ + city: + type: string + example: North Benedicthaven + state: + type: string + example: Georgia + phone: + $ref: '#/components/schemas/Phone' diff --git a/abc_spec/components/schemas/Events/Card.yaml b/abc_spec/components/schemas/Events/Card.yaml new file mode 100644 index 000000000..1edab3b47 --- /dev/null +++ b/abc_spec/components/schemas/Events/Card.yaml @@ -0,0 +1,34 @@ +type: object +properties: + customer_id: + type: string + example: cust_7508EA38E86A4569AF12E483519E332D + expiry_month: + type: string + example: '06' + expiry_year: + type: string + example: 2018 + billing_details: + $ref: '#/components/schemas/BillingDetails' + id: + type: string + example: card_D44D7F4CCC6348698717CD80072808B0 + last4: + type: string + example: 424242******4242 + payment_method: + type: string + example: VISA + fingerprint: + type: string + example: f639cab2745bee4140bf86df6b6d6e255c5945aac3788d923fa047ea4c208622 + name: + type: string + example: Test Customer + cvv_check: + type: string + example: 'Y' + avs_check: + type: string + example: S diff --git a/abc_spec/components/schemas/Events/CustomerPaymentPlan.yaml b/abc_spec/components/schemas/Events/CustomerPaymentPlan.yaml new file mode 100644 index 000000000..4c6de05ff --- /dev/null +++ b/abc_spec/components/schemas/Events/CustomerPaymentPlan.yaml @@ -0,0 +1,38 @@ +type: object +properties: + id: + type: string + customer_plan_id: + type: string + card_id: + type: string + customer_id: + type: string + name: + type: string + plan_track_id: + type: string + auto_cap_time: + type: string + value: + type: integer + currency: + type: string + cycle: + type: string + recurring_count: + type: integer + recurring_count_left: + type: integer + total_collected_value: + type: integer + total_collected_count: + type: integer + current_recurring_status: + type: integer + start_date: + type: string + previous_recurring_date: + type: string + next_recurring_date: + type: string diff --git a/abc_spec/components/schemas/Events/Data.yaml b/abc_spec/components/schemas/Events/Data.yaml new file mode 100644 index 000000000..9ddf1a0ef --- /dev/null +++ b/abc_spec/components/schemas/Events/Data.yaml @@ -0,0 +1,88 @@ +type: object +description: The event data +properties: + id: + description: The payment unique identifier + allOf: + - $ref: '#/components/schemas/PaymentId' + action_id: + description: The unique identifier for the action performed against this payment + allOf: + - $ref: '#/components/schemas/ActionId' + amount: + type: integer + description: The payment amount + example: 6540 + currency: + type: string + description: The currency in which the payment was made (three-letter ISO code) + example: USD + maxLength: 3 + minLength: 3 + approved: + type: boolean + description: Whether the payment request was approved + example: true + status: + type: string + description: The status of the payment + enum: + - Pending + - Authorized + - Voided + - Partially Captured + - Captured + - Partially Refunded + - Refunded + - Declined + - Canceled + example: Authorized + auth_code: + type: string + description: The acquirer authorization code, if the payment was authorized. + example: '643381' + response_code: + type: string + description: The gateway response code + example: '10000' + response_summary: + type: string + description: The gateway response summary + example: 'Approved' + 3ds: + type: object + description: Provides 3D Secure enrollment status if the payment was downgraded to non-3D Secure + allOf: + - $ref: '#/components/schemas/3dsEnrollmentData' + example: + downgraded: true + enrolled: N + flagged: + type: boolean + description: Whether the payment was flagged by a risk check + default: false + example: true + source: + description: The source of the payment + type: object + allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + customer: + type: object + description: The customer to which this payment is linked + allOf: + - $ref: '#/components/schemas/PaymentResponseCustomer' + processed_on: + description: The date/time the payment was processed + allOf: + - $ref: '#/components/schemas/ServerTimestamp' + reference: + type: string + description: Your reference for the payment + example: ORD-5023-4E89 + metadata: + type: object + description: A set of key-value pairs that you can attach to a payment. It can be useful for storing additional information in a structured format. + example: + coupon_code: 'NY2018' + partner_id: 123989 diff --git a/abc_spec/components/schemas/Events/EventId.yaml b/abc_spec/components/schemas/Events/EventId.yaml new file mode 100644 index 000000000..3ad29860e --- /dev/null +++ b/abc_spec/components/schemas/Events/EventId.yaml @@ -0,0 +1,5 @@ +type: string +description: The unique event identifier +maxLength: 30 +minLength: 30 +example: 'evt_az5sblvku4ge3dwpztvyizgcau' diff --git a/abc_spec/components/schemas/Events/EventLinks.yaml b/abc_spec/components/schemas/Events/EventLinks.yaml new file mode 100644 index 000000000..2e9dfd915 --- /dev/null +++ b/abc_spec/components/schemas/Events/EventLinks.yaml @@ -0,0 +1,17 @@ +type: object +description: The links related to the event +properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the event + example: + href: 'https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau' + webhooks-retry: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to retry all of the webhooks configured for the event + example: + href: 'https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/webhooks/retry' diff --git a/abc_spec/components/schemas/Events/EventObject.yaml b/abc_spec/components/schemas/Events/EventObject.yaml new file mode 100644 index 000000000..72da9623b --- /dev/null +++ b/abc_spec/components/schemas/Events/EventObject.yaml @@ -0,0 +1,25 @@ +type: object +properties: + id: + $ref: '#/components/schemas/EventId' + type: + type: string + description: The event type + example: payment_approved + version: + type: string + description: Determines the version of the event sent + example: '2.0' + created_on: + description: The date/time the event occurred + allOf: + - $ref: '#/components/schemas/ServerTimestamp' + data: + $ref: '#/components/schemas/Data' + notifications: + type: array + description: The notifications (e.g., webhooks) that have been sent for the event + items: + $ref: '#/components/schemas/NotificationSummary' + _links: + $ref: '#/components/schemas/EventLinks' diff --git a/abc_spec/components/schemas/Events/EventResult.yaml b/abc_spec/components/schemas/Events/EventResult.yaml new file mode 100644 index 000000000..61c9eca06 --- /dev/null +++ b/abc_spec/components/schemas/Events/EventResult.yaml @@ -0,0 +1,28 @@ +type: object +properties: + total_count: + type: integer + example: 100 + description: The total number of events + limit: + type: integer + description: The `limit` query parameter + example: 10 + skip: + type: integer + example: 10 + description: The `skip` query parameter + from: + type: string + format: date-time + description: The `from` query parameter + example: '2018-01-01T00:00:00Z' + to: + type: string + format: date-time + example: '2018-01-15T12:00:00Z' + description: The `to` query parameter + data: + type: array + items: + $ref: '#/components/schemas/EventSummary' diff --git a/spec/components/schemas/Events/EventSummary.yaml b/abc_spec/components/schemas/Events/EventSummary.yaml similarity index 100% rename from spec/components/schemas/Events/EventSummary.yaml rename to abc_spec/components/schemas/Events/EventSummary.yaml diff --git a/abc_spec/components/schemas/Events/EventTypesObject.yaml b/abc_spec/components/schemas/Events/EventTypesObject.yaml new file mode 100644 index 000000000..436d0b81a --- /dev/null +++ b/abc_spec/components/schemas/Events/EventTypesObject.yaml @@ -0,0 +1,34 @@ +type: object +properties: + version: + type: string + example: '2.0' + event_types: + type: array + items: + type: string + example: + - card_verification_declined + - card_verified + - dispute_canceled + - dispute_evidence_required + - dispute_expired + - dispute_lost + - dispute_resolved + - dispute_won + - payment_approved + - payment_risk_matched + - payment_pending + - payment_declined + - payment_expired + - payment_canceled + - payment_voided + - payment_void_declined + - payment_captured + - payment_capture_declined + - payment_capture_pending + - payment_refunded + - payment_refund_declined + - payment_refund_pending + - payment_chargeback + - payment_retrieval diff --git a/abc_spec/components/schemas/Events/Notification.yaml b/abc_spec/components/schemas/Events/Notification.yaml new file mode 100644 index 000000000..2b47ac208 --- /dev/null +++ b/abc_spec/components/schemas/Events/Notification.yaml @@ -0,0 +1,39 @@ +type: object +properties: + id: + $ref: '#/components/schemas/NotificationId' + url: + type: string + description: The notification endpoint + example: https://example.com/webhooks + success: + type: boolean + description: Whether the notification eventually succeeded + example: false + content_type: + type: string + description: The content type of the data sent to the endpoint + example: json + attempts: + type: array + description: The notification events ordered by timestamp in descending order (latest first) + items: + $ref: '#/components/schemas/NotificationAttempt' + _links: + type: object + description: The links related to the notification + properties: + self: + type: object + description: The URI of the notification + allOf: + - $ref: '#/components/schemas/Link' + example: + href: https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/notifications/ntf_az5sblvku4ge3dwpztvyizgcau + retry: + type: object + description: A link to retry the notification to the configured webhook + allOf: + - $ref: '#/components/schemas/Link' + example: + href: https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/webhooks/wh_5nuzkt62ddxuho5rwsvt6pyesi/retry diff --git a/abc_spec/components/schemas/Events/NotificationAttempt.yaml b/abc_spec/components/schemas/Events/NotificationAttempt.yaml new file mode 100644 index 000000000..1dac6f0ec --- /dev/null +++ b/abc_spec/components/schemas/Events/NotificationAttempt.yaml @@ -0,0 +1,21 @@ +type: object +properties: + status_code: + type: integer + description: The HTTP status code returned from the target server + example: 400 + response_body: + type: string + description: The response body returned from the target server + example: Bad Request + send_mode: + type: string + description: Whether the notification was sent automatically or requested manually + enum: + - Automatic + - Manual + timestamp: + type: string + description: The date/time the attempt was made + allOf: + - $ref: '#/components/schemas/ServerTimestamp' diff --git a/abc_spec/components/schemas/Events/NotificationId.yaml b/abc_spec/components/schemas/Events/NotificationId.yaml new file mode 100644 index 000000000..3a8c7f72f --- /dev/null +++ b/abc_spec/components/schemas/Events/NotificationId.yaml @@ -0,0 +1,5 @@ +type: string +description: The unique notification identifier +maxLength: 30 +minLength: 30 +example: 'ntf_az5sblvku4ge3dwpztvyizgcau' diff --git a/abc_spec/components/schemas/Events/NotificationSummary.yaml b/abc_spec/components/schemas/Events/NotificationSummary.yaml new file mode 100644 index 000000000..0fb771765 --- /dev/null +++ b/abc_spec/components/schemas/Events/NotificationSummary.yaml @@ -0,0 +1,20 @@ +type: object +properties: + id: + $ref: '#/components/schemas/NotificationId' + url: + type: string + description: The notification endpoint + example: https://example.com/webhooks + success: + type: boolean + description: Whether the notification eventually succeeded + example: false + _links: + type: object + description: The links related to the notification + properties: + self: + type: string + example: + href: https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/notifications/ntf_az5sblvku4ge3dwpztvyizgcau diff --git a/abc_spec/components/schemas/Events/PaymentIdInvalidResponse.yaml b/abc_spec/components/schemas/Events/PaymentIdInvalidResponse.yaml new file mode 100644 index 000000000..911c76f43 --- /dev/null +++ b/abc_spec/components/schemas/Events/PaymentIdInvalidResponse.yaml @@ -0,0 +1,16 @@ +type: object +properties: + request_id: + type: string + description: The identifier of the request + example: 0HMA0CMCKVMI1:00000001 + error_type: + type: string + description: The type of error + example: request_invalid + error_codes: + type: array + description: Array containing error codes + items: + type: string + example: "payment_id_invalid" \ No newline at end of file diff --git a/abc_spec/components/schemas/Events/Payment_Id.yaml b/abc_spec/components/schemas/Events/Payment_Id.yaml new file mode 100644 index 000000000..a7b9b09ce --- /dev/null +++ b/abc_spec/components/schemas/Events/Payment_Id.yaml @@ -0,0 +1,51 @@ +type: object +properties: + total_count: + type: integer + description: The total number of events returned + example: 1 + limit: + type: integer + description: The limit you set on the number of events returned + example: 5 + skip: + type: integer + description: The number of events skipped + example: 0 + data: + type: array + items: + type: object + properties: + id: + type: string + description: The event identifier + example: "evt_3nup2pts3emebenhtw6ky4frim" + type: + type: string + description: The type of event + example: "payment_approved" + created_on: + type: string + description: The date and time the event was created + example: "2021-06-25T09:40:12Z" + _links: + type: object + description: The links relating to the event + properties: + self: + type: object + description: The URI of the event + properties: + href: + type: string + description: The link URL + example: "https://api.checkout.com/events/evt_3nup2pts3emebenhtw6ky4frim" + webhooks-retry: + type: object + description: A link to retry all of the webhooks configured for the event + properties: + href: + type: string + description: The link URL + example: "https://api.checkout.com/events/evt_3nup2pts3emebenhtw6ky4frim/webhooks/retry" \ No newline at end of file diff --git a/abc_spec/components/schemas/Events/Phone.yaml b/abc_spec/components/schemas/Events/Phone.yaml new file mode 100644 index 000000000..64ae542ec --- /dev/null +++ b/abc_spec/components/schemas/Events/Phone.yaml @@ -0,0 +1,10 @@ +type: object +properties: + country_code: + type: string + description: The international country calling code + example: '975' + number: + type: string + example: '174217187' + description: The phone number diff --git a/abc_spec/components/schemas/Events/Product.yaml b/abc_spec/components/schemas/Events/Product.yaml new file mode 100644 index 000000000..6f29d74f9 --- /dev/null +++ b/abc_spec/components/schemas/Events/Product.yaml @@ -0,0 +1,26 @@ +type: object +properties: + name: + type: string + example: Tablet 1 gold limited + description: + type: string + example: Nokia Lumia + sku: + type: string + example: 1aab2aa + price: + type: integer + example: 100 + quantity: + type: integer + example: 1 + image: + type: string + example: 'http://www.test_Jabari.com/' + shipping_cost: + type: integer + example: 10 + tracking_url: + type: string + example: 'https://www.tracker.com' diff --git a/abc_spec/components/schemas/Events/ShippingDetails.yaml b/abc_spec/components/schemas/Events/ShippingDetails.yaml new file mode 100644 index 000000000..fbac31955 --- /dev/null +++ b/abc_spec/components/schemas/Events/ShippingDetails.yaml @@ -0,0 +1,22 @@ +type: object +properties: + address_line_1: + type: string + example: 333 Cormier Bypass + address_line_2: + type: string + example: Rolfson Alley + post_code: + type: string + example: BR3 6TK + country: + type: string + example: GB + city: + type: string + example: Bromley + state: + type: string + example: Greater London + phone: + $ref: '#/components/schemas/Phone' diff --git a/abc_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse.yaml b/abc_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse.yaml new file mode 100644 index 000000000..61d48b394 --- /dev/null +++ b/abc_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse.yaml @@ -0,0 +1,131 @@ +type: object +discriminator: + propertyName: status + mapping: + Payment Pending: '#/components/schemas/GetHostedPaymentsResponseStatusPaymentPending' + Payment Received: '#/components/schemas/GetHostedPaymentsResponseStatusPaymentReceived' + Expired: '#/components/schemas/GetHostedPaymentsResponseStatusExpired' + +required: + - id + - status + - amount + - currency + - billing + - success_url + - cancel_url + - failure_url + - _links + +properties: + id: + example: hpp_xGQBg0AXl3cM + allOf: + - $ref: '#/components/schemas/HostedPaymentId' + status: + type: string + enum: + - Payment Pending + - Payment Received + - Expired + description: | + The status of the Hosted Payments Page: + - `Payment Pending`: The Hosted Payments Page can accept a payment from the customer. A payment may have been attempted by the customer but not completed successfully. + - `Payment Received`: A payment has been received successfully using this Hosted Payments Page. + - `Expired`: The Hosted Payments Page has expired and can no longer be accessed. + example: Payment Pending + payment_id: + type: string + description: Unique identifier for an in progress or completed payment for this Payment Link. + example: + amount: + type: integer + description: The original payment amount. + example: 100 + currency: + type: string + description: The three-letter ISO currency code of the payment.
+ example: GBP + reference: + type: string + description: Your reference for the payment. + example: ORD-123A + description: + type: string + description: A description of the payment. + example: Payment for Gold Necklace + customer: + type: object + description: The customer's details. + properties: + email: + type: string + format: email + description: The email address for the customer. + example: brucewayne@email.com + name: + type: string + description: The customer's name. + example: Bruce Wayne + billing: + type: object + additionalProperties: false + description: The billing details. + required: + - address + properties: + address: + type: object + description: The billing address. + required: + - country + allOf: + - $ref: '#/components/schemas/Address' + phone: + type: object + description: The customer's phone number. + required: + - number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + products: + type: array + description: Details about the provided products. + items: + type: object + additionalProperties: false + required: + - name + - price + properties: + name: + type: string + description: Descriptive item name. + example: Gold Necklace + quantity: + type: integer + description: The item quantity + example: 1 + price: + type: integer + description: Minor units. Includes tax, excludes discounts. + example: 200 + metadata: + type: object + description: Any additional information stored at the point of creation. + additionalProperties: true + success_url: + type: string + format: uri + description: The provided URL your customer will be redirected to upon a successful payment. + example: https://example.com/success + cancel_url: + type: string + format: uri + description: The provided URL your customer will be redirected to if the payment is cancelled. + example: https://example.com/cancel + failure_url: + type: string + format: uri + description: The provided URL your customer will be redirected to upon a failed payment. + example: https://example.com/failure diff --git a/abc_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseLinks.yaml b/abc_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseLinks.yaml new file mode 100644 index 000000000..392bcc388 --- /dev/null +++ b/abc_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseLinks.yaml @@ -0,0 +1,32 @@ +type: object +description: The links related to the Hosted Payments Page. +minItems: 2 +required: + - self + - redirect +properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the Hosted Payments Page details. + redirect: + type: object + description: The link to visit the Hosted Payments Page. + allOf: + - $ref: '#/components/schemas/Link' + payment: + type: object + description: The URI of the in progress or completed payment for this Hosted Payments Page. + allOf: + - $ref: '#/components/schemas/Link' + payment_actions: + type: object + description: The URI of the actions associated with the in progress or completed payment for this Hosted Payments Page. + allOf: + - $ref: '#/components/schemas/Link' +example: + self: + href: 'https://api.sandbox.checkout.com/hosted-payments/hpp_xGQBg0AXl3cM' + redirect: + href: 'https://pay.sandbox.checkout.com/page/hpp_xGQBg0AXl3cM' diff --git a/abc_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseStatusExpired.yaml b/abc_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseStatusExpired.yaml new file mode 100644 index 000000000..f1044ff0a --- /dev/null +++ b/abc_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseStatusExpired.yaml @@ -0,0 +1,9 @@ +type: object +description: An expired Hosted Payments Page. +allOf: + - $ref: '#/components/schemas/GetHostedPaymentsResponse' + - type: object + properties: + _links: + allOf: + - $ref: '#/components/schemas/GetHostedPaymentsResponseLinks' diff --git a/abc_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseStatusPaymentPending.yaml b/abc_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseStatusPaymentPending.yaml new file mode 100644 index 000000000..a82c83b51 --- /dev/null +++ b/abc_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseStatusPaymentPending.yaml @@ -0,0 +1,9 @@ +type: object +description: A Hosted Payments Page that can accept a payment from a customer. +allOf: + - $ref: '#/components/schemas/GetHostedPaymentsResponse' + - type: object + properties: + _links: + allOf: + - $ref: '#/components/schemas/GetHostedPaymentsResponseLinks' diff --git a/abc_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseStatusPaymentReceived.yaml b/abc_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseStatusPaymentReceived.yaml new file mode 100644 index 000000000..003d92e15 --- /dev/null +++ b/abc_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseStatusPaymentReceived.yaml @@ -0,0 +1,25 @@ +type: object +description: A Hosted Payments Page that has received a payment +required: + - payment_id +allOf: + - $ref: '#/components/schemas/GetHostedPaymentsResponse' + - type: object + properties: + payment_id: + example: pay_m3s3k65cfpl2hd2rv4by4vl4r4 + _links: + required: + - payment + - payment_actions + allOf: + - $ref: '#/components/schemas/GetHostedPaymentsResponseLinks' + example: + self: + href: https://api.sandbox.checkout.com/hosted-payments/hpp_xGQBg0AXl3cM + redirect: + href: https://pay.sandbox.checkout.com/page/hpp_xGQBg0AXl3cM + payment: + href: https://api.sandbox.checkout.com/payments/pay_m3s3k65cfpl2hd2rv4by4vl4r4 + payment_actions: + href: https://api.sandbox.checkout.com/payments/pay_m3s3k65cfpl2hd2rv4by4vl4r4/actions diff --git a/abc_spec/components/schemas/HostedPayments/HostedPaymentId.yaml b/abc_spec/components/schemas/HostedPayments/HostedPaymentId.yaml new file mode 100644 index 000000000..851f62ca4 --- /dev/null +++ b/abc_spec/components/schemas/HostedPayments/HostedPaymentId.yaml @@ -0,0 +1,5 @@ +type: string +pattern: '^hpp_[A-Za-z0-9_-]{12}$' +description: The unique identifier for a Hosted Payments Page. +maxLength: 16 +minLength: 16 diff --git a/abc_spec/components/schemas/HostedPayments/HostedPaymentsRequest.yaml b/abc_spec/components/schemas/HostedPayments/HostedPaymentsRequest.yaml new file mode 100644 index 000000000..2d5f6d9e9 --- /dev/null +++ b/abc_spec/components/schemas/HostedPayments/HostedPaymentsRequest.yaml @@ -0,0 +1,284 @@ +type: object +required: + - currency + - billing + - success_url + - cancel_url + - failure_url +properties: + amount: + type: integer + description: The payment amount. The exact format depends on the currency + minimum: 1 + example: 1000 + currency: + type: string + description: The three-letter ISO currency code of the payment + example: GBP + minLength: 3 + maxLength: 3 + payment_type: + type: string + description: This must be specified for card payments where the cardholder is not present (i.e., recurring or mail order / telephone order) + enum: + - Regular + - Recurring + default: Regular + payment_ip: + type: string + format: ipv4 + maxLength: 45 + description: The IP address used to make the payment. Used by our risk engine to check the customer's IP address – only accepts IPv4 addresses + billing_descriptor: + type: object + description: An optional description that is displayed on the customer's statement identifying a purchase + required: + - name + - city + properties: + name: + type: string + maxLength: 25 + description: A dynamic description of the change + city: + type: string + minLength: 1 + maxLength: 13 + description: The city from which the charge originated + reference: + type: string + description: A reference you can later use to identify this payment, such as an order number + example: ORD-123A + maxLength: 50 + description: + type: string + description: A description of the payment + example: Payment for Gold Necklace + maxLength: 100 + customer: + type: object + description: The customer's details + properties: + email: + type: string + format: email + description: An optional email address to associate with the customer + example: brucewayne@email.com + maxLength: 255 + name: + type: string + description: The customer's name. This will only set the name for new customers + example: Bruce Wayne + maxLength: 255 + shipping: + type: object + description: The address any products are being sent to. + required: + - address + properties: + address: + type: object + description: The customer's address to ship to. + required: + - country + allOf: + - $ref: '#/components/schemas/Address' + phone: + type: object + description: The customer's phone number + required: + - number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + billing: + type: object + additionalProperties: false + description: The billing details + required: + - address + properties: + address: + type: object + description: The billing address + required: + - country + allOf: + - $ref: '#/components/schemas/Address' + phone: + type: object + description: The customer's phone number. This will override the phone number specified during tokenization + required: + - number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + recipient: + $ref: '#/components/schemas/PaymentRecipient' + processing: + type: object + description: Use the processing object to influence or override the data sent during card processing. + properties: + aft: + type: boolean + description: Indicates whether the payment is an [Account Funding Transaction](https://www.checkout.com/docs/previous/payments/manage-payments/account-funding-transactions). + allow_payment_methods: + type: array + description: > + Use to specify which payment methods should render on the page. Check the requirements for each payment method + enum: + - card + - sofort + - klarna + - paypal + - ideal + - sepa + - knet + - giropay + - bancontact + - eps + - p24 + - multibanco + example: + - card + products: + type: array + description: Details about the products in the order + minItems: 1 + maxItems: 1000 + items: + type: object + additionalProperties: false + required: + - name + - quantity + - price + properties: + name: + type: string + description: Descriptive item name + example: Gold Necklace + quantity: + type: integer + description: The item quantity. Non-negative + minimum: 1 + example: 1 + price: + type: integer + description: 'Minor units. Includes tax, excludes discounts. The exact format depends on the currency' + minimum: 0 + example: 1000 + risk: + $ref: '#/components/schemas/RiskRequest' + success_url: + type: string + format: uri + description: For redirect payment methods, this overrides the default success redirect URL configured on your account + example: https://example.com/payments/success + maxLength: 255 + cancel_url: + type: string + format: uri + description: The URL to which the customer should be directed if they cancel the payment + example: https://example.com/payments/cancel + maxLength: 255 + failure_url: + type: string + format: uri + description: For redirect payment methods, this overrides the default failure redirect URL configured on your account + example: https://example.com/payments/failure + maxLength: 255 + metadata: + type: object + title: The Metadata Schema + description: Allows you to store additional information about the transaction. This object only allows one level of depth, so cannot accept non-primitive data types such as objects or arrays. + additionalProperties: true + locale: + type: string + description: Creates a translated version of the page in the specified language. For Klarna payments, read our documentation about expected parameters for certain locales. + enum: + - ar + - da-DK + - de-AT + - de-CH + - de-DE + - el + - en-AT + - en-CH + - en-DE + - en-DK + - en-FI + - en-GB + - en-NL + - en-NO + - en-SE + - es-ES + - fi-FI + - fil-PH + - fr-CH + - fr-FR + - hi-IN + - id-ID + - it-CH + - it-IT + - ja-JP + - ms-MY + - nb-NO + - nl-NL + - pt-PT + - sv-SE + - th-TH + - vi-VN + - zh-CN + - zh-HK + - zh-TW + default: en-GB + 3ds: + type: object + description: Information required for 3D Secure payments + properties: + enabled: + type: boolean + description: Whether to process this payment as a 3D Secure payment + default: false + example: false + attempt_n3d: + type: boolean + description: Determines whether to attempt a 3D Secure payment as non-3D Secure should the card issuer not be enrolled + default: false + example: false + challenge_indicator: + type: string + description: Indicates the preference for whether or not a 3DS challenge should be performed. The customer’s bank has the final say on whether or not the customer receives the challenge. + enum: + - no_preference + - no_challenge_requested + - challenge_requested + - challenge_requested_mandate + default: no_preference + allow_upgrade: + type: boolean + default: true + description: Whether to process this payment as 3D Secure if the authorization was soft declined because 3DS authentication is required. + exemption: + type: string + enum: + - low_value + - secure_corporate_payment + - trusted_listing + - transaction_risk_assessment + - 3ds_outage + - sca_delegation + - out_of_sca_scope + - other + - low_risk_program + - recurring_operation + description: Specifies an exemption reason so that the payment is not processed using 3D Secure authentication. Learn more about exemptions in our SCA compliance guide. + capture: + type: boolean + description: Whether to capture the payment (if applicable). + example: true + capture_on: + description: | + A timestamp (ISO 8601 code) that determines when the payment should be captured. + Providing this field will automatically set `capture` to true. + allOf: + - $ref: '#/components/schemas/Timestamp' diff --git a/abc_spec/components/schemas/HostedPayments/HostedPaymentsResponse.yaml b/abc_spec/components/schemas/HostedPayments/HostedPaymentsResponse.yaml new file mode 100644 index 000000000..fdb814944 --- /dev/null +++ b/abc_spec/components/schemas/HostedPayments/HostedPaymentsResponse.yaml @@ -0,0 +1,45 @@ +type: object +required: + - id + - _links +properties: + id: + example: 'hpp_xGQBg0AXl3cM' + allOf: + - $ref: '#/components/schemas/HostedPaymentId' + reference: + type: string + description: A reference you can later use to identify this payment, such as an order number. + example: ORD-5023-4E89 + warnings: + type: array + description: Related to the `allow_payment_methods` object in the request. Included in the response if an alternative payment method is passed through, but no card schemes are configured against the account. + items: + type: object + properties: + code: + type: string + description: Reason for the warning. + example: card_unavailable + description: + type: string + description: Description of the warning code. + example: Card was provided in allow_payment_methods, but no card schemes are configured. + _links: + type: object + description: The links related to the hosted payment. + readOnly: true + minItems: 1 + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + example: + href: 'https://api.sandbox.checkout.com/hosted-payments/hpp_xGQBg0AXl3cM' + redirect: + type: object + allOf: + - $ref: '#/components/schemas/Link' + example: + href: 'https://pay.sandbox.checkout.com/page/hpp_xGQBg0AXl3cM' diff --git a/abc_spec/components/schemas/IPAddress.yaml b/abc_spec/components/schemas/IPAddress.yaml new file mode 100644 index 000000000..2c300e503 --- /dev/null +++ b/abc_spec/components/schemas/IPAddress.yaml @@ -0,0 +1,4 @@ +type: string +format: ipv4 +maxLength: 45 +example: '90.197.169.245' diff --git a/abc_spec/components/schemas/Instruments/InstrumentRequest.yaml b/abc_spec/components/schemas/Instruments/InstrumentRequest.yaml new file mode 100644 index 000000000..b2653e481 --- /dev/null +++ b/abc_spec/components/schemas/Instruments/InstrumentRequest.yaml @@ -0,0 +1,59 @@ +type: object +required: + - type + - token +properties: + type: + type: string + description: The instrument type + example: token + token: + type: string + description: The Checkout.com token + pattern: ^(tok)_(\w{26})$ | ^(card_tok)_(\w{12})$ + example: tok_asoto22g2fsu7prwomy12sgfsa + account_holder: + type: object + description: The account holder details + properties: + billing_address: + description: The billing address of the account holder + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The phone number of the account holder + allOf: + - $ref: '#/components/schemas/Phone' + customer: + type: object + description: The customer's details + properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + description: The identifier of an existing customer + # example: "cus_y3oqhf46pyzuxjbcn2giaqnb44" + email: + type: string + format: email + description: An optional email address to associate with the customer + maxLength: 255 + name: + type: string + description: The customer's name. This will only set the name for *new* customers. + maxLength: 255 + phone: + description: The customer's phone number. This will only set the phone number for *new* customers. + example: + allOf: + - $ref: '#/components/schemas/Phone' + default: + type: boolean + description: If true, this instrument will become the default for the customer. If a *new* customer is created as a result of this request, the instrument will automatically be the default. + example: + email: 'brucewayne@gmail.com' + name: 'Bruce Wayne' + phone: + country_code: '+1' + number: '4155552671' + default: true diff --git a/abc_spec/components/schemas/Instruments/InstrumentResponse.yaml b/abc_spec/components/schemas/Instruments/InstrumentResponse.yaml new file mode 100644 index 000000000..63d9f30c0 --- /dev/null +++ b/abc_spec/components/schemas/Instruments/InstrumentResponse.yaml @@ -0,0 +1,100 @@ +type: object +required: + - id + - type + - expiry_month + - expiry_year + - last4 + - bin + - fingerprint +properties: + id: + description: The unique identifier of the payment source or destination that can be used later for payments + type: string + example: 'src_wmlfc3zyhqzehihu7giusaaawu' + type: + description: The underlying instrument type (for instruments created from Checkout.com tokens, this will reflect the type of instrument that was tokenized) + type: string + example: 'card' + fingerprint: + type: string + description: A token that can uniquely identify this instrument across all customers + example: vnsdrvikkvre3dtrjjvlm5du4q + expiry_month: + type: integer + description: The expiry month + minimum: 1 + example: 6 + maxLength: 2 + expiry_year: + type: integer + description: The expiry year + example: 2025 + minLength: 4 + maxLength: 4 + scheme: + type: string + description: The card scheme + example: 'VISA' + last4: + type: string + description: The last four digits of the card number + example: '9996' + minLength: 4 + maxLength: 4 + bin: + type: string + description: The card issuer's bank identification number (BIN) + example: '454347' + card_type: + type: string + description: The card type + enum: + - Credit + - Debit + - Prepaid + - Charge + - Deferred Debit + example: Credit + card_category: + type: string + description: The card category + enum: + - Consumer + - Commercial + example: Consumer + issuer: + type: string + description: The name of the card issuer + example: 'GOTHAM STATE BANK' + issuer_country: + type: string + maxLength: 2 + minLength: 2 + description: The card issuer's country (two-letter ISO code) + example: 'US' + product_id: + type: string + description: The issuer/card scheme product identifier + example: 'F' + product_type: + type: string + description: The issuer/card scheme product type + example: CLASSIC + customer: + type: object + description: The customer details + properties: + id: + type: string + description: The customer's unique identifier + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' + email: + type: string + format: email + description: The customer's email address + example: JohnTest@test.com + name: + type: string + description: The customer's name + example: Jack Test diff --git a/abc_spec/components/schemas/Instruments/RetrieveInstrumentResponse.yaml b/abc_spec/components/schemas/Instruments/RetrieveInstrumentResponse.yaml new file mode 100644 index 000000000..55dc50f92 --- /dev/null +++ b/abc_spec/components/schemas/Instruments/RetrieveInstrumentResponse.yaml @@ -0,0 +1,120 @@ +type: object +required: + - id + - type + - fingerprint + - expiry_month + - expiry_year + - last4 + - bin +properties: + id: + description: The instrument id for the retrieved instrument + type: string + example: src_lmyvsjadlxxu7kqlgevt6ebkra + type: + description: The instrument type + type: string + example: card + fingerprint: + type: string + description: A token that can uniquely identify this card across all customers + pattern: ^([a-z0-9]{26})$ + example: vnsdrvikkvre3dtrjjvlm5du4q + expiry_month: + type: integer + description: The expiry month + minimum: 1 + example: 6 + maxLength: 2 + expiry_year: + type: integer + description: The expiry year + example: 2025 + minLength: 4 + maxLength: 4 + name: + description: The name of the cardholder + type: string + example: John Test + scheme: + type: string + description: The card scheme + example: VISA + last4: + type: string + description: The last four digits of the card number + example: '9996' + minLength: 4 + maxLength: 4 + bin: + type: string + description: The card issuer's bank identification number (BIN) + example: '454347' + card_type: + type: string + description: The card type + enum: + - Credit + - Debit + - Prepaid + - Charge + - Deferred Debit + example: Credit + card_category: + type: string + description: The card category + enum: + - Consumer + - Commercial + example: Consumer + issuer: + type: string + description: The name of the card issuer + example: 'GOTHAM STATE BANK' + issuer_country: + type: string + maxLength: 2 + minLength: 2 + description: The card issuer's country (two-letter ISO code) + example: 'US' + product_id: + type: string + description: The issuer/card scheme product identifier + example: 'F' + product_type: + type: string + description: The issuer/card scheme product type + example: CLASSIC + account_holder: + type: object + description: The account holder details + properties: + billing_address: + description: The billing address of the account holder + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The phone number of the account holder + allOf: + - $ref: '#/components/schemas/Phone' + customer: + type: object + description: The customer attached to the instrument + properties: + id: + description: The identifier of an existing customer + type: string + example: cus_gajmdgunwwlehbctuj6a3sifpm + email: + description: The email address of the customer + type: string + example: JohnTest@test.com + name: + description: The name address of the customer + type: string + example: John Test + default: + description: True, if this instrument is set as the default for the customer + type: boolean + example: true diff --git a/abc_spec/components/schemas/Instruments/UpdateInstrumentRequest.yaml b/abc_spec/components/schemas/Instruments/UpdateInstrumentRequest.yaml new file mode 100644 index 000000000..94a6758b4 --- /dev/null +++ b/abc_spec/components/schemas/Instruments/UpdateInstrumentRequest.yaml @@ -0,0 +1,42 @@ +type: object +properties: + expiry_month: + type: integer + description: The expiry month + minimum: 1 + example: 6 + maxLength: 2 + expiry_year: + type: integer + description: The expiry year + example: 2025 + minLength: 4 + maxLength: 4 + name: + description: The name of the cardholder + type: string + example: John Test + account_holder: + type: object + description: The account holder details + properties: + billing_address: + description: The billing address of the account holder + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The phone number of the account holder + allOf: + - $ref: '#/components/schemas/Phone' + customer: + type: object + description: The customer attached to the instrument + properties: + id: + description: The identifier of an existing customer + type: string + example: cus_gajmdgunwwlehbctuj6a3sifpm + default: + description: If true, sets this instrument as the default for the customer (if false, no changes are actioned) + type: boolean + example: true diff --git a/abc_spec/components/schemas/Instruments/UpdateInstrumentResponse.yaml b/abc_spec/components/schemas/Instruments/UpdateInstrumentResponse.yaml new file mode 100644 index 000000000..7edf8adc9 --- /dev/null +++ b/abc_spec/components/schemas/Instruments/UpdateInstrumentResponse.yaml @@ -0,0 +1,14 @@ +type: object +required: + - type + - fingerprint +properties: + type: + description: The instrument type + type: string + example: card + fingerprint: + type: string + description: A token that can uniquely identify this card across all customers + pattern: ^([a-z0-9]{26})$ + example: vnsdrvikkvre3dtrjjvlm5du4q diff --git a/abc_spec/components/schemas/Instruments/properties/AccountHolder.yaml b/abc_spec/components/schemas/Instruments/properties/AccountHolder.yaml new file mode 100644 index 000000000..49ae35617 --- /dev/null +++ b/abc_spec/components/schemas/Instruments/properties/AccountHolder.yaml @@ -0,0 +1,72 @@ +type: object +description: The account holder details +properties: + type: + description: The type of account holder + type: string + enum: + - individual + - corporate + - government + example: individual + + first_name: + description: | + The account holder's first name + type: string + example: 'John' + + last_name: + description: | + The account holder's last name + type: string + example: 'Smith' + + company_name: + description: | + The legal name of a registered company that holds the account + type: string + example: Test company + + tax_id: + description: The account holder's tax number/reference + type: string + example: '123456' + + date_of_birth: + description: The account holder's date of birth in `YYYY-MM-DD` format + type: string + format: date + example: '1986-01-01' + + country_of_birth: + description: The two-letter ISO country code of the account holder's country of birth + type: string + example: GB + + residential_status: + description: The account holder's residential status + type: string + enum: + - resident + - non_resident + example: resident + + billing_address: + description: The billing address of the account holder + allOf: + - $ref: '#/components/schemas/Address' + + phone: + description: The phone number of the account holder + allOf: + - $ref: '#/components/schemas/PhoneNumber' + + identification: + $ref: '#/components/schemas/AccountHolderIdentification' + + email: + description: The account holder's email address + type: string + format: email + example: test.user@checkout.com diff --git a/abc_spec/components/schemas/Instruments/properties/AccountHolderIdentification.yaml b/abc_spec/components/schemas/Instruments/properties/AccountHolderIdentification.yaml new file mode 100644 index 000000000..2c7929f3e --- /dev/null +++ b/abc_spec/components/schemas/Instruments/properties/AccountHolderIdentification.yaml @@ -0,0 +1,21 @@ +type: object +description: Bank account holder's proof of identification +properties: + type: + description: The type of identification used to identify the account holder + type: string + enum: + - passport + - driving_licence + - national_id + - company_registration + - tax_id + example: passport + number: + description: The identification number + type: string + example: 09876 + issuing_country: + description: The two-letter ISO country code of the country that issued the identification + type: string + example: US diff --git a/abc_spec/components/schemas/Instruments/properties/BankDetails.yaml b/abc_spec/components/schemas/Instruments/properties/BankDetails.yaml new file mode 100644 index 000000000..df14cb89c --- /dev/null +++ b/abc_spec/components/schemas/Instruments/properties/BankDetails.yaml @@ -0,0 +1,17 @@ +type: object +description: Details of the bank +properties: + name: + description: The bank's name + type: string + example: Lloyds TSB + + branch: + description: The bank branch's name + type: string + example: Bournemouth + + address: + allOf: + - $ref: '#/components/schemas/Address' + description: The bank's contact address diff --git a/abc_spec/components/schemas/Instruments/properties/UpdateCardAccountHolder.yaml b/abc_spec/components/schemas/Instruments/properties/UpdateCardAccountHolder.yaml new file mode 100644 index 000000000..57d0d5280 --- /dev/null +++ b/abc_spec/components/schemas/Instruments/properties/UpdateCardAccountHolder.yaml @@ -0,0 +1,24 @@ +type: object +description: The account holder details +properties: + first_name: + description: | + First name of the instrument owner + type: string + example: 'John' + + last_name: + description: | + Last name of the instrument owner. + type: string + example: 'Smith' + + billing_address: + description: The billing address of the account holder + allOf: + - $ref: '#/components/schemas/Address' + + phone: + description: The phone number of the account holder + allOf: + - $ref: '#/components/schemas/PhoneNumber' diff --git a/abc_spec/components/schemas/InvalidError.yaml b/abc_spec/components/schemas/InvalidError.yaml new file mode 100644 index 000000000..14550a104 --- /dev/null +++ b/abc_spec/components/schemas/InvalidError.yaml @@ -0,0 +1,8 @@ +allOf: + - $ref: '#/components/schemas/Error' + - type: object + properties: + details: + type: array + items: + type: string diff --git a/abc_spec/components/schemas/Links/Link.yaml b/abc_spec/components/schemas/Links/Link.yaml new file mode 100644 index 000000000..74c4421b9 --- /dev/null +++ b/abc_spec/components/schemas/Links/Link.yaml @@ -0,0 +1,7 @@ +type: object +properties: + href: + description: The link URL + type: string +required: + - href diff --git a/abc_spec/components/schemas/Links/SelfLink.yaml b/abc_spec/components/schemas/Links/SelfLink.yaml new file mode 100644 index 000000000..8a7f0211c --- /dev/null +++ b/abc_spec/components/schemas/Links/SelfLink.yaml @@ -0,0 +1,11 @@ +type: object +allOf: + - $ref: '#/components/schemas/Link' +properties: + rel: + description: The link type + type: string + enum: + - self +required: + - rel diff --git a/abc_spec/components/schemas/PagingError.yaml b/abc_spec/components/schemas/PagingError.yaml new file mode 100644 index 000000000..5f4242fef --- /dev/null +++ b/abc_spec/components/schemas/PagingError.yaml @@ -0,0 +1,13 @@ +type: object +properties: + request_id: + type: string + example: 0HL80RJLS76I7 + error_type: + type: string + example: request_invalid + error_codes: + type: array + items: + type: string + example: paging_limit_invalid diff --git a/abc_spec/components/schemas/PaymentLinks/GetPaymentLinkResponse.yaml b/abc_spec/components/schemas/PaymentLinks/GetPaymentLinkResponse.yaml new file mode 100644 index 000000000..331586a40 --- /dev/null +++ b/abc_spec/components/schemas/PaymentLinks/GetPaymentLinkResponse.yaml @@ -0,0 +1,185 @@ +type: object +discriminator: + propertyName: status + mapping: + Active: '#/components/schemas/PaymentLinkResponseStatusActive' + Payment Received: '#/components/schemas/PaymentLinkResponseStatusPaymentReceived' + Expired: '#/components/schemas/PaymentLinkResponseStatusExpired' + +required: + - id + - status + - amount + - currency + - expires_on + - created_on + - billing + - _links + +properties: + id: + example: pl_ELqQJXdXzabU + allOf: + - $ref: '#/components/schemas/PaymentLinkId' + status: + type: string + enum: + - Active + - Payment Received + - Expired + description: | + The status of the Payment Link: + - `Active`: The Payment Link can accept a payment from the customer. A payment may have been attempted by the customer but not completed successfully. + - `Payment Received`: A payment has been received successfully using this Payment Link. + - `Expired`: The Payment Link has expired and can no longer be accessed. + example: Active + payment_id: + type: string + description: Unique identifier for an in progress or completed payment for this Payment Link. + example: + amount: + type: integer + description: The original payment amount. + example: 100 + currency: + type: string + description: The three-letter ISO currency code of the payment.
+ example: GBP + reference: + type: string + description: Your reference for the payment. + example: ORD-123A + description: + type: string + description: A description of the payment. + example: Payment for Gold Necklace + created_on: + type: string + description: The date and time when the Payment Link was created. + format: date-time + example: '2021-08-19T20:25:28.725Z' + expires_on: + type: string + description: The date and time when the Payment Link expires. + format: date-time + example: '2021-08-20T20:25:28+08:00' + customer: + type: object + description: The customer's details. + properties: + email: + type: string + format: email + description: The email address for the customer. + example: brucewayne@email.com + name: + type: string + description: The customer's name. + example: Bruce Wayne + shipping: + type: object + description: The address any products are being sent to. + required: + - address + properties: + address: + type: object + description: The customer's address to ship to. + required: + - country + allOf: + - $ref: '#/components/schemas/Address' + billing: + type: object + additionalProperties: false + description: The billing details. + required: + - address + properties: + address: + type: object + description: The billing address. + required: + - country + allOf: + - $ref: '#/components/schemas/Address' + phone: + type: object + description: The customer's phone number. + required: + - number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + products: + type: array + description: Details about the provided products. + items: + type: object + additionalProperties: false + required: + - name + - quantity + - price + properties: + name: + type: string + description: Descriptive item name. + example: Gold Necklace + quantity: + type: integer + description: The item quantity + example: 1 + price: + type: integer + description: Minor units. Includes tax, excludes discounts. + example: 200 + metadata: + type: object + title: The Metadata Schema + description: Any additional information stored at the point of creation. + additionalProperties: true + locale: + type: string + description: The language that the Payment Link page is displayed in. + enum: + - ar + - da-DK + - de-AT + - de-CH + - de-DE + - el + - en-AT + - en-CH + - en-DE + - en-DK + - en-FI + - en-GB + - en-NL + - en-NO + - en-SE + - es-ES + - fi-FI + - fil-PH + - fr-CH + - fr-FR + - hi-IN + - id-ID + - it-CH + - it-IT + - ja-JP + - ms-MY + - nb-NO + - nl-NL + - pt-PT + - sv-SE + - th-TH + - vi-VN + - zh-CN + - zh-HK + - zh-TW + return_url: + type: string + format: uri + description: If provided, the success page will include a button that redirects your customer to the provided URL. + example: https://example.com/success + maxLength: 255 diff --git a/abc_spec/components/schemas/PaymentLinks/PaymentLinkId.yaml b/abc_spec/components/schemas/PaymentLinks/PaymentLinkId.yaml new file mode 100644 index 000000000..35cea4e91 --- /dev/null +++ b/abc_spec/components/schemas/PaymentLinks/PaymentLinkId.yaml @@ -0,0 +1,5 @@ +type: string +pattern: '^pl_[A-Za-z0-9_-]{12}$' +description: The unique identifier for a Payment Link. +maxLength: 15 +minLength: 15 diff --git a/abc_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseLinks.yaml b/abc_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseLinks.yaml new file mode 100644 index 000000000..b596541b7 --- /dev/null +++ b/abc_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseLinks.yaml @@ -0,0 +1,32 @@ +type: object +description: The links related to the Payment Link. +minItems: 2 +required: + - self + - redirect +properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the Payment Link details. + redirect: + type: object + description: The link to visit the Payment Link page. + allOf: + - $ref: '#/components/schemas/Link' + payment: + type: object + description: The URI of the in progress or completed payment for this Payment Link. + allOf: + - $ref: '#/components/schemas/Link' + payment_actions: + type: object + description: The URI of the actions associated with the in progress or completed payment for this Payment Link. + allOf: + - $ref: '#/components/schemas/Link' +example: + self: + href: 'https://api.sandbox.checkout.com/payment-links/pl_ELqQJXdXzabU' + redirect: + href: 'https://pay.sandbox.checkout.com/link/pl_ELqQJXdXzabU' diff --git a/abc_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseStatusActive.yaml b/abc_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseStatusActive.yaml new file mode 100644 index 000000000..7cf2b3afb --- /dev/null +++ b/abc_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseStatusActive.yaml @@ -0,0 +1,9 @@ +type: object +description: A Payment Link that is active and can accept a payment from a customer. +allOf: + - $ref: '#/components/schemas/GetPaymentLinkResponse' + - type: object + properties: + _links: + allOf: + - $ref: '#/components/schemas/PaymentLinkResponseLinks' diff --git a/abc_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseStatusExpired.yaml b/abc_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseStatusExpired.yaml new file mode 100644 index 000000000..af162f193 --- /dev/null +++ b/abc_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseStatusExpired.yaml @@ -0,0 +1,9 @@ +type: object +description: An expired Payment Link +allOf: + - $ref: '#/components/schemas/GetPaymentLinkResponse' + - type: object + properties: + _links: + allOf: + - $ref: '#/components/schemas/PaymentLinkResponseLinks' diff --git a/abc_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseStatusPaymentReceived.yaml b/abc_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseStatusPaymentReceived.yaml new file mode 100644 index 000000000..1303b6f81 --- /dev/null +++ b/abc_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseStatusPaymentReceived.yaml @@ -0,0 +1,25 @@ +type: object +description: A Payment Link that has received a payment +required: + - payment_id +allOf: + - $ref: '#/components/schemas/GetPaymentLinkResponse' + - type: object + properties: + payment_id: + example: pay_mbabizu24mvu3mela5njyhpit4 + _links: + required: + - payment + - payment_actions + allOf: + - $ref: '#/components/schemas/PaymentLinkResponseLinks' + example: + self: + href: 'https://api.sandbox.checkout.com/payment-links/pl_ELqQJXdXzabU' + redirect: + href: 'https://pay.sandbox.checkout.com/link/pl_ELqQJXdXzabU' + payment: + href: https://api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4 + payment_actions: + href: https://api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/actions diff --git a/abc_spec/components/schemas/PaymentLinks/PaymentLinksRequest.yaml b/abc_spec/components/schemas/PaymentLinks/PaymentLinksRequest.yaml new file mode 100644 index 000000000..6ef08a7ea --- /dev/null +++ b/abc_spec/components/schemas/PaymentLinks/PaymentLinksRequest.yaml @@ -0,0 +1,275 @@ +type: object +required: + - amount + - currency + - billing +properties: + amount: + type: integer + description: The payment amount. The exact format depends on the currency. + minimum: 1 + example: 200 + currency: + type: string + description: The three-letter ISO currency code of the payment.
The `currency` and `billing.address.country` fields determine which payment methods are shown on the payment page. + example: GBP + minLength: 3 + maxLength: 3 + payment_type: + type: string + description: This must be specified for card payments where the cardholder is not present (i.e., recurring or mail order / telephone order) + enum: + - Regular + - Recurring + default: Regular + payment_ip: + type: string + format: ipv4 + maxLength: 45 + description: The IP address used to make the payment. Used by our risk engine to check the customer's IP address – only accepts IPv4 addresses + billing_descriptor: + type: object + description: An optional description that is displayed on the customer's statement identifying a purchase + required: + - name + - city + properties: + name: + type: string + maxLength: 25 + description: A dynamic description of the change + city: + type: string + minLength: 1 + maxLength: 13 + description: The city from which the charge originated + reference: + type: string + description: A reference you can later use to identify this payment, such as an order number.
Required for PayPal payments. + example: ORD-123A + maxLength: 50 + description: + type: string + description: A description of the payment. + example: Payment for Gold Necklace + maxLength: 100 + expires_in: + type: integer + description: The time for which the link remains valid, in seconds. + minimum: 1 + maximum: 1209600 + default: 86400 + example: 604800 + customer: + type: object + description: The customer's details. + properties: + email: + type: string + format: email + description: An email address to associate with the customer. + example: brucewayne@email.com + maxLength: 255 + name: + type: string + description: The customer's name. This will only set the name for new customers. + example: Bruce Wayne + maxLength: 255 + shipping: + type: object + description: The address any products are being sent to. + required: + - address + properties: + address: + type: object + description: The customer's address to ship to. + required: + - country + allOf: + - $ref: '#/components/schemas/Address' + phone: + type: object + description: The customer's phone number + required: + - number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + billing: + type: object + additionalProperties: false + description: The billing details. + required: + - address + properties: + address: + type: object + description: The billing address. + required: + - country + allOf: + - $ref: '#/components/schemas/Address' + phone: + type: object + description: The customer's phone number + required: + - number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + recipient: + $ref: '#/components/schemas/PaymentRecipient' + processing: + type: object + description: Use the processing object to influence or override the data sent during card processing + properties: + aft: + type: boolean + description: Indicates whether the payment is an [Account Funding Transaction](https://www.checkout.com/docs/previous/payments/manage-payments/account-funding-transactions) + allow_payment_methods: + type: array + description: > + Use to specify which payment methods should render on the page. Check the requirements for each payment method + enum: + - card + - sofort + - klarna + - paypal + - ideal + - sepa + - knet + - giropay + - bancontact + - eps + - p24 + - multibanco + example: + - card + products: + type: array + description: Details about the products in the order. + minItems: 1 + maxItems: 1000 + items: + type: object + additionalProperties: false + required: + - name + - quantity + - price + properties: + name: + type: string + description: Descriptive item name. + example: Gold Necklace + quantity: + type: integer + description: The item quantity. + minimum: 1 + example: 1 + price: + type: integer + description: Minor units. Includes tax, excludes discounts. + minimum: 0 + example: 200 + metadata: + type: object + title: The Metadata Schema + description: Allows you to store additional information about the transaction. This object only allows one level of depth, so cannot accept non-primitive data types such as objects or arrays. + additionalProperties: true + 3ds: + type: object + description: Information required for 3D Secure payments. + properties: + enabled: + type: boolean + description: Whether to process this payment as a 3D Secure payment. + default: false + attempt_n3d: + type: boolean + description: Determines whether to attempt a 3D Secure payment as non-3D Secure should the card issuer not be enrolled. + default: false + challenge_indicator: + type: string + description: Indicates the preference for whether or not a 3DS challenge should be performed. The customer’s bank has the final say on whether or not the customer receives the challenge. + enum: + - no_preference + - no_challenge_requested + - challenge_requested + - challenge_requested_mandate + default: no_preference + allow_upgrade: + type: boolean + default: true + description: Whether to process this payment as 3D Secure if the authorization was soft declined because 3DS authentication is required. + exemption: + type: string + enum: + - low_value + - secure_corporate_payment + - trusted_listing + - transaction_risk_assessment + - 3ds_outage + - sca_delegation + - out_of_sca_scope + - other + - low_risk_program + - recurring_operation + description: Specifies an exemption reason so that the payment is not processed using 3D Secure authentication. Learn more about exemptions in our SCA compliance guide. + risk: + $ref: '#/components/schemas/RiskRequest' + return_url: + type: string + format: uri + description: If provided, the success page will include a button that redirects your customer to the provided URL. + example: https://example.com/success + maxLength: 255 + locale: + type: string + description: Creates a translated version of the page in the specified language. For Klarna payments, read our documentation about expected parameters for certain locales. + enum: + - ar + - da-DK + - de-AT + - de-CH + - de-DE + - el + - en-AT + - en-CH + - en-DE + - en-DK + - en-FI + - en-GB + - en-NL + - en-NO + - en-SE + - es-ES + - fi-FI + - fil-PH + - fr-CH + - fr-FR + - hi-IN + - id-ID + - it-CH + - it-IT + - ja-JP + - ms-MY + - nb-NO + - nl-NL + - pt-PT + - sv-SE + - th-TH + - vi-VN + - zh-CN + - zh-HK + - zh-TW + default: en-GB + capture: + type: boolean + description: Whether to capture the payment (if applicable). + example: true + capture_on: + description: | + A timestamp (ISO 8601 code) that determines when the payment should be captured. + Providing this field will automatically set `capture` to true. + allOf: + - $ref: '#/components/schemas/Timestamp' diff --git a/abc_spec/components/schemas/PaymentLinks/PaymentLinksResponse.yaml b/abc_spec/components/schemas/PaymentLinks/PaymentLinksResponse.yaml new file mode 100644 index 000000000..ae03e94da --- /dev/null +++ b/abc_spec/components/schemas/PaymentLinks/PaymentLinksResponse.yaml @@ -0,0 +1,50 @@ +type: object +required: + - id + - _links +properties: + id: + example: pl_ELqQJXdXzabU + allOf: + - $ref: '#/components/schemas/PaymentLinkId' + expires_on: + type: string + description: The date and time when the Payment Link expires. + format: date-time + example: '2020-08-20T20:25:28+08:00' + reference: + type: string + description: A reference you can later use to identify this payment, such as an order number. + example: ORD-123A + warnings: + type: array + description: Related to the `allow_payment_methods` object in the request. Included in the response if an alternative payment method is passed through, but no card schemes are configured against the account. + items: + type: object + properties: + code: + type: string + description: Reason for the warning. + example: card_unavailable + description: + type: string + description: Description of the warning code. + example: Card was provided in allow_payment_methods, but no card schemes are configured. + _links: + type: object + description: The links related to the Payment Link session. + readOnly: true + minItems: 1 + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + example: + href: 'https://api.sandbox.checkout.com/payment-links/pl_ELqQJXdXzabU' + redirect: + type: object + allOf: + - $ref: '#/components/schemas/Link' + example: + href: 'https://pay.sandbox.checkout.com/link/pl_ELqQJXdXzabU' diff --git a/abc_spec/components/schemas/Payments/3dsData.yaml b/abc_spec/components/schemas/Payments/3dsData.yaml new file mode 100644 index 000000000..37a2c893c --- /dev/null +++ b/abc_spec/components/schemas/Payments/3dsData.yaml @@ -0,0 +1,47 @@ +type: object +properties: + downgraded: + type: boolean + description: Indicates whether this was a 3D Secure payment downgraded to non-3D Secure (when `attempt_n3d` is specified) + example: false + enrolled: + type: string + description: > + Indicates the 3D Secure enrollment status of the issuer + * `Y` - Issuer enrolled + * `N` - Customer not enrolled + * `U` - Unknown + example: Y + signature_valid: + type: string + description: Verification to ensure the integrity of the response + example: Y + authentication_response: + type: string + description: > + Indicates whether or not the cardholder was authenticated + * `Y` - Customer authenticated + * `N` - Customer not authenticated + * `A` - Authentication was processed by a stand-in service, and is classed as successful + * `U` - Unable to perform authentication + example: Y + cryptogram: + type: string + description: Base64 encoded cryptographic identifier (CAVV) used by the card schemes to validate the integrity of the 3D secure payment data + example: hv8mUFzPzRZoCAAAAAEQBDMAAAA= + xid: + type: string + description: Unique identifier for the transaction assigned by the MPI + example: MDAwMDAwMDAwMDAwMDAwMzIyNzY= + version: + type: string + description: Indicates the version of 3D Secure that was used for authentication + example: '2.1.0' + exemption: + type: string + description: Specifies an exemption reason so that the payment is not processed using 3D Secure authentication + example: 'low_value' + upgrade_reason: + type: string + description: Indicates the reason why the payment was upgraded to 3D secure (when `allow_upgrade` is set to true) + example: sca_retry diff --git a/abc_spec/components/schemas/Payments/3dsEnrollmentData.yaml b/abc_spec/components/schemas/Payments/3dsEnrollmentData.yaml new file mode 100644 index 000000000..32d3e50a3 --- /dev/null +++ b/abc_spec/components/schemas/Payments/3dsEnrollmentData.yaml @@ -0,0 +1,18 @@ +type: object +properties: + downgraded: + type: boolean + description: Indicates whether this was a 3D Secure payment downgraded to non-3D-Secure (when `attempt_n3d` is specified) + example: false + enrolled: + type: string + description: > + Indicates the 3D Secure enrollment status of the issuer + * `Y` - Issuer enrolled + * `N` - Customer not enrolled + * `U` - Unknown + example: Y + upgrade_reason: + type: string + description: Indicates the reason why the payment was upgraded to 3D secure (when `allow_upgrade` is set to true) + example: sca_retry diff --git a/abc_spec/components/schemas/Payments/3dsRequest.yaml b/abc_spec/components/schemas/Payments/3dsRequest.yaml new file mode 100644 index 000000000..f6efbbfa2 --- /dev/null +++ b/abc_spec/components/schemas/Payments/3dsRequest.yaml @@ -0,0 +1,58 @@ +type: object +description: Information required for 3D Secure payments +properties: + enabled: + type: boolean + description: Whether to process this payment as a 3D Secure payment + default: false + example: true + attempt_n3d: + type: boolean + description: | + Determines whether to attempt a 3D Secure payment as non-3D Secure + should the card issuer not be enrolled + default: false + example: true + eci: + type: string + description: The Electronic Commerce Indicator security level associated with the 3D Secure enrollment result. Required if using a third-party merchant plug-in (MPI) + maxLength: 2 + example: '05' + cryptogram: + type: string + description: A Base64 encoded cryptographic identifier (CAVV) used by the card schemes to validate the cardholder authentication result (3D Secure). Required if using an external MPI + maxLength: 50 + example: AgAAAAAAAIR8CQrXcIhbQAAAAAA= + xid: + type: string + description: The 3D Secure transaction identifier. Required if using an external MPI with 3D Secure 2.X.X and a Mastercard card, or with 3D Secure 1.X.X for any supported card scheme + maxLength: 100 + example: MDAwMDAwMDAwMDAwMDAwMzIyNzY= + version: + type: string + description: Indicates the version of 3D Secure that was used for authentication. Defaults to 1.0.0 if not provided + maxLength: 10 + example: '2.0.1' + exemption: + type: string + description: Specifies an exemption reason so that the payment is not processed using 3D Secure authentication. Learn more about exemptions in our SCA compliance guide. + enum: + - low_value + - secure_corporate_payment + - trusted_listing + - transaction_risk_assessment + example: 'low_value' + challenge_indicator: + type: string + description: Indicates the preference for whether or not a 3DS challenge should be performed. The customer’s bank has the final say on whether or not the customer receives the challenge. + enum: + - no_preference + - no_challenge_requested + - challenge_requested + - challenge_requested_mandate + default: no_preference + allow_upgrade: + type: boolean + description: Whether to process this payment as 3D Secure if the authorization was soft declined due to 3DS authentication required + default: true + example: true diff --git a/abc_spec/components/schemas/Payments/ActionId.yaml b/abc_spec/components/schemas/Payments/ActionId.yaml new file mode 100644 index 000000000..50591ad75 --- /dev/null +++ b/abc_spec/components/schemas/Payments/ActionId.yaml @@ -0,0 +1,6 @@ +type: string +pattern: "^(act)_(\\w{26})$" +description: The action identifier +maxLength: 30 +minLength: 30 +example: 'act_y3oqhf46pyzuxjbcn2giaqnb44' diff --git a/abc_spec/components/schemas/Payments/BillingDescriptor.yaml b/abc_spec/components/schemas/Payments/BillingDescriptor.yaml new file mode 100644 index 000000000..01bd08f59 --- /dev/null +++ b/abc_spec/components/schemas/Payments/BillingDescriptor.yaml @@ -0,0 +1,18 @@ +type: object +description: | + An optional description that is displayed on the customer's statement identifying a purchase. +properties: + name: + type: string + description: A dynamic description of the charge + example: 'SUPERHEROES.COM' + maxLength: 25 + city: + type: string + description: The city from which the charge originated + minimum: 1 + example: 'GOTHAM' + maxLength: 13 +required: + - name + - city diff --git a/abc_spec/components/schemas/Payments/CaptureAcceptedResponse.yaml b/abc_spec/components/schemas/Payments/CaptureAcceptedResponse.yaml new file mode 100644 index 000000000..a917b5e3c --- /dev/null +++ b/abc_spec/components/schemas/Payments/CaptureAcceptedResponse.yaml @@ -0,0 +1,35 @@ +type: object +description: Capture response +required: + - action_id +properties: + action_id: + description: The unique identifier for the capture action + allOf: + - $ref: '#/components/schemas/ActionId' + reference: + type: string + description: Your reference for the capture request + example: 'ORD-5023-4E89' + _links: + type: object + description: The links related to the capture + readOnly: true + minItems: 2 + properties: + payment: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the payment to be captured. Use this to check the status of the payment + example: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44' + redirect: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: For some alternative payments, the URI that the customer should be redirected to to complete the capture + example: + href: 'https://api.checkout.com/redirect/act_y3oqhf46pyzuxjbcn2giaqnb44' + required: + - payment diff --git a/abc_spec/components/schemas/Payments/CaptureRequest.yaml b/abc_spec/components/schemas/Payments/CaptureRequest.yaml new file mode 100644 index 000000000..478fc7a0f --- /dev/null +++ b/abc_spec/components/schemas/Payments/CaptureRequest.yaml @@ -0,0 +1,19 @@ +type: object +properties: + amount: + type: integer + description: | + The amount to capture. If not specified or amount `0` is sent, the full payment amount will be captured. + minimum: 0 + example: 6540 + reference: + type: string + description: A reference you can later use to identify this capture request + maxLength: 50 + example: 'ORD-5023-4E89' + metadata: + type: object + description: A set of key-value pairs that you can attach to the capture request. This can be useful for storing additional information in a structured format + example: + coupon_code: 'NY2018' + partner_id: 123989 diff --git a/abc_spec/components/schemas/Payments/Item.yaml b/abc_spec/components/schemas/Payments/Item.yaml new file mode 100644 index 000000000..cf1c49eaf --- /dev/null +++ b/abc_spec/components/schemas/Payments/Item.yaml @@ -0,0 +1,37 @@ +type: object +description: The order line item or product that is being purchased +properties: + sku: + type: string + description: The stock-keeping unit (SKU) identifier of the item + example: 858818ac + name: + type: string + description: The name of the item or product + example: Kevlar batterang + description: + type: string + description: A description of the item or product + example: The fastest, hardest batterang known to man + image_url: + type: string + format: uri + description: The URL of an image of the item or product + example: http://example.com/batterang.jpg + price: + type: number + description: The unit price of the item or product in the minor currency unit + example: 34.50 + quantity: + type: number + description: The number of the items purchased + example: 2 + shipping_cost: + type: number + description: The shipping cost of the item + example: 2.99 + shipping_tracking_url: + type: string + format: uri + description: A URL to track the shipping status of the item + example: http://www.dhl.co.uk/en/express/tracking.html?AWB=41f280bbe12cd787b47c&brand=DHL diff --git a/abc_spec/components/schemas/Payments/Payment.yaml b/abc_spec/components/schemas/Payments/Payment.yaml new file mode 100644 index 000000000..9187044ea --- /dev/null +++ b/abc_spec/components/schemas/Payments/Payment.yaml @@ -0,0 +1,196 @@ +type: object +description: Payment response +required: + - id + - requested_on + - amount + - currency + - status + - approved + - _links +properties: + id: + description: Payment unique identifier + allOf: + - $ref: '#/components/schemas/PaymentId' + requested_on: + description: The date/time the payment was requested + allOf: + - $ref: '#/components/schemas/ServerTimestamp' + source: + description: The source of the payment + type: object + allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + destination: + description: The destination of the payment + type: object + allOf: + - $ref: '#/components/schemas/PaymentResponseDestination' + amount: + type: integer + description: The original payment amount + example: 6540 + currency: + type: string + description: The three-letter ISO currency code of the payment + example: USD + maxLength: 3 + minLength: 3 + payment_type: + type: string + description: This must be specified for card payments where the cardholder is not present (i.e., recurring or mail order / telephone order) + enum: + - Regular + - Recurring + - MOTO + - Installment + - Unscheduled + default: Regular + example: Recurring + reference: + type: string + description: Your reference for the payment + example: ORD-5023-4E89 + description: + type: string + description: A description of the payment + example: Set of 3 masks + approved: + type: boolean + description: Whether the payment was successful + example: true + status: + type: string + description: The status of the payment + enum: + - Pending + - Authorized + - Card Verified + - Voided + - Partially Captured + - Captured + - Partially Refunded + - Refunded + - Declined + - Canceled + - Expired + - Paid + example: Authorized + 3ds: + type: object + description: Provides information relating to the processing of 3D Secure payments + allOf: + - $ref: '#/components/schemas/3dsData' + risk: + type: object + description: Returns the payments risk assessment results + properties: + flagged: + type: boolean + description: Whether the payment was flagged by a risk check + default: false + example: true + customer: + type: object + description: The customer to which this payment is linked + properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + description: The unique identifier of the customer. This can be passed as a source when making a payment + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' + email: + type: string + description: The customer's email address + example: 'brucewayne@gmail.com' + name: + type: string + description: The customer's name + example: 'Bruce Wayne' + required: + - id + billing_descriptor: + $ref: '#/components/schemas/BillingDescriptor' + shipping: + type: object + description: The payment shipping details + properties: + address: + description: The shipping address + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The phone number associated with the shipping address + allOf: + - $ref: '#/components/schemas/PhoneNumber' + payment_ip: + description: The IP address used to make the payment. Used by our risk engine to check the customer's IP address – only accepts IPv4 addresses. + allOf: + - $ref: '#/components/schemas/IPAddress' + recipient: + $ref: '#/components/schemas/PaymentRecipient' + metadata: + type: object + description: A set of key-value pairs that you can attach to a payment. It can be useful for storing additional information in a structured format + example: + coupon_code: 'NY2018' + partner_id: 123989 + eci: + type: string + description: | + The final Electronic Commerce Indicator (ECI) security level used to authorize the payment. + Applicable for 3D Secure, digital wallets, and network token payments + example: '06' + scheme_id: + type: string + description: | + The scheme transaction identifier + example: '488341541494658' + actions: + type: array + items: + $ref: '#/components/schemas/PaymentActionSummary' + description: | + A summary of the payment's actions, + returned when a session ID is used to get the payment details + _links: + type: object + description: The links related to the payment + minItems: 2 + required: + - self + - actions + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the payment + actions: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to the payment's associated actions + void: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to void the payment, where applicable + capture: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to capture the payment, where applicable + refund: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to refund the payment, where applicable + example: + self: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44' + actions: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/actions' + refund: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/refund' diff --git a/abc_spec/components/schemas/Payments/PaymentAcceptedResponse.yaml b/abc_spec/components/schemas/Payments/PaymentAcceptedResponse.yaml new file mode 100644 index 000000000..d79a05d07 --- /dev/null +++ b/abc_spec/components/schemas/Payments/PaymentAcceptedResponse.yaml @@ -0,0 +1,52 @@ +type: object +description: Payment response +required: + - id + - status +properties: + id: + description: The payment's unique identifier + readOnly: true + allOf: + - $ref: '#/components/schemas/PaymentId' + status: + type: string + description: The status of the payment + enum: + - Pending + reference: + type: string + description: Your reference for the payment request + example: ORD-5023-4E89 + customer: + type: object + description: The customer associated with the payment, if provided in the request + allOf: + - $ref: '#/components/schemas/PaymentResponseCustomer' + 3ds: + type: object + description: Provides 3D Secure enrollment status + allOf: + - $ref: '#/components/schemas/3dsEnrollmentData' + _links: + type: object + description: The links related to the payment + readOnly: true + minItems: 2 + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the payment + example: + href: 'https://api.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4' + redirect: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI that the customer should be redirected to in order to complete the payment + example: + href: 'https://api.checkout.com/3ds/pay_mbabizu24mvu3mela5njyhpit4' + required: + - self diff --git a/abc_spec/components/schemas/Payments/PaymentAction.yaml b/abc_spec/components/schemas/Payments/PaymentAction.yaml new file mode 100644 index 000000000..034af09b8 --- /dev/null +++ b/abc_spec/components/schemas/Payments/PaymentAction.yaml @@ -0,0 +1,69 @@ +type: object +required: + - id + - type + - amount + - response_code + - processed_on +properties: + id: + description: The unique identifier of the payment action + allOf: + - $ref: '#/components/schemas/ActionId' + type: + type: string + description: The type of action + enum: + - Authorization + - Card Verification + - Void + - Capture + - Refund + - Payout + processed_on: + description: The date/time the action was processed + allOf: + - $ref: '#/components/schemas/ServerTimestamp' + amount: + type: integer + description: The action amount + example: 6540 + approved: + type: boolean + description: Whether the action was successful + example: true + auth_code: + type: string + description: The acquirer authorization code for cards + example: '643381' + response_code: + type: string + description: The Gateway response code + example: '10000' + response_summary: + type: string + description: The Gateway response summary + example: 'Approved' + reference: + type: string + description: Your reference for the action + example: 'ORD-5023-4E89' + processing: + type: object + description: Returns information related to the processing of the payment + properties: + retrieval_reference_number: + type: string + description: 'A unique identifier for the authorization that is submitted to the card scheme during processing' + example: '909913440644' + acquirer_reference_number: + type: string + description: 'A unique identifier for the capture that is submitted to the card scheme during processing' + example: '24021219099007452440793' + acquirer_transaction_id: + type: string + description: 'A unique identifier for the transaction generated by the acquirer' + example: '440644309099499894406' + metadata: + type: object + description: A set of key-value pairs that you can attach to an action diff --git a/abc_spec/components/schemas/Payments/PaymentActionSummary.yaml b/abc_spec/components/schemas/Payments/PaymentActionSummary.yaml new file mode 100644 index 000000000..351a784c2 --- /dev/null +++ b/abc_spec/components/schemas/Payments/PaymentActionSummary.yaml @@ -0,0 +1,27 @@ +type: object +required: + - id + - type + - response_code +properties: + id: + description: The unique identifier of the payment action + allOf: + - $ref: '#/components/schemas/ActionId' + type: + type: string + description: The type of action + enum: + - Authorization + - Card Verification + - Void + - Capture + - Refund + response_code: + type: string + description: The Gateway response code + example: '10000' + response_summary: + type: string + description: The Gateway response summary + example: 'Approved' diff --git a/abc_spec/components/schemas/Payments/PaymentActionsResponse.yaml b/abc_spec/components/schemas/Payments/PaymentActionsResponse.yaml new file mode 100644 index 000000000..390b06ed7 --- /dev/null +++ b/abc_spec/components/schemas/Payments/PaymentActionsResponse.yaml @@ -0,0 +1,38 @@ +type: array +items: + $ref: '#/components/schemas/PaymentAction' +minItems: 1 +description: | + The payment actions +example: + - 'id': 'act_fd3h6evhpn3uxdoqbuu3lqnqbm' + 'type': 'Refund' + 'processed_on': '2018-01-20T10:30:48Z' + 'amount': 1000 + 'approved': true + 'response_code': '10000' + 'response_summary': 'Approved' + - 'id': 'act_gefycn3jcvuupboxfmqrhk2aym' + 'type': 'Capture' + 'processed_on': '2018-01-17T10:30:48Z' + 'amount': 6540 + 'approved': true + 'response_code': '10000' + 'response_summary': 'Approved' + 'processing': + 'acquirer_reference_number': '24021219099007452440793' + 'acquirer_transaction_id': '00745244079' + 'metadata': + 'shipping_ref': 'MQIBN2' + - 'id': 'act_y3oqhf46pyzuxjbcn2giaqnb44' + 'type': 'Authorization' + 'processed_on': '2018-01-17T09:30:48Z' + 'amount': 6540 + 'approved': true + 'auth_code': '643381' + 'response_code': '10000' + 'response_summary': 'Approved' + 'reference': 'ORD-5023-4E89' + 'processing': + 'retrieval_reference_number': '909913440644' + 'acquirer_transaction_id': '440644309099499894406' diff --git a/abc_spec/components/schemas/Payments/PaymentDestination.yaml b/abc_spec/components/schemas/Payments/PaymentDestination.yaml new file mode 100644 index 000000000..0cf455361 --- /dev/null +++ b/abc_spec/components/schemas/Payments/PaymentDestination.yaml @@ -0,0 +1,15 @@ +type: object +description: | + A destination for OpenPay payments +properties: + id: + type: string + description: The OpenPay account identifier + example: 'vendor-123456' + amount: + type: integer + description: The amount to be credited to the destination in the major currency unit + example: 10.50 +required: + - id + - amount diff --git a/abc_spec/components/schemas/Payments/PaymentId.yaml b/abc_spec/components/schemas/Payments/PaymentId.yaml new file mode 100644 index 000000000..47505ccc8 --- /dev/null +++ b/abc_spec/components/schemas/Payments/PaymentId.yaml @@ -0,0 +1,6 @@ +type: string +pattern: "^(pay)_(\\w{26})$" +description: The payment identifier +maxLength: 30 +minLength: 30 +example: 'pay_mbabizu24mvu3mela5njyhpit4' diff --git a/abc_spec/components/schemas/Payments/PaymentPaged.yaml b/abc_spec/components/schemas/Payments/PaymentPaged.yaml new file mode 100644 index 000000000..4ccf6ea18 --- /dev/null +++ b/abc_spec/components/schemas/Payments/PaymentPaged.yaml @@ -0,0 +1,19 @@ +type: object +properties: + limit: + type: integer + description: The number of results to retrieve + example: 10 + skip: + type: integer + description: The number of results to skip + example: 10 + total_count: + type: integer + description: The total number of results matching the payment reference. This number is unaffected by the values of the `skip` and `limit` parameters + example: 1 + data: + type: array + description: The list of payments + items: + $ref: '#/components/schemas/Payment' \ No newline at end of file diff --git a/abc_spec/components/schemas/Payments/PaymentRecipient.yaml b/abc_spec/components/schemas/Payments/PaymentRecipient.yaml new file mode 100644 index 000000000..e7d9cdbf5 --- /dev/null +++ b/abc_spec/components/schemas/Payments/PaymentRecipient.yaml @@ -0,0 +1,29 @@ +type: object +description: Information about the recipient of the payment's funds. Relevant for [Account Funding Transactions](https://www.checkout.com/docs/previous/payments/manage-payments/account-funding-transactions) and VISA or MasterCard [domestic UK transactions processed by Financial Institutions](https://www.checkout.com/docs/previous/risk-management/requirements-for-financial-institutions). +properties: + dob: + type: string + format: date + description: The recipient's date of birth (yyyy-mm-dd) + maxLength: 10 + example: '1985-05-15' + account_number: + type: string + description: Any identifier like part of the PAN (the first six digits and the last four digits), an IBAN, an internal account number, or a phone number related to the account of the primary recipient + maxLength: 34 + example: '5555554444' + zip: + type: string + description: The first part of the UK postcode (e.g., W1T 4TJ would be W1T) + maxLength: 6 + example: 'W1T' + first_name: + type: string + description: The recipient's first name + maxLength: 50 + example: 'John' + last_name: + type: string + description: The recipient's last name + maxLength: 50 + example: 'Jones' diff --git a/abc_spec/components/schemas/Payments/PaymentRequest.yaml b/abc_spec/components/schemas/Payments/PaymentRequest.yaml new file mode 100644 index 000000000..7037d2191 --- /dev/null +++ b/abc_spec/components/schemas/Payments/PaymentRequest.yaml @@ -0,0 +1,253 @@ +type: object +required: + - currency +properties: + source: + $ref: '#/components/schemas/PaymentRequestSource' + amount: + type: integer + description: | + The payment amount. + The exact format depends on the currency. + Omit the amount or provide a value of `0` to perform a card verification. + minimum: 0 + example: 6540 + currency: + type: string + description: | + The three-letter ISO currency code + example: USD + maxLength: 3 + minLength: 3 + payment_type: + type: string + description: This must be specified for card payments where the cardholder is not present (i.e., recurring or mail order / telephone order) + enum: + - Regular + - Recurring + - MOTO + - Installment + - Unscheduled + default: Regular + example: Recurring + merchant_initiated: + type: boolean + description: Flags the payment as a merchant-initiated transaction (MIT). Must be set to `true` for all MITs. + reference: + type: string + description: A reference you can later use to identify this payment, such as an order number. Required when processing via dLocal or Bambora. + maxLength: 50 + example: 'ORD-5023-4E89' + description: + type: string + description: A description of the payment + maxLength: 100 + example: 'Set of 3 masks' + capture: + type: boolean + description: Whether to capture the payment (if applicable) + default: true + example: true + capture_on: + description: | + A timestamp (ISO 8601 code) that determines when the payment should be captured. + Providing this field will automatically set `capture` to true + + allOf: + - $ref: '#/components/schemas/Timestamp' + customer: + type: object + description: The customer's details + properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + description: | + The identifier of an existing customer. + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' + email: + type: string + format: email + description: The customer's email address. Providing this will create a new customer, unless you have already stored a customer with the same email. + maxLength: 255 + example: 'brucewayne@gmail.com' + name: + type: string + description: The customer's name. This will only set the name for *new* customers + maxLength: 255 + example: 'Bruce Wayne' + billing_descriptor: + $ref: '#/components/schemas/BillingDescriptor' + shipping: + type: object + description: The shipping details + properties: + address: + description: The shipping address + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The phone number associated with the shipping address + allOf: + - $ref: '#/components/schemas/PhoneNumber' + 3ds: + $ref: '#/components/schemas/3dsRequest' + previous_payment_id: + type: string + description: | + For payments that use stored card details, such as recurring payments – + an existing payment identifier from the recurring series or the Scheme Transaction Id + maxLength: 100 + example: 'pay_fun26akvvjjerahhctaq2uzhu4' + risk: + $ref: '#/components/schemas/RiskRequest' + success_url: + type: string + format: uri + description: For redirect payment methods, this overrides the default success redirect URL configured on your account + maxLength: 255 + example: 'http://example.com/payments/success' + failure_url: + type: string + format: uri + description: For redirect payment methods, this overrides the default failure redirect URL configured on your account + maxLength: 255 + example: 'http://example.com/payments/fail' + payment_ip: + description: The IP address used to make the payment. Used by our risk engine to check the customer's IP address – only accepts IPv4 addresses. + allOf: + - $ref: '#/components/schemas/IPAddress' + recipient: + $ref: '#/components/schemas/PaymentRecipient' + processing: + type: object + description: Use the processing object to influence or override the data sent during card processing + properties: + aft: + type: boolean + description: Indicates whether the payment is an [Account Funding Transaction](https://www.checkout.com/docs/previous/payments/manage-payments/account-funding-transactions) + senderInformation: + type: object + description: Details about the sender. See our documentation for specific requirements. + properties: + reference: + type: string + description: Merchant's unique customer ID.
Alphanumeric characters only. + maxLength: 16 + firstName: + type: string + description: The first name. + maxLength: 15 + lastName: + type: string + description: The last name. + maxLength: 15 + dob: + type: string + format: date + description: The sender's date of birth (yyyy-mm-dd) + maxLength: 10 + example: '1985-05-15' + address: + type: string + description: The address. + maxLength: 35 + city: + type: string + description: The address city. + maxLength: 25 + state: + type: string + description: The state or province of the address country (ISO 3166-2 code of up to two alphanumeric characters). + maxLength: 2 + country: + type: string + description: The address country (two-letter ISO country code). + maxLength: 2 + postalCode: + type: string + description: The post/zip code.
Only required for Mastercard transactions. + maxLength: 10 + sourceOfFunds: + type: string + description: The source of the funds. + enum: + - Credit + - Debit + - Prepaid + - DepositAccount + - MobileMoneyAccount + - Cash + purpose: + type: string + description: Contains the purpose of the transaction. Required when the destination country is Argentina, Bangladesh, Egypt or India. Mandatory from 15th October 2021. + enum: + - donations + - education + - emergency_need + - expatriation + - family_support + - financial_services + - gifts + - income + - insurance + - investment + - it_services + - leisure + - loan_payment + - medical_treatment + - other + - pension + - royalties + - savings + - travel_and_tourism + merchant_initiated_reason: + type: string + enum: + - 'Delayed_charge' + - 'Resubmission' + - 'No_show' + - 'Reauthorization' + description: Indicates the reason for a merchant initiated payment request. + dlocal: + type: object + description: Processing information required for dLocal payments. + properties: + country: + type: string + description: The two-letter ISO code of the cardholder's country. + example: 'MX' + payer: + type: object + description: Details about the customer. These details may differ from those of the cardholder. + required: + - document + - name + - email + properties: + document: + type: string + description: The customer's personal identification number. The identification required is country-specific. See the dLocal documentation for more information. + example: '5305305305' + name: + type: string + description: The customer's full name. + example: 'John Doe' + email: + type: string + description: The customer's email address. + example: 'john.doe@example.com' + installments: + type: object + description: Details about the installments. + properties: + count: + type: string + description: The number of payments to be made in the installment plan. + example: '3' + metadata: + type: object + description: Allows you to store additional information about a transaction with custom fields and up to five user-defined fields (`udf1` to `udf5`), which can be used for reporting purposes. `udf1` is also used for some of our risk rules. + example: + coupon_code: 'NY2018' + partner_id: 123989 diff --git a/abc_spec/components/schemas/Payments/PaymentRequestDestination.yaml b/abc_spec/components/schemas/Payments/PaymentRequestDestination.yaml new file mode 100644 index 000000000..82cb90531 --- /dev/null +++ b/abc_spec/components/schemas/Payments/PaymentRequestDestination.yaml @@ -0,0 +1,15 @@ +type: object +description: The destination of the payout.
Use to pay out to a card. +discriminator: + propertyName: type + mapping: + token: '#/components/schemas/01_PaymentRequestTokenDestination' + id: '#/components/schemas/02_PaymentRequestIdDestination' + card: '#/components/schemas/03_PaymentRequestCardDestination' +required: + - type +properties: + type: + type: string + description: The payout destination type + example: 'token' diff --git a/abc_spec/components/schemas/Payments/PaymentRequestSource.yaml b/abc_spec/components/schemas/Payments/PaymentRequestSource.yaml new file mode 100644 index 000000000..584532c0a --- /dev/null +++ b/abc_spec/components/schemas/Payments/PaymentRequestSource.yaml @@ -0,0 +1,39 @@ +type: object +description: > + The source of the payment.
Use to request a payment. +discriminator: + propertyName: type + mapping: + token: '#/components/schemas/01_PaymentRequestTokenSource' + id: '#/components/schemas/02_PaymentRequestIdSource' + card: '#/components/schemas/03_PaymentRequestCardSource' + customer: '#/components/schemas/04_PaymentRequestCustomerSource' + network_token: '#/components/schemas/05_PaymentRequestNetworkTokenSource' + alipay: '#/components/schemas/PaymentRequestAlipaySource' + benefitpay: '#/components/schemas/PaymentRequestBenefitPaySource' + boleto: '#/components/schemas/PaymentRequestBoletoSource' + eps: '#/components/schemas/PaymentRequestEpsSource' + giropay: '#/components/schemas/PaymentRequestGiropaySource' + ideal: '#/components/schemas/PaymentRequestIdealSource' + klarna: '#/components/schemas/PaymentRequestKlarnaSource' + knet: '#/components/schemas/PaymentRequestKnetSource' + oxxo: '#/components/schemas/PaymentRequestOXXOSource' + p24: '#/components/schemas/PaymentRequestP24Source' + pagofacil: '#/components/schemas/PaymentRequestPagoFacilSource' + paypal: '#/components/schemas/PaymentRequestPayPalSource' + poli: '#/components/schemas/PaymentRequestPoliSource' + rapipago: '#/components/schemas/PaymentRequestRapiPagoSource' + bancontact: '#/components/schemas/PaymentRequestBancontactSource' + fawry: '#/components/schemas/PaymentRequestFawrySource' + qpay: '#/components/schemas/PaymentRequestQPaySource' + multibanco: '#/components/schemas/PaymentRequestMultibancoSource' + dLocal: '#/components/schemas/06_PaymentRequestdLocalSource' + sofort: '#/components/schemas/PaymentRequestSofortSource' +required: + - type +properties: + type: + type: string + description: > + The payment source type
*Note:* *To make a payment with full card details, you must be SAQ D PCI compliant*
BenefitPay is **DEPRECATED** + example: 'card' diff --git a/abc_spec/components/schemas/Payments/PaymentResponse.yaml b/abc_spec/components/schemas/Payments/PaymentResponse.yaml new file mode 100644 index 000000000..7eb3543a3 --- /dev/null +++ b/abc_spec/components/schemas/Payments/PaymentResponse.yaml @@ -0,0 +1,169 @@ +type: object +description: Payment Response +required: + - id + - action_id + - amount + - currency + - approved + - status + - response_code + - processed_on + - _links +properties: + id: + description: The payment's unique identifier + allOf: + - $ref: '#/components/schemas/PaymentId' + action_id: + description: The unique identifier for the action performed against this payment + allOf: + - $ref: '#/components/schemas/ActionId' + amount: + type: integer + description: The payment amount + example: 6540 + currency: + type: string + description: The three-letter ISO currency code of the payment + example: USD + maxLength: 3 + minLength: 3 + approved: + type: boolean + description: Whether or not the authorization or capture was successful + example: true + status: + type: string + description: The status of the payment + enum: + - Authorized + - Pending + - Card Verified + - Captured + - Declined + - Paid + example: Authorized + auth_code: + type: string + description: The acquirer authorization code if the payment was authorized + example: '643381' + response_code: + type: string + description: The Gateway response code + example: '10000' + response_summary: + type: string + description: The Gateway response summary + example: 'Approved' + 3ds: + type: object + description: Provides 3D Secure enrollment status if the payment was downgraded to non-3D Secure + allOf: + - $ref: '#/components/schemas/3dsEnrollmentData' + example: + downgraded: true + enrolled: N + risk: + type: object + description: Returns the payment's risk assessment results + properties: + flagged: + type: boolean + description: Whether or not the payment was flagged by a risk check + default: false + example: true + source: + description: The source of the payment + type: object + allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + #destination: + #description: The destination of the payment + #type: object + #allOf: + # - $ref: '#/components/schemas/PaymentResponseDestination' + customer: + type: object + description: The customer associated with the payment, if provided in the request + allOf: + - $ref: '#/components/schemas/PaymentResponseCustomer' + processed_on: + description: The date/time the payment was processed + allOf: + - $ref: '#/components/schemas/ServerTimestamp' + reference: + type: string + description: Your reference for the payment + example: ORD-5023-4E89 + processing: + type: object + description: Returns information related to the processing of the payment + properties: + retrieval_reference_number: + type: string + description: 'A unique identifier for the authorization that is submitted to the card scheme during processing' + example: '909913440644' + acquirer_transaction_id: + type: string + description: 'A unique identifier for the transaction generated by the acquirer' + example: '440644309099499894406' + recommendation_code: + type: string + description: 'A code that represents the next recommended action for the payment' + example: "02" + pun: + type: string + description: 'QPay Payment Unique Number' + example: '123456789' + eci: + type: string + description: The final Electronic Commerce Indicator (ECI) security level used to authorize the payment. + Applicable for 3D Secure, digital wallet, and network token payments + example: '06' + scheme_id: + type: string + description: The scheme transaction identifier + example: '489341065491658' + _links: + type: object + description: The links related to the payment + minItems: 2 + required: + - self + - actions + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the payment + actions: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to the payment's associated actions + void: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to void the payment, where applicable + capture: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to capture the payment, where applicable + refund: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to refund the payment, where applicable + example: + self: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44' + actions: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/actions' + void: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/voids' + capture: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/capture' diff --git a/abc_spec/components/schemas/Payments/PaymentResponseCustomer.yaml b/abc_spec/components/schemas/Payments/PaymentResponseCustomer.yaml new file mode 100644 index 000000000..6fb913215 --- /dev/null +++ b/abc_spec/components/schemas/Payments/PaymentResponseCustomer.yaml @@ -0,0 +1,18 @@ +type: object +description: The customer to which this payment is linked +required: + - id +properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + description: The customer's unique identifier. This can be passed as a source when making a payment + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' + email: + type: string + description: The customer's email address + example: 'brucewayne@gmail.com' + name: + type: string + description: The customer's name + example: 'Bruce Wayne' diff --git a/abc_spec/components/schemas/Payments/PaymentResponseDestination.yaml b/abc_spec/components/schemas/Payments/PaymentResponseDestination.yaml new file mode 100644 index 000000000..777d40806 --- /dev/null +++ b/abc_spec/components/schemas/Payments/PaymentResponseDestination.yaml @@ -0,0 +1,28 @@ +type: object +description: Payment destination +discriminator: + propertyName: type + mapping: + card: '#/components/schemas/01_PaymentResponseCardDestination' +required: + - type +properties: + type: + type: string + description: | + The payment destination type. + example: 'card' + id: + type: string + description: | + The payment source identifier that can be used for subsequent payments. + For new sources, this will only be returned if the payment was approved + example: src_wmlfc3zyhqzehihu7giusaaawu + billing_address: + description: The payment source owner's billing address + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The payment source owner's phone number + allOf: + - $ref: '#/components/schemas/PhoneNumber' diff --git a/abc_spec/components/schemas/Payments/PaymentResponseSource.yaml b/abc_spec/components/schemas/Payments/PaymentResponseSource.yaml new file mode 100644 index 000000000..1dece2661 --- /dev/null +++ b/abc_spec/components/schemas/Payments/PaymentResponseSource.yaml @@ -0,0 +1,118 @@ +type: object +description: Payment source + +discriminator: + propertyName: type + mapping: + card: '#/components/schemas/01_PaymentResponseCardSource' + alipay: '#/components/schemas/PaymentResponseAlipaySource' + benefitpay: '#/components/schemas/PaymentResponseBenefitPaySource' + boleto: '#/components/schemas/PaymentResponseBoletoSource' + eps: '#/components/schemas/PaymentResponseEpsSource' + giropay: '#/components/schemas/PaymentResponseGiropaySource' + ideal: '#/components/schemas/PaymentResponseIdealSource' + klarna: '#/components/schemas/PaymentResponseKlarnaSource' + knet: '#/components/schemas/PaymentResponseKnetSource' + oxxo: '#/components/schemas/PaymentResponseOXXOSource' + p24: '#/components/schemas/PaymentResponseP24Source' + pagofacil: '#/components/schemas/PaymentResponsePagoFacilSource' + paypal: '#/components/schemas/PaymentResponsePayPalSource' + poli: '#/components/schemas/PaymentResponsePoliSource' + rapipago: '#/components/schemas/PaymentResponseRapiPagoSource' + bancontact: '#/components/schemas/PaymentResponseBancontactSource' + fawry: '#/components/schemas/PaymentResponseFawrySource' + qpay: '#/components/schemas/PaymentResponseQPaySource' + multibanco: '#/components/schemas/PaymentResponseMultibancoSource' + sofort: '#/components/schemas/PaymentResponseSofortSource' + alma: '#/components/schemas/PaymentResponseAlmaSource' +required: + - type + +properties: + type: + type: string + description: | + The payment source type. For any payment request sources that result in a card token (token, source ID, etc.), + this will be `card`; otherwise it will be the name of the alternative payment method
BenefitPay is **DEPRECATED** + example: 'card' + id: + type: string + description: | + The payment source identifier that can be used for subsequent payments. + For new sources, this will only be returned if the payment was approved + example: 'src_nwd3m4in3hkuddfpjsaevunhdy' + billing_address: + description: The payment source owner's billing address + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The payment source owner's phone number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + expiry_month: + type: integer + description: The expiry month + minLength: 1 + maxLength: 2 + example: '6' + expiry_year: + type: integer + description: The expiry year + maxLength: 4 + example: '2025' + name: + type: string + description: The cardholder's name + example: 'Bruce Wayne' + scheme: + type: string + description: The card scheme + example: 'Visa' + last4: + type: string + description: The last four digits of the card number + example: '9996' + fingerprint: + type: string + description: Uniquely identifies this particular card number. You can use this to compare cards across customers. + example: '31CFD9C909A2A99EB03E50675A60E67E7F5633B4A277C2D63B4BCF1302A2D934' + bin: + type: string + description: The card issuer's Bank Identification Number (BIN) + maxLength: 6 + example: '454347' + card_type: + type: string + description: The card type + enum: + - Credit + - Debit + - Prepaid + - Charge + - Deferred Debit + example: 'Credit' + card_category: + type: string + description: The card category + enum: + - Consumer + - Commercial + example: 'Consumer' + issuer: + type: string + description: The name of the card issuer + example: 'STATE BANK OF MAURITIUS, LTD.' + issuer_country: + type: string + description: The card issuer's country (**two-letter ISO code**) + minLength: 2 + maxLength: 2 + example: 'MU' + product_id: + type: string + description: The issuer/card scheme product identifier + example: 'F' + product_type: + type: string + description: The issuer/card scheme product type + example: 'Visa Classic' diff --git a/abc_spec/components/schemas/Payments/Payout.yaml b/abc_spec/components/schemas/Payments/Payout.yaml new file mode 100644 index 000000000..c0cc300d7 --- /dev/null +++ b/abc_spec/components/schemas/Payments/Payout.yaml @@ -0,0 +1,213 @@ +type: object +required: + - destination + - amount + - currency +properties: + destination: + $ref: '#/components/schemas/PaymentRequestDestination' + amount: + type: integer + description: | + The payment amount. + The exact format depends on the currency. + Omit the amount or provide a value of `0` to perform a card verification. + minimum: 0 + example: 6540 + fund_transfer_type: + type: string + enum: + - AA + - PP + - FT + - FD + - PD + - LO + - OG + description: An identifier used by issuer banks to recognize the use case. The fund transfer type(s) that you're eligible to use are determined by the schemes. The value(s) you can use for this field will be communicated to you during onboarding. + example: FD + currency: + type: string + description: | + The three-letter ISO currency code + example: USD + maxLength: 3 + minLength: 3 + payment_type: + type: string + description: This must be specified for card payments where the cardholder is not present (i.e., recurring or mail order / telephone order) + enum: + - Regular + - Recurring + - MOTO + default: Regular + example: Recurring + reference: + type: string + description: A reference you can later use to identify this payment, such as an order number + maxLength: 50 + example: 'ORD-5023-4E89' + description: + type: string + description: A description of the payment + maxLength: 100 + example: 'Set of 3 masks' + capture: + type: boolean + description: Whether to capture the payment (if applicable) + default: true + example: true + capture_on: + description: | + A timestamp (ISO 8601 code) that determines when the payment should be captured. + Providing this field will automatically set `capture` to true + + allOf: + - $ref: '#/components/schemas/Timestamp' + customer: + type: object + description: The customer's details + properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + description: | + The identifier of an existing customer. If neither customer `id` nor `email` is provided, then + a new customer will be registered + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' + email: + type: string + format: email + description: An optional email address to associate with the customer + maxLength: 255 + example: 'brucewayne@gmail.com' + name: + type: string + description: The customer's name. This will only set the name for *new* customers + maxLength: 255 + example: 'Bruce Wayne' + billing_descriptor: + $ref: '#/components/schemas/BillingDescriptor' + shipping: + type: object + description: The shipping details + properties: + address: + description: The shipping address + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The phone number associated with the shipping address + allOf: + - $ref: '#/components/schemas/PhoneNumber' + 3ds: + $ref: '#/components/schemas/3dsRequest' + previous_payment_id: + type: string + description: | + For payments that use stored card details, such as recurring payments – + an existing payment identifier from the recurring series or the Scheme Transaction Id + example: 'pay_fun26akvvjjerahhctaq2uzhu4' + risk: + $ref: '#/components/schemas/RiskRequest' + success_url: + type: string + format: uri + description: For redirect payment methods, this overrides the default success redirect URL configured on your account + maxLength: 255 + example: 'http://example.com/payments/success' + failure_url: + type: string + format: uri + description: For redirect payment methods, this overrides the default failure redirect URL configured on your account + maxLength: 255 + example: 'http://example.com/payments/fail' + payment_ip: + description: The IP address used to make the payment. Used by our risk engine to check the customer's IP address – only accepts IPv4 addresses. + allOf: + - $ref: '#/components/schemas/IPAddress' + recipient: + $ref: '#/components/schemas/PaymentRecipient' + processing: + type: object + description: Use the processing object to influence or override the data sent during card processing + properties: + senderInformation: + type: object + description: Allows you to send additional data required for Visa Direct Original Credit Transaction (OCT) and Mastercard Moneysend payments. Only required when sending transactions on behalf of another person or business. See our documentation for specific requirements. + properties: + reference: + type: string + description: Merchant's unique customer ID.
Alphanumeric characters only. + maxLength: 16 + accountNumber: + type: string + description: The account number. + maxLength: 19 + firstName: + type: string + description: The first name. + maxLength: 15 + lastName: + type: string + description: The last name. + maxLength: 15 + address: + type: string + description: The address. + maxLength: 35 + city: + type: string + description: The address city. + maxLength: 25 + state: + type: string + description: The state or province of the address country (ISO 3166-2 code of up to two alphanumeric characters). + maxLength: 2 + country: + type: string + description: The address country (two-letter ISO country code). + maxLength: 2 + postalCode: + type: string + description: The post/zip code.
Only required for Mastercard transactions. + maxLength: 10 + sourceOfFunds: + type: string + description: The source of the funds. + enum: + - Credit + - Debit + - Prepaid + - DepositAccount + - MobileMoneyAccount + - Cash + purpose: + type: string + description: Contains the purpose of the transaction. Required when the destination country is Argentina, Bangladesh, Egypt or India. Mandatory from 15th October 2021. + enum: + - donations + - education + - emergency_need + - expatriation + - family_support + - financial_services + - gifts + - income + - insurance + - investment + - it_services + - leisure + - loan_payment + - medical_treatment + - other + - pension + - royalties + - savings + - travel_and_tourism + metadata: + type: object + description: Allows you to store additional information about a transaction with custom fields and up to five user-defined fields (`udf1` to `udf5`), which can be used for reporting purposes. `udf1` is also used for some of our risk rules. + example: + coupon_code: 'NY2018' + partner_id: 123989 diff --git a/abc_spec/components/schemas/Payments/RefundAcceptedResponse.yaml b/abc_spec/components/schemas/Payments/RefundAcceptedResponse.yaml new file mode 100644 index 000000000..55a28110a --- /dev/null +++ b/abc_spec/components/schemas/Payments/RefundAcceptedResponse.yaml @@ -0,0 +1,28 @@ +type: object +description: Refund response +required: + - action_id +properties: + action_id: + description: The unique identifier for the refund action + allOf: + - $ref: '#/components/schemas/ActionId' + reference: + type: string + description: Your reference for the refund request + example: ORD-5023-4E89 + _links: + type: object + description: The links related to the refund + readOnly: true + minItems: 2 + properties: + payment: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the payment to be refunded. Use this to check the status of the payment + example: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44' + required: + - payment diff --git a/abc_spec/components/schemas/Payments/RefundRequest.yaml b/abc_spec/components/schemas/Payments/RefundRequest.yaml new file mode 100644 index 000000000..965586697 --- /dev/null +++ b/abc_spec/components/schemas/Payments/RefundRequest.yaml @@ -0,0 +1,19 @@ +type: object +properties: + amount: + type: integer + description: | + The amount to refund. If not specified or amount `0` is sent, the full payment amount will be refunded. + minimum: 0 + example: 6540 + reference: + type: string + description: A reference you can later use to identify this refund request + maxLength: 50 + example: 'ORD-5023-4E89' + metadata: + type: object + description: A set of key-value pairs that you can attach to the refund request. It can be useful for storing additional information in a structured format + example: + coupon_code: 'NY2018' + partner_id: 123989 diff --git a/abc_spec/components/schemas/Payments/RequestDestinations/01_PaymentRequestTokenDestination.yaml b/abc_spec/components/schemas/Payments/RequestDestinations/01_PaymentRequestTokenDestination.yaml new file mode 100644 index 000000000..7245a526c --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestDestinations/01_PaymentRequestTokenDestination.yaml @@ -0,0 +1,31 @@ +type: object +description: A token payment destination +required: + - token + - first_name + - last_name +allOf: + - $ref: '#/components/schemas/PaymentRequestDestination' + - type: object + properties: + token: + type: string + pattern: "^(tok)_(\\w{26})$" + description: The Checkout.com token (e.g., a card, wallet or token) + example: 'tok_ubfj2q76miwundwlk72vxt2i7q' + first_name: + type: string + description: The payout destination owner's first name + example: 'John' + last_name: + type: string + description: The payout destination owner's last name + example: 'Smith' + billing_address: + description: The payout destination owner's billing address. This will override the billing address specified during tokenization + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The payout destination owner's phone number. This will override the phone number specified during tokenization + allOf: + - $ref: '#/components/schemas/PhoneNumber' diff --git a/abc_spec/components/schemas/Payments/RequestDestinations/02_PaymentRequestIdDestination.yaml b/abc_spec/components/schemas/Payments/RequestDestinations/02_PaymentRequestIdDestination.yaml new file mode 100644 index 000000000..10b37659d --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestDestinations/02_PaymentRequestIdDestination.yaml @@ -0,0 +1,22 @@ +type: object +description: An existing payment source +required: + - id + - first_name + - last_name +allOf: + - $ref: '#/components/schemas/PaymentRequestDestination' + - type: object + properties: + id: + type: string + description: The payment source identifier (e.g., a card source identifier) + example: src_wmlfc3zyhqzehihu7giusaaawu + first_name: + type: string + description: The payout destination owner's first name + example: John + last_name: + type: string + description: The payout destination owner's last name + example: Smith diff --git a/abc_spec/components/schemas/Payments/RequestDestinations/03_PaymentRequestCardDestination.yaml b/abc_spec/components/schemas/Payments/RequestDestinations/03_PaymentRequestCardDestination.yaml new file mode 100644 index 000000000..2ce516ca9 --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestDestinations/03_PaymentRequestCardDestination.yaml @@ -0,0 +1,50 @@ +type: object +description: A card payment destination +required: + - type + - number + - expiry_month + - expiry_year + - first_name + - last_name +allOf: + - $ref: '#/components/schemas/PaymentRequestDestination' + - type: object + properties: + number: + type: string + description: The card number + example: '4543474002249996' + expiry_month: + type: integer + description: The expiry month of the card + minimum: 1 + example: 6 + minLength: 1 + maxLength: 2 + expiry_year: + type: integer + description: The expiry year of the card + example: 2025 + minLength: 4 + maxLength: 4 + first_name: + type: string + description: The payout destination owner's first name + example: John + last_name: + type: string + description: The payout destination owner's last name + example: Smith + name: + type: string + description: The cardholder's name + example: 'Bruce Wayne' + billing_address: + description: The payout destination owner's billing address + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The payout destination owner's phone number + allOf: + - $ref: '#/components/schemas/PhoneNumber' diff --git a/abc_spec/components/schemas/Payments/RequestSources/01_PaymentRequestTokenSource.yaml b/abc_spec/components/schemas/Payments/RequestSources/01_PaymentRequestTokenSource.yaml new file mode 100644 index 000000000..0a215b695 --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/01_PaymentRequestTokenSource.yaml @@ -0,0 +1,26 @@ +type: object +description: A token payment source +required: + - token +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + properties: + token: + type: string + pattern: "^(tok)_(\\w{26})$" + description: The Checkout.com token (e.g., a card or digital wallet token) + example: tok_ubfj2q76miwundwlk72vxt2i7q + billing_address: + description: The customer's billing address. This will override the billing address specified during tokenization + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The customer's phone number. This will override the phone number specified during tokenization + allOf: + - $ref: '#/components/schemas/PhoneNumber' + store_for_future_use: + type: boolean + description: This must be set to true if you intend to reuse the payment credentials in subsequent payments. Setting the field as false will mean that a payment instrument will not be included in the payment response. + default: true + example: false diff --git a/abc_spec/components/schemas/Payments/RequestSources/02_PaymentRequestIdSource.yaml b/abc_spec/components/schemas/Payments/RequestSources/02_PaymentRequestIdSource.yaml new file mode 100644 index 000000000..56a4993ac --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/02_PaymentRequestIdSource.yaml @@ -0,0 +1,19 @@ +type: object +description: An existing payment source +required: + - id +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + properties: + id: + type: string + pattern: "^(src)_(\\w{26})$" + description: The payment source identifer (e.g., a card source identifier) + example: src_wmlfc3zyhqzehihu7giusaaawu + cvv: + type: string + description: The card verification value/code (for card sources). 3 digits, except for American Express (4 digits) + example: '956' + minLength: 3 + maxLength: 4 diff --git a/abc_spec/components/schemas/Payments/RequestSources/03_PaymentRequestCardSource.yaml b/abc_spec/components/schemas/Payments/RequestSources/03_PaymentRequestCardSource.yaml new file mode 100644 index 000000000..ecc8eb618 --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/03_PaymentRequestCardSource.yaml @@ -0,0 +1,58 @@ +type: object +description: A card payment source +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - type + - number + - expiry_month + - expiry_year + properties: + number: + type: string + description: The card number (without separators) + maxLength: 19 + example: '4543474002249996' + expiry_month: + type: integer + description: The expiry month of the card + minimum: 1 + minLength: 1 + maxLength: 2 + example: 6 + expiry_year: + type: integer + description: The expiry year of the card + minLength: 4 + maxLength: 4 + example: 2025 + name: + type: string + description: The name of the cardholder + maxLength: 255 + example: 'Bruce Wayne' + cvv: + type: string + description: The card verification value/code. 3 digits, except for American Express (4 digits) + example: '956' + minLength: 3 + maxLength: 4 + stored: + type: boolean + description: This must be set to `true` for payments that use stored card details + default: false + example: true + store_for_future_use: + type: boolean + description: This must be set to true if you intend to reuse the payment credentials in subsequent payments. Setting the field as false will mean that a payment instrument will not be included in the payment response. + default: true + example: false + billing_address: + description: The billing address of the cardholder + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The phone number of the cardholder + allOf: + - $ref: '#/components/schemas/PhoneNumber' diff --git a/abc_spec/components/schemas/Payments/RequestSources/04_PaymentRequestCustomerSource.yaml b/abc_spec/components/schemas/Payments/RequestSources/04_PaymentRequestCustomerSource.yaml new file mode 100644 index 000000000..e86a956e4 --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/04_PaymentRequestCustomerSource.yaml @@ -0,0 +1,13 @@ +type: object +description: A customer source +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - id + properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + description: The customer's identifier. + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' diff --git a/abc_spec/components/schemas/Payments/RequestSources/05_PaymentRequestNetworkTokenSource.yaml b/abc_spec/components/schemas/Payments/RequestSources/05_PaymentRequestNetworkTokenSource.yaml new file mode 100644 index 000000000..938d569d9 --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/05_PaymentRequestNetworkTokenSource.yaml @@ -0,0 +1,73 @@ +type: object +description: A network token payment source +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - type + - token + - expiry_month + - expiry_year + - token_type + - cryptogram + - eci + properties: + token: + type: string + description: The network token PAN + example: '4543474002249996' + expiry_month: + type: integer + description: The expiry month of the token + minimum: 1 + example: 6 + minLength: 1 + maxLength: 2 + expiry_year: + type: integer + description: The expiry year of the token + example: 2025 + minLength: 4 + maxLength: 4 + token_type: + type: string + description: The type of token + enum: + - vts + - mdes + - applepay + - googlepay + cryptogram: + type: string + description: The Base64 encoded cryptographic identifier (TAVV) used by card schemes to validate the token verification result. Optional if `previous_payment_id` is specified and `3ds.enabled` is false + maxLength: 50 + example: hv8mUFzPzRZoCAAAAAEQBDMAAAA= + eci: + type: string + description: | + The Electronic Commerce Indicator (ECI) security level associated with the token. Optional if `previous_payment_id` is specified and `3ds.enabled` is false + maxLength: 2 + example: '05' + stored: + type: boolean + description: This must be set to `true` for payments that use stored card details + default: false + example: true + name: + type: string + description: The customer's name + example: 'Bruce Wayne' + cvv: + type: string + description: The card verification value/code. 3 digits, except for American Express (4 digits) + example: '956' + minLength: 3 + maxLength: 4 + billing_address: + description: The customer's billing address + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The customer's phone number + allOf: + - $ref: '#/components/schemas/PhoneNumber' diff --git a/abc_spec/components/schemas/Payments/RequestSources/06_PaymentRequestdLocalSource.yaml b/abc_spec/components/schemas/Payments/RequestSources/06_PaymentRequestdLocalSource.yaml new file mode 100644 index 000000000..f9ba8417b --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/06_PaymentRequestdLocalSource.yaml @@ -0,0 +1,11 @@ +type: object +description: A card payment source +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - $ref: '#/components/schemas/03_PaymentRequestCardSource' + - type: object + properties: + number: + type: string + description: The LATAM local card scheme card number (without separators) + example: '4543474002249996' diff --git a/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestAlipaySource.yaml b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestAlipaySource.yaml new file mode 100644 index 000000000..8d7b0e7b6 --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestAlipaySource.yaml @@ -0,0 +1,4 @@ +type: object +description: Alipay Source +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' diff --git a/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestAlmaSource.yaml b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestAlmaSource.yaml new file mode 100644 index 000000000..8de26dc3f --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestAlmaSource.yaml @@ -0,0 +1,17 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: Alma payment source +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + properties: + billing_address: + description: The billing address of the cardholder + required: + - address_line1 + - city + - country + allOf: + - $ref: '#/components/schemas/Address' \ No newline at end of file diff --git a/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestBancontactSource.yaml b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestBancontactSource.yaml new file mode 100644 index 000000000..7f92be28e --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestBancontactSource.yaml @@ -0,0 +1,40 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Bancontact Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - payment_country + - account_holder_name + properties: + payment_country: + maxLength: 2 + minLength: 2 + enum: + - BE + type: string + description: 'The 2-letter ISO country code of the country in which the payment instrument is issued/operated.' + account_holder_name: + maxLength: 100 + minLength: 3 + type: string + description: 'The account holder.' + billing_descriptor: + maxLength: 65534 + type: string + description: 'Payment billing descriptor.' + language: + maxLength: 2 + minLength: 2 + enum: + - fr + - nl + - de + - en + type: string + description: 'The 2-letter ISO language code that should be preferred when presenting payment pages to the consumer.' + default: fr + example: nl diff --git a/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestBenefitPaySource.yaml b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestBenefitPaySource.yaml new file mode 100644 index 000000000..3df0eca4f --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestBenefitPaySource.yaml @@ -0,0 +1,16 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'BenefitPay Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - integration_type + properties: + integration_type: + enum: + - mobile + type: string + description: "Payment method integration type (platform wise) \n* mobile: \n Payment requested for a purchase via an iOS / Android app. \n In case of successful creation, the request will return a transaction reference number. \n The reference number should be used to request a transaction creation via the Android SDK \n or the iOS SDK of BenefitPay." diff --git a/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestBoletoSource.yaml b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestBoletoSource.yaml new file mode 100644 index 000000000..f79438dfd --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestBoletoSource.yaml @@ -0,0 +1,49 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Boleto Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - integration_type + - country + - payer + properties: + integration_type: + enum: + - direct + - redirect + type: string + description: "The type of the integration:\n - `direct`: a ticket object is returned, which a merchant can use to render a ticket to a customer; no redirect url is returned\n - `redirect`: a redirect url is returned, which the merchant redirects the customer to, to continue payment" + country: + maxLength: 2 + enum: + - BR + type: string + description: "Payer's country code. ISO 3166-1 alpha-2 code." + description: + maxLength: 200 + type: string + description: 'Payment description' + payer: + required: + - name + - email + - document + type: object + properties: + name: + maxLength: 100 + type: string + description: "Payer's full name." + email: + maxLength: 100 + type: string + description: "Payer's email address." + document: + maxLength: 100 + type: string + description: "Payer's document identifier in Brazil, namely, Cadastro de Pessoas Físicas (CPF) or Cadastro Nacional da Pessoa Jurídica (CNPJ)." + description: 'Payer object' diff --git a/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestEpsSource.yaml b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestEpsSource.yaml new file mode 100644 index 000000000..891fb1676 --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestEpsSource.yaml @@ -0,0 +1,19 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Eps Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - purpose + properties: + purpose: + maxLength: 27 + type: string + description: "Purpose of the payment as appearing on customer's bank statement." + bic: + maxLength: 11 + type: string + description: 'BIC (8 or 11-digits)' diff --git a/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestFawrySource.yaml b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestFawrySource.yaml new file mode 100644 index 000000000..ad8b81b1b --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestFawrySource.yaml @@ -0,0 +1,56 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Fawry Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - description + - products + - customer_email + - customer_mobile + properties: + description: + maxLength: 265 + type: string + description: 'The payment description.' + customer_profile_id: + type: string + description: "The customer's id within merchant's system." + customer_email: + type: string + description: "The customer's email address." + customer_mobile: + type: string + description: "The customer's mobile phone number." + expires_on: + type: string + description: 'The date on which the payment expires.' + format: 'date-time' + products: + type: array + items: + required: + - product_id + - quantity + - price + - description + type: object + properties: + product_id: + maxLength: 265 + type: string + description: 'The id of the product.' + quantity: + type: integer + description: 'The quantity of the product.' + price: + type: integer + description: "The price of the item. Expressed using Checkout.com's standard rules for calculating payment values." + description: + maxLength: 265 + type: string + description: 'The description of the product.' + description: 'List of Products' diff --git a/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestGiropaySource.yaml b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestGiropaySource.yaml new file mode 100644 index 000000000..9e23a5f3d --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestGiropaySource.yaml @@ -0,0 +1,34 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Giropay Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - purpose + properties: + purpose: + maxLength: 27 + type: string + description: "Purpose of the payment as appearing on customer's bank statement." + bic: + maxLength: 11 + type: string + description: 'BIC (8 or 11-digits)' + info_fields: + maxItems: 5 + type: array + items: + type: object + properties: + label: + maxLength: 30 + type: string + description: 'Additional information field which is shown on the payment form (label)' + text: + maxLength: 80 + type: string + description: 'Additional information field which is shown on the payment form (text)' + additionalProperties: false diff --git a/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestIdealSource.yaml b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestIdealSource.yaml new file mode 100644 index 000000000..b123b56c9 --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestIdealSource.yaml @@ -0,0 +1,24 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Ideal Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - description + - bic + properties: + description: + maxLength: 35 + type: string + description: "Description of the product(s) or services being paid for. This field must not contain characters that can lead to problems (for example those occurring in HTML editing codes). To prevent any possible errors most iDEAL systems will reject any description that contains HTML-tags and such other code.\n" + bic: + maxLength: 11 + type: string + description: 'BIC (8 or 11-digits). In iDEAL-lingo this is also called issuerID' + language: + maxLength: 2 + type: string + description: "This field enables the Issuer's site to select the Consumer's preferred language (e.g. the language selected on the Merchant's site), if the Issuer's site supports this. Code list in accordance with ISO 639-1. (Dutch = 'nl', English = 'en'). If a non-supported or non-existing language is entered the standard language of the Issuer is used. It is recommended to use 'nl' by default since not all Issuers support other languages.\n" diff --git a/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestKlarnaSource.yaml b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestKlarnaSource.yaml new file mode 100644 index 000000000..14c95ae1d --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestKlarnaSource.yaml @@ -0,0 +1,80 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Klarna Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - authorization_token + - locale + - purchase_country + - billing_address + - tax_amount + - products + properties: + authorization_token: + type: string + description: 'Klarna authentication token, obtained by the merchant during client transaction authorization.' + locale: + type: string + description: 'Used to define the language and region of the customer. RFC 1766 customer''s locale.' + x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__locale' + purchase_country: + type: string + description: 'The purchase country of the customer. ISO 3166 alpha-2 purchase country' + x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__purchase_country' + auto_capture: + type: boolean + description: 'Allow merchant to trigger auto capturing.' + x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__auto_capture' + billing_address: + type: object + description: "Customer's billing address. \nThis object is passed directly to Klarna as `billing_address`, \nso for the object definition use the [Klarna documentation](https://developers.klarna.com/api/#payments-api__create-a-new-order__billing_address)." + x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__billing_address' + x-cko-passthrough: true + shipping_address: + type: object + description: "Customer's shipping address. \nThis object is passed directly to Klarna as `shipping_address`, \nso for the object definition use the [Klarna documentation](https://developers.klarna.com/api/#payments-api__create-a-new-order__shipping_address)." + x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__shipping_address' + x-cko-passthrough: true + tax_amount: + type: integer + description: 'Total tax amount of the order.' + x-klarna-name: order_tax_amount + x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__order_tax_amount' + products: + type: array + description: "The applicable order lines. \nThis object is passed directly to Klarna as `order_lines`, \nso for the object definition use the [Klarna documentation](https://developers.klarna.com/api/#payments-api__create-a-new-order__order_lines)." + x-klarna-name: order_lines + x-cko-passthrough: true + x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__order_lines' + customer: + type: object + description: "Information about the liable customer of the order. \nThis object is passed directly to Klarna as `customer`, \nso for the object definition use the [Klarna documentation](https://developers.klarna.com/api/#payments-api__create-a-new-order__customer)." + x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__customer' + x-cko-passthrough: true + merchant_reference1: + type: string + description: 'Used for storing merchant''s internal order number or other reference. If set, will be shown on the confirmation page as "order number" (max 255 characters).' + x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__merchant_reference1' + merchant_reference2: + type: string + description: "Used for storing merchant's internal order number or other reference (max 255 characters)." + x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__merchant_reference2' + merchant_data: + type: string + description: 'Pass through field (max 1024 characters).' + x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__merchant_data' + attachment: + type: object + description: "Additional purchase information required for some industries. \nThis object is passed directly to Klarna as `attachment`, \nso for the object definition use the [Klarna documentation](https://developers.klarna.com/api/#payments-api__create-a-new-order__attachment)." + x-cko-passthrough: true + x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__attachment' + custom_payment_method_ids: + type: array + description: "This array can be used to define which of the configured payment options within a payment category (`pay_later`, `pay_over_time`, etc.) should be shown for this purchase. \nThis object is passed directly to Klarna as `custom_payment_method_ids`, \nso for the object definition use the [Klarna documentation](https://developers.klarna.com/api/#payments-api__create-a-new-order__custom_payment_method_ids)." + x-klarna-name: custom_payment_method_ids + x-cko-passthrough: true + x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__custom_payment_method_ids' \ No newline at end of file diff --git a/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestKnetSource.yaml b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestKnetSource.yaml new file mode 100644 index 000000000..af2603578 --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestKnetSource.yaml @@ -0,0 +1,77 @@ +type: object +description: 'KNet Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - language + properties: + language: + maxLength: 2 + enum: + - ar + - en + type: string + description: This field enables the issuer's site to select the consumer's preferred language + (e.g. the language selected on the merchant's site), if the issuer's site supports this. + Code list in accordance with ISO 639-1. (Arabic = 'ar', English = 'en'). + Note that 'ar' corresponds to 'ARA' and 'en' to 'USA' values accepted by KNet Gateway + user_defined_field1: + maxLength: 255 + type: string + description: >- + User-defined field that can be used to pass and store any additional transaction data + required to be archived with the transaction and available as a searching criteria. + Only alphanumeric characters and spaces are allowed + user_defined_field2: + maxLength: 255 + type: string + description: >- + User-defined field that can be used to pass and store any additional transaction data + required to be archived with the transaction and available as a searching criteria. + Only alphanumeric characters and spaces are allowed + user_defined_field3: + maxLength: 255 + type: string + description: >- + User-defined field that can be used to pass and store any additional transaction data + required to be archived with the transaction and available as a searching criteria. + Only alphanumeric characters and spaces are allowed. + Note that this field must be omitted when the `card_token` field is not empty. This restriction + exists because a card token is passed to KNet Gateway as user defined field 3 + user_defined_field4: + maxLength: 255 + type: string + description: >- + User-defined field that can be used to pass and store any additional transaction data + required to be archived with the transaction and available as a searching criteria. + Only alphanumeric characters and spaces are allowed. + user_defined_field5: + maxLength: 255 + type: string + description: >- + User-defined field that can be used to pass and store any additional transaction data + required to be archived with the transaction and available as a searching criteria. + Only alphanumeric characters and spaces are allowed. + Note that this field must be omitted when the ptlf field is not empty. This restriction + exists because a PTLF value is passed to KNet Gateway as user defined field 5 + card_token: + type: string + pattern: '^[0-9]{8}$' + description: >- + This token allows re-use of card details for multiple payments. + This 8-digit token should be generated by a merchant. When a subsequent payment + is initialized with the same card token, a customer is presented with two options. + The customer can choose to pay with KFast (doesn't need to enter card details again), + or with KNet as usual. The payment flow stays the same i.e. a merchant should redirect + a customer to the redirect URL which is provided in the payment creation response. + Note that `user_defined_field3` must be omitted when the `card_token` field is not empty. This restriction + exists because a card token is passed to KNet Gateway as user defined field 3 + ptlf: + maxLength: 45 + type: string + description: >- + This is an ID for merchant PTLF functionality tracking. + Only alphanumeric characters are allowed. + Note that `user_defined_field5` must be omitted when the `ptlf` field is not empty. This restriction + exists because a PTLF value is passed to KNet Gateway as user defined field 5 diff --git a/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestMultibancoSource.yaml b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestMultibancoSource.yaml new file mode 100644 index 000000000..994fe36e7 --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestMultibancoSource.yaml @@ -0,0 +1,28 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Multibanco Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - payment_country + - account_holder_name + properties: + payment_country: + maxLength: 2 + minLength: 2 + enum: + - PT + type: string + description: 'The 2-letter ISO country code of the country in which the payment instrument is issued/operated.' + account_holder_name: + maxLength: 100 + minLength: 3 + type: string + description: 'The account holder.' + billing_descriptor: + maxLength: 65534 + type: string + description: 'Payment billing descriptor.' diff --git a/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestOXXOSource.yaml b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestOXXOSource.yaml new file mode 100644 index 000000000..cb39eb220 --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestOXXOSource.yaml @@ -0,0 +1,49 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'OXXO Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - integration_type + - country + - payer + properties: + integration_type: + enum: + - direct + - redirect + type: string + description: "The type of the integration:\n - `direct`: a ticket object is returned, which a merchant can use to render a ticket to a customer; no redirect url is returned\n - `redirect`: a redirect url is returned, which the merchant redirects the customer to, to continue payment" + country: + maxLength: 2 + enum: + - MX + type: string + description: "Payer's country code. ISO 3166-1 alpha-2 code." + description: + maxLength: 200 + type: string + description: 'Payment description' + payer: + required: + - name + - email + - document + type: object + properties: + name: + maxLength: 100 + type: string + description: "Payer's full name." + email: + maxLength: 100 + type: string + description: "Payer's email address." + document: + maxLength: 100 + type: string + description: "Payer's document identifier in Mexico, namely, Unique Population Registry Code (CURP)." + description: 'Payer object' diff --git a/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestP24Source.yaml b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestP24Source.yaml new file mode 100644 index 000000000..9d6701c1f --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestP24Source.yaml @@ -0,0 +1,33 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'P24 Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - payment_country + - account_holder_name + - account_holder_email + properties: + payment_country: + maxLength: 2 + minLength: 2 + enum: + - PL + type: string + description: 'The 2-letter ISO country code of the country in which the payment instrument is issued/operated.' + account_holder_name: + maxLength: 100 + minLength: 3 + type: string + description: 'The account holder.' + account_holder_email: + maxLength: 254 + type: string + description: 'RFC compliant email address of the account holder.' + billing_descriptor: + maxLength: 65534 + type: string + description: 'Payment billing descriptor.' diff --git a/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestPagoFacilSource.yaml b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestPagoFacilSource.yaml new file mode 100644 index 000000000..371b14fe2 --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestPagoFacilSource.yaml @@ -0,0 +1,50 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'PagoFacil Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - integration_type + - country + - payer + properties: + integration_type: + enum: + - direct + - redirect + type: string + description: "The type of the integration:\n - `direct`: a ticket object is returned, which a merchant can use to render a ticket to a customer; no redirect url is returned\n - `redirect`: a redirect url is returned, which the merchant redirects the customer to, to continue payment" + country: + maxLength: 2 + enum: + - AR + type: string + description: "Payer's country code. ISO 3166-1 alpha-2 code." + description: + maxLength: 200 + type: string + description: 'Payment description' + payer: + required: + - name + - email + - document + type: object + properties: + name: + maxLength: 100 + type: string + description: "Payer's full name." + email: + maxLength: 100 + type: string + description: "Payer's email address." + document: + maxLength: 100 + type: string + description: "Payer's document identifier in Argentina, namely, Documento Nacional de Identidad (DNI) or Clave Única de Identificación Tributaria (CUIT)." + example: '27332162' + description: 'Payer object' diff --git a/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestPayPalSource.yaml b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestPayPalSource.yaml new file mode 100644 index 000000000..60fb93346 --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestPayPalSource.yaml @@ -0,0 +1,127 @@ +type: object +required: + - invoice_number +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + properties: + invoice_number: + type: string + minLength: 1 + maxLength: 256 + description: > + PayPal recommends using this field to associate transactions with your internal tracking IDs or invoice numbers; + populating the invoice ID field will help you pull transaction information at a later date using only your internal ID.

Note: The invoice number must be a unique value. + recipient_name: + maxLength: 128 + type: string + description: > + Person's name associated with the shipping address. + logo_url: + type: string + format: uri + description: > + A URL to your logo. Use a graphics format, such as .gif, .jpg, or .png. + The logo appears at the top of the cart review area. + Host the image on a secure (https) server. + Character limit: 127 single-byte alphanumeric characters. + Width: 190px + Height: 60px + stc: + type: object + additionalProperties: + type: string + description: > + These details are used by Paypal to perform a pre-transaction risk management evaluation. + The property names should be the same one as agreed between the merchant and PayPal. + example: + ota_type: 'airline' + ota_start_city: 'SKG' + + #TODO These are all fields supported by the legacy API but not by UPAPI (yet) + #order: + # type: boolean + # default: false + # description: > + # Set this flag to 'true' to use the Deferred Settlement (Order / Auth / Capture) flow. + # This will only create an order for a customer's approval and will require an additional API authorisation call before a capture. + #collection: + # type: boolean + # default: false + # description: > + # Set this to true if the products will be collected by the customer. + #display_shipping: + # type: boolean + # default: false + # description: > + # Applies to ECS transactions only. + # Set this flag to 'true' if the shipping details from PayPal should be displayed on the payment screen. + #airline_details: + # type: object + # description: > + # Additional details to be provided in case of airline tickets + # properties: + # passenger_name: + # type: string + # minLength: 1 + # maxLength: 25 + # description: > + # Name of passenger or person to whom the ticket was issued. + # issue_date: + # type: string + # minLength: 8 + # maxLength: 8 + # description: > + # Date when the ticket was issued to the buyer. + # In case of multiple issuances of the same ticket to a buyer, the merchant should use the last ticket date. + # The date is in the format YYYYMMDD. + # travel_agency_name: + # type: string + # minLength: 1 + # maxLength: 25 + # description: > + # Name of the travel agency issuing the ticket. For direct airline integration, leave this field blank. + # travel_agency_code: + # type: string + # minLength: 1 + # maxLength: 8 + # description: > + # The travel agency code. For direct airline integration, leave this field blank. + # ticket_number: + # type: string + # minLength: 1 + # maxLength: 16 + # description: > + # The ticket number. If multiple tickets are purchased with one payment, use the primary ticket number. + # issuing_carrier_code: + # type: string + # minLength: 4 + # maxLength: 4 + # description: > + # Airline code for the airline issuing the ticket. + # customer_code: + # type: string + # minLength: 1 + # maxLength: 17 + # description: > + # A code that the buyer supplied to the merchant, such as a frequent flyer number. + # total_fare: + # type: string + # description: > + # Total fare for all legs on the ticket, excluding taxes and fees. If multiple tickets are purchased, this is the total fare for all tickets. + # Character length and limitations: Must not exceed 10,000.00 in any currency. No currency symbol. Must have two decimal places, decimal separator must be a period (.), and the optional thousands separator must be a comma (,). + # total_taxes: + # type: string + # description: > + # Total taxes for all legs on the ticket. If multiple tickets are purchased, this is the total taxes for all tickets. + # Character length and limitations: Must not exceed 10,000.00 in any currency. No currency symbol. Must have two decimal places, decimal separator must be a period (.), and the optional thousands separator must be a comma (,). + # total_fee: + # type: string + # description: > + # The total fee for all legs on the ticket. If multiple tickets are purchased, this is the total fee for all tickets. + # Character length and limitations: Must not exceed 10,000.00 in any currency. No currency symbol. Must have two decimal places, decimal separator must be a period (.), and the optional thousands separator must be a comma (,). + # restricted_ticket: + # type: boolean + # default: false + # description: > + # For direct airline integration, indicates whether the ticket is restricted (refundable). diff --git a/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestPoliSource.yaml b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestPoliSource.yaml new file mode 100644 index 000000000..f3831207b --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestPoliSource.yaml @@ -0,0 +1,4 @@ +type: object +description: POLi Source +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' diff --git a/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestQPaySource.yaml b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestQPaySource.yaml new file mode 100644 index 000000000..c5443e6cc --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestQPaySource.yaml @@ -0,0 +1,25 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'QPay Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - description + properties: + quantity: + minimum: 1 + type: integer + description: 'A numeric value greater than zero represents the quantity of purchased Item. The value is used for display purposes only and does not affect the total amount of the payment. The minimum allowed value is 1.' + description: + type: string + description: 'Alphanumeric string containing a description of the payment order. Note: The maximum allowed length of this property is 255 characters after UTF-8 URL encoding.' + language: + type: string + description: 'Alphabetic value representing the language of the interface displayed to customer at merchant site, and used as language for the payment description parameter. PG will use this value to display the interface supporting selected language to the customer during the payment process. Supported values are: En, Ar. The default value is En.' + national_id: + maxLength: 32 + type: string + description: 'Alphanumeric value representing the national id of the customer performing the transaction. The maximum allowed length of this property is 32.' diff --git a/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestRapiPagoSource.yaml b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestRapiPagoSource.yaml new file mode 100644 index 000000000..1a62461cd --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestRapiPagoSource.yaml @@ -0,0 +1,49 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'RapiPago Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - integration_type + - country + - payer + properties: + integration_type: + enum: + - redirect + type: string + description: 'The type of the integration. A redirect url is returned, which the merchant redirects the customer to, to continue payment.' + country: + maxLength: 2 + enum: + - AR + type: string + description: "Payer's country code. ISO 3166-1 alpha-2 code." + description: + maxLength: 200 + type: string + description: 'Payment description' + payer: + required: + - name + - email + - document + type: object + properties: + name: + maxLength: 100 + type: string + description: "Payer's full name." + email: + maxLength: 100 + type: string + description: "Payer's email address." + document: + maxLength: 100 + type: string + description: "Payer's document identifier in Argentina, namely, Documento Nacional de Identidad (DNI) or Clave Única de Identificación Tributaria (CUIT)." + example: '27332162' + description: 'Payer object' diff --git a/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestSofortSource.yaml b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestSofortSource.yaml new file mode 100644 index 000000000..8f5d2d2dd --- /dev/null +++ b/abc_spec/components/schemas/Payments/RequestSources/PaymentRequestSofortSource.yaml @@ -0,0 +1,15 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Sofort Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + properties: + countryCode: + type: string + description: 'The ISO 3166-1 alpha-2 country code. For example DE, FR, IT.' + languageCode: + type: string + description: 'The ISO 639-1 language code. For example de, fr, it.' diff --git a/abc_spec/components/schemas/Payments/ResponseDestinations/01_PaymentResponseCardDestination.yaml b/abc_spec/components/schemas/Payments/ResponseDestinations/01_PaymentResponseCardDestination.yaml new file mode 100644 index 000000000..a0489a412 --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseDestinations/01_PaymentResponseCardDestination.yaml @@ -0,0 +1,82 @@ +type: object +description: A card payment destination +allOf: + - $ref: '#/components/schemas/PaymentResponseDestination' + - type: object + required: + - expiry_month + - expiry_year + - last4 + - fingerprint + - bin + properties: + expiry_month: + type: integer + description: The expiry month + example: 6 + minimum: 1 + maxLength: 2 + minLength: 1 + expiry_year: + type: integer + description: The expiry year + example: 2025 + maxLength: 4 + minLength: 4 + name: + type: string + description: The cardholder's name + example: 'Bruce Wayne' + scheme: + type: string + description: The card scheme + example: 'VISA' + last4: + type: string + description: The last four digits of the card number + example: '9996' + maxLength: 4 + minLength: 4 + fingerprint: + type: string + description: Uniquely identifies this particular card number. You can use this to compare cards across customers + example: 'F639CAB2745BEE4140BF86DF6B6D6' + bin: + type: string + description: The card issuer's Bank Identification Number (BIN) + example: '454347' + maxLength: 6 + card_type: + type: string + description: The card type + enum: + - Credit + - Debit + - Prepaid + - Charge + example: Credit + card_category: + type: string + description: The card category + enum: + - Consumer + - Commercial + example: Consumer + issuer: + type: string + description: The name of the card issuer + example: 'GOTHAM STATE BANK' + issuer_country: + type: string + maxLength: 2 + minLength: 2 + description: The card issuer's country (two-letter ISO code) + example: 'US' + product_id: + type: string + description: The issuer/card scheme product identifier + example: 'F' + product_type: + type: string + description: The issuer/card scheme product type + example: CLASSIC diff --git a/abc_spec/components/schemas/Payments/ResponseSources/01_PaymentResponseCardSource.yaml b/abc_spec/components/schemas/Payments/ResponseSources/01_PaymentResponseCardSource.yaml new file mode 100644 index 000000000..abe79670e --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseSources/01_PaymentResponseCardSource.yaml @@ -0,0 +1,106 @@ +type: object +description: A card payment source +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + required: + - expiry_month + - expiry_year + - last4 + - fingerprint + - bin + properties: + expiry_month: + type: integer + description: The expiry month + minimum: 1 + minLength: 1 + maxLength: 2 + example: 6 + expiry_year: + type: integer + description: The expiry year + minLength: 4 + maxLength: 4 + example: 2025 + name: + type: string + description: The cardholder's name + example: 'Bruce Wayne' + scheme: + type: string + description: The card scheme + example: 'VISA' + last4: + type: string + description: The last four digits of the card number + example: '9996' + fingerprint: + type: string + description: Uniquely identifies this particular card number. You can use this to compare cards across customers. + example: 'F639CAB2745BEE4140BF86DF6B6D6' + bin: + type: string + description: The card issuer's Bank Identification Number (BIN) + maxLength: 6 + example: '454347' + card_type: + type: string + description: The card type + enum: + - Credit + - Debit + - Prepaid + - Charge + - Deferred Debit + example: Credit + card_category: + type: string + description: The card category + enum: + - Consumer + - Commercial + example: Consumer + issuer: + type: string + description: The name of the card issuer + example: 'GOTHAM STATE BANK' + issuer_country: + type: string + maxLength: 2 + minLength: 2 + description: The card issuer's country (two-letter ISO code) + example: 'US' + product_id: + type: string + description: The issuer/card scheme product identifier + example: 'F' + product_type: + type: string + description: The issuer/card scheme product type + example: CLASSIC + avs_check: + type: string + description: The Address Verification System check result + example: S + cvv_check: + type: string + description: The card verification value (CVV) check result + example: Y + payouts: + type: boolean + description: Whether the card supports payouts + example: true + fast_funds: + type: string + enum: + - d + - c + - dc + - u + description: The fast funds eligibility of the card, as defined during [card verification](https://www.checkout.com/docs/previous/risk-management/card-verification#Verifying_a_card_for_payouts). For more information, see our [Card Payouts](https://www.checkout.com/docs/previous/card-payouts) documentation. + example: d + payment_account_reference: + type: string + description: A unique reference to the underlying card for network tokens (e.g., Apple Pay, Google Pay) + example: 'EUNIX9AX7THOOJIEJ2AP6OOFAHGH4' diff --git a/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseAlipaySource.yaml b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseAlipaySource.yaml new file mode 100644 index 000000000..9b7f7b945 --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseAlipaySource.yaml @@ -0,0 +1,4 @@ +type: object +description: An Alipay payment source +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' diff --git a/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseBancontactSource.yaml b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseBancontactSource.yaml new file mode 100644 index 000000000..7d5e991f9 --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseBancontactSource.yaml @@ -0,0 +1,13 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Bancontact Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + properties: + iban: + maxLength: 34 + type: string + description: "The IBAN of the Consumer Bank account used for payment (if applicable).\n" diff --git a/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseBenefitPaySource.yaml b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseBenefitPaySource.yaml new file mode 100644 index 000000000..386605218 --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseBenefitPaySource.yaml @@ -0,0 +1,24 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'BenefitPay Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + properties: + reference_number: + type: string + description: 'Unique transaction reference number from BenefitPay' + qr_data: + type: string + description: 'String for generating the QR code to be scanned' + failure_reason: + type: string + description: 'Reason for error with payment' + error_code: + type: string + description: "Error code returned from BenefitPay. For further detail, the full code meaning has to be requested directly from BenefitPay, as CKO does not have access to this.\n" + error_description: + type: string + description: 'Error description returned from BenefitPay' diff --git a/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseBoletoSource.yaml b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseBoletoSource.yaml new file mode 100644 index 000000000..cbb90c0bd --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseBoletoSource.yaml @@ -0,0 +1,95 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Boleto Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + allOf: + - type: object + properties: + dlocal_order_id: + type: string + description: "An ID used for tracking payments in dLocal. The dLocal 'Order ID' will contain this value." + example: b777afcdfdb74e6ab005fff223fe4d0f + dlocal_payment_id: + type: string + description: "An ID returned from dLocal for a created payment. The dLocal 'Payment ID' will contain this value. This value will not be available in the case of rejected payments." + example: D-30150-73979261-1667-4a6d-aaca-92a805cf837d + failure_reason: + type: string + description: 'Reason of payment failure' + example: 'Third party response: Rejected (Error code: 300)' + failure_code: + enum: + - third_party_invalid_credentials + - third_party_access_denied + - third_party_invalid_request + - third_party_invalid_parameter + - third_party_invalid_transaction_status + - third_party_rejected + - third_party_amount_exceeded + - third_party_timeout + - third_party_error + type: string + description: 'Failure code' + example: third_party_rejected + - type: object + properties: + integration_type: + enum: + - direct + - redirect + type: string + description: "The type of the integration:\n - `direct`: a ticket object is returned, which a merchant can use to render a ticket to a customer; no redirect url is returned\n - `redirect`: a redirect url is returned, which the merchant redirects the customer to, to continue payment" + description: + maxLength: 200 + type: string + description: 'Payment description' + ticket: + required: + - type + type: object + properties: + type: + enum: + - numeric + - barcode + - custom + type: string + description: 'Type of ticket' + number: + type: string + description: 'Numeric code of the numeric or custom ticket' + barcode: + type: string + description: 'Code to be included in the barcode of the barcode or custom ticket' + format: + type: string + description: 'Format of the barcode of the BARCODE or CUSTOM ticket. For example, CODE_128, or ITF.' + id: + type: string + description: 'Reference code of the ticket' + expiration_date: + type: string + description: 'The expiration date of the ticket' + format: date-time + company_name: + type: string + description: 'Name of the company that acts as the beneficiary of the payment' + company_id: + type: string + description: 'Identifier of the company' + provider_name: + type: string + description: 'Name of the company/bank that is creating the ticket' + provider_logo_url: + type: string + description: 'URL of the logo of the company/bank that is creating the ticket' + format: url + ticket_url: + type: string + description: 'URL of the full version of the ticket' + format: url + description: "Ticket object. Returned only when the payment was submitted with integration_type as 'direct'." diff --git a/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseEpsSource.yaml b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseEpsSource.yaml new file mode 100644 index 000000000..95dab0717 --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseEpsSource.yaml @@ -0,0 +1,24 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Eps Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + properties: + purpose: + maxLength: 27 + type: string + description: "Purpose of the payment as appearing on customer's bank statement." + bic: + maxLength: 11 + type: string + description: 'Bank Identifier Code (BIC). It can be exactly 8 characters or 11 characters long.' + iban: + maxLength: 34 + type: string + description: 'International Bank Account Number (IBAN) without whitespaces.' + account_holder: + type: string + description: 'Account holder information.' diff --git a/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseFawrySource.yaml b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseFawrySource.yaml new file mode 100644 index 000000000..ae2b4a2f1 --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseFawrySource.yaml @@ -0,0 +1,18 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Fawry Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + required: + - description + properties: + description: + maxLength: 65534 + type: string + description: 'Payment description' + reference_number: + type: string + description: "The customer pays using this number at Fawry's outlets" diff --git a/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseGiropaySource.yaml b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseGiropaySource.yaml new file mode 100644 index 000000000..707ba8772 --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseGiropaySource.yaml @@ -0,0 +1,24 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Giropay Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + properties: + purpose: + maxLength: 27 + type: string + description: "Purpose of the payment as appearing on customer's bank statement." + bic: + maxLength: 11 + type: string + description: 'Bank Identifier Code (BIC). It can be exactly 8 characters or 11 characters long.' + iban: + maxLength: 34 + type: string + description: 'International Bank Account Number (IBAN) without whitespaces.' + account_holder: + type: string + description: 'Account holder information.' diff --git a/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseIdealSource.yaml b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseIdealSource.yaml new file mode 100644 index 000000000..635942e4d --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseIdealSource.yaml @@ -0,0 +1,27 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Ideal Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + required: + - description + - bic + properties: + description: + maxLength: 27 + type: string + description: description + bic: + maxLength: 11 + type: string + description: "BIC (8 or 11-digits) BIC of the bank where the Consumer account is held. If governing law prevents Issuers outside the Netherlands from disclosing this information, field may be omitted.\n" + iban: + maxLength: 34 + type: string + description: "The IBAN of the Consumer Bank account used for payment. If governing law prevents Issuers outside the Netherlands from disclosing this information, field may be omitted.\n" + account_holder: + type: string + description: "Name of the Consumer according to the name of the account used for payment. In the exceptional case that the consumerName cannot be retrieved by the Issuer, this is filled with 'N/A'. If governing law prevents Issuers outside the Netherlands from disclosing this information, field may be omitted.\n" diff --git a/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseKlarnaSource.yaml b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseKlarnaSource.yaml new file mode 100644 index 000000000..feed87c6c --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseKlarnaSource.yaml @@ -0,0 +1,37 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Klarna Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + properties: + order_id: + type: string + description: 'Klarna order identifier' + billing_address: + type: object + description: 'Customer''s billing address.' + shipping_address: + type: object + description: 'Customer''s shipping address.' + products: + type: array + description: 'The applicable order lines.' + x-klarna-name: order_lines + customer: + type: object + description: 'Information about the liable customer of the order.' + custom_payment_method_ids: + type: array + description: 'This array can be used to define which of the configured payment options within a payment category (`pay_later`, `pay_over_time`, etc.) should be shown for this purchase.' + initial_payment_method: + type: object + properties: + type: + type: string + description: 'Payment option type name' + description: + type: string + description: 'Payment option description' \ No newline at end of file diff --git a/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseKnetSource.yaml b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseKnetSource.yaml new file mode 100644 index 000000000..5ae5f5e3e --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseKnetSource.yaml @@ -0,0 +1,123 @@ +type: object +description: 'KNet Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + properties: + language: + enum: + - ar + - en + type: string + description: >- + This field enables the Issuer's site to select the Consumer's preferred language + (e.g. the language selected on the Merchant's site), if the Issuer's site supports this. + Code list in accordance with ISO 639-1. (Arabic = 'ar', English = 'en'). + NOTE: 'ar' corresponds to 'ARA' and 'en' - to 'USA' values accepted by KNet Gateway. + user_defined_field1: + type: string + description: >- + User defined field can be used to pass and store any additional transaction data + required to be archived with the transaction and available as a searching criteria. + Only alphanumeric characters and spaces are allowed. + user_defined_field2: + type: string + description: >- + User defined field can be used to pass and store any additional transaction data + required to be archived with the transaction and available as a searching criteria. + Only alphanumeric characters and spaces are allowed. + user_defined_field3: + type: string + description: >- + User defined field can be used to pass and store any additional transaction data + required to be archived with the transaction and available as a searching criteria. + Only alphanumeric characters and spaces are allowed. + Note that this field must be omitted when the card_token field is not empty. This restriction + exists because a card token is passed to KNet Gateway as user defined field 3. + user_defined_field4: + type: string + description: >- + User defined field can be used to pass and store any additional transaction data + required to be archived with the transaction and available as a searching criteria. + Only alphanumeric characters and spaces are allowed. + user_defined_field5: + type: string + description: >- + User defined field can be used to pass and store any additional transaction data + required to be archived with the transaction and available as a searching criteria. + Only alphanumeric characters and spaces are allowed. + Note that this field must be omitted when the ptlf field is not empty. This restriction + exists because a PTLF value is passed to KNet Gateway as user defined field 5. + card_token: + type: string + pattern: '^[0-9]{8}$' + description: >- + This token allows re-usage of card details for multiple payments. + This 8-digit token should be generated by a merchant. When a subsequent payment + is initialized with the same card token, a customer is presented with two options. + The customer can choose to pay with KFast (doesn't need to enter card details again), + or with KNet as usual. The payment flow stays the same i.e. a merchant should redirect + a customer to the redirect URL which is provided in the payment creation response. + Note that user_defined_field3 must be omitted when the card_token field is not empty. This restriction + exists because a card token is passed to KNet Gateway as user defined field 3. + ptlf: + type: string + maxLength: 45 + description: >- + This is an ID for merchant PTLF functionality tracking. + Only alphanumeric characters are allowed. + Note that user_defined_field5 must be omitted when the ptlf field is not empty. This restriction + exists because a PTLF value is passed to KNet Gateway as user defined field 5. + knet_payment_id: + type: string + description: The payment identifier assigned by KNet Gateway. + knet_result: + type: string + description: >- + The state of the payment, returned by KNet Gateway after the customer is redirected from + the payment page. + inquiry_result: + type: string + description: >- + The state of the payment, retunrned by KNet Gateway in the response from the payment inquiry. + This field is populated in rare cases when the redirection from the payment page did not occur + properly. + bank_reference: + type: string + example: 123456789012 + description: 'The result transaction reference, given by some banks/institutions.' + knet_transaction_id: + type: string + example: 1234567890123456 + description: The transaction identifier assigned by KNet Gateway. + auth_code: + type: string + example: 999554 + description: The resulting authorization code from the issuing bank. + auth_response_code: + type: string + example: 5 + description: >- + The auth response code / reason code relating to the issuing bank + authorization code. + post_date: + type: string + example: 1127 + description: >- + The transaction date in the authorization system format, with the + value defined by the issuing bank, so may not match the actual + transaction date. The format is `MMDD`. + avr: + type: string + example: A + description: >- + The Address Verification Response returned from the address + verification service. + error: + type: string + example: IPAY0100044 + description: The KNET error code for transaction processing. + error_text: + type: string + example: IPAY0100044-Problem occured while loading payment page. + description: 'The KNET text detail for the error, including an error code.' diff --git a/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseMultibancoSource.yaml b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseMultibancoSource.yaml new file mode 100644 index 000000000..1206e8e72 --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseMultibancoSource.yaml @@ -0,0 +1,15 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Multibanco Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + properties: + payment_reference: + type: string + description: 'Multibanco payment reference' + service_supplier_id: + type: string + description: 'The identifier of a supplier charging for its service or product' diff --git a/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseOXXOSource.yaml b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseOXXOSource.yaml new file mode 100644 index 000000000..a0aa7fb63 --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseOXXOSource.yaml @@ -0,0 +1,95 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'OXXO Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + allOf: + - type: object + properties: + dlocal_order_id: + type: string + description: "An ID used for tracking payments in dLocal. The dLocal 'Order ID' will contain this value." + example: b777afcdfdb74e6ab005fff223fe4d0f + dlocal_payment_id: + type: string + description: "An ID returned from dLocal for a created payment. The dLocal 'Payment ID' will contain this value. This value will not be available in the case of rejected payments." + example: D-30150-73979261-1667-4a6d-aaca-92a805cf837d + failure_reason: + type: string + description: 'Reason of payment failure' + example: 'Third party response: Rejected (Error code: 300)' + failure_code: + enum: + - third_party_invalid_credentials + - third_party_access_denied + - third_party_invalid_request + - third_party_invalid_parameter + - third_party_invalid_transaction_status + - third_party_rejected + - third_party_amount_exceeded + - third_party_timeout + - third_party_error + type: string + description: 'Failure code' + example: third_party_rejected + - type: object + properties: + integration_type: + enum: + - direct + - redirect + type: string + description: "The type of the integration:\n - `direct`: a ticket object is returned, which a merchant can use to render a ticket to a customer; no redirect url is returned\n - `redirect`: a redirect url is returned, which the merchant redirects the customer to, to continue payment" + description: + maxLength: 200 + type: string + description: 'Payment description' + ticket: + required: + - type + type: object + properties: + type: + enum: + - numeric + - barcode + - custom + type: string + description: 'Type of ticket' + number: + type: string + description: 'Numeric code of the numeric or custom ticket' + barcode: + type: string + description: 'Code to be included in the barcode of the barcode or custom ticket' + format: + type: string + description: 'Format of the barcode of the BARCODE or CUSTOM ticket. For example, CODE_128, or ITF.' + id: + type: string + description: 'Reference code of the ticket' + expiration_date: + type: string + description: 'The expiration date of the ticket' + format: date-time + company_name: + type: string + description: 'Name of the company that acts as the beneficiary of the payment' + company_id: + type: string + description: 'Identifier of the company' + provider_name: + type: string + description: 'Name of the company/bank that is creating the ticket' + provider_logo_url: + type: string + description: 'URL of the logo of the company/bank that is creating the ticket' + format: url + ticket_url: + type: string + description: 'URL of the full version of the ticket' + format: url + description: "Ticket object. Returned only when the payment was submitted with integration_type as 'direct'." diff --git a/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseP24Source.yaml b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseP24Source.yaml new file mode 100644 index 000000000..242ba7465 --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseP24Source.yaml @@ -0,0 +1,12 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'P24 Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + properties: + p24_descriptor: + type: string + description: "P24 generated payment descriptor, which will contain requested billing descriptor or merchant's default descriptor (subject to truncation)." diff --git a/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponsePagoFacilSource.yaml b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponsePagoFacilSource.yaml new file mode 100644 index 000000000..078f795f0 --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponsePagoFacilSource.yaml @@ -0,0 +1,98 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'PagoFacil Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + allOf: + - type: object + properties: + dlocal_order_id: + type: string + description: "An ID used for tracking payments in dLocal. The dLocal 'Order ID' will contain this value." + example: b777afcdfdb74e6ab005fff223fe4d0f + dlocal_payment_id: + type: string + description: "An ID returned from dLocal for a created payment. The dLocal 'Payment ID' will contain this value. This value will not be available in the case of rejected payments." + example: D-30150-73979261-1667-4a6d-aaca-92a805cf837d + failure_reason: + type: string + description: 'Reason of payment failure' + example: 'Third party response: Rejected (Error code: 300)' + failure_code: + enum: + - third_party_invalid_credentials + - third_party_access_denied + - third_party_invalid_request + - third_party_invalid_parameter + - third_party_invalid_transaction_status + - third_party_rejected + - third_party_amount_exceeded + - third_party_timeout + - third_party_error + type: string + description: 'Failure code' + example: third_party_rejected + - type: object + properties: + integration_type: + enum: + - direct + - redirect + type: string + description: "The type of the integration:\n - `direct`: a ticket object is returned, which a merchant can use to render a ticket to a customer; no redirect url is returned\n - `redirect`: a redirect url is returned, which the merchant redirects the customer to, to continue payment" + description: + maxLength: 200 + type: string + description: 'Payment description' + - type: object + properties: + ticket: + required: + - type + type: object + properties: + type: + enum: + - numeric + - barcode + - custom + - reference_code + type: string + description: 'Type of ticket' + number: + type: string + description: 'Numeric code of the numeric or custom ticket' + barcode: + type: string + description: 'Code to be included in the barcode of the barcode or custom ticket' + format: + type: string + description: 'Format of the barcode of the BARCODE or CUSTOM ticket. For example, CODE_128, or ITF.' + id: + type: string + description: 'Reference code of the ticket' + expiration_date: + type: string + description: 'The expiration date of the ticket' + format: date-time + company_name: + type: string + description: 'Name of the company that acts as the beneficiary of the payment' + company_id: + type: string + description: 'Identifier of the company' + provider_name: + type: string + description: 'Name of the company/bank that is creating the ticket' + provider_logo_url: + type: string + description: 'URL of the logo of the company/bank that is creating the ticket' + format: url + ticket_url: + type: string + description: 'URL of the full version of the ticket' + format: url + description: "Ticket object. Returned only when the payment was submitted with integration_type as 'direct'." diff --git a/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponsePayPalSource.yaml b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponsePayPalSource.yaml new file mode 100644 index 000000000..69126201a --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponsePayPalSource.yaml @@ -0,0 +1,4 @@ +type: object +description: 'PayPal payment source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' diff --git a/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponsePoliSource.yaml b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponsePoliSource.yaml new file mode 100644 index 000000000..5f0807131 --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponsePoliSource.yaml @@ -0,0 +1,4 @@ +type: object +description: A POLi payment source +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' diff --git a/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseQPaySource.yaml b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseQPaySource.yaml new file mode 100644 index 000000000..ef01ff7b3 --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseQPaySource.yaml @@ -0,0 +1,23 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'QPay Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + required: + - description + properties: + description: + type: string + description: 'Alphanumeric string containing a description of the payment order.' + qpay_status: + type: string + description: 'The status code returned from the QPay gateway on payment, if available.' + status_message: + type: string + description: 'A message giving further detail on the payment status, for failure/cancelled/success status payments.' + confirmation_id: + type: string + description: 'An identifier from the QPay gateway for a successful payment.' diff --git a/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseRapiPagoSource.yaml b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseRapiPagoSource.yaml new file mode 100644 index 000000000..fdab4ba0b --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseRapiPagoSource.yaml @@ -0,0 +1,49 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'RapiPago Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + allOf: + - type: object + properties: + dlocal_order_id: + type: string + description: "An ID used for tracking payments in dLocal. The dLocal 'Order ID' will contain this value." + example: b777afcdfdb74e6ab005fff223fe4d0f + dlocal_payment_id: + type: string + description: "An ID returned from dLocal for a created payment. The dLocal 'Payment ID' will contain this value. This value will not be available in the case of rejected payments." + example: D-30150-73979261-1667-4a6d-aaca-92a805cf837d + failure_reason: + type: string + description: 'Reason of payment failure' + example: 'Third party response: Rejected (Error code: 300)' + failure_code: + enum: + - third_party_invalid_credentials + - third_party_access_denied + - third_party_invalid_request + - third_party_invalid_parameter + - third_party_invalid_transaction_status + - third_party_rejected + - third_party_amount_exceeded + - third_party_timeout + - third_party_error + type: string + description: 'Failure code' + example: third_party_rejected + - type: object + properties: + integration_type: + enum: + - redirect + type: string + description: 'The type of the integration. A redirect url is returned, which the merchant redirects the customer to, to continue payment.' + description: + maxLength: 200 + type: string + description: 'Payment description' + - type: object diff --git a/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseSofortSource.yaml b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseSofortSource.yaml new file mode 100644 index 000000000..fb0eb1d76 --- /dev/null +++ b/abc_spec/components/schemas/Payments/ResponseSources/PaymentResponseSofortSource.yaml @@ -0,0 +1,18 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Sofort Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + properties: + iban: + type: string + description: 'IBAN of a payer, available when a payment is authorised.' + bic: + type: string + description: 'BIC of a payer, available when a payment is authorised.' + account_holder_name: + type: string + description: 'The name of a payer, available when a payment is authorised.' diff --git a/abc_spec/components/schemas/Payments/RiskRequest.yaml b/abc_spec/components/schemas/Payments/RiskRequest.yaml new file mode 100644 index 000000000..3c63a8356 --- /dev/null +++ b/abc_spec/components/schemas/Payments/RiskRequest.yaml @@ -0,0 +1,10 @@ +type: object +description: Configures the risk assessment performed during the processing of the payment +required: + - enabled +properties: + enabled: + type: boolean + description: Whether a risk assessment should be performed + default: true + example: false diff --git a/abc_spec/components/schemas/Payments/VoidAcceptedResponse.yaml b/abc_spec/components/schemas/Payments/VoidAcceptedResponse.yaml new file mode 100644 index 000000000..34f9067fa --- /dev/null +++ b/abc_spec/components/schemas/Payments/VoidAcceptedResponse.yaml @@ -0,0 +1,27 @@ +type: object +description: Void response +required: + - action_id +properties: + action_id: + description: The unique identifier for the void action + allOf: + - $ref: '#/components/schemas/ActionId' + reference: + type: string + description: Your reference for the void request + example: 'ORD-5023-4E89' + _links: + type: object + description: The links related to the void + readOnly: true + minItems: 2 + properties: + payment: + type: object + allOf: + - $ref: '#/components/schemas/Link' + example: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44' + required: + - payment diff --git a/abc_spec/components/schemas/Payments/VoidRequest.yaml b/abc_spec/components/schemas/Payments/VoidRequest.yaml new file mode 100644 index 000000000..1a9064b5c --- /dev/null +++ b/abc_spec/components/schemas/Payments/VoidRequest.yaml @@ -0,0 +1,13 @@ +type: object +properties: + reference: + type: string + description: A reference you can later use to identify this void request + maxLength: 50 + example: 'ORD-5023-4E89' + metadata: + type: object + description: A set of key-value pairs that you can attach to the void request. It can be useful for storing additional information in a structured format + example: + coupon_code: 'NY2018' + partner_id: 123989 diff --git a/abc_spec/components/schemas/Payments/VoidResponse.yaml b/abc_spec/components/schemas/Payments/VoidResponse.yaml new file mode 100644 index 000000000..517397738 --- /dev/null +++ b/abc_spec/components/schemas/Payments/VoidResponse.yaml @@ -0,0 +1,64 @@ +type: object +description: Payment response +required: + - id + - action_id + - amount + - currency + - status + - response_code + - processed_on + - _links +properties: + id: + description: The unique payment identifier + allOf: + - $ref: '#/components/schemas/PaymentId' + action_id: + description: The unique identifier for the void action + allOf: + - $ref: '#/components/schemas/ActionId' + amount: + type: integer + description: The void amount + example: 6540 + currency: + type: string + description: The three-letter ISO currency code of the payment + example: USD + maxLength: 3 + minLength: 3 + status: + type: string + description: The status of the payment + example: 'Voided' + response_code: + type: string + description: The Gateway response code + example: '10000' + response_summary: + type: string + description: The Gateway response summary + example: 'Approved' + processed_on: + description: The date/time the void was processed + allOf: + - $ref: '#/components/schemas/ServerTimestamp' + reference: + type: string + description: Your reference for the void request + example: ORD-5023-4E89 + _links: + type: object + description: The links related to the payment + minItems: 1 + properties: + payment: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the payment + example: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44' + required: + - payment diff --git a/abc_spec/components/schemas/PhoneNumber.yaml b/abc_spec/components/schemas/PhoneNumber.yaml new file mode 100644 index 000000000..b89f411a1 --- /dev/null +++ b/abc_spec/components/schemas/PhoneNumber.yaml @@ -0,0 +1,15 @@ +type: object +description: A phone number +properties: + number: + type: string + description: The phone number. + minLength: 6 + maxLength: 25 + example: '4155552671' + country_code: + type: string + description: The international country calling code. Required for some risk checks. + minLength: 1 + maxLength: 7 + example: '+1' diff --git a/abc_spec/components/schemas/README.md b/abc_spec/components/schemas/README.md new file mode 100644 index 000000000..c78344fad --- /dev/null +++ b/abc_spec/components/schemas/README.md @@ -0,0 +1,4 @@ +# Definitions + +- Write each definition in separate file +- File name repeat the resource name, i.e. `Customer.yaml` diff --git a/abc_spec/components/schemas/Reporting/PaymentsReportResponse.yaml b/abc_spec/components/schemas/Reporting/PaymentsReportResponse.yaml new file mode 100644 index 000000000..d1c84b475 --- /dev/null +++ b/abc_spec/components/schemas/Reporting/PaymentsReportResponse.yaml @@ -0,0 +1,147 @@ +type: object +description: Payments Report Response +required: + - count + - data +properties: + count: + type: integer + description: The number of payments included in the report + example: 1 + data: + type: array + description: The data object + items: + type: object + properties: + id: + type: string + description: The unique payment identifier. This was previously called `transaction_id` + example: 'pay_nezg6bx2k22utmk4xm5s2ughxi' + processing_currency: + type: string + description: The currency of the payment when processed by the cardholder + example: 'USD' + payout_currency: + type: string + description: The currency of the payment when paid out to you + example: 'GBP' + requested_on: + type: string + format: date-time + description: The date on which the payment was initiated + example: '2019-03-08T10:29:51.922' + channel_name: + type: string + description: The name of the channel from which the payment was initiated + example: 'www.example.com' + reference: + type: string + description: An optional identifier used for tracking payments. This was previously called `track_id` + example: 'ORD-5023-4E89' + payment_method: + type: string + description: The payment method + example: 'VISA' + card_type: + type: string + description: The card type + example: 'CREDIT' + card_category: + type: string + description: The card category + example: 'Consumer' + issuer_country: + type: string + description: The country of the issuing bank + example: 'US' + merchant_country: + type: string + description: The country of the merchant bank + example: 'SI' + mid: + type: string + description: An optional, user-defined identifier for the business + example: '123456' + actions: + type: array + description: The actions object + items: + type: object + properties: + type: + type: string + description: The type of action administered to a payment + example: 'Authorization' + id: + type: string + description: The unique identifier associated with an action (referred to as a charge ID in the Hub) + example: 'act_nezg6bx2k22utmk4xm5s2ughxi' + processed_on: + type: string + format: date-time + description: The date on which the action occurred + example: '2019-03-08T10:29:51.922' + response_code: + type: integer + description: The response code of the action (payment request) + example: '10000' + response_description: + type: string + description: Further information about the response code + example: 'Approved' + breakdown: + type: array + description: The breakdown object + items: + type: object + properties: + type: + type: string + description: Describes an amount or fee associated with an action. For example, a gateway fee, capture fee and capture amount would all be associated with the capture action + example: 'Gateway Fee Tax ARE USD/GBP@0.7640412612' + date: + type: string + format: date-time + description: Specifies an associated date with a specific amount (some external fees are returned after the associated action) + example: '2019-03-08T10:29:51.922' + processing_currency_amount: + type: string + description: The associated amount in the processing currency (if applicable). Numerical values up to 8 decimal places are provided in the response + example: '-0.003' + payout_currency_amount: + type: string + description: The associated amount in the payout currency. Numerical values up to 8 decimal places are provided in the response + example: '-0.00229212' + _links: + type: object + description: The link object + properties: + payments: + type: object + description: The payments object + properties: + href: + type: string + description: The direct link to the payment + example: 'http://api.checkout.com/reporting/statements/190110B107654/payments' + _links: + type: object + description: The link object + properties: + next: + type: object + description: The next object + properties: + href: + type: string + description: This link allows you to move to the next page of results in the response. Responses are paginated at the payout level + example: 'http://api.checkout.com/reporting/payments?from=01%2F03%2F2019%2000%3A00%3A00&to=01%2F03%2F2019%2000%3A00%3A00&limit=1&after=11111111' + self: + type: object + description: The self object + properties: + href: + type: string + description: This is a direct link to the response associated with the submitted request + example: 'http://api.checkout.com/reporting/payments?from=01%2F03%2F2019%2000%3A00%3A00&to=01%2F03%2F2019%2000%3A00%3A00&limit=1' diff --git a/abc_spec/components/schemas/Reporting/StatementsReportResponse.yaml b/abc_spec/components/schemas/Reporting/StatementsReportResponse.yaml new file mode 100644 index 000000000..b895eb496 --- /dev/null +++ b/abc_spec/components/schemas/Reporting/StatementsReportResponse.yaml @@ -0,0 +1,133 @@ +type: object +description: Statements Report Response +required: + - count + - data + - id + - period_start + - period_end + - date + - payouts + - _links +properties: + count: + type: integer + description: The number of statements included in the report + example: 1 + data: + type: array + description: The data object + items: + type: object + properties: + id: + type: string + description: The unique identifier of the generated statement + example: '190110B107654' + period_start: + type: string + format: date-time + description: The start date of all transactions and amounts that are encompassed within the statement + example: '2019-01-09T00:00:00.000' + period_end: + type: string + format: date-time + description: The end date of all transactions and amounts that are encompassed within the statement + example: '2019-01-09T23:59:59.000' + date: + type: string + format: date-time + description: The date the statement was generated + payouts: + type: array + description: The summary is a breakdown of your statement, ordered by the payout currency and its associated payout ID + items: + type: object + properties: + currency: + type: string + description: The currency of the payout + example: 'GBP' + carried_forward_amount: + type: string + description: The amount carried forward before the statement period + example: '0' + current_period_amount: + type: string + description: The total amount of transactions during the statement period + example: '15005.24' + net_amount: + type: string + description: The total amount paid out to your bank account + example: '15005.24' + date: + type: string + format: date-time + description: The date the payout was completed + example: '2019-01-10T00:00:00.000' + period_start: + type: string + format: date-time + description: The period start date + example: '2019-01-09T00:00:00.000' + period_end: + type: string + format: date-time + description: The period end date + example: '2019-01-09T23:59:59.000' + id: + type: string + description: Identifies the associated payment + example: 'ABCDEFGH' + status: + type: string + description: The status of the payout + example: 'Remitted' + payout _fee: + type: string + description: The total fee charged for the payout + example: '-5' + _links: + type: object + description: The link object + properties: + payments: + type: object + description: The payments object + properties: + href: + type: string + description: The direct link to the payout + example: 'http://api.checkout.com/reporting/statements/190110B107654/payments?payout_id=ABCDEFGH' + _links: + type: object + description: The link object + properties: + payments: + type: object + description: The payments object + properties: + href: + type: string + description: The direct link to the payment + example: 'http://api.checkout.com/reporting/statements/190110B107654/payments' + _links: + type: object + description: The link object + properties: + next: + type: object + description: The next link object + properties: + href: + type: string + description: This link allows you to move to the next page of results in the response. Responses are paginated at the payout level + example: 'http://api.checkout.com/reporting/statements?from=01%2F01%2F2019%2000%3A00%3A00&to=01%2F11%2F2019%2000%3A00%3A00&limit=1&skip=1' + self: + type: object + description: The self link object + properties: + href: + type: string + description: This is a direct link to the response associated with the submitted request + example: 'http://api.checkout.com/reporting/statements?from=01%2F01%2F2019%2000%3A00%3A00&to=01%2F11%2F2019%2000%3A00%3A00&limit=1' diff --git a/abc_spec/components/schemas/ResourceId.yaml b/abc_spec/components/schemas/ResourceId.yaml new file mode 100644 index 000000000..17290b059 --- /dev/null +++ b/abc_spec/components/schemas/ResourceId.yaml @@ -0,0 +1,4 @@ +type: string +description: The resource ID. Defaults to UUID v4 +maxLength: 50 +example: '4f6cf35x-2c4y-483z-a0a9-158621f77a21' diff --git a/abc_spec/components/schemas/Risk/AuthenticationResult.yaml b/abc_spec/components/schemas/Risk/AuthenticationResult.yaml new file mode 100644 index 000000000..30f0afba6 --- /dev/null +++ b/abc_spec/components/schemas/Risk/AuthenticationResult.yaml @@ -0,0 +1,26 @@ +type: object +properties: + attempted: + type: boolean + description: Authentication was initiated between the issuer and cardholder + example: true + challenged: + type: boolean + description: The customer was asked to enter a password or biometric authentication + example: true + succeeded: + type: boolean + description: Did the customer succeed authentication + example: true + liability_shifted: + type: boolean + description: Was liability shifted + example: true + method: + type: string + description: Authentication method + example: 3ds + version: + type: string + description: The authentication method version + example: "2.0" \ No newline at end of file diff --git a/abc_spec/components/schemas/Risk/AuthorizationResult.yaml b/abc_spec/components/schemas/Risk/AuthorizationResult.yaml new file mode 100644 index 000000000..fec848572 --- /dev/null +++ b/abc_spec/components/schemas/Risk/AuthorizationResult.yaml @@ -0,0 +1,8 @@ +type: object +properties: + avs_code: + type: string + example: V + cvv_result: + type: string + example: N diff --git a/abc_spec/components/schemas/Risk/Customer.yaml b/abc_spec/components/schemas/Risk/Customer.yaml new file mode 100644 index 000000000..734d3a474 --- /dev/null +++ b/abc_spec/components/schemas/Risk/Customer.yaml @@ -0,0 +1,11 @@ +type: object +description: The customer making the payment +properties: + name: + type: string + description: "The full name of the customer" + example: "John Doe" + email: + type: string + description: "The customer's email address" + example: "john.doe@checkout.com" \ No newline at end of file diff --git a/abc_spec/components/schemas/Risk/Device.yaml b/abc_spec/components/schemas/Risk/Device.yaml new file mode 100644 index 000000000..a2ed963fd --- /dev/null +++ b/abc_spec/components/schemas/Risk/Device.yaml @@ -0,0 +1,34 @@ +type: object +properties: + ip: + description: The IP V4 address used to make the payment + allOf: + - $ref: '#/components/schemas/IPAddress' + location: + description: The physical location of the request source + allOf: + - $ref: '#/components/schemas/Location' + os: + description: The device's operating system + type: string + example: ISO + type: + description: The type of device + type: string + example: Phone + model: + description: The device model + type: string + example: iPhone X + date: + description: The device's date in UTC as an ISO 8601 timestamp. + allOf: + - $ref: '#/components/schemas/Timestamp' + user_agent: + description: The device's user-agent + type: string + example: Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1 + fingerprint: + description: The device fingerprint + type: string + example: 34304a9e3fg09302 diff --git a/abc_spec/components/schemas/Risk/GetRiskAssessmentsResponse.yaml b/abc_spec/components/schemas/Risk/GetRiskAssessmentsResponse.yaml new file mode 100644 index 000000000..315e7a443 --- /dev/null +++ b/abc_spec/components/schemas/Risk/GetRiskAssessmentsResponse.yaml @@ -0,0 +1,12 @@ +type: object +properties: + assessment_id: + type: string + description: The correlation id across scans for a given transaction + example: "ras_c4oqhf46pyzuxjbcn2giaqnb44" + pre_authentication: + type: object + $ref: '#/components/schemas/PreAuthenticationDetails' + pre_capture: + type: object + $ref: '#/components/schemas/PreCaptureDetails' diff --git a/abc_spec/components/schemas/Risk/Location.yaml b/abc_spec/components/schemas/Risk/Location.yaml new file mode 100644 index 000000000..e12fa65dd --- /dev/null +++ b/abc_spec/components/schemas/Risk/Location.yaml @@ -0,0 +1,10 @@ +type: object +properties: + latitude: + description: The latitude of the device location + type: number + example: 51.5107 + longitude: + description: The longitude of the device location + type: number + example: 0.1313 \ No newline at end of file diff --git a/abc_spec/components/schemas/Risk/Metadata.yaml b/abc_spec/components/schemas/Risk/Metadata.yaml new file mode 100644 index 000000000..fcddfec65 --- /dev/null +++ b/abc_spec/components/schemas/Risk/Metadata.yaml @@ -0,0 +1,8 @@ +type: object +description: Allows you to attach additional information to the assessment in key-value pairs. You can reference these properties in your custom risk rules. +additionalProperties: + type: string +example: + VoucherCode: "loyalty_10" + discountApplied: "10" + customer_id: "2190EF321" \ No newline at end of file diff --git a/abc_spec/components/schemas/Risk/PreAuthenticationAssessmentRequest.yaml b/abc_spec/components/schemas/Risk/PreAuthenticationAssessmentRequest.yaml new file mode 100644 index 000000000..369a959c0 --- /dev/null +++ b/abc_spec/components/schemas/Risk/PreAuthenticationAssessmentRequest.yaml @@ -0,0 +1,46 @@ +type: object +properties: + date: + description: An ISO 8601 timestamp of the date of the original payment attempt + allOf: + - $ref: '#/components/schemas/Timestamp' + source: + $ref: '#/components/schemas/RiskPaymentRequestSource' + customer: + $ref: '#/components/schemas/Customer' + payment: + $ref: '#/components/schemas/RiskPayment' + shipping: + description: The shipping details + allOf: + - $ref: '#/components/schemas/RiskShippingDetails' + reference: + type: string + description: A reference you can later use to identify this assessment, such as an order number. + maxLength: 50 + example: "ORD-1011-87AH" + description: + type: string + description: A description of the order + maxLength: 100 + example: "Set of 3 masks" + amount: + type: integer + description: | + The payment amount. + The exact format depends on the currency. + minimum: 0 + example: 6540 + currency: + type: string + description: | + The three-letter ISO currency code + example: GBP + maxLength: 3 + minLength: 3 + device: + description: Device data + allOf: + - $ref: '#/components/schemas/Device' + metadata: + $ref: '#/components/schemas/Metadata' \ No newline at end of file diff --git a/abc_spec/components/schemas/Risk/PreAuthenticationAssessmentResponse.yaml b/abc_spec/components/schemas/Risk/PreAuthenticationAssessmentResponse.yaml new file mode 100644 index 000000000..c57bcb0f4 --- /dev/null +++ b/abc_spec/components/schemas/Risk/PreAuthenticationAssessmentResponse.yaml @@ -0,0 +1,41 @@ +type: object +description: Pre-Authentication Response +required: + - assessment_id + - result +properties: + assessment_id: + type: string + description: The correlation ID across scans for a given transaction + example: "ras_c4oqhf46pyzuxjbcn2giaqnb44" + score: + type: integer + description: The risk score calculated by Checkout. Absent if not enough data provided. + example: 22 + minimum: 0 + maximum: 100 + result: + description: The scan result based on your defined pre-authentication risk settings + allOf: + - $ref: '#/components/schemas/PreAuthenticationResult' + warning: + description: Present when our risk settings are more restrictive + allOf: + - $ref: '#/components/schemas/PreAuthenticationWarning' + _links: + type: object + properties: + self: + description: The URL of the assessment + properties: + href: + type: string + description: The link URL + example: "https://api.checkout.com/risk/assessments/{assessment_id}" + pre-capture: + description: A link to perform a pre-capture assessment using the same context. Absent if no pre-capture risk settings configured + properties: + href: + type: string + description: The link URL + example: "https://api.checkout.com/risk/assessments/{assessment_id}/pre-capture" diff --git a/abc_spec/components/schemas/Risk/PreAuthenticationDetails.yaml b/abc_spec/components/schemas/Risk/PreAuthenticationDetails.yaml new file mode 100644 index 000000000..9001f4e7b --- /dev/null +++ b/abc_spec/components/schemas/Risk/PreAuthenticationDetails.yaml @@ -0,0 +1,19 @@ +type: object +description: Details of the pre-authentication response +required: + - result +properties: + score: + type: integer + description: The risk score calculated by Checkout. Absent if not enough data provided. + example: 22 + minimum: 0 + maximum: 100 + result: + description: The scan result based on your defined pre-authentication risk settings + allOf: + - $ref: '#/components/schemas/PreAuthenticationResult' + warning: + description: Present when our risk settings are more restrictive + allOf: + - $ref: '#/components/schemas/PreAuthenticationWarning' \ No newline at end of file diff --git a/abc_spec/components/schemas/Risk/PreAuthenticationResult.yaml b/abc_spec/components/schemas/Risk/PreAuthenticationResult.yaml new file mode 100644 index 000000000..eddd5930f --- /dev/null +++ b/abc_spec/components/schemas/Risk/PreAuthenticationResult.yaml @@ -0,0 +1,19 @@ +type: object +required: + - decision +description: The assessment result +properties: + decision: + type: string + description: The recommended action based on the assessment + enum: + - try_exemptions + - try_frictionless + - no_preference + - force_challenge + - decline + example: try_frictionless + details: + description: The reasons for the decision + type: string + example: "low_value_item_rule" diff --git a/abc_spec/components/schemas/Risk/PreAuthenticationWarning.yaml b/abc_spec/components/schemas/Risk/PreAuthenticationWarning.yaml new file mode 100644 index 000000000..1f5ad934a --- /dev/null +++ b/abc_spec/components/schemas/Risk/PreAuthenticationWarning.yaml @@ -0,0 +1,21 @@ +type: object +required: + - decision + - reasons +properties: + decision: + type: string + description: The recommended action based on our more restrictive risk settings + enum: + - try_exemptions + - try_frictionless + - no_preference + - force_challenge + - decline + example: decline + reasons: + description: The reasons for the decision + type: array + items: + type: string + example: [decline_list_email, decline_list_shipping] diff --git a/abc_spec/components/schemas/Risk/PreCaptureAssessmentRequest.yaml b/abc_spec/components/schemas/Risk/PreCaptureAssessmentRequest.yaml new file mode 100644 index 000000000..e215f88d7 --- /dev/null +++ b/abc_spec/components/schemas/Risk/PreCaptureAssessmentRequest.yaml @@ -0,0 +1,44 @@ +type: object +properties: + assessment_id: + type: string + pattern: "^(ras)_(\\w{26})$" + description: The risk assessment identifier returned in the /pre-authentication response + date: + description: An ISO 8601 timestamp of the date of the original payment attempt + allOf: + - $ref: '#/components/schemas/Timestamp' + source: + $ref: '#/components/schemas/RiskPaymentRequestSource' + customer: + $ref: '#/components/schemas/Customer' + amount: + type: integer + description: | + The payment amount. + The exact format depends on the currency. + minimum: 0 + example: 6540 + currency: + type: string + description: | + The three-letter ISO currency code + example: GBP + maxLength: 3 + minLength: 3 + payment: + $ref: '#/components/schemas/RiskPayment' + shipping: + description: The shipping details + allOf: + - $ref: '#/components/schemas/RiskShippingDetails' + device: + description: Device data + allOf: + - $ref: '#/components/schemas/Device' + metadata: + $ref: '#/components/schemas/Metadata' + authentication_result: + $ref: '#/components/schemas/AuthenticationResult' + authorization_result: + $ref: '#/components/schemas/AuthorizationResult' diff --git a/abc_spec/components/schemas/Risk/PreCaptureAssessmentResponse.yaml b/abc_spec/components/schemas/Risk/PreCaptureAssessmentResponse.yaml new file mode 100644 index 000000000..80281354f --- /dev/null +++ b/abc_spec/components/schemas/Risk/PreCaptureAssessmentResponse.yaml @@ -0,0 +1,34 @@ +type: object +description: Pre-Capture Response +required: + - assessment_id + - result +properties: + assessment_id: + type: string + description: The correlation ID across scans for a given transaction + example: "ras_c4oqhf46pyzuxjbcn2giaqnb44" + score: + type: integer + description: The risk score calculated by Checkout. Absent if not enough data provided. + example: 55 + minimum: 0 + maximum: 100 + result: + description: The scan result based on your pre-capture risk settings + allOf: + - $ref: '#/components/schemas/PreCaptureResult' + warning: + description: Present when our risk settings are more restrictive + allOf: + - $ref: '#/components/schemas/PreCaptureWarning' + _links: + type: object + properties: + self: + description: The URL of the assessment + properties: + href: + type: string + description: The link URL + example: "https://api.checkout.com/risk/assessments/{assessment_id}" diff --git a/abc_spec/components/schemas/Risk/PreCaptureDetails.yaml b/abc_spec/components/schemas/Risk/PreCaptureDetails.yaml new file mode 100644 index 000000000..b9aa38f92 --- /dev/null +++ b/abc_spec/components/schemas/Risk/PreCaptureDetails.yaml @@ -0,0 +1,19 @@ +type: object +description: Details of the pre-capture response +required: + - result +properties: + score: + type: integer + description: The risk score calculated by Checkout. Absent if not enough data provided. + example: 22 + minimum: 0 + maximum: 100 + result: + description: The scan result based on your defined pre-capture risk settings + allOf: + - $ref: '#/components/schemas/PreCaptureResult' + warning: + description: Present when Checkout scan is more restrictive + allOf: + - $ref: '#/components/schemas/PreCaptureWarning' \ No newline at end of file diff --git a/abc_spec/components/schemas/Risk/PreCaptureResult.yaml b/abc_spec/components/schemas/Risk/PreCaptureResult.yaml new file mode 100644 index 000000000..216a680f3 --- /dev/null +++ b/abc_spec/components/schemas/Risk/PreCaptureResult.yaml @@ -0,0 +1,17 @@ +type: object +required: + - decision +description: The assessment result +properties: + decision: + type: string + description: The recommended action based on the assessment + enum: + - capture + - flag + - void + example: capture + details: + description: The reasons for the decision + type: string + example: "risk_profile_1" \ No newline at end of file diff --git a/abc_spec/components/schemas/Risk/PreCaptureWarning.yaml b/abc_spec/components/schemas/Risk/PreCaptureWarning.yaml new file mode 100644 index 000000000..9949e1110 --- /dev/null +++ b/abc_spec/components/schemas/Risk/PreCaptureWarning.yaml @@ -0,0 +1,19 @@ +type: object +required: + - decision + - reasons +properties: + decision: + type: string + description: The recommended action based on our more restrictive risk settings + enum: + - capture + - void + - flag + example: capture + reasons: + description: The reasons for the decision + type: array + items: + type: string + example: [rule_low_risk_postal_address] diff --git a/abc_spec/components/schemas/Risk/RequestSources/CardSourcePrism.yaml b/abc_spec/components/schemas/Risk/RequestSources/CardSourcePrism.yaml new file mode 100644 index 000000000..2bf351568 --- /dev/null +++ b/abc_spec/components/schemas/Risk/RequestSources/CardSourcePrism.yaml @@ -0,0 +1,42 @@ +type: object +description: A card payment source +allOf: + - $ref: '#/components/schemas/RiskPaymentRequestSource' + - type: object + required: + - type + - number + - expiry_month + - expiry_year + properties: + number: + type: string + description: The card number (without separators) + maxLength: 19 + example: "4543474002249996" + expiry_month: + type: integer + description: The expiry month of the card + minimum: 1 + minLength: 1 + maxLength: 2 + example: 6 + expiry_year: + type: integer + description: The expiry year of the card + minLength: 4 + maxLength: 4 + example: 2025 + name: + type: string + description: The name of the cardholder + maxLength: 255 + example: "Bruce Wayne" + billing_address: + description: The billing address of the cardholder + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The phone number of the cardholder + allOf: + - $ref: '#/components/schemas/PhoneNumber' diff --git a/abc_spec/components/schemas/Risk/RequestSources/CustomerSourcePrism.yaml b/abc_spec/components/schemas/Risk/RequestSources/CustomerSourcePrism.yaml new file mode 100644 index 000000000..2c2b938ed --- /dev/null +++ b/abc_spec/components/schemas/Risk/RequestSources/CustomerSourcePrism.yaml @@ -0,0 +1,20 @@ +type: object +description: A customer source +required: + - id +allOf: + - $ref: '#/components/schemas/RiskPaymentRequestSource' + - type: object + properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + description: The customer's identifier. + example: "cus_y3oqhf46pyzuxjbcn2giaqnb44" + # email: + # type: string + # format: email + # description: The customer's email address. Required if `id` is not provided + # maxLength: 255 + # example: "brucewayne@gmail.com" + diff --git a/abc_spec/components/schemas/Risk/RequestSources/IdSourcePrism.yaml b/abc_spec/components/schemas/Risk/RequestSources/IdSourcePrism.yaml new file mode 100644 index 000000000..9a55cf470 --- /dev/null +++ b/abc_spec/components/schemas/Risk/RequestSources/IdSourcePrism.yaml @@ -0,0 +1,19 @@ +type: object +description: An existing payment source +required: + - id +allOf: + - $ref: '#/components/schemas/RiskPaymentRequestSource' + - type: object + properties: + id: + type: string + pattern: "^(src)_(\\w{26})$" + description: The payment source identifer (e.g., a card source identifier) + example: src_wmlfc3zyhqzehihu7giusaaawu + cvv: + type: string + description: The card verification value/code (for card sources). 3 digits, except for American Express (4 digits) + example: "956" + minLength: 3 + maxLength: 4 \ No newline at end of file diff --git a/abc_spec/components/schemas/Risk/RiskCardInfo.yaml b/abc_spec/components/schemas/Risk/RiskCardInfo.yaml new file mode 100644 index 000000000..a78c64c21 --- /dev/null +++ b/abc_spec/components/schemas/Risk/RiskCardInfo.yaml @@ -0,0 +1,52 @@ +type: object +required: + - type +description: The details of the card being used +properties: + cardholder_name: + type: string + description: The cardholder name provided + example: Mrs Jane Doe + bin: + type: string + description: The card issuer's Bank Identification Number (BIN) + maxLength: 6 + example: "454540" + expiry_month: + type: integer + description: The expiry month + minimum: 1 + example: 6 + maxLength: 2 + expiry_year: + type: integer + description: The expiry year + example: 2025 + minLength: 4 + maxLength: 4 + last4: + type: string + description: The last four digits of the card number + example: "9996" + minLength: 4 + maxLength: 4 + scheme: + type: string + enum: + - Mastercard + - Visa + description: The card scheme + example: VISA + card_type: + type: string + description: The card type + enum: + - Credit + - Debit + - Prepaid + - Charge + example: Credit + type: + type: string + description: The payment method type + example: card \ No newline at end of file diff --git a/abc_spec/components/schemas/Risk/RiskPayment.yaml b/abc_spec/components/schemas/Risk/RiskPayment.yaml new file mode 100644 index 000000000..b950e47c3 --- /dev/null +++ b/abc_spec/components/schemas/Risk/RiskPayment.yaml @@ -0,0 +1,12 @@ +type: object +description: The details of the payment being processed +properties: + psp: + type: string + description: "The payment service provider processing this transaction" + example: "Checkout.com" + id: + type: string + description: "The PSP's transaction identifier. Can be back-filled at a later step, e.g /pre-capture" + example: "78453878" + maxLength: 32 \ No newline at end of file diff --git a/abc_spec/components/schemas/Risk/RiskPaymentRequestSource.yaml b/abc_spec/components/schemas/Risk/RiskPaymentRequestSource.yaml new file mode 100644 index 000000000..648b2f0ae --- /dev/null +++ b/abc_spec/components/schemas/Risk/RiskPaymentRequestSource.yaml @@ -0,0 +1,37 @@ +type: object +description: The source of the payment.
+discriminator: + propertyName: type + mapping: + token: '#/components/schemas/01_PaymentRequestTokenSource' + id: '#/components/schemas/IdSourcePrism' + card: '#/components/schemas/CardSourcePrism' + customer: '#/components/schemas/CustomerSourcePrism' + # network_token: '#/components/schemas/05_PaymentRequestNetworkTokenSource' + # alipay: '#/components/schemas/PaymentRequestAlipaySource' + # benefitpay: '#/components/schemas/PaymentRequestBenefitPaySource' + # boleto: '#/components/schemas/PaymentRequestBoletoSource' + # eps: '#/components/schemas/PaymentRequestEpsSource' + # giropay: '#/components/schemas/PaymentRequestGiropaySource' + # ideal: '#/components/schemas/PaymentRequestIdealSource' + # klarna: '#/components/schemas/PaymentRequestKlarnaSource' + # knet: '#/components/schemas/PaymentRequestKnetSource' + # oxxo: '#/components/schemas/PaymentRequestOXXOSource' + # p24: '#/components/schemas/PaymentRequestP24Source' + # pagofacil: '#/components/schemas/PaymentRequestPagoFacilSource' + # paypal: '#/components/schemas/PaymentRequestPayPalSource' + # poli: '#/components/schemas/PaymentRequestPoliSource' + # rapipago: '#/components/schemas/PaymentRequestRapiPagoSource' + # bancontact: '#/components/schemas/PaymentRequestBancontactSource' + # fawry: '#/components/schemas/PaymentRequestFawrySource' + # qpay: '#/components/schemas/PaymentRequestQPaySource' + # multibanco: '#/components/schemas/PaymentRequestMultibancoSource' + # dLocal: '#/components/schemas/06_PaymentRequestdLocalSource' + # sofort: '#/components/schemas/PaymentRequestSofortSource' +required: + - type +properties: + type: + type: string + description: The payment source type + example: "card" diff --git a/abc_spec/components/schemas/Risk/RiskShippingDetails.yaml b/abc_spec/components/schemas/Risk/RiskShippingDetails.yaml new file mode 100644 index 000000000..881f2a54f --- /dev/null +++ b/abc_spec/components/schemas/Risk/RiskShippingDetails.yaml @@ -0,0 +1,7 @@ +type: object +description: The shipping details +properties: + address: + description: The shipping address + allOf: + - $ref: '#/components/schemas/Address' \ No newline at end of file diff --git a/abc_spec/components/schemas/ServerTimestamp.yaml b/abc_spec/components/schemas/ServerTimestamp.yaml new file mode 100644 index 000000000..0ab01a7d6 --- /dev/null +++ b/abc_spec/components/schemas/ServerTimestamp.yaml @@ -0,0 +1,4 @@ +type: string +description: Read-only UTC timestamp, automatically assigned by us +format: date-time +readOnly: true diff --git a/abc_spec/components/schemas/Sources/01_SepaSource.yaml b/abc_spec/components/schemas/Sources/01_SepaSource.yaml new file mode 100644 index 000000000..3a319e035 --- /dev/null +++ b/abc_spec/components/schemas/Sources/01_SepaSource.yaml @@ -0,0 +1,50 @@ +type: object +description: A SEPA payment source +required: + - billing_address + - source_data +allOf: + - $ref: '#/components/schemas/SourceRequest' + - type: object + properties: + billing_address: + description: The payment source owner's billing address + allOf: + - $ref: '#/components/schemas/01_SepaAddress' + source_data: + type: object + description: Additional data required to create SEPA payment sources + required: + - first_name + - last_name + - account_iban + - billing_descriptor + - mandate_type + properties: + first_name: + type: string + description: The account holder's first name + example: 'Marcus' + last_name: + type: string + description: The account holder's last name + example: 'Barrilius Maximus' + account_iban: + type: string + description: The account IBAN + example: 'DE25100100101234567893' + bic: + type: string + description: The account BIC + example: 'PBNKDEFFXXX' + billing_descriptor: + type: string + description: The billing descriptor + example: 'ExampleCompany.com' + mandate_type: + type: string + description: The type of mandate + enum: + - 'single' + - 'recurring' + example: 'recurring' diff --git a/abc_spec/components/schemas/Sources/01_SepaSourceResponse.yaml b/abc_spec/components/schemas/Sources/01_SepaSourceResponse.yaml new file mode 100644 index 000000000..e4120d641 --- /dev/null +++ b/abc_spec/components/schemas/Sources/01_SepaSourceResponse.yaml @@ -0,0 +1,30 @@ +type: object +description: The SEPA mandate details +allOf: + - $ref: '#/components/schemas/AddSourceResponse' + - type: object + properties: + response_data: + type: object + description: SEPA Direct Debit details + properties: + mandate_reference: + type: string + description: The Direct Debit mandate reference + example: 'MANDXI9809809' + _links: + type: object + description: The links related to the SEPA payment source + readOnly: true + minItems: 1 + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the payment source + cancel: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to cancel the SEPA Direct Debit mandate diff --git a/abc_spec/components/schemas/Sources/AddSourceResponse.yaml b/abc_spec/components/schemas/Sources/AddSourceResponse.yaml new file mode 100644 index 000000000..093f126d7 --- /dev/null +++ b/abc_spec/components/schemas/Sources/AddSourceResponse.yaml @@ -0,0 +1,26 @@ +type: object +discriminator: + propertyName: type + mapping: + sepa: '#/components/schemas/01_SepaSourceResponse' +required: + - type + - response_code +properties: + id: + type: string + description: The unique identifier of the payment source that can be used later for payments + example: src_y3oqhf46pyzuxjbcn2giaqnb44 + type: + type: string + description: The payment source type + example: 'sepa' + response_code: + type: string + description: The Gateway response code + example: '10000' + customer: + type: object + description: The customer associated with the payment source if provided in the request + allOf: + - $ref: '#/components/schemas/SourceResponseCustomer' diff --git a/abc_spec/components/schemas/Sources/Source.yaml b/abc_spec/components/schemas/Sources/Source.yaml new file mode 100644 index 000000000..d05970c5e --- /dev/null +++ b/abc_spec/components/schemas/Sources/Source.yaml @@ -0,0 +1,32 @@ +type: object +required: + - type +properties: + id: + type: string + description: The unique identifier of the payment source that can be later used for payments + example: src_y3oqhf46pyzuxjbcn2giaqnb44 + type: + type: string + description: The payment source type + example: 'sepa' + _links: + type: object + description: The links related to the payment source + readOnly: true + minItems: 1 + required: + - self + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the payment source + example: + href: https://api.checkout.com/sources/src_y3oqhf46pyzuxjbcn2giaqnb44 + example: + self: + href: https://api.checkout.com/sources/src_y3oqhf46pyzuxjbcn2giaqnb44 + 'sepa:mandate': + href: https://api.checkout.com/sepa/mandates/src_y3oqhf46pyzuxjbcn2giaqnb44 diff --git a/abc_spec/components/schemas/Sources/SourceRequest.yaml b/abc_spec/components/schemas/Sources/SourceRequest.yaml new file mode 100644 index 000000000..df5aa87a3 --- /dev/null +++ b/abc_spec/components/schemas/Sources/SourceRequest.yaml @@ -0,0 +1,40 @@ +type: object +required: + - type +discriminator: + propertyName: type + mapping: + sepa: '#/components/schemas/01_SepaSource' +properties: + type: + type: string + description: The payment source type + example: sepa + reference: + type: string + description: A reference you can later use to identify the source + example: 'X-080957-N34' + phone: + description: The payment source owner's phone number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + customer: + type: object + description: Details of the customer to associate with the source + properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + description: | + The identifier of an existing customer. If neither customer `id` or `email` is provided, then + a new customer will be registered + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' + email: + type: string + format: email + description: An optional email address to associate with the customer + example: 'brucewayne@gmail.com' + name: + type: string + description: The customer's name. This will only set the name for *new* customers + example: 'Bruce Wayne' diff --git a/abc_spec/components/schemas/Sources/SourceResponseCustomer.yaml b/abc_spec/components/schemas/Sources/SourceResponseCustomer.yaml new file mode 100644 index 000000000..b6c92424f --- /dev/null +++ b/abc_spec/components/schemas/Sources/SourceResponseCustomer.yaml @@ -0,0 +1,18 @@ +type: object +description: The customer to which the payment source is linked +required: + - id +properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + description: The unique identifier of the customer + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' + email: + type: string + description: The customer's email address + example: 'brucewayne@gmail.com' + name: + type: string + description: The customer's name + example: 'Bruce Wayne' diff --git a/abc_spec/components/schemas/Timestamp.yaml b/abc_spec/components/schemas/Timestamp.yaml new file mode 100644 index 000000000..89716d6d1 --- /dev/null +++ b/abc_spec/components/schemas/Timestamp.yaml @@ -0,0 +1,3 @@ +type: string +description: ISO 8601 timestamp +format: date-time diff --git a/abc_spec/components/schemas/Tokens/01_ApplePayTokenRequest.yaml b/abc_spec/components/schemas/Tokens/01_ApplePayTokenRequest.yaml new file mode 100644 index 000000000..eeb8bda61 --- /dev/null +++ b/abc_spec/components/schemas/Tokens/01_ApplePayTokenRequest.yaml @@ -0,0 +1,34 @@ +type: object +description: Apple Pay Token Request +allOf: + - $ref: '#/components/schemas/TokenRequest' + - type: object + properties: + token_data: + type: object + description: The Apple Pay payment token + properties: + version: + type: string + description: Version information about the payment token. The token uses `EC_v1` for ECC-encrypted data, and `RSA_v1` for RSA-encrypted data + data: + type: string + description: Encrypted payment data. Base64 encoded as a string + signature: + type: string + description: Signature of the payment and header data. The signature includes the signing certificate, its intermediate CA certificate, and information about the signing algorithm + header: + type: object + description: Additional version-dependent information used to decrypt and verify the payment + example: + { + 'version': 'EC_v1', + 'data': 't7GeajLB9skXB6QSWfEpPA4WPhDqB7ekdd+F7588arLzvebKp3P0TekUslSQ8nkuacUgLdks2IKyCm7U3OL/PEYLXE7w60VkQ8WE6FXs/cqHkwtSW9vkzZNDxSLDg9slgLYxAH2/iztdipPpyIYKl0Kb6Rn9rboF+lwgRxM1B3n84miApwF5Pxl8ZOOXGY6F+3DsDo7sMCUTaJK74DUJJcjIXrigtINWKW6RFa/4qmPEC/Y+syg04x7B99mbLQQzWFm7z6HfRmynPM9/GA0kbsqd/Kn5Mkqssfhn/m6LuNKsqEmbKi85FF6kip+F17LRawG48bF/lT8wj/QEuDY0G7t/ryOnGLtKteXmAf0oJnwkelIyfyj2KI8GChBuTJonGlXKr5klPE89/ycmkgDl+T6Ms7PhiNZpuGEE2QE=', + 'signature': 'MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCAMIID5jCCA4ugAwIBAgIIaGD2mdnMpw8wCgYIKoZIzj0EAwIwejEuMCwGA1UEAwwlQXBwbGUgQXBwbGljYXRpb24gSW50ZWdyYXRpb24gQ0EgLSBHMzEmMCQGA1UECwwdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTMB4XDTE2MDYwMzE4MTY0MFoXDTIxMDYwMjE4MTY0MFowYjEoMCYGA1UEAwwfZWNjLXNtcC1icm9rZXItc2lnbl9VQzQtU0FOREJPWDEUMBIGA1UECwwLaU9TIFN5c3RlbXMxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEgjD9q8Oc914gLFDZm0US5jfiqQHdbLPgsc1LUmeY+M9OvegaJajCHkwz3c6OKpbC9q+hkwNFxOh6RCbOlRsSlaOCAhEwggINMEUGCCsGAQUFBwEBBDkwNzA1BggrBgEFBQcwAYYpaHR0cDovL29jc3AuYXBwbGUuY29tL29jc3AwNC1hcHBsZWFpY2EzMDIwHQYDVR0OBBYEFAIkMAua7u1GMZekplopnkJxghxFMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUI/JJxE+T5O8n5sT2KGw/orv9LkswggEdBgNVHSAEggEUMIIBEDCCAQwGCSqGSIb3Y2QFATCB/jCBwwYIKwYBBQUHAgIwgbYMgbNSZWxpYW5jZSBvbiB0aGlzIGNlcnRpZmljYXRlIGJ5IGFueSBwYXJ0eSBhc3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJsZSBzdGFuZGFyZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRlIHBvbGljeSBhbmQgY2VydGlmaWNhdGlvbiBwcmFjdGljZSBzdGF0ZW1lbnRzLjA2BggrBgEFBQcCARYqaHR0cDovL3d3dy5hcHBsZS5jb20vY2VydGlmaWNhdGVhdXRob3JpdHkvMDQGA1UdHwQtMCswKaAnoCWGI2h0dHA6Ly9jcmwuYXBwbGUuY29tL2FwcGxlYWljYTMuY3JsMA4GA1UdDwEB/wQEAwIHgDAPBgkqhkiG92NkBh0EAgUAMAoGCCqGSM49BAMCA0kAMEYCIQDaHGOui+X2T44R6GVpN7m2nEcr6T6sMjOhZ5NuSo1egwIhAL1a+/hp88DKJ0sv3eT3FxWcs71xmbLKD/QJ3mWagrJNMIIC7jCCAnWgAwIBAgIISW0vvzqY2pcwCgYIKoZIzj0EAwIwZzEbMBkGA1UEAwwSQXBwbGUgUm9vdCBDQSAtIEczMSYwJAYDVQQLDB1BcHBsZSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTETMBEGA1UECgwKQXBwbGUgSW5jLjELMAkGA1UEBhMCVVMwHhcNMTQwNTA2MjM0NjMwWhcNMjkwNTA2MjM0NjMwWjB6MS4wLAYDVQQDDCVBcHBsZSBBcHBsaWNhdGlvbiBJbnRlZ3JhdGlvbiBDQSAtIEczMSYwJAYDVQQLDB1BcHBsZSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTETMBEGA1UECgwKQXBwbGUgSW5jLjELMAkGA1UEBhMCVVMwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATwFxGEGddkhdUaXiWBB3bogKLv3nuuTeCN/EuT4TNW1WZbNa4i0Jd2DSJOe7oI/XYXzojLdrtmcL7I6CmE/1RFo4H3MIH0MEYGCCsGAQUFBwEBBDowODA2BggrBgEFBQcwAYYqaHR0cDovL29jc3AuYXBwbGUuY29tL29jc3AwNC1hcHBsZXJvb3RjYWczMB0GA1UdDgQWBBQj8knET5Pk7yfmxPYobD+iu/0uSzAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFLuw3qFYM4iapIqZ3r6966/ayySrMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly9jcmwuYXBwbGUuY29tL2FwcGxlcm9vdGNhZzMuY3JsMA4GA1UdDwEB/wQEAwIBBjAQBgoqhkiG92NkBgIOBAIFADAKBggqhkjOPQQDAgNnADBkAjA6z3KDURaZsYb7NcNWymK/9Bft2Q91TaKOvvGcgV5Ct4n4mPebWZ+Y1UENj53pwv4CMDIt1UQhsKMFd2xd8zg7kGf9F3wsIW2WT8ZyaYISb1T4en0bmcubCYkhYQaZDwmSHQAAMYIBjTCCAYkCAQEwgYYwejEuMCwGA1UEAwwlQXBwbGUgQXBwbGljYXRpb24gSW50ZWdyYXRpb24gQ0EgLSBHMzEmMCQGA1UECwwdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTAghoYPaZ2cynDzANBglghkgBZQMEAgEFAKCBlTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xNzA4MDIxNjA5NDZaMCoGCSqGSIb3DQEJNDEdMBswDQYJYIZIAWUDBAIBBQChCgYIKoZIzj0EAwIwLwYJKoZIhvcNAQkEMSIEIGEfVr+4x9RQXyfF8IYA0kraoK0pcZEaBlINo6EGrOReMAoGCCqGSM49BAMCBEgwRgIhAKunK47QEr/ZjxPlVl+etzVzbKA41xPLWtO01oUOlulmAiEAiaFH9F9LK6uqTFAUW/WIDkHWiFuSm5a3NVox7DlyIf0AAAAAAAA=', + 'header': + { + 'ephemeralPublicKey': 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEX1ievoT8DRB8T5zGkhHZHeDr0oBmYEgsDSxyT0MD0IZ2Mpfjz2LdWq6LUwSH9EmxdPEzMunsZKWMyOr3K/zlsw==', + 'publicKeyHash': 'tqYV+tmG9aMh+l/K6cicUnPqkb1gUiLjSTM9gEz6Nl0=', + 'transactionId': '3cee89679130a4b2617c76118a1c62fd400cd45b49dc0916d5b951b560cd17b4', + }, + } diff --git a/abc_spec/components/schemas/Tokens/01_ApplePayTokenResponse.yaml b/abc_spec/components/schemas/Tokens/01_ApplePayTokenResponse.yaml new file mode 100644 index 000000000..2ceb8801f --- /dev/null +++ b/abc_spec/components/schemas/Tokens/01_ApplePayTokenResponse.yaml @@ -0,0 +1,12 @@ +type: object +description: Apple Pay Token Response +allOf: + - $ref: '#/components/schemas/TokenResponse' + - type: object + properties: + token_format: + type: string + description: The format of the token. + enum: + - cryptogram_3ds + example: 'cryptogram_3ds' diff --git a/abc_spec/components/schemas/Tokens/02_GooglePayTokenRequest.yaml b/abc_spec/components/schemas/Tokens/02_GooglePayTokenRequest.yaml new file mode 100644 index 000000000..4cace65a9 --- /dev/null +++ b/abc_spec/components/schemas/Tokens/02_GooglePayTokenRequest.yaml @@ -0,0 +1,28 @@ +type: object +description: Google Pay Token Request +allOf: + - $ref: '#/components/schemas/TokenRequest' + - type: object + properties: + token_data: + type: object + description: The Google Pay payment token + properties: + signature: + type: string + description: Verifies the message came from Google. The signature is created using ECDSA + protocolVersion: + type: string + description: Identifies which encryption/signing scheme created this message. In this way, the protocol can evolve over time if needed. If it is not set, assume ECv0 + signedMessage: + type: string + description: A serialized JSON string containing the encryptedMessage, ephemeralPublicKey, and tag. To simplify the signature verification process, this value is serialized + example: + { + 'protocolVersion': 'ECv1', + 'signature': 'TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ', + 'signedMessage': '{"encryptedMessage": + "ZW5jcnlwdGVkTWVzc2FnZQ==", + "ephemeralPublicKey": "ZXBoZW1lcmFsUHVibGljS2V5", + "tag": "c2lnbmF0dXJl"}', + } diff --git a/abc_spec/components/schemas/Tokens/02_GooglePayTokenResponse.yaml b/abc_spec/components/schemas/Tokens/02_GooglePayTokenResponse.yaml new file mode 100644 index 000000000..2de69c785 --- /dev/null +++ b/abc_spec/components/schemas/Tokens/02_GooglePayTokenResponse.yaml @@ -0,0 +1,13 @@ +type: object +description: Google Pay Token Response +allOf: + - $ref: '#/components/schemas/TokenResponse' + - type: object + properties: + token_format: + type: string + description: The format of the token + enum: + - pan_only + - cryptogram_3ds + example: 'pan_only' diff --git a/abc_spec/components/schemas/Tokens/03_CardTokenRequest.yaml b/abc_spec/components/schemas/Tokens/03_CardTokenRequest.yaml new file mode 100644 index 000000000..599caeb0e --- /dev/null +++ b/abc_spec/components/schemas/Tokens/03_CardTokenRequest.yaml @@ -0,0 +1,45 @@ +type: object +description: Card Token Request +allOf: + - $ref: '#/components/schemas/TokenRequest' + - type: object + required: + - number + - expiry_month + - expiry_year + properties: + number: + type: string + description: The card number + example: '4543474002249996' + expiry_month: + type: integer + description: The expiry month of the card + minimum: 1 + example: 6 + minLength: 1 + maxLength: 2 + expiry_year: + type: integer + description: The expiry year of the card + example: 2025 + minLength: 4 + maxLength: 4 + name: + type: string + description: The cardholder's name + example: 'Bruce Wayne' + cvv: + type: string + description: The card verification value/code. 3 digits, except for American Express (4 digits) + example: '956' + minLength: 3 + maxLength: 4 + billing_address: + description: The payment source owner's billing address + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The payment source owner's phone number + allOf: + - $ref: '#/components/schemas/PhoneNumber' diff --git a/abc_spec/components/schemas/Tokens/03_CardTokenResponse.yaml b/abc_spec/components/schemas/Tokens/03_CardTokenResponse.yaml new file mode 100644 index 000000000..a3b26a06b --- /dev/null +++ b/abc_spec/components/schemas/Tokens/03_CardTokenResponse.yaml @@ -0,0 +1,85 @@ +type: object +description: Card Token Response +required: + - expiry_month + - expiry_year + - last4 + - bin +allOf: + - $ref: '#/components/schemas/TokenResponse' + - type: object + properties: + billing_address: + description: The payment source owner's billing address + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The payment source owner's phone number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + expiry_month: + type: integer + description: The expiry month + minimum: 1 + example: 6 + minLength: 1 + maxLength: 2 + expiry_year: + type: integer + description: The expiry year + example: 2025 + minLength: 4 + maxLength: 4 + name: + type: string + description: The cardholder's name + example: 'Bruce Wayne' + scheme: + type: string + description: The card scheme + example: 'VISA' + last4: + type: string + description: The last four digits of the card number + example: '9996' + minLength: 4 + maxLength: 4 + bin: + type: string + description: The card issuer's Bank Identification Number (BIN) + example: '454347' + maxLength: 6 + card_type: + type: string + description: The card type + enum: + - Credit + - Debit + - Prepaid + - Charge + example: Credit + card_category: + type: string + description: The card category + enum: + - Consumer + - Commercial + example: Consumer + issuer: + type: string + description: The name of the card issuer + example: 'GOTHAM STATE BANK' + issuer_country: + type: string + maxLength: 2 + minLength: 2 + description: The card issuer's country (two-letter ISO code) + example: 'US' + product_id: + type: string + description: The issuer/card scheme product identifier + example: 'F' + product_type: + type: string + description: The issuer/card scheme product type + example: CLASSIC diff --git a/abc_spec/components/schemas/Tokens/TokenRequest.yaml b/abc_spec/components/schemas/Tokens/TokenRequest.yaml new file mode 100644 index 000000000..b5b16e594 --- /dev/null +++ b/abc_spec/components/schemas/Tokens/TokenRequest.yaml @@ -0,0 +1,34 @@ +type: object +description: The source of the payment +discriminator: + propertyName: type + mapping: + applepay: '#/components/schemas/01_ApplePayTokenRequest' + googlepay: '#/components/schemas/02_GooglePayTokenRequest' + card: '#/components/schemas/03_CardTokenRequest' +required: + - type +properties: + type: + type: string + description: The type of card details to be tokenized +example: { + "type": "card", + "number": "4543474002249996", + "expiry_month": 6, + "expiry_year": 2025, + "name": "Bruce Wayne", + "cvv": "956", + "billing_address": { + "address_line1": "Checkout.com", + "address_line2": "90 Tottenham Court Road", + "city": "London", + "state": "London", + "zip": "W1T 4TJ", + "country": "GB" + }, + "phone": { + "number": "4155552671", + "country_code": "+1" + } +} \ No newline at end of file diff --git a/abc_spec/components/schemas/Tokens/TokenResponse.yaml b/abc_spec/components/schemas/Tokens/TokenResponse.yaml new file mode 100644 index 000000000..4e86dc5aa --- /dev/null +++ b/abc_spec/components/schemas/Tokens/TokenResponse.yaml @@ -0,0 +1,89 @@ +type: object +description: The source of the payment +discriminator: + propertyName: type + mapping: + applepay: '#/components/schemas/01_ApplePayTokenResponse' + googlepay: '#/components/schemas/02_GooglePayTokenResponse' + card: '#/components/schemas/03_CardTokenResponse' +required: + - type + - token + - expires_on + - expiry_month + - expiry_year + - last4 + - bin +properties: + type: + type: string + description: The type of card details to be tokenized + example: 'card' + token: + type: string + description: The reference token + example: tok_ubfj2q76miwundwlk72vxt2i7q + expires_on: + description: The date/time the token will expire + allOf: + - $ref: '#/components/schemas/ServerTimestamp' + expiry_month: + type: integer + description: The expiry month + minimum: 1 + example: 6 + minLength: 1 + maxLength: 2 + expiry_year: + type: integer + description: expiry year + example: 2025 + minLength: 4 + maxLength: 4 + scheme: + type: string + description: The card scheme + example: 'VISA' + last4: + type: string + description: The last four digits of the card number + example: '9996' + bin: + type: string + description: The card issuer BIN + example: '454347' + card_type: + type: string + description: The card type + enum: + - Credit + - Debit + - Prepaid + - Charge + - Deferred Debit + example: Credit + card_category: + type: string + description: The card category + enum: + - Consumer + - Commercial + example: Consumer + issuer: + type: string + description: The name of the card issuer + example: 'GOTHAM STATE BANK' + issuer_country: + type: string + maxLength: 2 + minLength: 2 + description: The card issuer country ISO-2 code + example: 'US' + product_id: + type: string + description: The issuer/card scheme product identifier + example: 'F' + product_type: + type: string + description: The issuer/card scheme product type + example: CLASSIC diff --git a/abc_spec/components/schemas/ValidationError.yaml b/abc_spec/components/schemas/ValidationError.yaml new file mode 100644 index 000000000..29c1a7b6a --- /dev/null +++ b/abc_spec/components/schemas/ValidationError.yaml @@ -0,0 +1,13 @@ +type: object +properties: + request_id: + type: string + example: 0HL80RJLS76I7 + error_type: + type: string + example: request_invalid + error_codes: + type: array + items: + type: string + example: payment_source_required diff --git a/spec/components/schemas/Webhooks/Webhook.yaml b/abc_spec/components/schemas/Webhooks/Webhook.yaml similarity index 77% rename from spec/components/schemas/Webhooks/Webhook.yaml rename to abc_spec/components/schemas/Webhooks/Webhook.yaml index 3121c9082..0678eaf6c 100644 --- a/spec/components/schemas/Webhooks/Webhook.yaml +++ b/abc_spec/components/schemas/Webhooks/Webhook.yaml @@ -2,7 +2,8 @@ type: object properties: id: type: string - example: wh_387ac7a83a054e37ae140105429d76b5 + format: "^(wh)_(\\w{32})$" + example: 'wh_387ac7a83a054e37ae140105429d76b5' url: type: string example: 'https://example.com/webhooks' @@ -17,7 +18,6 @@ properties: type: string enum: - json - - xml example: json event_types: $ref: '#/components/schemas/WebhookEvents' @@ -30,4 +30,4 @@ properties: - $ref: '#/components/schemas/Link' description: The URI of the payment source example: - href: "https://api.checkout.com/webhooks/wh_387ac7a83a054e37ae140105429d76b5" \ No newline at end of file + href: 'https://api.checkout.com/webhooks/wh_387ac7a83a054e37ae140105429d76b5' diff --git a/spec/components/schemas/Webhooks/WebhookEvents.yaml b/abc_spec/components/schemas/Webhooks/WebhookEvents.yaml similarity index 81% rename from spec/components/schemas/Webhooks/WebhookEvents.yaml rename to abc_spec/components/schemas/Webhooks/WebhookEvents.yaml index 1c9a31dcb..788431d34 100644 --- a/spec/components/schemas/Webhooks/WebhookEvents.yaml +++ b/abc_spec/components/schemas/Webhooks/WebhookEvents.yaml @@ -3,11 +3,10 @@ items: type: string example: - payment_approved - - payment_flagged - payment_pending - payment_declined - payment_expired - - payment_cancelled + - payment_canceled - payment_voided - payment_void_declined - payment_captured @@ -15,4 +14,4 @@ example: - payment_capture_pending - payment_refunded - payment_refund_declined - - payment_refund_pending \ No newline at end of file + - payment_refund_pending diff --git a/spec/components/schemas/Webhooks/WebhookRequest.yaml b/abc_spec/components/schemas/Webhooks/WebhookRequest.yaml similarity index 90% rename from spec/components/schemas/Webhooks/WebhookRequest.yaml rename to abc_spec/components/schemas/Webhooks/WebhookRequest.yaml index 0c43cfe92..944c92dd0 100644 --- a/spec/components/schemas/Webhooks/WebhookRequest.yaml +++ b/abc_spec/components/schemas/Webhooks/WebhookRequest.yaml @@ -22,8 +22,7 @@ properties: description: The content type to be sent to the webhook endpoint enum: - json - - xml default: json example: json event_types: - $ref: '#/components/schemas/WebhookEvents' \ No newline at end of file + $ref: '#/components/schemas/WebhookEvents' diff --git a/abc_spec/components/schemas/Webhooks/WebhookRequestPatch.yaml b/abc_spec/components/schemas/Webhooks/WebhookRequestPatch.yaml new file mode 100644 index 000000000..bde2caecf --- /dev/null +++ b/abc_spec/components/schemas/Webhooks/WebhookRequestPatch.yaml @@ -0,0 +1,25 @@ +type: object +properties: + url: + type: string + description: Your webhook endpoint + example: 'https://example.com/webhooks' + format: url + active: + type: boolean + description: Whether the webhook is active + default: true + example: true + headers: + type: object + example: + authorization: '1234' + content_type: + type: string + description: The content type to be sent to the webhook endpoint + enum: + - json + default: json + example: json + event_types: + $ref: '#/components/schemas/WebhookEvents' diff --git a/abc_spec/components/schemas/Webhooks/WebhookRequestPut.yaml b/abc_spec/components/schemas/Webhooks/WebhookRequestPut.yaml new file mode 100644 index 000000000..8e740bcfb --- /dev/null +++ b/abc_spec/components/schemas/Webhooks/WebhookRequestPut.yaml @@ -0,0 +1,31 @@ +type: object +required: + - url + - active + - headers + - content_type + - event_types +properties: + url: + type: string + description: Your webhook endpoint + example: 'https://example.com/webhooks' + format: url + active: + type: boolean + description: Whether the webhook is active + default: true + example: true + headers: + type: object + example: + authorization: '1234' + content_type: + type: string + description: The content type to be sent to the webhook endpoint + enum: + - json + default: json + example: json + event_types: + $ref: '#/components/schemas/WebhookEvents' diff --git a/abc_spec/components/securitySchemes/ApiPublicKey.yaml b/abc_spec/components/securitySchemes/ApiPublicKey.yaml new file mode 100644 index 000000000..e4a24e7e1 --- /dev/null +++ b/abc_spec/components/securitySchemes/ApiPublicKey.yaml @@ -0,0 +1,17 @@ +description: > + Unless explicitly stated, all endpoints require authentication using your secret key. + Public keys should only be used in JavaScript or native applications. + + ### Where to find your keys? + + You can find your API keys, and generate new ones, in your Hub account. + + #### Format + + - Sandbox `pk_test_xxxxxxxxxxxxxxxxxxxxxxxxxx` + + - Production `pk_xxxxxxxxxxxxxxxxxxxxxxxxxx` +name: Authorization +type: apiKey +in: header +x-cko-type: publicKey \ No newline at end of file diff --git a/abc_spec/components/securitySchemes/ApiSecretKey.yaml b/abc_spec/components/securitySchemes/ApiSecretKey.yaml new file mode 100644 index 000000000..d4bc9c6d6 --- /dev/null +++ b/abc_spec/components/securitySchemes/ApiSecretKey.yaml @@ -0,0 +1,15 @@ +description: > + Unless explicitly stated, all endpoints require authentication using your secret key. + Public keys should only be used in JavaScript or native applications. + + You can find your API keys, and generate new ones, in your Hub account. + + #### Format + + - Sandbox `sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxx` + + - Production `sk_xxxxxxxxxxxxxxxxxxxxxxxxxx` +name: Authorization +type: apiKey +in: header +x-cko-type: secretKey \ No newline at end of file diff --git a/abc_spec/future/components/schemas/Files/File.yaml b/abc_spec/future/components/schemas/Files/File.yaml new file mode 100644 index 000000000..0a79c8bb8 --- /dev/null +++ b/abc_spec/future/components/schemas/Files/File.yaml @@ -0,0 +1,50 @@ +type: object +required: + - id + - filename + - purpose + - size + - uploaded_on + - _links +properties: + id: + type: string + description: The file identifier + example: file_6lbss42ezvoufcb2beo76rvwly + filename: + type: string + description: The file name + example: receipt.jpg + purpose: + type: string + description: The purpose of the uploaded file + example: dispute_evidence + size: + type: number + description: The size in bytes of the file upload object + example: 1024 + uploaded_on: + type: string + format: date-time + description: File upload date and time in UTC + example: '2016-05-17T16:48:52.000Z' + _links: + type: object + required: + - self + - download + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The file information retrieval URL + example: + href: https://api.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly + download: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The temporary file download URL. The URL expires after a certain time period + example: + href: https://checkout-file-upload.s3.eu-west-2.amazonaws.com/ucdac/ucdac/6lbss42ezvoufcb2beo76rvwly?X-Amz-Expires=3600&x-amz-security-token=FQoDYXdzENL%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEa diff --git a/abc_spec/future/components/schemas/Files/FileUploadResponse.yaml b/abc_spec/future/components/schemas/Files/FileUploadResponse.yaml new file mode 100644 index 000000000..8b3488a06 --- /dev/null +++ b/abc_spec/future/components/schemas/Files/FileUploadResponse.yaml @@ -0,0 +1,24 @@ +type: object +required: + - id + - _links +properties: + id: + type: string + description: The unique identifier of the file uploaded + example: file_6lbss42ezvoufcb2beo76rvwly + _links: + type: object + description: The links related to the file + readOnly: true + minItems: 1 + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the file uploaded. Use this to retrieve detailed file information + example: + href: https://api.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly + required: + - self diff --git a/spec/future/paths/files.yaml b/abc_spec/future/paths/files.yaml similarity index 100% rename from spec/future/paths/files.yaml rename to abc_spec/future/paths/files.yaml diff --git a/abc_spec/future/paths/files@{id}.yaml b/abc_spec/future/paths/files@{id}.yaml new file mode 100644 index 000000000..3c0e7b444 --- /dev/null +++ b/abc_spec/future/paths/files@{id}.yaml @@ -0,0 +1,31 @@ +get: + tags: + - Files + summary: Get file information + description: Gets the information of file with the specified file identifier. + parameters: + - in: path + name: id + schema: + type: string + pattern: "^file_(\\w{26})$" + required: true + description: The file identifier + responses: + '200': + description: File was retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/File' + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: File not found diff --git a/abc_spec/paths/README.md b/abc_spec/paths/README.md new file mode 100644 index 000000000..7cb32fe08 --- /dev/null +++ b/abc_spec/paths/README.md @@ -0,0 +1,4 @@ +# Paths + +- Write each path specification in separate file +- File name repeat the path, the slash replaced with `@` sign, i.e. `user@{username}.yaml` matches to `user/{username}` diff --git a/abc_spec/paths/customers.yaml b/abc_spec/paths/customers.yaml new file mode 100644 index 000000000..5981a60ea --- /dev/null +++ b/abc_spec/paths/customers.yaml @@ -0,0 +1,30 @@ +post: + security: + - ApiSecretKey: [] + tags: + - Customers + summary: Create a customer + operationId: createCustomer + description: > + Store a customer's details in a customer object to reuse in future payments. Link a payment instrument using the Update customer details endpoint, so the customer `id` returned can be passed as a source when making a payment. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerCreateRequest' + responses: + '201': + description: Customer created successfully + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerCreateResponse' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' diff --git a/abc_spec/paths/customers@{identifier}.yaml b/abc_spec/paths/customers@{identifier}.yaml new file mode 100644 index 000000000..b8a8691fd --- /dev/null +++ b/abc_spec/paths/customers@{identifier}.yaml @@ -0,0 +1,105 @@ +get: + security: + - ApiSecretKey: [ ] + tags: + - Customers + summary: Get customer details + operationId: getCustomerDetails + description: Returns details of a customer and their instruments + parameters: + - in: path + name: identifier + required: true + description: The customer's ID or email + schema: + type: string + properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + email: + type: string + format: email + maxLength: 255 + additionalProperties: false + oneOf: + - required: [ id ] + - required: [ email ] + responses: + '200': + description: Customer retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerGetResponse' + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Customer not found + +patch: + security: + - ApiSecretKey: [ ] + tags: + - Customers + summary: Update customer details + operationId: updateCustomerDetails + description: Update details of a customer + parameters: + - in: path + name: identifier + schema: + type: string + pattern: "^(cus)_(\\w{26})$" + required: true + description: The customer id + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateCustomerRequest' + responses: + '204': + description: Customer updated successfully + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '404': + description: Customer not found + +delete: + security: + - ApiSecretKey: [ ] + tags: + - Customers + summary: Delete a customer + operationId: deleteCustomerDetails + description: Delete a customer and all of their linked payment instruments + parameters: + - in: path + name: identifier + required: true + schema: + type: string + pattern: "^(cus)_(\\w{26})$" + description: The customer id + responses: + '204': + description: Customer deleted successfully + '401': + description: Unauthorized + '404': + description: Customer not found or not associated with client diff --git a/abc_spec/paths/disputes.yaml b/abc_spec/paths/disputes.yaml new file mode 100644 index 000000000..e2f703744 --- /dev/null +++ b/abc_spec/paths/disputes.yaml @@ -0,0 +1,95 @@ +get: + security: + - ApiSecretKey: [ ] + tags: + - Disputes + summary: Get disputes + operationId: getDisputes + description: + Returns a list of all disputes against your business. The results will be returned in reverse chronological order, + showing the last modified dispute (for example, where you've recently added a piece of evidence) first. + You can use the optional parameters below to skip or limit results. + parameters: + - in: query + name: limit + schema: + type: integer + minimum: 1 + maximum: 250 + default: 50 + required: false + description: The numbers of results to return + - in: query + name: skip + schema: + type: integer + minimum: 0 + default: 0 + required: false + description: The number of results to skip + - in: query + name: from + schema: + type: string + format: date-time + required: false + description: The date and time from which to filter disputes, based on the dispute's `last_update` field + - in: query + name: to + schema: + type: string + format: date-time + required: false + description: The date and time until which to filter disputes, based on the dispute's `last_update` field + - in: query + name: id + schema: + type: string + required: false + description: The unique identifier of the dispute + - in: query + name: statuses + schema: + type: string + example: evidence_required,evidence_under_review + required: false + description: One or more comma-separated statuses. This works like a logical *OR* operator + - in: query + name: payment_id + schema: + type: string + required: false + description: The unique identifier of the payment + - in: query + name: payment_reference + schema: + type: string + required: false + description: An optional reference (such as an order ID) that you can use later to identify the payment. Previously known as `TrackId` + - in: query + name: payment_arn + schema: + type: string + required: false + description: The acquirer reference number (ARN) that you can use to query the issuing bank + - in: query + name: this_channel_only + schema: + type: boolean + required: false + description: If `true`, only returns disputes of the specific channel that the secret key is associated with. Otherwise, returns all disputes for that business + responses: + '200': + description: Disputes retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/DisputePaged' + '401': + description: Unauthorized + '422': + description: Unprocessable paging + content: + application/json: + schema: + $ref: '#/components/schemas/PagingError' diff --git a/abc_spec/paths/disputes@{dispute_id}.yaml b/abc_spec/paths/disputes@{dispute_id}.yaml new file mode 100644 index 000000000..faea64784 --- /dev/null +++ b/abc_spec/paths/disputes@{dispute_id}.yaml @@ -0,0 +1,27 @@ +get: + security: + - ApiSecretKey: [ ] + tags: + - Disputes + summary: Get dispute details + operationId: getDisputeDetails + description: Returns all the details of a dispute using the dispute identifier. + parameters: + - in: path + name: dispute_id + schema: + type: string + pattern: "^(dsp)_(\\w{26})$" + required: true + description: The dispute identifier + responses: + '200': + description: Dispute retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/Dispute' + '401': + description: Unauthorized + '404': + description: Dispute not found diff --git a/abc_spec/paths/disputes@{dispute_id}@accept.yaml b/abc_spec/paths/disputes@{dispute_id}@accept.yaml new file mode 100644 index 000000000..5ddc07ed9 --- /dev/null +++ b/abc_spec/paths/disputes@{dispute_id}@accept.yaml @@ -0,0 +1,23 @@ +post: + security: + - ApiSecretKey: [ ] + tags: + - Disputes + summary: Accept dispute + operationId: acceptDispute + description: If a dispute is legitimate, you can choose to accept it. This will close it for you and remove it from your list of open disputes. There are no further financial implications. + parameters: + - in: path + name: dispute_id + schema: + type: string + pattern: "^(dsp)_(\\w{26})$" + required: true + description: The dispute identifier + responses: + '204': + description: Dispute accepted successfully + '401': + description: Unauthorized + '404': + description: Dispute not found diff --git a/abc_spec/paths/disputes@{dispute_id}@evidence.yaml b/abc_spec/paths/disputes@{dispute_id}@evidence.yaml new file mode 100644 index 000000000..571937eb9 --- /dev/null +++ b/abc_spec/paths/disputes@{dispute_id}@evidence.yaml @@ -0,0 +1,91 @@ +put: + security: + - ApiSecretKey: [ ] + tags: + - Disputes + summary: Provide dispute evidence + operationId: provideDisputeEvidence + description: | + Adds supporting evidence to a dispute. Before using this endpoint, you first need to [upload your files](#tag/Disputes/paths/~1files/post) using the file uploader. You will receive a file id (prefixed by `file_`) which you can then use in your request. + Note that this only attaches the evidence to the dispute, it does not send it to us. Once ready, you will need to submit it. + + **You must provide at least one evidence type in the body of your request.** + parameters: + - in: path + name: dispute_id + schema: + type: string + pattern: "^(dsp)_(\\w{26})$" + required: true + description: The dispute identifier + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProvideEvidenceRequest' + responses: + '204': + description: Dispute evidence provided successfully + '400': + description: Unprocessable + '401': + description: Unauthorized + '404': + description: Dispute not found + '422': + description: Unprocessable entity + +get: + security: + - ApiSecretKey: [ ] + tags: + - Disputes + summary: Get dispute evidence + operationId: getDisputeEvidence + description: | + Retrieves a list of the evidence submitted in response to a specific dispute. + parameters: + - in: path + name: dispute_id + schema: + type: string + pattern: "^(dsp)_(\\w{26})$" + required: true + description: The dispute identifier + responses: + '200': + description: Dispute evidence retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/Evidence' + '401': + description: Unauthorized + '404': + description: Dispute not found + +post: + security: + - ApiSecretKey: [ ] + tags: + - Disputes + summary: Submit dispute evidence + operationId: submitDisputeEvidence + description: + With this final request, you can submit the evidence that you have previously provided. Make sure you have provided all the relevant information before using this request. + You will not be able to amend your evidence once you have submitted it. + parameters: + - in: path + name: dispute_id + schema: + type: string + pattern: "^(dsp)_(\\w{26})$" + required: true + description: The dispute identifier + responses: + '204': + description: Dispute evidence submitted successfully + '401': + description: Unauthorized + '404': + description: Dispute not found diff --git a/abc_spec/paths/disputes@{dispute_id}@schemefiles.yaml b/abc_spec/paths/disputes@{dispute_id}@schemefiles.yaml new file mode 100644 index 000000000..f491001ab --- /dev/null +++ b/abc_spec/paths/disputes@{dispute_id}@schemefiles.yaml @@ -0,0 +1,28 @@ +get: + security: + - ApiSecretKey: [ ] + tags: + - Disputes + summary: Get dispute scheme files + operationId: getDisputeSchemeFiles + description: | + Returns all of the scheme files of a dispute using the dispute identifier. Currently available only for VISA disputes. + parameters: + - in: path + name: dispute_id + schema: + type: string + pattern: "^(dsp)_(\\w{26})$" + required: true + description: The dispute identifier + responses: + '200': + description: Dispute retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/SchemeFileResponse' + '401': + description: Unauthorized + '404': + description: Dispute not found diff --git a/abc_spec/paths/event-types.yaml b/abc_spec/paths/event-types.yaml new file mode 100644 index 000000000..9ae84e297 --- /dev/null +++ b/abc_spec/paths/event-types.yaml @@ -0,0 +1,33 @@ +get: + security: + - ApiSecretKey: [ ] + tags: + - Events + summary: Retrieve event types + operationId: retrieveEventTypes + description: Retrieve a list of event types grouped by their respective version that you can configure on your webhooks. + parameters: + - in: query + name: version + schema: + type: string + description: The API version for which you want to retrieve the event types. Set this to `1.0` for the legacy API or `2.0` for the Unified Payments API. If no version is specified, event types for both versions will be returned. + required: false + responses: + '200': + description: Event types retrieved successfully + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EventTypesObject' + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized diff --git a/abc_spec/paths/events.yaml b/abc_spec/paths/events.yaml new file mode 100644 index 000000000..712a749c7 --- /dev/null +++ b/abc_spec/paths/events.yaml @@ -0,0 +1,51 @@ +get: + security: + - ApiSecretKey: [ ] + tags: + - Events + summary: Retrieve events + operationId: retrieveEvents + description: | + Retrieves events based on your query parameters. + parameters: + - in: query + name: payment_id + schema: + type: string + pattern: "^(pay)_(\\w{26})$" + description: The identifier of a payment + example: pay_ok2ynq6ubn3ufmo6jsdfmdvy5q + - in: query + name: skip + schema: + type: integer + description: Set how many events you want to skip + example: 0 + - in: query + name: limit + schema: + type: integer + description: Limit how many events your request returns + example: 5 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Payment_Id' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '204': + description: No Content + '401': + description: Unauthorized + '422': + description: Unprocessable Entry + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentIdInvalidResponse' \ No newline at end of file diff --git a/spec/paths/events@{eventId}.yaml b/abc_spec/paths/events@{eventId}.yaml similarity index 77% rename from spec/paths/events@{eventId}.yaml rename to abc_spec/paths/events@{eventId}.yaml index a09ebc15a..921c347a2 100644 --- a/spec/paths/events@{eventId}.yaml +++ b/abc_spec/paths/events@{eventId}.yaml @@ -1,7 +1,10 @@ get: + security: + - ApiSecretKey: [ ] tags: - Events summary: Retrieve event + operationId: retrieveEvent description: | Retrieves the event with the specified identifier string. The event `data` includes the full event details, the schema of which will vary based on the `type`. parameters: @@ -21,10 +24,10 @@ get: $ref: '#/components/schemas/EventObject' headers: Cko-Request-Id: - $ref: "#/components/headers/Cko-Request-Id" + $ref: '#/components/headers/Cko-Request-Id' Cko-Version: - $ref: "#/components/headers/Cko-Version" + $ref: '#/components/headers/Cko-Version' '401': description: Unauthorized '404': - description: Event not found \ No newline at end of file + description: Event not found diff --git a/spec/paths/events@{eventId}@notifications@{notificationId}.yaml b/abc_spec/paths/events@{eventId}@notifications@{notificationId}.yaml similarity index 77% rename from spec/paths/events@{eventId}@notifications@{notificationId}.yaml rename to abc_spec/paths/events@{eventId}@notifications@{notificationId}.yaml index bf6aab2ca..a90aec688 100644 --- a/spec/paths/events@{eventId}@notifications@{notificationId}.yaml +++ b/abc_spec/paths/events@{eventId}@notifications@{notificationId}.yaml @@ -1,7 +1,10 @@ get: + security: + - ApiSecretKey: [ ] tags: - Events summary: Retrieve event notification + operationId: retrieveEventNotification description: Retrieves the attempts for a specific event notification parameters: - in: path @@ -27,10 +30,10 @@ get: $ref: '#/components/schemas/Notification' headers: Cko-Request-Id: - $ref: "#/components/headers/Cko-Request-Id" + $ref: '#/components/headers/Cko-Request-Id' Cko-Version: - $ref: "#/components/headers/Cko-Version" + $ref: '#/components/headers/Cko-Version' '401': description: Unauthorized '404': - description: Event or notification not found \ No newline at end of file + description: Event or notification not found diff --git a/abc_spec/paths/events@{eventId}@webhooks@retry.yaml b/abc_spec/paths/events@{eventId}@webhooks@retry.yaml new file mode 100644 index 000000000..fd759bcde --- /dev/null +++ b/abc_spec/paths/events@{eventId}@webhooks@retry.yaml @@ -0,0 +1,28 @@ +post: + security: + - ApiSecretKey: [ ] + tags: + - Events + summary: Retry all webhooks + operationId: retryAllWebhooks + description: Retries all webhook notifications configured for the specified event + parameters: + - in: path + name: eventId + schema: + type: string + pattern: "^(evt)_(\\w{26})$" + required: true + description: The event identifier + responses: + '202': + description: Retry accepted + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Event or webhook not found diff --git a/abc_spec/paths/events@{eventId}@webhooks@{webhookId}@retry.yaml b/abc_spec/paths/events@{eventId}@webhooks@{webhookId}@retry.yaml new file mode 100644 index 000000000..ab07ea20a --- /dev/null +++ b/abc_spec/paths/events@{eventId}@webhooks@{webhookId}@retry.yaml @@ -0,0 +1,36 @@ +post: + security: + - ApiSecretKey: [ ] + tags: + - Events + summary: Retry webhook + operationId: retryWebhook + description: Retries a specific webhook notification for the given event + parameters: + - in: path + name: eventId + schema: + type: string + pattern: "^(evt)_(\\w{26})$" + required: true + description: The event identifier + - in: path + name: webhookId + schema: + type: string + pattern: "^(wh)_(\\w{32})$" + required: true + description: The webhook identifier + example: 'wh_387ac7a83a054e37ae140105429d76b5' + responses: + '202': + description: Retry accepted + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Event or webhook not found diff --git a/abc_spec/paths/files.yaml b/abc_spec/paths/files.yaml new file mode 100644 index 000000000..7d27d3008 --- /dev/null +++ b/abc_spec/paths/files.yaml @@ -0,0 +1,31 @@ +post: + security: + - ApiSecretKey: [ ] + tags: + - Disputes + summary: Upload file + operationId: uploadFile + description: Upload a file to use as evidence in a dispute. Your file must be in either JPEG/JPG, PNG or PDF format, and be no larger than 4MB. + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/File' + responses: + '200': + description: File uploaded successfully + content: + application/json: + schema: + $ref: '#/components/schemas/FileUploadResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '422': + description: Unprocessable + '429': + description: Too many requests diff --git a/abc_spec/paths/files@{file_id}.yaml b/abc_spec/paths/files@{file_id}.yaml new file mode 100644 index 000000000..5f76a8ac5 --- /dev/null +++ b/abc_spec/paths/files@{file_id}.yaml @@ -0,0 +1,33 @@ +get: + security: + - ApiSecretKey: [ ] + tags: + - Disputes + summary: Get file information + operationId: getFileInformation + description: Retrieve information about a file that was previously uploaded. + parameters: + - in: path + name: file_id + schema: + type: string + required: true + description: The file identifier. It is always prefixed by `file_`. + responses: + '200': + description: File information retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/FileResult' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: File not found + '429': + description: Too many requests or duplicate request detected diff --git a/abc_spec/paths/hosted-payments.yaml b/abc_spec/paths/hosted-payments.yaml new file mode 100644 index 000000000..c90248036 --- /dev/null +++ b/abc_spec/paths/hosted-payments.yaml @@ -0,0 +1,32 @@ +post: + security: + - ApiSecretKey: [ ] + tags: + - Hosted Payments Page + summary: Create a Hosted Payments Page session + operationId: createAHostedPaymentsSession + description: | + Create a Hosted Payments Page session and pass through all the payment information, like the amount, currency, country and reference. + + To get started with our Hosted Payments Page, contact your Solutions Engineer or support@checkout.com. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/HostedPaymentsRequest' + responses: + '201': + description: Created Hosted Payments Page + content: + application/json: + schema: + $ref: '#/components/schemas/HostedPaymentsResponse' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' diff --git a/abc_spec/paths/hosted-payments@{id}.yaml b/abc_spec/paths/hosted-payments@{id}.yaml new file mode 100644 index 000000000..4fd8b8947 --- /dev/null +++ b/abc_spec/paths/hosted-payments@{id}.yaml @@ -0,0 +1,28 @@ +get: + security: + - ApiSecretKey: [] + tags: + - Hosted Payments Page + summary: Get Hosted Payments Page details + operationId: getHostedPaymentsPageDetails + description: | + Retrieve details about a specific Hosted Payments Page using the ID returned when it was created. In the response, you will see the status of the Hosted Payments Page.

+ For more information, see the Hosted Payments Page documentation. + parameters: + - in: path + name: id + required: true + schema: + allOf: + - $ref: '#/components/schemas/HostedPaymentId' + responses: + '200': + description: Hosted Payments Page details retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/GetHostedPaymentsResponse' + '401': + description: Unauthorized + '404': + description: Hosted Payments Page not found diff --git a/abc_spec/paths/instruments.yaml b/abc_spec/paths/instruments.yaml new file mode 100644 index 000000000..d0ecbf5e6 --- /dev/null +++ b/abc_spec/paths/instruments.yaml @@ -0,0 +1,30 @@ +post: + security: + - ApiSecretKey: [ ] + tags: + - Instruments + summary: Create an instrument + operationId: createAnInstrument + description: | + Exchange a single use Checkout.com token for a payment instrument reference, that can be used at any time to request one or more payments. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/InstrumentRequest' + responses: + '201': + description: Instrument created successfully + content: + application/json: + schema: + $ref: '#/components/schemas/InstrumentResponse' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' diff --git a/abc_spec/paths/instruments@{id}.yaml b/abc_spec/paths/instruments@{id}.yaml new file mode 100644 index 000000000..406686bbd --- /dev/null +++ b/abc_spec/paths/instruments@{id}.yaml @@ -0,0 +1,103 @@ +get: + security: + - ApiSecretKey: [ ] + tags: + - Instruments + summary: Get instrument details + operationId: getInstrumentDetails + description: Returns details of an instrument + parameters: + - in: path + name: id + schema: + type: string + pattern: "^(src)_(\\w{26})$" + required: true + description: The instrument id + responses: + '200': + description: Instrument retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/RetrieveInstrumentResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Instrument not found + +patch: + security: + - ApiSecretKey: [ ] + tags: + - Instruments + summary: Update instrument details + operationId: updateInstrumentDetails + description: Update details of an instrument + parameters: + - in: path + name: id + schema: + type: string + pattern: "^(src)_(\\w{26})$" + example: src_ubfj2q76miwundwlk72vxt2i7q + required: true + description: The instrument ID + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateInstrumentRequest' + responses: + '200': + description: Instrument updated successfully + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateInstrumentResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '404': + description: Instrument not found + +delete: + security: + - ApiSecretKey: [ ] + tags: + - Instruments + summary: Delete an instrument + operationId: removeInstrument + description: Delete a payment instrument. + parameters: + - in: path + name: id + schema: + type: string + pattern: "^(src)_(\\w{26})$" + example: src_ubfj2q76miwundwlk72vxt2i7q + required: true + description: The payment instrument to be deleted + responses: + '204': + description: Instrument deleted successfully + '401': + description: Unauthorized + '404': + description: Instrument not found or not associated with client diff --git a/abc_spec/paths/payment-links.yaml b/abc_spec/paths/payment-links.yaml new file mode 100644 index 000000000..b69025cc5 --- /dev/null +++ b/abc_spec/paths/payment-links.yaml @@ -0,0 +1,30 @@ +post: + security: + - ApiSecretKey: [ ] + tags: + - Payment Links + summary: Create a Payment Link + operationId: createAPaymentLinkSession + description: | + Create a Payment Link and pass through all the payment information, like the amount, currency, country and reference. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentLinksRequest' + responses: + '201': + description: Create Payment Link Page + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentLinksResponse' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' diff --git a/abc_spec/paths/payment-links@{id}.yaml b/abc_spec/paths/payment-links@{id}.yaml new file mode 100644 index 000000000..9742d755b --- /dev/null +++ b/abc_spec/paths/payment-links@{id}.yaml @@ -0,0 +1,28 @@ +get: + security: + - ApiSecretKey: [] + tags: + - Payment Links + summary: Get Payment Link details + operationId: getPaymentLinkDetails + description: | + Retrieve details about a specific Payment Link using its ID returned when the link was created. In the response, you will see the status of the Payment Link.

+ For more information, see the Payment Links documentation. + parameters: + - in: path + name: id + required: true + schema: + allOf: + - $ref: '#/components/schemas/PaymentLinkId' + responses: + '200': + description: Payment Link details retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/GetPaymentLinkResponse' + '401': + description: Unauthorized + '404': + description: Payment Link session not found diff --git a/abc_spec/paths/payments.yaml b/abc_spec/paths/payments.yaml new file mode 100644 index 000000000..07d88b120 --- /dev/null +++ b/abc_spec/paths/payments.yaml @@ -0,0 +1,216 @@ +post: + security: + - ApiSecretKey: [] + tags: + - Payments + summary: Request a payment or payout + operationId: requestAPaymentOrPayout + description: | + To accept payments from cards, digital wallets and many alternative payment methods, specify the `source.type` field, along with the source-specific data. + + To pay out to a card, specify the destination of your payout using the `destination.type` field, along with the destination-specific data. + + To verify the success of the payment, check the `approved` field in the response. + parameters: + - $ref: '#/components/parameters/ckoIdempotencyKey' + requestBody: + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/PaymentRequest' + - $ref: '#/components/schemas/Payout' + example: + source: + type: token + token: tok_4gzeau5o2uqubbk6fufs3m7p54 + amount: 6540 + currency: USD + payment_type: Recurring + reference: 'ORD-5023-4E89' + description: 'Set of 3 masks' + capture: true + capture_on: '2019-09-10T10:11:12Z' + customer: + id: 'cus_udst2tfldj6upmye2reztkmm4i' + email: 'brucewayne@gmail.com' + name: 'Bruce Wayne' + billing_descriptor: + name: SUPERHEROES.COM + city: GOTHAM + shipping: + address: + address_line1: Checkout.com + address_line2: 90 Tottenham Court Road + city: London + state: London + zip: W1T 4TJ + country: GB + phone: + country_code: '+1' + number: 415 555 2671 + 3ds: + enabled: true + attempt_n3d: true + eci: '05' + cryptogram: AgAAAAAAAIR8CQrXcIhbQAAAAAA= + xid: MDAwMDAwMDAwMDAwMDAwMzIyNzY= + version: '2.0.1' + previous_payment_id: 'pay_fun26akvvjjerahhctaq2uzhu4' + risk: + enabled: false + success_url: 'http://example.com/payments/success' + failure_url: 'http://example.com/payments/fail' + payment_ip: '90.197.169.245' + recipient: + dob: '1985-05-15' + account_number: '5555554444' + zip: W1T + first_name: John + last_name: Jones + metadata: + udf1: 'value1' + new_customer: false + registration_date: '2019-09-10T10:11:12Z' + + responses: + '201': + description: Payment processed successfully + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentResponse' + example: + id: 'pay_mbabizu24mvu3mela5njyhpit4' + action_id: 'act_mbabizu24mvu3mela5njyhpit4' + amount: 6540 + currency: 'USD' + approved: true + status: 'Authorized' + auth_code: '770687' + response_code: '10000' + response_summary: 'Approved' + 3ds: + downgraded: true + enrolled: 'N' + risk: + flagged: true + source: + type: 'card' + id: 'src_nwd3m4in3hkuddfpjsaevunhdy' + billing_address: + address_line1: 'Checkout.com' + address_line2: '90 Tottenham Court Road' + city: 'London' + state: 'London' + zip: 'W1T 4TJ' + country: 'GB' + phone: + country_code: '+1' + number: '415 555 2671' + last4: '4242' + fingerprint: 'F31828E2BDABAE63EB694903825CDD36041CC6ED461440B81415895855502832' + bin: '424242' + customer: + id: 'cus_udst2tfldj6upmye2reztkmm4i' + email: 'brucewayne@gmail.com' + name: 'Bruce Wayne' + processed_on: '2019-09-10T10:11:12Z' + reference: 'ORD-5023-4E89' + processing: + retrieval_reference_number: '909913440644' + acquirer_transaction_id: '440644309099499894406' + recommendation_code: '02' + eci: '06' + scheme_id: '489341065491658' + _links: + self: + href: 'https://api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4' + action: + href: 'https://api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/actions' + void: + href: 'https://api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/voids' + capture: + href: 'https://api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/captures' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '202': + description: Payment asynchronous or further action required + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentAcceptedResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '429': + description: Too many requests or duplicate request detected + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '502': + description: Bad gateway +get: + security: + - ApiSecretKey: [ ] + tags: + - Payments + summary: Get payment lists + operationId: getPayments + description: | + Beta

+ Returns a list of your business' payments that match the specified reference. Results are returned in reverse chronological order, with the most recent payments shown first. + You can use the optional parameters below to skip or limit results. + parameters: + - in: query + name: limit + schema: + type: integer + minimum: 1 + maximum: 100 + default: 10 + required: false + description: The numbers of results to retrieve + - in: query + name: skip + schema: + type: integer + minimum: 0 + default: 0 + required: false + description: The number of results to skip + - in: query + name: reference + schema: + type: string + required: true + description: A reference, such as an order ID, that can be used to identify the payment + responses: + '200': + description: Payments retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentPaged' + '401': + description: Unauthorized + '422': + description: Unprocessable paging + content: + application/json: + schema: + $ref: '#/components/schemas/PagingError' diff --git a/abc_spec/paths/payments@{id}.yaml b/abc_spec/paths/payments@{id}.yaml new file mode 100644 index 000000000..e143e97aa --- /dev/null +++ b/abc_spec/paths/payments@{id}.yaml @@ -0,0 +1,39 @@ +get: + security: + - ApiSecretKey: [ ] + tags: + - Payments + summary: Get payment details + operationId: getPaymentDetails + description: | + Returns the details of the payment with the specified identifier string. + + If the payment method requires a redirection to a third party (e.g., 3D Secure), + the redirect URL back to your site will include a `cko-session-id` query parameter + containing a payment session ID that can be used to obtain the details of the payment, for example: + + http://example.com/success?cko-session-id=sid_ubfj2q76miwundwlk72vxt2i7q. + parameters: + - in: path + name: id + schema: + type: string + pattern: "^(pay|sid)_(\\w{26})$" + required: true + description: The payment or payment session identifier + responses: + '200': + description: Payment retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/Payment' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Payment not found diff --git a/abc_spec/paths/payments@{id}@actions.yaml b/abc_spec/paths/payments@{id}@actions.yaml new file mode 100644 index 000000000..cd98eb3f2 --- /dev/null +++ b/abc_spec/paths/payments@{id}@actions.yaml @@ -0,0 +1,33 @@ +get: + security: + - ApiSecretKey: [ ] + tags: + - Payments + summary: Get payment actions + operationId: getPaymentActions + description: | + Returns all the actions associated with a payment ordered by processing date in descending order (latest first). + parameters: + - in: path + name: id + schema: + type: string + pattern: "^(pay)_(\\w{26})$" + required: true + description: The payment identifier + responses: + '200': + description: Payment actions retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentActionsResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Payment not found diff --git a/abc_spec/paths/payments@{id}@captures.yaml b/abc_spec/paths/payments@{id}@captures.yaml new file mode 100644 index 000000000..5b51b6cd2 --- /dev/null +++ b/abc_spec/paths/payments@{id}@captures.yaml @@ -0,0 +1,51 @@ +post: + security: + - ApiSecretKey: [ ] + tags: + - Payments + summary: Capture a payment + operationId: captureAPayment + description: | + Captures a payment if supported by the payment method. + + For card payments, capture requests are processed asynchronously. You can use [webhooks](#tag/Webhooks) to be notified if the capture is successful. + parameters: + - $ref: '#/components/parameters/ckoIdempotencyKey' + - in: path + name: id + schema: + type: string + pattern: "^(pay)_(\\w{26})$" + required: true + description: The payment identifier + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CaptureRequest' + responses: + '202': + description: Capture accepted + content: + application/json: + schema: + $ref: '#/components/schemas/CaptureAcceptedResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '403': + description: Capture not allowed + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '404': + description: Payment not found + '502': + description: Bad gateway diff --git a/abc_spec/paths/payments@{id}@refunds.yaml b/abc_spec/paths/payments@{id}@refunds.yaml new file mode 100644 index 000000000..1b66a49a1 --- /dev/null +++ b/abc_spec/paths/payments@{id}@refunds.yaml @@ -0,0 +1,51 @@ +post: + security: + - ApiSecretKey: [ ] + tags: + - Payments + summary: Refund a payment + operationId: refundAPayment + description: | + Refunds a payment if supported by the payment method. + + For card payments, refund requests are processed asynchronously. You can use [webhooks](#tag/Webhooks) to be notified if the refund is successful. + parameters: + - $ref: '#/components/parameters/ckoIdempotencyKey' + - in: path + name: id + schema: + type: string + pattern: "^(pay)_(\\w{26})$" + required: true + description: The payment identifier + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RefundRequest' + responses: + '202': + description: Refund accepted + content: + application/json: + schema: + $ref: '#/components/schemas/RefundAcceptedResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '403': + description: Refund not allowed + '404': + description: Payment not found + '502': + description: Bad gateway diff --git a/abc_spec/paths/payments@{id}@voids.yaml b/abc_spec/paths/payments@{id}@voids.yaml new file mode 100644 index 000000000..59504747c --- /dev/null +++ b/abc_spec/paths/payments@{id}@voids.yaml @@ -0,0 +1,51 @@ +post: + security: + - ApiSecretKey: [ ] + tags: + - Payments + summary: Void a payment + operationId: voidAPayment + description: | + Voids a payment if supported by the payment method. + + For card payments, void requests are processed asynchronously. You can use [webhooks](#tag/Webhooks) to be notified if the void is successful. + parameters: + - $ref: '#/components/parameters/ckoIdempotencyKey' + - in: path + name: id + schema: + type: string + pattern: "^(pay)_(\\w{26})$" + required: true + description: The payment identifier + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VoidRequest' + responses: + '202': + description: Void accepted + content: + application/json: + schema: + $ref: '#/components/schemas/VoidAcceptedResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '403': + description: Void not allowed + '404': + description: Payment not found + '502': + description: Bad gateway diff --git a/abc_spec/paths/reporting@payments.yaml b/abc_spec/paths/reporting@payments.yaml new file mode 100644 index 000000000..a48f336fe --- /dev/null +++ b/abc_spec/paths/reporting@payments.yaml @@ -0,0 +1,61 @@ +get: + security: + - ApiSecretKey: [ ] + tags: + - Reconciliation + summary: Get JSON payments report + operationId: getJsonPaymentsReport + description: Returns a JSON report containing all payments within your specified parameters. + You can reconcile the data from this report against your statements (which can be found in the Hub), the list of payments in the Hub (using the `Reference` field) or your own systems. + *Note:* no payments from before 7 February 2019 at 00.00.00 UTC will appear when using the payments endpoint. To view earlier payments, please contact our support team. + + parameters: + - in: query + name: from + schema: + type: string + format: date-time + required: false + description: Date and time from which to search for payments + - in: query + name: to + schema: + type: string + format: date-time + required: false + description: Date and time until which to search for payments + - in: query + name: reference + schema: + type: string + required: false + description: Reference of a specific payment to search for + - in: query + name: limit + schema: + type: integer + maximum: 500 + default: 200 + required: false + description: Sets a limit on the number of results + + responses: + '200': + description: Payments report retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentsReportResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '502': + description: Bad gateway diff --git a/abc_spec/paths/reporting@payments@download.yaml b/abc_spec/paths/reporting@payments@download.yaml new file mode 100644 index 000000000..06bafa83c --- /dev/null +++ b/abc_spec/paths/reporting@payments@download.yaml @@ -0,0 +1,28 @@ +get: + security: + - ApiSecretKey: [ ] + tags: + - Reconciliation + summary: Get CSV payments report + responses: + '200': + description: CSV downloaded successfully + operationId: getCsvPaymentsReport + description: + In addition to the JSON format returned by the `reporting/payments` endpoint, you can also download a CSV report containing the same data. + Learn more about how to read your CSV report. + parameters: + - in: query + name: from + schema: + type: string + format: date-time + required: false + description: Date and time from which to search for payments + - in: query + name: to + schema: + type: string + format: date-time + required: false + description: Date and time until which to search for payments diff --git a/abc_spec/paths/reporting@payments@{paymentId}.yaml b/abc_spec/paths/reporting@payments@{paymentId}.yaml new file mode 100644 index 000000000..5cc3af013 --- /dev/null +++ b/abc_spec/paths/reporting@payments@{paymentId}.yaml @@ -0,0 +1,40 @@ +get: + security: + - ApiSecretKey: [ ] + tags: + - Reconciliation + summary: Get JSON single payment report + operationId: getJsonSinglePaymentReport + description: + Returns a JSON payment report containing all of the data related to a specific payment, based on the payment's identifier. + *Note:* no payments from before 7 February 2019 at 00.00.00 UTC will appear when using the payments endpoint. To view earlier payments, please contact our support team. + + parameters: + - in: path + name: paymentId + schema: + type: string + pattern: "^(pay)_(\\w{26})$" + required: true + description: The unique payment identifier + + responses: + '200': + description: Payment report returned successfully + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentsReportResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '502': + description: Bad gateway diff --git a/abc_spec/paths/reporting@statements.yaml b/abc_spec/paths/reporting@statements.yaml new file mode 100644 index 000000000..2f4a0a022 --- /dev/null +++ b/abc_spec/paths/reporting@statements.yaml @@ -0,0 +1,45 @@ +get: + security: + - ApiSecretKey: [ ] + tags: + - Reconciliation + summary: Get JSON statements report + operationId: getJsonStatementsReport + description: Returns a JSON report containing all statements within your specified parameters. Please note that the timezone for the request will be UTC. + + parameters: + - in: query + name: from + schema: + type: string + format: date-time + required: false + description: Date and time from which to search for statements + - in: query + name: to + schema: + type: string + format: date-time + required: false + description: Date and time until which to search for statements + + responses: + '200': + description: Statements report successfully retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/StatementsReportResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '502': + description: Bad gateway diff --git a/abc_spec/paths/reporting@statements@download.yaml b/abc_spec/paths/reporting@statements@download.yaml new file mode 100644 index 000000000..b519dd84e --- /dev/null +++ b/abc_spec/paths/reporting@statements@download.yaml @@ -0,0 +1,11 @@ +get: + security: + - ApiSecretKey: [ ] + tags: + - Reconciliation + responses: + '200': + description: CSV downloaded successfully + summary: Get CSV statements report + operationId: getCsvStatementsReport + description: In addition to the JSON format returned by the `reporting/statements` endpoint, you can also download a CSV report containing the same data. diff --git a/abc_spec/paths/reporting@statements@{StatementId}@payments@download.yaml b/abc_spec/paths/reporting@statements@{StatementId}@payments@download.yaml new file mode 100644 index 000000000..cae9c0091 --- /dev/null +++ b/abc_spec/paths/reporting@statements@{StatementId}@payments@download.yaml @@ -0,0 +1,19 @@ +get: + security: + - ApiSecretKey: [ ] + tags: + - Reconciliation + summary: Get CSV single statement report + operationId: GetCsvSingleStatementReport + description: Downloads a CSV statement report containing all of the data related to a specific statement, based on the statement's identifier. + responses: + '200': + description: CSV downloaded successfully + parameters: + - in: path + name: StatementId + example: '190110B107654' + schema: + type: string + required: true + description: The unique statement identifier diff --git a/abc_spec/paths/sources.yaml b/abc_spec/paths/sources.yaml new file mode 100644 index 000000000..3744e7a23 --- /dev/null +++ b/abc_spec/paths/sources.yaml @@ -0,0 +1,38 @@ +post: + security: + - ApiSecretKey: [] + tags: + - Sources + summary: Add a payment source + operationId: addAPaymentSource + description: | + Add a reusable payment source, like a SEPA Direct Debit, that you can later use to make one or more payments. + Payment sources are linked to a specific customer and cannot be shared between customers. + + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SourceRequest' + responses: + '201': + description: Payment source added successfully + content: + application/json: + schema: + $ref: '#/components/schemas/AddSourceResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '502': + description: Bad gateway diff --git a/abc_spec/paths/tokens.yaml b/abc_spec/paths/tokens.yaml new file mode 100644 index 000000000..75b655d87 --- /dev/null +++ b/abc_spec/paths/tokens.yaml @@ -0,0 +1,38 @@ +post: + security: + - ApiPublicKey: [ ] + tags: + - Tokens + summary: Request a token + operationId: requestAToken + description: | + Exchange a digital wallet payment token or card details for a reference token that can be used later to request a card payment. Tokens are single use and expire after 15 minutes. + To create a token, please authenticate using your public key. + + **Please note:** You should only use the `card` type for testing purposes. + + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TokenRequest' + responses: + '201': + description: Reference token created successfully + content: + application/json: + schema: + $ref: '#/components/schemas/TokenResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' diff --git a/abc_spec/paths/webhooks.yaml b/abc_spec/paths/webhooks.yaml new file mode 100644 index 000000000..91085a928 --- /dev/null +++ b/abc_spec/paths/webhooks.yaml @@ -0,0 +1,65 @@ +get: + security: + - ApiSecretKey: [ ] + tags: + - Webhooks + summary: Retrieve webhooks + operationId: retrieveWebhooks + description: | + Retrieves the webhooks configured for the channel identified by your API key + parameters: [ ] + responses: + '200': + description: Configured webhooks + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Webhook' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '204': + description: No webhooks configured + '401': + description: Unauthorized + +post: + security: + - ApiSecretKey: [ ] + tags: + - Webhooks + summary: Register webhook + operationId: registerWebhook + description: | + Register a new webhook endpoint that Checkout.com will post all or selected events to + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookRequest' + responses: + '201': + description: Webhook registered successfully + content: + application/json: + schema: + $ref: '#/components/schemas/Webhook' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '409': + description: URL already registered for another webhook diff --git a/abc_spec/paths/webhooks@{id}.yaml b/abc_spec/paths/webhooks@{id}.yaml new file mode 100644 index 000000000..ce054b376 --- /dev/null +++ b/abc_spec/paths/webhooks@{id}.yaml @@ -0,0 +1,152 @@ +get: + security: + - ApiSecretKey: [ ] + tags: + - Webhooks + summary: Retrieve webhook + operationId: retrieveWebhook + description: | + Retrieves the webhook with the specified identifier string + parameters: + - name: id + required: true + schema: + type: string + pattern: "^(wh)_(\\w{32})$" + in: path + description: | + The webhook identifier + example: 'wh_387ac7a83a054e37ae140105429d76b5' + responses: + '200': + description: Webhook was retrieved successfully + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/WebhookRequest' + required: + - url + '401': + description: Unauthorized + '404': + description: Webhook not found + +put: + security: + - ApiSecretKey: [ ] + tags: + - Webhooks + summary: Update webhook + operationId: updateWebhook + description: | + Updates an existing webhook + parameters: + - name: id + required: true + schema: + type: string + pattern: "^(wh)_(\\w{32})$" + in: path + description: | + The webhook identifier + example: 'wh_387ac7a83a054e37ae140105429d76b5' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookRequestPut' + responses: + '200': + description: Updated webhook + content: + application/json: + schema: + $ref: '#/components/schemas/Webhook' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '404': + description: Webhook not found + '409': + description: URL already registered for another webhook + +patch: + security: + - ApiSecretKey: [ ] + tags: + - Webhooks + summary: Partially update webhook + operationId: partiallyUpdateWebhook + description: Updates all or some of the registered webhook details + parameters: + - name: id + required: true + schema: + type: string + pattern: "^(wh)_(\\w{32})$" + in: path + description: | + The webhook identifier + example: 'wh_387ac7a83a054e37ae140105429d76b5' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookRequestPatch' + responses: + '200': + description: Updated webhook + content: + application/json: + schema: + $ref: '#/components/schemas/Webhook' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '404': + description: Webhook not found + '409': + description: URL already exists in another webhook configuration + +delete: + security: + - ApiSecretKey: [ ] + tags: + - Webhooks + summary: Remove webhook + operationId: removeWebhook + description: Removes an existing webhook + parameters: + - name: id + required: true + schema: + type: string + pattern: "^(wh)_(\\w{32})$" + in: path + description: | + The webhook identifier + example: 'wh_387ac7a83a054e37ae140105429d76b5' + responses: + '200': + description: Webhook removed successfully + '401': + description: Unauthorized + '404': + description: Webhook not found diff --git a/abc_spec/swagger.yaml b/abc_spec/swagger.yaml new file mode 100644 index 000000000..bbb392636 --- /dev/null +++ b/abc_spec/swagger.yaml @@ -0,0 +1,101 @@ +openapi: '3.0.1' +info: + title: Checkout.com API Reference + x-logo: + url: 'https://assets.checkout.com/docs/logos/logo-checkout-api-dark.svg' + altText: 'Checkout.com API logo' + contact: + name: Checkout.com Support + url: 'https://checkout.com' + email: support@checkout.com + license: + name: Checkout.com + url: 'https://checkout.com/api/license/' + termsOfService: 'https://checkout.com/terms/' + description: > + ## Get started + + Checkout.com provides a collection of APIs that enable you to process and manage payments. Our APIs accept and return JSON in the HTTP body, and return standard HTTP response codes. + + You can consume the APIs directly using your favorite HTTP/REST library or make use of one of our SDKs. + + We have a testing environment called sandbox, which you can sign up for to test API calls without affecting live data. + + ### Base URLs + + Use the following base URLs when making requests to the APIs: + + | Environment | Base URL | + |---------------|------------------------------------------------------| + | Sandbox | https://api.sandbox.checkout.com/ | + | Production | https://api.checkout.com/ | + + ### Looking for more guidance? + + Depending on what integration you need, we've provided guides to get you set up. + + ### Not using APIs? + + We've partnered with many popular e-commerce platforms so you can get up and running quickly, processing online payments with one of our e-commerce plugins. + + # Authentication + + When you sign up for an account, you are given a secret and public API key + pair. You authenticate with our API by providing the appropriate key in + the request Authorization header. + + Never share your secret keys. Keep them guarded and secure. + + + +servers: + - url: https://api.sandbox.checkout.com + description: Sandbox API + - url: https://api.checkout.com + description: Live API +tags: + - name: Payments + description: Process and manage payments from a variety of sources and to various destinations all within one integration. + - name: Payment Links + description: Create a Payment Link to accept and process payment details. + - name: Hosted Payments Page + description: Create a Hosted Payments Page to accept and process payment details. + - name: Sources + description: Create a payment source for a customer that you can use for one or more payments. + - name: Tokens + description: Create a token that represents a card's details (or their tokenized form in a digital wallet) that you can later use to request a payment, without you having to process or store any sensitive information. + - name: Instruments + description: Create a payment instrument that you can later use as the source or destination for one or more payments. + - name: Webhooks + description: Create and manage the webhook notifications you receive to keep up to date with the status of your transactions. + - name: Events + description: Use events to monitor and get insights into your transactions. + - name: Disputes + description: Keep track of and act on your open disputes (also known as chargebacks) to submit the best possible response. + - name: Reconciliation + description: Quickly find all fees associated with each of your payments, so you can concentrate on the important stuff while streamlining your financial reporting. + # - name: Files + # description: | + # Upload files to be used as input to other APIs +x-tagGroups: + - name: Handle payments and payouts + tags: + - Payments + - Payment Links + - Hosted Payments Page + - name: Stored payment details + tags: + - Tokens + - Sources + - Instruments + - Customers + - name: Notifications + tags: + - Events + - Webhooks + - name: Disputes + tags: + - Disputes + - name: Statements and reporting + tags: + - Reconciliation diff --git a/gulpfile.js b/gulpfile.js index 5ddb1d034..3e3809e4b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,50 +1,72 @@ -var gulp = require('gulp'); -var util = require('gulp-util') -var gulpConnect = require('gulp-connect'); var connect = require('connect'); var cors = require('cors'); -var path = require('path'); -var exec = require('child_process').exec; +var { existsSync, mkdirSync } = require('fs'); +const gulp = require('gulp'); +var { watch } = require('gulp'); +var gulpConnect = require('gulp-connect'); +var exec = require('gulp-exec'); +var util = require('gulp-util'); var portfinder = require('portfinder'); var swaggerRepo = require('swagger-repo'); var DIST_DIR = 'web_deploy'; -gulp.task('serve', ['build', 'watch', 'edit'], function() { - portfinder.getPort({port: 3000}, function (err, port) { - gulpConnect.server({ - root: [DIST_DIR], - livereload: true, - port: port, - middleware: function (gulpConnect, opt) { - return [ - cors() - ] - } - }); - }); -}); +if (!existsSync(DIST_DIR)) { + mkdirSync(DIST_DIR); +} -gulp.task('edit', function() { - portfinder.getPort({port: 5000}, function (err, port) { - var app = connect(); - app.use(swaggerRepo.swaggerEditorMiddleware()); - app.listen(port); - util.log(util.colors.green('swagger-editor started http://localhost:' + port)); - }); -}); +gulp.task('build', () => gulp.src(DIST_DIR).pipe(exec('npm run build:all'))); + +gulp.task( + 'reload', + gulp.series('build', () => gulp.src(DIST_DIR).pipe(gulpConnect.reload())) +); -gulp.task('build', function (cb) { - exec('npm run build', function (err, stdout, stderr) { - console.log(stderr); - cb(err); - }); +gulp.task('watch', (cb) => { + watch('abc_spec/**/*', gulp.series('reload')); + watch('nas_spec/**/*', gulp.series('reload')); + watch('web/**/*', gulp.series('reload')); + cb(); }); -gulp.task('reload', ['build'], function () { - gulp.src(DIST_DIR).pipe(gulpConnect.reload()) +gulp.task('edit', () => { + return portfinder + .getPortPromise({ port: 5000 }) + .then((port) => { + var app = connect(); + app.use(swaggerRepo.swaggerEditorMiddleware()); + app.listen(port); + util.log(util.colors.green('swagger-editor started http://localhost:' + port)); + }) + .catch((err) => { + // Could not get a free port, `err` contains the reason. + console.log(err); + }); }); -gulp.task('watch', function () { - gulp.watch(['spec/**/*', 'web/**/*'], ['reload']); +gulp.task('start_site', (cb) => { + return portfinder + .getPortPromise({ port: 3001 }) + .then((port) => { + // `port` is guaranteed to be a free port in this scope. + gulpConnect.server( + { + root: [DIST_DIR], + livereload: true, + port: port, + middleware: (_, __) => { + return [cors()]; + }, + }, + function () { + this.server.on('close', cb); + } + ); + }) + .catch((err) => { + // Could not get a free port, `err` contains the reason. + console.log(err); + }); }); + +gulp.task('serve', gulp.series('build', gulp.parallel('watch', 'edit', 'start_site'))); diff --git a/nas_spec/README.md b/nas_spec/README.md new file mode 100644 index 000000000..4170ed190 --- /dev/null +++ b/nas_spec/README.md @@ -0,0 +1,25 @@ +## Global headers + +In order to minimize duplications you can use `headers` global object (similar to `definitions`, `responses`). +During build process all references to global `headers` will be inlined and `headers` will be removed form resulting spec so spec will be valid (global `headers` is not allowed by Swagger spec): + +Example: + +```yaml +--- +headers: + Rate-Limit-Limit: + description: The number of allowed requests in the current period + type: integer +--- +paths: + /api-keys: + get: + summary: Retrieve a list of api keys + responses: + 200: + description: A list of api keys was retrieved successfully + headers: + Rate-Limit-Limit: + $ref: '#/components/schemas/Rate-Limit-Limit' +``` diff --git a/nas_spec/changelog.md b/nas_spec/changelog.md new file mode 100644 index 000000000..3360fc0ba --- /dev/null +++ b/nas_spec/changelog.md @@ -0,0 +1,175 @@ +# Changelog + +| Date | Description of change | +|------------|-------------------------------------------------------------------------------------------------------------------------| +| 2023/07/06 | Added the available `product_type` options for Tamara payment method | +| 2023/07/10 | Remove `Beta` tag from Financial Actions API | +| 2023/07/05 | Remove deprecated `instruments` endpoint from Platforms API | +| 2023/07/04 | Add `currency` property to `TransferSource` | +| 2023/07/03 | Add `holding_currencies` property to sub-entity onboarding profile | +| 2023/07/03 | Updated `processing-channel` type to `processing_channel` in Add/Update Workflow Condition | +| 2023/06/28 | Added `InitialTransaction` to `SessionRequest` | +| 2023/06/28 | Added new `MerchantInitiated` channel type and new object `InitialTransaction` | +| 2023/06/28 | Added `account_holder` object to Giropay payment create request and get payment response | +| 2023/06/26 | Added `optimization` object to Authentication request and responses | +| 2023/06/21 | Added new card testing endpoint to simulate refunds for Issuing | +| 2023/06/14 | Added new props in `CardholderAccountInfo` and `MerchantRiskInfo`, and new object `ThreeDsRequestorAuthenticationInfo` | +| 2023/06/05 | Added LocalBillingDescriptor to NAS spec | +| 2023/05/31 | Removed Forex Quotes endpoint | +| 2023/05/23 | Added new card testing endpoint to simulate clearing for Issuing | +| 2023/05/17 | Added new card testing endpoints to simulate pre/incremental authorizations and reversals for Issuing | +| 2023/05/16 | Updated `sender.reference` minimum length for Card Payouts | +| 2023/05/09 | Add `local_schemes` to response source and deprecate `scheme_local` | +| 2023/04/21 | Remove `giropay` from Hosted Payments and Payment Links | +| 2023/04/13 | Add `authentication_status_reason` to `3ds` object in the GET payment details response | +| 2023/04/04 | Update conflict response for onboard sub entity operation to include ID | +| 2023/04/03 | Updated `payment_ip` to support IPv6 addresses | +| 2023/03/28 | Increased NAS `recipient.account_number` max length from 10 to 34 | +| 2023/04/03 | Added `if-match` header to `PlatformsPaymentInstrumentUpdate` for Integrated Platforms | +| 2023/04/02 | Added `card_token` object to `PlatformsPaymentInstrument` for Integrated Platforms | +| 2023/03/30 | Updated Bank Payouts docs hyperlink | +| 2023/03/23 | Remove `marketplace` from Hosted Payments and Payment Links | +| 2023/03/22 | Adds API documentation for card issuing | +| 2023/03/21 | Modified `Standalone` API path to correctly point to `sessions` for backward compatible reasons | +| 2023/03/15 | Modified the description for `purchase_country` in Request/Capture/GET payment | +| 2023/03/08 | Added `Go` code samples for both ABC and NAS | +| 2023/03/08 | Updated `trusted_beneficiary` in `Standalone` with a better description. | +| 2023/03/08 | Added `customer_ip` to `Standalone` response | +| 2023/03/08 | Added `javascript_enabled` to `Standalone` requests | +| 2023/03/08 | Renamed `Sessions` to `Standalone`, moving it under the new `Authentication` group. | +| 2023/02/22 | Added `3ds.exemption` and `3ds.allow_upgrade` to Hosted Payments Page and Payment Links. | +| 2023/02/16 | Updated `PlatformsFileRetrieveResponse` and tidied up platforms-files paths | +| 2023/02/16 | Updated `PaymentRequest`, `Address`. Removed unused properties in `PaymentRequestGiropaySource`. | +| 2023/02/15 | Added `exemption_applied` to 3DS details in GET response | +| 2023/02/14 | Updated `PaymentRequestProcessingSettings` to add `line_of_business` field to the NAS payment request | +| 2023/02/13 | Update `ProcessingData` to add `aft`, `merchant_category_code`, `scheme_merchant_id` properties in `GetPaymentResponse` | +| 2023/02/10 | Added `amount_allocations` object to Refund Request details | +| 2023/02/10 | Added `resolved_reason` to get all disputes response for NAS and MBC. | +| 2023/02/10 | Updated `zip` format requirements to display as code style | +| 2023/02/09 | Updated `zip` code format requirements for US merchants for Card Payouts | +| 2023/02/07 | Added Portuguese and Greek locale options to Hosted Payments Page and Payment Links | +| 2023/02/01 | Update file uploads/retrievals for Platforms | +| 2023/02/01 | Added the API reference for the Financial Actions API. | +| 2023/01/26 | Add SEPA DD NAS Request and Response sources | +| 2022/01/25 | Add new sections for adding/deleting workflow actions and workflow conditions. | +| 2023/01/25 | Added `Unscheduled` payment_type to payment request | +| 2023/01/24 | Update PaymentResponse `processing` object to add `partner_payment_id`, `partner_status`, `partner_transaction_id`, | +| | `partner_error_codes`, `partner_error_message`, `partner_authorization_code`, `partner_authorization_response_code` | +| | properties. | +| 2023/01/24 | Update ProcessingData to add `retrieval_reference_number`, `partner_status`, `partner_transaction_id`, | +| | `partner_authorization_code`, `partner_authorization_response_code` properties. | +| 2023/01/18 | Renamed partner_reason to partner_error_message for Reverse API payment methods | +| 2023/01/16 | Replaced the deprecated "reporting" scope with the new "reports" scope in Reports API. | +| 2023/01/12 | Accuracy and readability improvements to NAS card payouts. | +| 2023/01/11 | Remove old description from the session request's payload. | +| 2023/01/04 | Add new tags to Platforms section and add `id` property on a response for PATCH payment instrument request. | +| 2023/01/04 | Add API key security to remaining Integrated Platforms endpoints. | +| 2023/01/03 | Add Platforms Update Payment Instrument Request spec. | +| 2022/12/20 | Added `first_name` and `address` to `recipient`, deprecated `recipient.zip`, made `sender.address` optional. | +| 2022/12/15 | Change Platforms schedule `by_day` response samples to use arrays. | +| 2022/12/15 | Add CV Connect NAS Request and Response source. | +| 2022/12/15 | Add Trustly NAS Request and Response source. | +| 2022/12/15 | Add Illicado NAS Request and Response source. | +| 2022/12/14 | Add missing `available` property to Accounts Individual and Company responses | +| 2022/12/13 | Remove third-party fields from integrated auth | +| 2022/11/30 | Add API key security to IP endpoints. | +| 2022/11/29 | Adding prism device_session_id to payment request. | +| 2022/11/28 | Updated Issuing API spec to fix descriptions and add new properties | +| 2022/11/15 | Adding a `entity` to BankPayoutRequest source. | +| 2022/11/14 | Changing Card Metadata API request format | +| 2022/11/09 | Removed the `risk` endpoints | +| 2022/11/03 | Added `score` property to the `risk` object on the 201 created payment response and GET details response | +| 2022/11/02 | Fix indentation bug causing 'document' property to not be shown in `PlatformsPaymentInstrumentCreate.yaml` | +| 2022/11/02 | Ensure 'document' property is exposed on all relevant Platforms payment instruments schemas | +| 2022/11/02 | Add `default` property to Platforms payment instrument create examples | +| 2022/11/02 | Fix indentation bug causing 'document' property to not be shown in `PlatformsPaymentInstrumentCreate.yaml` | +| 2022/10/31 | Updated `payment_method` to be mandatory | +| 2022/10/25 | Added Card Metadata API | +| 2022/10/20 | Removed wrong remark about app on Sessions channel data | +| 2022/10/20 | Added the `3ds.allow_upgrade` to payment requests & `3ds.upgrade_reason` to the 202 accepted & GET endpoint responses | +| 2022/10/18 | Add new challenge indicator for authentication: data_share | +| 2022/10/17 | Fixed Card and Token sources in Session to not have store_for_future_use | +| 2022/10/11 | Add Tamara NAS Request and Response source. | +| 2022/09/29 | Added new GET Payments endpoint | +| 2022/09/27 | Adding a `customer` to PaymentRequest as a source. | +| 2022/09/27 | Split ProcessingSettings object into PaymentRequestProcessingSettings and CaptureRequestProcessingSettings | +| 2022/09/22 | Add Integrated Platforms email address field and descriptions for French seller data | +| 2022/09/16 | Corrected one of the Reports API paths. | +| 2022/09/15 | Add Alipay Plus `processing.app_id` field to ProcessingData. | +| 2022/09/13 | Add scheme to session source. | +| 2022/09/12 | Amended address state field to have validation of <= 2 chars rather than <= 3 and fixed text description to match. | +| 2022/09/06 | ADD missing challenge indicator field. | +| 2022/09/06 | Added the `processing.partner_customer_id` field to ProcessingData. | +| 2022/09/05 | ADD Alma NAS Request source. | +| 2022/09/02 | Adding `amount_allocations` object to Payment request, Capture and Payment Details | +| 2022/08/29 | Add One Klarna Nas structure | +| 2022/08/26 | ADD KNET NAS Request and Response source | +| 2022/08/25 | Add P24 NAS Request and Response source. | +| 2022/08/29 | Add Postfinance, Bancontact and Multibanco NAS Request and Response sources | +| 2022/08/26 | ADD KNET NAS Request and Response source | +| 2022/08/25 | Add P24 NAS Request and Response source. | +| 2022/08/23 | Add STC Pay | +| 2022/08/19 | Add Benefit PG specific requirements to `reference` description | +| 2022/08/19 | Added alipay_plus type | +| 2022/08/17 | Added Reports API | +| 2022/08/10 | Add Giropay, EPS Request and Response source. | +| 2022/08/09 | Add Mbway NAS Request and Response source. | +| 2022/08/09 | Add QPay Payment Request & Response source. | +| 2022/08/09 | Add Benefit PG Request and Response sources | +| 2022/08/08 | Fixing document types for platforms | +| 2022/08/05 | Add AfterPay NAS Request and Response source. | +| 2022/08/03 | Add discriminator for 3ds information | +| 2022/08/03 | Add missing `token_format` to Google Pay and Apple Pay token responses. | +| 2022/07/29 | Adding `marketplace` object to capture and other minor fixes to IP space | +| 2022/07/29 | Update Java, C#, PHP & Python code samples to match new SDK Version. | +| 2022/07/20 | Added Alipay Plus's e-wallets supports | +| 2022/07/20 | Adding required fields for Platforms payment instruments and separate `corporate` and `individual` examples | +| 2022/07/20 | Added `knet`, `giropay`, `bancontact`, `eps`, `p24`, and `multibanco` to Hosted Payments and Payment Links. | +| 2022/07/19 | Updated example for Platforms payout schedules from `currency` to `GBP` and `ISO` | +| 2022/07/19 | Update WeChat Pay NAS structure | +| 2022/07/14 | Add Sofort NAS Request and Response source. | +| 2022/07/14 | Add `locale` property to Get Payment Link details response | +| 2022/07/14 | Added `customer`, `description`, `billing descriptor`, `shipping`, and `items` objects to Capture requests | +| 2022/07/13 | Added fields for Level 2 and Level 3 data. | +| 2022/07/13 | Added the `phone` object to `customer` object for payments. | +| 2022/07/13 | Adds fields required EU sellers using the Accounts API | +| 2022/07/13 | Added the `phone` object to `customer` object for payments. | +| 2022/07/11 | Replaced `identification` enum with `identity_verification` for Platform Files purpose | +| 2022/07/06 | Change `by_day` and `by_month_day` within Platform payout schedule to support multiple values. | +| 2022/07/04 | Rename instances of `instalment` to `installment` in Sessions. | +| 2022/05/28 | Add `instalment`, `add_card`, `maintain_card` authentication type in Sessions. | +| 2022/06/27 | Added iDEAL NAS Request and Response Source | +| 2022/05/23 | Update Alipay Plus NAS structure | +| 2022/06/01 | Marketplace API renamed to Accounts API | +| 2022/05/23 | Added Alipay Plus NAS structure | +| 2022/05/19 | Added WeChat Pay NAS structure | +| 2022/05/18 | Added "Get transfer details" | +| 2022/05/11 | Added Arabic locale option to Hosted Payments Page and Payment Links. | +| 2022/05/10 | Added `3ds.challenge_indicator` to Hosted Payments Page and Payment Links. | +| 2022/04/28 | Add recurring authentication type in Sessions. | +| 2022/04/27 | Added Scandinavian locale options to Hosted Payments Page and Payment Links. | +| 2022/04/27 | Added the `challenged` field to the GET payments response schema. | +| 2022/04/20 | Added required idempotency key to Transfers API | +| 2022/04/19 | Update `3ds.exemption` available enums | +| 2022/04/06 | Added `/payout-schedules` endpoint with `GET` and `PUT` methods to the Marketplace API | +| 2022/03/30 | Adds "Get action invocations" endpoint | +| 2022/03/28 | Update PHP code samples | +| 2022/03/25 | Increased max length for `reference` in "Onboard a sub-entity" to 50 characters | +| 2022/03/22 | Added new scheme `cartes_bancaires` to enum `scheme` in Get and Create Sessions Responses | +| 2022/03/22 | Fixed invalid format for `authentication_date` | +| 2022/03/18 | Added Cartes Bancaires changes to Sessions request and response. | +| 2022/03/16 | Adds `document` object to the `company` object in the Marketplace API | +| 2022/03/09 | Added the `provider_token` payment request source type. | +| 2022/03/08 | Change C# samples to suggest the usage of `await` instead of `.Result` | +| 2022/03/02 | Adds Transfers and Balances | +| 2022/02/23 | Adds Hosted Payments Page and Payment Links | +| 2022/02/18 | Added `Increment Payment Authorization` code samples for Java & C# | +| 2022/02/02 | Adds `active` property for workflows | +| 2022/01/26 | Update code samples for Java. | +| 2022/01/25 | Update code samples for C#. | +| 2022/01/19 | Added test a workflow endpoint. | +| 2022/01/13 | Update code samples for Node JS. | +| 2021/11/29 | Increase max length of the NAS `success_url` and `failure_url` fields of the payment request (both from 255 to 1024). | +| 2021/11/11 | Added `3ds.challenge_indicator` to card payment requests. | +| 2021/11/03 | Adds `identification` object under parent `sender` object in payment request. | +| 2021/10/18 | Added the `marketplaces.sub-entities` object to support split payments. | diff --git a/nas_spec/code_samples/C#/accounts@entities/post.cs b/nas_spec/code_samples/C#/accounts@entities/post.cs new file mode 100644 index 000000000..150c9e671 --- /dev/null +++ b/nas_spec/code_samples/C#/accounts@entities/post.cs @@ -0,0 +1,60 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Accounts; +using Checkout.Common; + +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Accounts) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +OnboardEntityRequest request = new OnboardEntityRequest +{ + Reference = "reference", + ContactDetails = new ContactDetails {Phone = new AccountPhone {Number = "2345678910"}}, + Profile = + new Profile + { + Urls = new List {"https://www.superheroexample.com"}, + Mccs = new List {"5311"} + }, + Individual = new Individual + { + FirstName = "FirstName", + LastName = "LastName", + TradingName = "John's Super Hero Masks", + RegisteredAddress = new Address + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + }, + NationalTaxId = "TAX123456", + DateOfBirth = new DateOfBirth {Day = 5, Month = 6, Year = 1995}, + Identification = new Identification {NationalIdNumber = "AB123456C"} + } +}; + +try +{ + OnboardEntityResponse response = await api.AccountsClient().CreateEntity(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/accounts@entities@{id}/get.cs b/nas_spec/code_samples/C#/accounts@entities@{id}/get.cs new file mode 100644 index 000000000..5fb1921b6 --- /dev/null +++ b/nas_spec/code_samples/C#/accounts@entities@{id}/get.cs @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Accounts; + +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Accounts) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + OnboardEntityDetailsResponse response = await api.AccountsClient().GetEntity("entity_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/accounts@entities@{id}/put.cs b/nas_spec/code_samples/C#/accounts@entities@{id}/put.cs new file mode 100644 index 000000000..352f85471 --- /dev/null +++ b/nas_spec/code_samples/C#/accounts@entities@{id}/put.cs @@ -0,0 +1,60 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Accounts; +using Checkout.Common; + +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Accounts) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +OnboardEntityRequest request = new OnboardEntityRequest +{ + Reference = "reference", + ContactDetails = new ContactDetails {Phone = new AccountPhone {Number = "2345678910"}}, + Profile = + new Profile + { + Urls = new List {"https://www.superheroexample.com"}, + Mccs = new List {"5311"} + }, + Individual = new Individual + { + FirstName = "FirstName", + LastName = "LastName", + TradingName = "John's Super Hero Masks", + RegisteredAddress = new Address + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + }, + NationalTaxId = "TAX123456", + DateOfBirth = new DateOfBirth {Day = 5, Month = 6, Year = 1995}, + Identification = new Identification {NationalIdNumber = "AB123456C"} + } +}; + +try +{ + OnboardEntityResponse response = await api.AccountsClient().UpdateEntity("entity_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/accounts@entities@{id}@instruments/post.cs b/nas_spec/code_samples/C#/accounts@entities@{id}@instruments/post.cs new file mode 100644 index 000000000..881b44a2e --- /dev/null +++ b/nas_spec/code_samples/C#/accounts@entities@{id}@instruments/post.cs @@ -0,0 +1,57 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Accounts; +using Checkout.Common; + +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Accounts) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +AccountsPaymentInstrument request = new AccountsPaymentInstrument +{ + Label = "Peter's Personal Account", + AccountNumber = "12345678", + BankCode = "050389", + Currency = Currency.GBP, + Country = CountryCode.GB, + AccountHolder = new AccountsAccountHolder + { + FirstName = "FirstName", + LastName = "LastName", + BillingAddress = new Address + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + } + }, + Document = new InstrumentDocument + { + Type = "bank_statement", FileId = "file_wxglze3wwywujg4nna5fb7ldli" + } +}; + +try +{ + await api.AccountsClient().CreatePaymentInstrument("entity_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/accounts@entities@{id}@payout-schedules/get.cs b/nas_spec/code_samples/C#/accounts@entities@{id}@payout-schedules/get.cs new file mode 100644 index 000000000..3277f45bc --- /dev/null +++ b/nas_spec/code_samples/C#/accounts@entities@{id}@payout-schedules/get.cs @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Accounts.Payout.Response; + +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Accounts) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + GetScheduleResponse response = await api.AccountsClient().RetrievePayoutSchedule("entity_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/accounts@entities@{id}@payout-schedules/put.cs b/nas_spec/code_samples/C#/accounts@entities@{id}@payout-schedules/put.cs new file mode 100644 index 000000000..9cf98cefb --- /dev/null +++ b/nas_spec/code_samples/C#/accounts@entities@{id}@payout-schedules/put.cs @@ -0,0 +1,39 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Accounts.Payout; +using Checkout.Accounts.Payout.Request; +using Checkout.Common; + +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Accounts) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +UpdateScheduleRequest scheduleRequest = new UpdateScheduleRequest +{ + Enabled = true, + Threshold = 1000, + Recurrence = + new ScheduleFrequencyWeeklyRequest {ByDay = new[] {DaySchedule.Sunday, DaySchedule.Monday}} +}; + +try +{ + EmptyResponse emptyResponse = await api.AccountsClient().UpdatePayoutSchedule("entity_id", Currency.USD, scheduleRequest); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/balances@{id}/get.cs b/nas_spec/code_samples/C#/balances@{id}/get.cs new file mode 100644 index 000000000..be374c80f --- /dev/null +++ b/nas_spec/code_samples/C#/balances@{id}/get.cs @@ -0,0 +1,34 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Balances; +using Checkout.Common; + +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Balances) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + + +BalancesQuery query = new BalancesQuery {Query = "currency:" + Currency.GBP}; + +try +{ + BalancesResponse balances = await api.BalancesClient() + .RetrieveEntityBalances("entitiy_id", query); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/connect@token/post.cs b/nas_spec/code_samples/C#/connect@token/post.cs new file mode 100644 index 000000000..964e4f675 --- /dev/null +++ b/nas_spec/code_samples/C#/connect@token/post.cs @@ -0,0 +1,25 @@ +// Please refer to https://github.com/checkout/checkout-sdk-net on how to setup the SDK with OAuth +try +{ + ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Vault) // more scopes available + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/customers/post.cs b/nas_spec/code_samples/C#/customers/post.cs new file mode 100644 index 000000000..fe6a4b367 --- /dev/null +++ b/nas_spec/code_samples/C#/customers/post.cs @@ -0,0 +1,46 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using CustomerRequest = Checkout.Customers.CustomerRequest; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Vault) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +CustomerRequest request = new CustomerRequest +{ + Email = "email@docs.checkout.com", + Name = "FirstName LastName", + Phone = new Phone {CountryCode = "1", Number = "4155552671"}, + Metadata = new Dictionary() {{"coupon_code", "NY2018"}, {"partner_id", "123989"}} +}; + +try +{ + IdResponse response = await api.CustomersClient().Create(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/customers@{identifier}/delete.cs b/nas_spec/code_samples/C#/customers@{identifier}/delete.cs new file mode 100644 index 000000000..5db27c42a --- /dev/null +++ b/nas_spec/code_samples/C#/customers@{identifier}/delete.cs @@ -0,0 +1,36 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Vault) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + EmptyResponse response = await api.CustomersClient().Delete("customer_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/customers@{identifier}/get.cs b/nas_spec/code_samples/C#/customers@{identifier}/get.cs new file mode 100644 index 000000000..11572a633 --- /dev/null +++ b/nas_spec/code_samples/C#/customers@{identifier}/get.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Customers; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Vault) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + CustomerDetailsResponse response = await api.CustomersClient().Get("customer_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/customers@{identifier}/patch.cs b/nas_spec/code_samples/C#/customers@{identifier}/patch.cs new file mode 100644 index 000000000..40924b299 --- /dev/null +++ b/nas_spec/code_samples/C#/customers@{identifier}/patch.cs @@ -0,0 +1,62 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using CustomerRequest = Checkout.Customers.CustomerRequest; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Vault) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +CustomerRequest request = new CustomerRequest +{ + Email = "email@docs.checkout.com", + Name = "FirstName LastName", + Phone = new Phone + { + CountryCode = "1", + Number = "4155552671" + }, + Metadata = new Dictionary() + { + {"coupon_code", "NY2018"}, + {"partner_id", "123989"} + } +}; + +CustomerRequest request = new CustomerRequest +{ + Email = "email@docs.checkout.com", + Name = "FirstName LastName", + Phone = new Phone {CountryCode = "1", Number = "4155552671"}, + Metadata = new Dictionary() {{"coupon_code", "NY2018"}, {"partner_id", "123989"}} +}; + +try +{ + await api.CustomersClient().Update("customer_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/disputes/get.cs b/nas_spec/code_samples/C#/disputes/get.cs new file mode 100644 index 000000000..83d01cd32 --- /dev/null +++ b/nas_spec/code_samples/C#/disputes/get.cs @@ -0,0 +1,43 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Disputes; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Disputes) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +DisputesQueryFilter request = new DisputesQueryFilter +{ + Limit = 250, + To = DateTime.Now, +}; + +try +{ + DisputesQueryResponse response = await api.DisputesClient().Query(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/disputes@{dispute_id}/get.cs b/nas_spec/code_samples/C#/disputes@{dispute_id}/get.cs new file mode 100644 index 000000000..e510a7add --- /dev/null +++ b/nas_spec/code_samples/C#/disputes@{dispute_id}/get.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Disputes; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Disputes) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + DisputeDetailsResponse response = await api.DisputesClient().GetDisputeDetails("disputes_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/disputes@{dispute_id}@accept/post.cs b/nas_spec/code_samples/C#/disputes@{dispute_id}@accept/post.cs new file mode 100644 index 000000000..7f5059cb2 --- /dev/null +++ b/nas_spec/code_samples/C#/disputes@{dispute_id}@accept/post.cs @@ -0,0 +1,36 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Disputes) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + EmptyResponse response = await api.DisputesClient().Accept("disputes_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/disputes@{dispute_id}@evidence/get.cs b/nas_spec/code_samples/C#/disputes@{dispute_id}@evidence/get.cs new file mode 100644 index 000000000..00f2e7d0a --- /dev/null +++ b/nas_spec/code_samples/C#/disputes@{dispute_id}@evidence/get.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Disputes; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Disputes) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + DisputeEvidenceResponse response = await api.DisputesClient().GetEvidence("disputes_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/disputes@{dispute_id}@evidence/post.cs b/nas_spec/code_samples/C#/disputes@{dispute_id}@evidence/post.cs new file mode 100644 index 000000000..1dceac786 --- /dev/null +++ b/nas_spec/code_samples/C#/disputes@{dispute_id}@evidence/post.cs @@ -0,0 +1,36 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Disputes) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + EmptyResponse response = await api.DisputesClient().SubmitEvidence("disputes_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/disputes@{dispute_id}@evidence/put.cs b/nas_spec/code_samples/C#/disputes@{dispute_id}@evidence/put.cs new file mode 100644 index 000000000..f80c1c337 --- /dev/null +++ b/nas_spec/code_samples/C#/disputes@{dispute_id}@evidence/put.cs @@ -0,0 +1,57 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Disputes; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Disputes) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +DisputeEvidenceRequest request = new DisputeEvidenceRequest +{ + ProofOfDeliveryOrServiceFile = "file_xxxxxx", + ProofOfDeliveryOrServiceText = "proof of delivery or service text", + InvoiceOrReceiptFile = "file_xxxxxx", + InvoiceOrReceiptText = "Copy of the invoice", + CustomerCommunicationFile = "file_xxxxxx", + CustomerCommunicationText = "Copy of an email exchange with the cardholder", + AdditionalEvidenceFile = "file_xxxxxx", + AdditionalEvidenceText = "Scanned document", + InvoiceShowingDistinctTransactionsFile = "file_xxxxxx", + InvoiceShowingDistinctTransactionsText = "Copy of invoice #1244 showing two transactions", + RefundOrCancellationPolicyFile = "file_xxxxxx", + RefundOrCancellationPolicyText = "Copy of the refund policy", + RecurringTransactionAgreementFile = "file_xxxxxx", + RecurringTransactionAgreementText = "Copy of the recurring transaction agreement", + ProofOfDeliveryOrServiceDateFile = "file_xxxxxx", + ProofOfDeliveryOrServiceDateText = "Copy of the customer receipt showing the merchandise was delivered" +}; + +try +{ + EmptyResponse response = await api.DisputesClient().PutEvidence("disputes_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/files/post.cs b/nas_spec/code_samples/C#/files/post.cs new file mode 100644 index 000000000..d20afa5dc --- /dev/null +++ b/nas_spec/code_samples/C#/files/post.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Disputes) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + IdResponse response = await api.DisputesClient().SubmitFile("file_path", "dispute_evidence"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/files@{file_id}/get.cs b/nas_spec/code_samples/C#/files@{file_id}/get.cs new file mode 100644 index 000000000..11ee44755 --- /dev/null +++ b/nas_spec/code_samples/C#/files@{file_id}/get.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Files; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Disputes) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + FileDetailsResponse response = await api.DisputesClient().GetFileDetails("file_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/forex@quotes/post.cs b/nas_spec/code_samples/C#/forex@quotes/post.cs new file mode 100644 index 000000000..140b18568 --- /dev/null +++ b/nas_spec/code_samples/C#/forex@quotes/post.cs @@ -0,0 +1,46 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Forex; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Fx) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +QuoteRequest request = new QuoteRequest +{ + SourceCurrency = Currency.GBP, + SourceAmount = 10, + DestinationCurrency = Currency.USD, + ProcessChannelId = "pc_abcdefghijklmnopqrstuvwxyz" +}; + +try +{ + QuoteResponse response = await api.ForexClient().RequestQuote(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/hosted-payments/post.cs b/nas_spec/code_samples/C#/hosted-payments/post.cs new file mode 100644 index 000000000..02b64b612 --- /dev/null +++ b/nas_spec/code_samples/C#/hosted-payments/post.cs @@ -0,0 +1,87 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Payments; +using Checkout.Payments.Hosted; + +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +HostedPaymentRequest request = new HostedPaymentRequest() +{ + Amount = 10, + Currency = Currency.GBP, + PaymentType = PaymentType.Regular, + PaymentIp = "192.168.0.1", + BillingDescriptor = new BillingDescriptor() {Name = "Name", City = "City"}, + Reference = "reference", + Description = "Payment for Gold Necklace", + Customer = new CustomerRequest() {Email = "email@docs.checkout.com", Name = "FirstName LastName"}, + Shipping = + new ShippingDetails() + { + Address = new Address() + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + }, + Phone = new Phone() {Number = "4155552671", CountryCode = "1"} + }, + Billing = + new BillingInformation() + { + Address = new Address() + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + }, + Phone = new Phone() {Number = "4155552671", CountryCode = "1"} + }, + Recipient = + new PaymentRecipient() + { + DateOfBirth = "1985-05-15", AccountNumber = "5555554444", Zip = "WIT", LastName = "LastName", + }, + Processing = new ProcessingSettings() {Aft = true}, + Products = new List() {new Product() {Name = "Gold Necklace", Quantity = 1, Price = 1000}}, + Risk = new RiskRequest() {Enabled = false}, + SuccessUrl = "https://example.com/payments/success", + CancelUrl = "https://example.com/payments/cancel", + FailureUrl = "https://example.com/payments/failure", + Metadata = new Dictionary(), + Locale = "en-GB", + ThreeDs = new ThreeDsRequest() {Enabled = false, AttemptN3D = false}, + Capture = true, + CaptureOn = new DateTime() +}; + +try +{ + HostedPaymentResponse response = + await api.HostedPaymentsClient().CreateHostedPaymentsPageSession(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/hosted-payments@{id}/get.cs b/nas_spec/code_samples/C#/hosted-payments@{id}/get.cs new file mode 100644 index 000000000..7ed3411a0 --- /dev/null +++ b/nas_spec/code_samples/C#/hosted-payments@{id}/get.cs @@ -0,0 +1,28 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Payments.Hosted; + +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + HostedPaymentDetailsResponse response = await api.HostedPaymentsClient().GetHostedPaymentsPageDetails("hosted_payment_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/instruments/post.cs b/nas_spec/code_samples/C#/instruments/post.cs new file mode 100644 index 000000000..59460c74b --- /dev/null +++ b/nas_spec/code_samples/C#/instruments/post.cs @@ -0,0 +1,65 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Instruments.Create; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Vault) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +CreateTokenInstrumentRequest request = new CreateTokenInstrumentRequest +{ + Token = "tok_asoto22g2fsu7prwomy12sgfsa", + AccountHolder = new AccountHolder() + { + FirstName = "FirstName", + LastName = "LastName", + BillingAddress = new Address() + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + }, + Phone = new Phone() {Number = "4155552671", CountryCode = "1"} + }, + Customer = new CreateCustomerInstrumentRequest() + { + Email = "email@docs.checkout.com", + Name = "FirstName LastName", + Phone = new Phone() {CountryCode = "1", Number = "4155552671"}, + Default = true + } +}; + +try +{ + CreateInstrumentResponse response = await api.InstrumentsClient().Create(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/instruments@{id}/delete.cs b/nas_spec/code_samples/C#/instruments@{id}/delete.cs new file mode 100644 index 000000000..0da48b5c9 --- /dev/null +++ b/nas_spec/code_samples/C#/instruments@{id}/delete.cs @@ -0,0 +1,36 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Vault) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + EmptyResponse response = await api.InstrumentsClient().Delete("instrument_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/instruments@{id}/get.cs b/nas_spec/code_samples/C#/instruments@{id}/get.cs new file mode 100644 index 000000000..6bf897faa --- /dev/null +++ b/nas_spec/code_samples/C#/instruments@{id}/get.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Instruments.Get; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Vault) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + GetInstrumentResponse response = await api.InstrumentsClient().Get("instrument_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/instruments@{id}/patch.cs b/nas_spec/code_samples/C#/instruments@{id}/patch.cs new file mode 100644 index 000000000..bf8a91382 --- /dev/null +++ b/nas_spec/code_samples/C#/instruments@{id}/patch.cs @@ -0,0 +1,61 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Instruments.Update; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Vault) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +UpdateInstrumentRequest request = new UpdateCardInstrumentRequest +{ + ExpiryMonth = 10, + ExpiryYear = 2027, + Name = "FirstName LastName", + AccountHolder = new AccountHolder() + { + FirstName = "FirstName", + LastName = "LastName", + BillingAddress = new Address() + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + }, + Phone = new Phone() {Number = "4155552671", CountryCode = "1"} + }, + Customer = new UpdateCustomerRequest() {Id = "cus_y3oqhf46pyzuxjbcn2giaqnb44", Default = true} +}; + +try +{ + UpdateInstrumentResponse response = await api.InstrumentsClient().Update("instrument_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/payment-links/post.cs b/nas_spec/code_samples/C#/payment-links/post.cs new file mode 100644 index 000000000..150f3ef46 --- /dev/null +++ b/nas_spec/code_samples/C#/payment-links/post.cs @@ -0,0 +1,88 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Payments; +using Checkout.Payments.Links; + +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +PaymentLinkRequest request = new PaymentLinkRequest +{ + Amount = 10, + Currency = Currency.GBP, + PaymentType = PaymentType.Regular, + PaymentIp = "192.168.0.1", + BillingDescriptor = new BillingDescriptor() {Name = "string", City = "string"}, + Reference = "reference", + Description = "Payment for Gold Necklace", + ExpiresIn = 604800, + Customer = new CustomerRequest() {Email = "email@docs.checkout.com", Name = "FirstName LastName"}, + Shipping = + new ShippingDetails() + { + Address = new Address() + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + }, + Phone = new Phone() {Number = "4155552671", CountryCode = "1"} + }, + Billing = + new BillingInformation() + { + Address = new Address() + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + }, + Phone = new Phone() {Number = "4155552671", CountryCode = "1"} + }, + Recipient = + new PaymentRecipient() + { + DateOfBirth = "1985-05-15", + AccountNumber = "5555554444", + Zip = "WIT", + LastName = "LastName", + }, + Processing = new ProcessingSettings() {Aft = true}, + Products = new List() {new Product() {Name = "Gold Necklace", Quantity = 1, Price = 1000}}, + Metadata = new Dictionary(), + ThreeDs = new ThreeDsRequest() {Enabled = false, AttemptN3D = false}, + Risk = new RiskRequest() {Enabled = false}, + ReturnUrl = "https://example.com/payments/success", + Locale = "en-GB", + Capture = true, + CaptureOn = new DateTime() +}; + +try +{ + PaymentLinkResponse response = await api.PaymentLinksClient().Create(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/payment-links@{id}/get.cs b/nas_spec/code_samples/C#/payment-links@{id}/get.cs new file mode 100644 index 000000000..6f8f6d575 --- /dev/null +++ b/nas_spec/code_samples/C#/payment-links@{id}/get.cs @@ -0,0 +1,28 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Payments.Links; + +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + PaymentLinkDetailsResponse response = await api.PaymentLinksClient().Get("payment_link_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/payments/post.cs b/nas_spec/code_samples/C#/payments/post.cs new file mode 100644 index 000000000..5b5a6396f --- /dev/null +++ b/nas_spec/code_samples/C#/payments/post.cs @@ -0,0 +1,95 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Payments; +using Checkout.Payments.Request; +using Checkout.Payments.Request.Source; +using Checkout.Payments.Response; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Gateway) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +PaymentRequest request = new PaymentRequest +{ + Source = new RequestTokenSource {Token = "tok_4gzeau5o2uqubbk6fufs3m7p54"}, + Amount = 10, + Currency = Currency.USD, + PaymentType = PaymentType.Recurring, + Reference = "reference", + Description = "Set of 3 masks", + Capture = true, + CaptureOn = new DateTime(), + Customer = + new CustomerRequest + { + Id = "cus_udst2tfldj6upmye2reztkmm4i", + Email = "email@docs.checkout.com", + Name = "FirstName LastName" + }, + BillingDescriptor = new BillingDescriptor {Name = "SUPERHEROES.COM", City = "GOTHAM"}, + Shipping = + new ShippingDetails + { + Address = new Address + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + }, + Phone = new Phone {Number = "4155552671", CountryCode = "1"} + }, + ThreeDs = + new ThreeDsRequest + { + Enabled = true, + AttemptN3D = true, + Eci = "05", + Cryptogram = "AgAAAAAAAIR8CQrXcIhbQAAAAAA=", + Xid = "MDAwMDAwMDAwMDAwMDAwMzIyNzY=", + Version = "2.0.1" + }, + PreviousPaymentId = "pay_fun26akvvjjerahhctaq2uzhu4", + Risk = new RiskRequest {Enabled = false}, + SuccessUrl = "https://example.com/payments/success", + FailureUrl = "https://example.com/payments/failure", + PaymentIp = "192.168.0.1", + Recipient = new PaymentRecipient + { + DateOfBirth = "1985-05-15", AccountNumber = "5555554444", Zip = "WIT", LastName = "LastName", + }, + Metadata = new Dictionary {{"coupon_code", "NY2018"}, {"partner_id", 123989}} +}; + +try +{ + PaymentResponse response = await api.PaymentsClient().RequestPayment(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/payments@{id}/get.cs b/nas_spec/code_samples/C#/payments@{id}/get.cs new file mode 100644 index 000000000..dc7244389 --- /dev/null +++ b/nas_spec/code_samples/C#/payments@{id}/get.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Payments.Response; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Gateway) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + GetPaymentResponse response = await api.PaymentsClient().GetPaymentDetails("payment_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/payments@{id}@actions/get.cs b/nas_spec/code_samples/C#/payments@{id}@actions/get.cs new file mode 100644 index 000000000..3e90aeb3c --- /dev/null +++ b/nas_spec/code_samples/C#/payments@{id}@actions/get.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Payments; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Gateway) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + ItemsResponse response = await api.PaymentsClient().GetPaymentActions("payment_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/payments@{id}@authorizations/post.cs b/nas_spec/code_samples/C#/payments@{id}@authorizations/post.cs new file mode 100644 index 000000000..ba448006e --- /dev/null +++ b/nas_spec/code_samples/C#/payments@{id}@authorizations/post.cs @@ -0,0 +1,44 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Payments.Request; +using Checkout.Payments.Response; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Gateway) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +AuthorizationRequest authorizationRequest = new AuthorizationRequest +{ + Amount = 100, Reference = "payment_reference" +}; + +try +{ + // Optional: idempotencyKey as a third parameter for idempotent requests + AuthorizationResponse response = await api.PaymentsClient().IncrementPaymentAuthorization("payment_id", authorizationRequest); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} diff --git a/nas_spec/code_samples/C#/payments@{id}@captures/post.cs b/nas_spec/code_samples/C#/payments@{id}@captures/post.cs new file mode 100644 index 000000000..7f1e405b4 --- /dev/null +++ b/nas_spec/code_samples/C#/payments@{id}@captures/post.cs @@ -0,0 +1,44 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Payments; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Gateway) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +CaptureRequest request = new CaptureRequest +{ + Amount = 10, + Reference = "reference", + Metadata = new Dictionary() {{"coupon_code", "NY2018"}, {"partner_id", "123989"}} +}; + +try +{ + CaptureResponse response = await api.PaymentsClient().CapturePayment("payment_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/payments@{id}@refunds/post.cs b/nas_spec/code_samples/C#/payments@{id}@refunds/post.cs new file mode 100644 index 000000000..8462fcec4 --- /dev/null +++ b/nas_spec/code_samples/C#/payments@{id}@refunds/post.cs @@ -0,0 +1,44 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Payments; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Gateway) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +RefundRequest request = new RefundRequest() +{ + Amount = 10, + Reference = "reference", + Metadata = new Dictionary() {{"coupon_code", "NY2018"}, {"partner_id", "123989"}} +}; + +try +{ + RefundResponse response = await api.PaymentsClient().RefundPayment("payment_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/payments@{id}@voids/post.cs b/nas_spec/code_samples/C#/payments@{id}@voids/post.cs new file mode 100644 index 000000000..1c5ac792b --- /dev/null +++ b/nas_spec/code_samples/C#/payments@{id}@voids/post.cs @@ -0,0 +1,43 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Payments; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Gateway) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +VoidRequest request = new VoidRequest +{ + Reference = "reference", + Metadata = new Dictionary {{"coupon_code", "NY2018"}, {"partner_id", "123989"}} +}; + +try +{ + VoidResponse response = await api.PaymentsClient().VoidPayment("payment_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/risk@assessments@pre-authentication/post.cs b/nas_spec/code_samples/C#/risk@assessments@pre-authentication/post.cs new file mode 100644 index 000000000..570650f1a --- /dev/null +++ b/nas_spec/code_samples/C#/risk@assessments@pre-authentication/post.cs @@ -0,0 +1,72 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Risk; +using Checkout.Risk.PreAuthentication; +using Checkout.Risk.source; + +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +PreAuthenticationAssessmentRequest request = new PreAuthenticationAssessmentRequest +{ + Date = DateTime.Now, + Source = new CardSourcePrism(), + Customer = new CustomerRequest {Name = "FirstName LastName", Email = "email@docs.checkout.com",}, + Payment = new RiskPayment {Psp = "Checkout.com", Id = "78453878"}, + Shipping = new RiskShippingDetails + { + Address = new Address + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + } + }, + Reference = "reference", + Description = "Set of 3 masks", + Amount = 10, + Currency = Currency.GBP, + Device = new Device + { + Ip = "90.197.169.245", + Location = new Location {Latitude = "51.5107", Longitude = "0.01313"}, + Os = "ISO", + Type = "Phone", + Model = "IPHone X", + Date = DateTime.Now, + UserAgent = + "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", + Fingerprint = "34304a9e3fg09302" + }, + Metadata = new Dictionary + { + {"VoucherCode", "loyalty_10"}, {"discountApplied", "10"}, {"customer_id", "2190EF321"} + } +}; + +try +{ + PreAuthenticationAssessmentResponse response = + await api.RiskClient().RequestPreAuthenticationRiskScan(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/risk@assessments@pre-capture/post.cs b/nas_spec/code_samples/C#/risk@assessments@pre-capture/post.cs new file mode 100644 index 000000000..c62bbbd47 --- /dev/null +++ b/nas_spec/code_samples/C#/risk@assessments@pre-capture/post.cs @@ -0,0 +1,80 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Risk; +using Checkout.Risk.PreCapture; +using Checkout.Risk.source; + +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +PreCaptureAssessmentRequest request = new PreCaptureAssessmentRequest +{ + AssessmentId = "string", + Date = DateTime.Now, + Source = new CardSourcePrism(), + Customer = new CustomerRequest {Name = "FirstName LastName", Email = "email@docs.checkout.com",}, + Amount = 10, + Currency = Currency.GBP, + Payment = new RiskPayment {Psp = "Checkout.com", Id = "78453878"}, + Shipping = new RiskShippingDetails + { + Address = new Address + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + } + }, + Device = new Device + { + Ip = "90.197.169.245", + Location = new Location {Latitude = "51.5107", Longitude = "0.01313"}, + Os = "ISO", + Type = "Phone", + Model = "IPHone X", + Date = DateTime.Now, + UserAgent = + "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", + Fingerprint = "34304a9e3fg09302" + }, + Metadata = new Dictionary + { + {"VoucherCode", "loyalty_10"}, {"discountApplied", "10"}, {"customer_id", "2190EF321"} + }, + AuthenticationResult = new AuthenticationResult + { + Attempted = true, + Challenged = true, + Succeeded = true, + LiabilityShifted = true, + Method = "3ds", + Version = "2.0" + }, + AuthorizationResult = new AuthorizationResult {AvsCode = "V", CvvResult = "N"} +}; + +try +{ + PreCaptureAssessmentResponse response = await api.RiskClient().RequestPreCaptureRiskScan(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/standalone/post.cs b/nas_spec/code_samples/C#/standalone/post.cs new file mode 100644 index 000000000..5a50a8137 --- /dev/null +++ b/nas_spec/code_samples/C#/standalone/post.cs @@ -0,0 +1,78 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Sessions; +using Checkout.Sessions.Channel; +using Checkout.Sessions.Completion; +using Checkout.Sessions.Source; + +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.SessionsApp, OAuthScope.SessionsBrowser) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +SessionRequest request = new SessionRequest +{ + Source = + new SessionCardSource + { + BillingAddress = new SessionAddress + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + }, + HomePhone = new Phone {Number = "4155552671", CountryCode = "1"}, + MobilePhone = new Phone {Number = "4155552671", CountryCode = "1"}, + WorkPhone = new Phone {Number = "4155552671", CountryCode = "1"} + }, + Amount = 10, + Currency = Currency.USD, + ProcessingChannelId = "pc_5jp2az55l3cuths25t5p3xhwru", + Marketplace = new MarketplaceAuth {SubEntityId = "ent_ocw5i74vowfg2edpy66izhts2u"}, + AuthenticationCategory = Category.Payment, + ChallengeIndicator = ChallengeIndicatorType.ChallengeRequested, + BillingDescriptor = new SessionsBillingDescriptor {Name = "SUPERHEROES.COM"}, + Reference = "reference", + TransactionType = TransactionType.GoodsService, + ShippingAddress = new SessionAddress(), + Completion = new NonHostedCompletionInfo {CallbackUrl = "https://merchant.com/callback"}, + ChannelData = new BrowserSession + { + AcceptHeader = "Accept: *.*, q=0.1", + JavaEnabled = true, + Language = "FR-fr", + ColorDepth = "16", + ScreenHeight = "1080", + ScreenWidth = "1920", + Timezone = "60", + UserAgent = + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36", + ThreeDsMethodCompletion = ThreeDsMethodCompletion.Y, + IpAddress = "1.12.123.255" + } +}; + +try +{ + SessionResponse response = await api.SessionsClient().RequestSession(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/standalone@{id}/get.cs b/nas_spec/code_samples/C#/standalone@{id}/get.cs new file mode 100644 index 000000000..cca25533e --- /dev/null +++ b/nas_spec/code_samples/C#/standalone@{id}/get.cs @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Sessions; + +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.SessionsApp, OAuthScope.SessionsBrowser) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + GetSessionResponse response = await api.SessionsClient().GetSessionDetails("session_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/standalone@{id}@collect-data/put.cs b/nas_spec/code_samples/C#/standalone@{id}@collect-data/put.cs new file mode 100644 index 000000000..914525c81 --- /dev/null +++ b/nas_spec/code_samples/C#/standalone@{id}@collect-data/put.cs @@ -0,0 +1,45 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Sessions; +using Checkout.Sessions.Channel; + +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.SessionsApp, OAuthScope.SessionsBrowser) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +BrowserSession request = new BrowserSession +{ + AcceptHeader = "Accept: *.*, q=0.1", + JavaEnabled = true, + Language = "FR-fr", + ColorDepth = "16", + ScreenWidth = "1920", + ScreenHeight = "1080", + Timezone = "60", + UserAgent = + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36", + ThreeDsMethodCompletion = ThreeDsMethodCompletion.Y, + IpAddress = "1.12.123.255" +}; + +try +{ + GetSessionResponse response = await api.SessionsClient().UpdateSession("session_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/standalone@{id}@complete/post.cs b/nas_spec/code_samples/C#/standalone@{id}@complete/post.cs new file mode 100644 index 000000000..3767f235d --- /dev/null +++ b/nas_spec/code_samples/C#/standalone@{id}@complete/post.cs @@ -0,0 +1,28 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net + +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.SessionsApp, OAuthScope.SessionsBrowser) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + EmptyResponse response = await api.SessionsClient().CompleteSession("session_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/standalone@{id}@issuer-fingerprint/put.cs b/nas_spec/code_samples/C#/standalone@{id}@issuer-fingerprint/put.cs new file mode 100644 index 000000000..cbdc63fa7 --- /dev/null +++ b/nas_spec/code_samples/C#/standalone@{id}@issuer-fingerprint/put.cs @@ -0,0 +1,36 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Sessions; +using Checkout.Sessions.Channel; + +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.SessionsApp, OAuthScope.SessionsBrowser) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +ThreeDsMethodCompletionRequest request = new ThreeDsMethodCompletionRequest() +{ + ThreeDsMethodCompletion = ThreeDsMethodCompletion.Y +}; + +try +{ + GetSessionResponseAfterChannelDataSupplied response = await api.SessionsClient() + .Update3dsMethodCompletionIndicator("session_secret", "session_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/tokens/post.cs b/nas_spec/code_samples/C#/tokens/post.cs new file mode 100644 index 000000000..e5ab00e98 --- /dev/null +++ b/nas_spec/code_samples/C#/tokens/post.cs @@ -0,0 +1,48 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Tokens; + +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .PublicKey("public_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +CardTokenRequest request = new CardTokenRequest +{ + Number = "4543474002249996", + ExpiryMonth = 10, + ExpiryYear = 2027, + Name = "FirstName LastName", + Cvv = "123", + BillingAddress = new Address() + { + AddressLine1 = "Checkout.com", + AddressLine2 = "90 Tottenham Court Road", + City = "London", + State = "London", + Zip = "W1T 4TJ", + Country = CountryCode.GB + }, + Phone = new Phone() {Number = "4155552671", CountryCode = "1"} +}; + +try +{ + CardTokenResponse response = await api.TokensClient().Request(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/transfers/post.cs b/nas_spec/code_samples/C#/transfers/post.cs new file mode 100644 index 000000000..f8c566a05 --- /dev/null +++ b/nas_spec/code_samples/C#/transfers/post.cs @@ -0,0 +1,38 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Transfers; + +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Transfers) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +CreateTransferRequest createTransferRequest = + new CreateTransferRequest + { + Source = new TransferSourceRequest {Amount = 100, Id = "entity_source_id"}, + Destination = new TransferDestinationRequest {Id = "entity_destination_id"}, + TransferType = TransferType.Commission + }; + +try +{ + CreateTransferResponse createTransferResponse = + await api.TransfersClient().InitiateTransferOfFunds(createTransferRequest); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/transfers@{id}/get.cs b/nas_spec/code_samples/C#/transfers@{id}/get.cs new file mode 100644 index 000000000..c8f1ffc84 --- /dev/null +++ b/nas_spec/code_samples/C#/transfers@{id}/get.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Transfers; + +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Transfers) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +CreateTransferRequest createTransferRequest = + new CreateTransferRequest + { + Source = new TransferSourceRequest {Amount = 100, Id = "entity_source_id"}, + Destination = new TransferDestinationRequest {Id = "entity_destination_id"}, + TransferType = TransferType.Commission + }; + +try +{ + TransferDetailsResponse transferDetailsResponse = await api.TransfersClient().RetrieveATransfer("transfer_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/validation@bank-accounts@{country}@{currency}/get.cs b/nas_spec/code_samples/C#/validation@bank-accounts@{country}@{currency}/get.cs new file mode 100644 index 000000000..feb652ef1 --- /dev/null +++ b/nas_spec/code_samples/C#/validation@bank-accounts@{country}@{currency}/get.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Common; +using Checkout.Instruments.Get; + + +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.PayoutsBankDetails) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +BankAccountFieldQuery request = new BankAccountFieldQuery +{ + AccountHolderType = AccountHolderType.Individual, PaymentNetwork = PaymentNetwork.Local +}; + +try +{ + BankAccountFieldResponse response = await api.InstrumentsClient() + .GetBankAccountFieldFormatting(CountryCode.GB, Currency.GBP, request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/workflows/get.cs b/nas_spec/code_samples/C#/workflows/get.cs new file mode 100644 index 000000000..c73130764 --- /dev/null +++ b/nas_spec/code_samples/C#/workflows/get.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Workflows; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Flow) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + GetWorkflowsResponse response = await api.WorkflowsClient().GetWorkflows(); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/workflows/post.cs b/nas_spec/code_samples/C#/workflows/post.cs new file mode 100644 index 000000000..41c9d4dd0 --- /dev/null +++ b/nas_spec/code_samples/C#/workflows/post.cs @@ -0,0 +1,111 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Workflows; +using Checkout.Workflows.Actions; +using Checkout.Workflows.Actions.Request; +using Checkout.Workflows.Conditions.Request; + + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Flow) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +CreateWorkflowRequest request = new CreateWorkflowRequest +{ + Name = "Webhooks workflow", + Conditions = new List + { + new EventWorkflowConditionRequest + { + Events = new Dictionary> + { + { + "gateway", + new HashSet + { + "payment_approved", + "payment_declined", + "card_verification_declined", + "card_verified", + "payment_authorization_incremented", + "payment_authorization_increment_declined", + "payment_capture_declined", + "payment_captured", + "payment_refund_declined", + "payment_refunded", + "payment_void_declined", + "payment_voided" + } + }, + { + "dispute", + new HashSet + { + "dispute_canceled", + "dispute_evidence_required", + "dispute_expired", + "dispute_lost", + "dispute_resolved", + "dispute_won" + } + } + } + }, + new EntityWorkflowConditionRequest + { + Entities = new List + { + "ent_xyfdshfudosfdshfdiosfds", "ent_fidjosfjdisofdjsifdosfu" + } + }, + new ProcessingChannelWorkflowConditionRequest + { + ProcessingChannels = new List {"pc_axclravnqf5u5ejkweijnp5zc4"} + } + }, + Actions = new List + { + new WebhookWorkflowActionRequest + { + Url = "https://example.com/webhooks", + Headers = new Dictionary + { + {"Authorization", "70ed20ff-ba31-4ea3-b3ef-772f2be1cbdf"} + }, + Signature = new WebhookSignature + { + Method = "HMACSHA256", Key = "8V8x0dLK%AyD*DNS8JJr" + } + } + } +}; + +try +{ + CreateWorkflowResponse response = await api.WorkflowsClient().CreateWorkflow(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/workflows@event-types/get.cs b/nas_spec/code_samples/C#/workflows@event-types/get.cs new file mode 100644 index 000000000..01c2cee13 --- /dev/null +++ b/nas_spec/code_samples/C#/workflows@event-types/get.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Workflows.Events; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Flow) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + ItemsResponse response = await api.WorkflowsClient().GetEventTypes(); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/workflows@events@reflow/post.cs b/nas_spec/code_samples/C#/workflows@events@reflow/post.cs new file mode 100644 index 000000000..844bb3b9f --- /dev/null +++ b/nas_spec/code_samples/C#/workflows@events@reflow/post.cs @@ -0,0 +1,52 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Workflows.Reflows; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Flow) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +ReflowRequest request = new ReflowByEventsRequest() +{ + Events = new List() + { + "evt_lzmo6p0i3612judj754w1ngtil", + "evt_05z6xuagtti48ajyfbuekg6a0a" + }, + Workflows = new List() + { + "wf_sq8jnqi9i749hhb470bu308uk2", + "wf_bz91q7i4ks4sr0kasmas2xhp56" + + } +}; + +try +{ + ReflowResponse response = await api.WorkflowsClient().Reflow(request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/workflows@events@subject@{subjectId}/get.cs b/nas_spec/code_samples/C#/workflows@events@subject@{subjectId}/get.cs new file mode 100644 index 000000000..b68d034a2 --- /dev/null +++ b/nas_spec/code_samples/C#/workflows@events@subject@{subjectId}/get.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Workflows.Events; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Flow) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + SubjectEventsResponse response = await api.WorkflowsClient().GetSubjectEvents("subject_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/workflows@events@subject@{subjectId}@reflow/post.cs b/nas_spec/code_samples/C#/workflows@events@subject@{subjectId}@reflow/post.cs new file mode 100644 index 000000000..85a286b86 --- /dev/null +++ b/nas_spec/code_samples/C#/workflows@events@subject@{subjectId}@reflow/post.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Workflows.Reflows; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Flow) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + ReflowResponse response = await api.WorkflowsClient().ReflowBySubject("subject_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow/post.cs b/nas_spec/code_samples/C#/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow/post.cs new file mode 100644 index 000000000..3deac4143 --- /dev/null +++ b/nas_spec/code_samples/C#/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow/post.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Workflows.Reflows; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Flow) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + ReflowResponse response = await api.WorkflowsClient().ReflowBySubjectAndWorkflow("subject_id", "workflow_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/workflows@events@{eventId}/get.cs b/nas_spec/code_samples/C#/workflows@events@{eventId}/get.cs new file mode 100644 index 000000000..7c3a0468a --- /dev/null +++ b/nas_spec/code_samples/C#/workflows@events@{eventId}/get.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Workflows.Events; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Flow) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + GetEventResponse response = await api.WorkflowsClient().GetEvent("event_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/workflows@events@{eventId}@actions@{workflowActionId}/get.cs b/nas_spec/code_samples/C#/workflows@events@{eventId}@actions@{workflowActionId}/get.cs new file mode 100644 index 000000000..595eead10 --- /dev/null +++ b/nas_spec/code_samples/C#/workflows@events@{eventId}@actions@{workflowActionId}/get.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Workflows.Actions.Response; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Flow) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + WorkflowActionInvocationsResponse response = await api.WorkflowsClient().GetActionInvocations("event_id", "action_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/workflows@events@{eventId}@reflow/post.cs b/nas_spec/code_samples/C#/workflows@events@{eventId}@reflow/post.cs new file mode 100644 index 000000000..43831d582 --- /dev/null +++ b/nas_spec/code_samples/C#/workflows@events@{eventId}@reflow/post.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Workflows.Reflows; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Flow) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + ReflowResponse response = await api.WorkflowsClient().ReflowByEvent("event_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/workflows@events@{eventId}@workflow@{workflowId}@reflow/post.cs b/nas_spec/code_samples/C#/workflows@events@{eventId}@workflow@{workflowId}@reflow/post.cs new file mode 100644 index 000000000..50daaab84 --- /dev/null +++ b/nas_spec/code_samples/C#/workflows@events@{eventId}@workflow@{workflowId}@reflow/post.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Workflows.Reflows; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Flow) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + ReflowResponse response = await api.WorkflowsClient().ReflowByEventAndWorkflow("event_id", "workflow_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/workflows@{workflowId}/delete.cs b/nas_spec/code_samples/C#/workflows@{workflowId}/delete.cs new file mode 100644 index 000000000..377e4a3a1 --- /dev/null +++ b/nas_spec/code_samples/C#/workflows@{workflowId}/delete.cs @@ -0,0 +1,36 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Flow) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + EmptyResponse response = await api.WorkflowsClient().RemoveWorkflow("workflow_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/workflows@{workflowId}/get.cs b/nas_spec/code_samples/C#/workflows@{workflowId}/get.cs new file mode 100644 index 000000000..986676957 --- /dev/null +++ b/nas_spec/code_samples/C#/workflows@{workflowId}/get.cs @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Workflows; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Flow) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +try +{ + GetWorkflowResponse response = await api.WorkflowsClient().GetWorkflow("workflow_id"); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/workflows@{workflowId}/patch.cs b/nas_spec/code_samples/C#/workflows@{workflowId}/patch.cs new file mode 100644 index 000000000..a3ed49f9f --- /dev/null +++ b/nas_spec/code_samples/C#/workflows@{workflowId}/patch.cs @@ -0,0 +1,39 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Workflows; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Flow) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +UpdateWorkflowRequest request = new UpdateWorkflowRequest {Name = "workflow_name"}; + +try +{ + UpdateWorkflowResponse response = await api.WorkflowsClient().UpdateWorkflow("workflow_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/workflows@{workflowId}@actions@{workflowActionId}/put.cs b/nas_spec/code_samples/C#/workflows@{workflowId}@actions@{workflowActionId}/put.cs new file mode 100644 index 000000000..8c5f6e40a --- /dev/null +++ b/nas_spec/code_samples/C#/workflows@{workflowId}@actions@{workflowActionId}/put.cs @@ -0,0 +1,48 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Workflows.Actions; +using Checkout.Workflows.Actions.Request; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Flow) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +WorkflowActionRequest request = new WebhookWorkflowActionRequest +{ + Url = "https://example.com/webhooks/checkout", + Headers = new Dictionary + { + {"Authorization", "70ed20ff-ba31-4ea3-b3ef-772f2be1cbdf"} + }, + Signature = new WebhookSignature {Method = "HMACSHA256", Key = "public-signing-key"} +}; + +try +{ + await api.WorkflowsClient().UpdateWorkflowAction("workflow_id", "action_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/C#/workflows@{workflowId}@conditions@{workflowConditionId}/put.cs b/nas_spec/code_samples/C#/workflows@{workflowId}@conditions@{workflowConditionId}/put.cs new file mode 100644 index 000000000..614d7ea40 --- /dev/null +++ b/nas_spec/code_samples/C#/workflows@{workflowId}@conditions@{workflowConditionId}/put.cs @@ -0,0 +1,39 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-net +using Checkout.Workflows.Conditions.Request; + +//API keys +ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() + .SecretKey("secret_key") + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +//OAuth +ICheckoutApi api = CheckoutSdk.Builder().OAuth() + .ClientCredentials("client_id", "client_secret") + .Scopes(OAuthScope.Flow) + .Environment(Environment.Sandbox) + .HttpClientFactory(new DefaultHttpClientFactory()) + .Build(); + +WorkflowConditionRequest request = new EntityWorkflowConditionRequest(); + +try +{ + EmptyResponse response = await api.WorkflowsClient().UpdateWorkflowCondition("workflow_id", "condition_id", request); +} +catch (CheckoutApiException e) +{ + // API error + string requestId = e.RequestId; + var statusCode = e.HttpStatusCode; + IDictionary errorDetails = e.ErrorDetails; +} +catch (CheckoutArgumentException e) +{ + // Bad arguments +} +catch (CheckoutAuthorizationException e) +{ + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/Go/accounts@entities/post.go b/nas_spec/code_samples/Go/accounts@entities/post.go new file mode 100644 index 000000000..1f93e8583 --- /dev/null +++ b/nas_spec/code_samples/Go/accounts@entities/post.go @@ -0,0 +1,75 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/accounts" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Accounts}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := accounts.OnboardEntityRequest{ + Reference: "reference", + ContactDetails: &accounts.ContactDetails{ + Phone: &accounts.Phone{Number: "4155552671"}, + }, + Profile: &accounts.Profile{ + Urls: []string{"https://docs.checkout.com/1", "https://docs.checkout.com/2"}, + Mccs: []string{"0742"}, + }, + Individual: &accounts.Individual{ + FirstName: "FirstName", + MiddleName: "", + LastName: "LastName", + TradingName: "TradingName", + NationalTaxId: "TAX123456", + RegisteredAddress: &common.Address{ + AddressLine1: "Checkout.com", + AddressLine2: "90 Tottenham Court Road", + City: "London", + State: "London", + Zip: "W1T 4TJ", + Country: common.GB, + }, + DateOfBirth: &accounts.DateOfBirth{ + Day: 5, + Month: 6, + Year: 1990, + }, + Identification: &accounts.Identification{ + NationalIdNumber: "AB123456C", + Document: &accounts.Document{ + Front: "number", + Back: "number", + }, + }, + }, +} + +response, err := api.Accounts.CreateEntity(request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/accounts@entities@{entityId}@payment-instruments@{id}/get.go b/nas_spec/code_samples/Go/accounts@entities@{entityId}@payment-instruments@{id}/get.go new file mode 100644 index 000000000..2e4a8e13d --- /dev/null +++ b/nas_spec/code_samples/Go/accounts@entities@{entityId}@payment-instruments@{id}/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Accounts}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Accounts.RetrievePaymentInstrumentDetails("entity_id", "payment_instrument_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/accounts@entities@{entityId}@payment-instruments@{id}/patch.go b/nas_spec/code_samples/Go/accounts@entities@{entityId}@payment-instruments@{id}/patch.go new file mode 100644 index 000000000..c967010e6 --- /dev/null +++ b/nas_spec/code_samples/Go/accounts@entities@{entityId}@payment-instruments@{id}/patch.go @@ -0,0 +1,41 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/accounts" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Accounts}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := accounts.UpdatePaymentInstrumentRequest{ + Label: "Peter's Personal Account", + Default: true, +} + +response, err := api.Accounts.UpdatePaymentInstrumentDetails("entity_id", "payment_instrument_id", request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/accounts@entities@{id}/get.go b/nas_spec/code_samples/Go/accounts@entities@{id}/get.go new file mode 100644 index 000000000..e9a783170 --- /dev/null +++ b/nas_spec/code_samples/Go/accounts@entities@{id}/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Accounts}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Accounts.GetEntity("entity_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/accounts@entities@{id}/put.go b/nas_spec/code_samples/Go/accounts@entities@{id}/put.go new file mode 100644 index 000000000..b165e246b --- /dev/null +++ b/nas_spec/code_samples/Go/accounts@entities@{id}/put.go @@ -0,0 +1,75 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/accounts" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Accounts}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := accounts.OnboardEntityRequest{ + Reference: "reference", + ContactDetails: &accounts.ContactDetails{ + Phone: &accounts.Phone{Number: "4155552671"}, + }, + Profile: &accounts.Profile{ + Urls: []string{"https://docs.checkout.com/1", "https://docs.checkout.com/2"}, + Mccs: []string{"0742"}, + }, + Individual: &accounts.Individual{ + FirstName: "FirstName", + MiddleName: "", + LastName: "LastName", + TradingName: "TradingName", + NationalTaxId: "TAX123456", + RegisteredAddress: &common.Address{ + AddressLine1: "Checkout.com", + AddressLine2: "90 Tottenham Court Road", + City: "London", + State: "London", + Zip: "W1T 4TJ", + Country: common.GB, + }, + DateOfBirth: &accounts.DateOfBirth{ + Day: 5, + Month: 6, + Year: 1990, + }, + Identification: &accounts.Identification{ + NationalIdNumber: "AB123456C", + Document: &accounts.Document{ + Front: "number", + Back: "number", + }, + }, + }, +} + +response, err := api.Accounts.UpdateEntity("entity_id", request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/accounts@entities@{id}@payment-instruments/get.go b/nas_spec/code_samples/Go/accounts@entities@{id}@payment-instruments/get.go new file mode 100644 index 000000000..255bc9694 --- /dev/null +++ b/nas_spec/code_samples/Go/accounts@entities@{id}@payment-instruments/get.go @@ -0,0 +1,38 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/accounts" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Accounts}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +query := accounts.PaymentInstrumentsQuery{Status: "pending"} + +response, err := api.Accounts.QueryPaymentInstruments("entity_id", query) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/accounts@entities@{id}@payment-instruments/post.go b/nas_spec/code_samples/Go/accounts@entities@{id}@payment-instruments/post.go new file mode 100644 index 000000000..95d998d8c --- /dev/null +++ b/nas_spec/code_samples/Go/accounts@entities@{id}@payment-instruments/post.go @@ -0,0 +1,54 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/accounts" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/instruments" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Accounts}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := accounts.PaymentInstrumentRequest{ + Label: "Bob's Bank Account", + Type: instruments.BankAccount, + Currency: common.GBP, + Country: common.GB, + DefaultDestination: true, + Document: &accounts.InstrumentDocument{ + Type: "document", + FileId: "file", + }, + InstrumentDetails: &accounts.InstrumentDetailsFasterPayments{ + AccountNumber: "123456789", + BankCode: "bank_code", + }, +} + +response, err := api.Accounts.CreatePaymentInstrument("entity_id", request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/accounts@entities@{id}@payout-schedules/get.go b/nas_spec/code_samples/Go/accounts@entities@{id}@payout-schedules/get.go new file mode 100644 index 000000000..c6d730bcf --- /dev/null +++ b/nas_spec/code_samples/Go/accounts@entities@{id}@payout-schedules/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Accounts}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Accounts.RetrievePayoutSchedule("entity_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/accounts@entities@{id}@payout-schedules/put.go b/nas_spec/code_samples/Go/accounts@entities@{id}@payout-schedules/put.go new file mode 100644 index 000000000..100c80db1 --- /dev/null +++ b/nas_spec/code_samples/Go/accounts@entities@{id}@payout-schedules/put.go @@ -0,0 +1,43 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/accounts" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Accounts}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := accounts.CurrencySchedule{ + Enabled: true, + Threshold: 1000, + Recurrence: accounts.NewScheduleFrequencyWeeklyRequest([]accounts.DaySchedule{accounts.Monday}), +} + +response, err := api.Accounts.UpdatePayoutSchedule("entity_id", common.GBP, request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/balances@{id}/get.go b/nas_spec/code_samples/Go/balances@{id}/get.go new file mode 100644 index 000000000..b22b7de34 --- /dev/null +++ b/nas_spec/code_samples/Go/balances@{id}/get.go @@ -0,0 +1,40 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "fmt" + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/balances" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Balances}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +query := balances.QueryFilter{Query: fmt.Sprintf("currency:%s", common.GBP)} + +response, err := api.Balances.RetrieveEntityBalances("entity_id", query) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/connect@token/post.go b/nas_spec/code_samples/Go/connect@token/post.go new file mode 100644 index 000000000..dc5d821de --- /dev/null +++ b/nas_spec/code_samples/Go/connect@token/post.go @@ -0,0 +1,19 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// SDK instantiation for OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Files, configuration.Flow, configuration.Fx, configuration.Gateway, + configuration.Marketplace, configuration.SessionsApp, configuration.SessionsBrowser, + configuration.Vault, configuration.PayoutsBankDetails, configuration.Disputes}). // more scopes available + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} diff --git a/nas_spec/code_samples/Go/customers/post.go b/nas_spec/code_samples/Go/customers/post.go new file mode 100644 index 000000000..15f6835dc --- /dev/null +++ b/nas_spec/code_samples/Go/customers/post.go @@ -0,0 +1,46 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/customers" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Vault}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := customers.CustomerRequest{ + Email: "email@docs.checkout.com", + Name: "Name", + Phone: &common.Phone{ + CountryCode: "44", + Number: "4155552671", + }, +} + +response, err := api.Customers.Create(request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/customers@{identifier}/delete.go b/nas_spec/code_samples/Go/customers@{identifier}/delete.go new file mode 100644 index 000000000..5ffece412 --- /dev/null +++ b/nas_spec/code_samples/Go/customers@{identifier}/delete.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Vault}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Customers.Delete("customer_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/customers@{identifier}/get.go b/nas_spec/code_samples/Go/customers@{identifier}/get.go new file mode 100644 index 000000000..5251adfce --- /dev/null +++ b/nas_spec/code_samples/Go/customers@{identifier}/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Vault}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Customers.Get("customer_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/customers@{identifier}/patch.go b/nas_spec/code_samples/Go/customers@{identifier}/patch.go new file mode 100644 index 000000000..c7e6f4861 --- /dev/null +++ b/nas_spec/code_samples/Go/customers@{identifier}/patch.go @@ -0,0 +1,46 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/customers" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Vault}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := customers.CustomerRequest{ + Email: "email@docs.checkout.com", + Name: "Name", + Phone: &common.Phone{ + CountryCode: "44", + Number: "4155552671", + }, +} + +response, err := api.Customers.Update("customer_id", request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/disputes/get.go b/nas_spec/code_samples/Go/disputes/get.go new file mode 100644 index 000000000..6a28ab424 --- /dev/null +++ b/nas_spec/code_samples/Go/disputes/get.go @@ -0,0 +1,47 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/disputes" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Disputes}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +query := disputes.QueryFilter{ + Limit: 10, + Skip: 5, + From: time.Parse("2006-01-02T15:04:05Z", time.Now().AddDate(0, -1, 0).Format("2006-01-02T15:04:05Z")), + To: time.Parse("2006-01-02T15:04:05Z", time.Now().Format("2006-01-02T15:04:05Z")), + Statuses: strings.Join([]string{disputes.EvidenceRequired, disputes.Accepted}[:], ","), + PaymentId: "payment_id", + PaymentReference: "payment_reference", + PaymentArn: "payment_arn", +} + +response, err := api.Disputes.Query(query) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/disputes@{dispute_id}/get.go b/nas_spec/code_samples/Go/disputes@{dispute_id}/get.go new file mode 100644 index 000000000..87a8d8345 --- /dev/null +++ b/nas_spec/code_samples/Go/disputes@{dispute_id}/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Disputes}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Disputes.GetDisputeDetails("dispute_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/disputes@{dispute_id}@accept/post.go b/nas_spec/code_samples/Go/disputes@{dispute_id}@accept/post.go new file mode 100644 index 000000000..d0810097b --- /dev/null +++ b/nas_spec/code_samples/Go/disputes@{dispute_id}@accept/post.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( +"github.com/checkout/checkout-sdk-go" +"github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Disputes}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Disputes.Accept("dispute_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/disputes@{dispute_id}@evidence/get.go b/nas_spec/code_samples/Go/disputes@{dispute_id}@evidence/get.go new file mode 100644 index 000000000..f4272dcab --- /dev/null +++ b/nas_spec/code_samples/Go/disputes@{dispute_id}@evidence/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Disputes}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Disputes.GetEvidence("dispute_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/disputes@{dispute_id}@evidence/post.go b/nas_spec/code_samples/Go/disputes@{dispute_id}@evidence/post.go new file mode 100644 index 000000000..dbe3cc1fa --- /dev/null +++ b/nas_spec/code_samples/Go/disputes@{dispute_id}@evidence/post.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Disputes}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Disputes.SubmitEvidence("dispute_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/disputes@{dispute_id}@evidence/put.go b/nas_spec/code_samples/Go/disputes@{dispute_id}@evidence/put.go new file mode 100644 index 000000000..990be8823 --- /dev/null +++ b/nas_spec/code_samples/Go/disputes@{dispute_id}@evidence/put.go @@ -0,0 +1,55 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/disputes" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Disputes}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := disputes.Evidence{ + ProofOfDeliveryOrServiceFile: "file_id", + ProofOfDeliveryOrServiceText: "proof of delivery or service text", + InvoiceOrReceiptFile: "file_id", + InvoiceOrReceiptText: "proof of receipt text", + InvoiceShowingDistinctTransactionsFile: "file_id", + InvoiceShowingDistinctTransactionsText: "invoice showing distinct transactions text", + CustomerCommunicationFile: "file_id", + CustomerCommunicationText: "customer communication text", + RefundOrCancellationPolicyFile: "file_id", + RefundOrCancellationPolicyText: "refund or cancellation policy text", + RecurringTransactionAgreementFile: "file_id", + RecurringTransactionAgreementText: "recurring transaction agreement text", + AdditionalEvidenceFile: "file_id", + AdditionalEvidenceText: "additional evidence text", + ProofOfDeliveryOrServiceDateFile: "file_id", + ProofOfDeliveryOrServiceDateText: "proof of delivery or service date text", +} + +response, err := api.Disputes.PutEvidence("dispute_id", request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/disputes@{dispute_id}@schemefiles/get.go b/nas_spec/code_samples/Go/disputes@{dispute_id}@schemefiles/get.go new file mode 100644 index 000000000..12d460db3 --- /dev/null +++ b/nas_spec/code_samples/Go/disputes@{dispute_id}@schemefiles/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Disputes}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Disputes.GetDisputeSchemeFiles("dispute_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/files/post.go b/nas_spec/code_samples/Go/files/post.go new file mode 100644 index 000000000..c5dbb95c8 --- /dev/null +++ b/nas_spec/code_samples/Go/files/post.go @@ -0,0 +1,41 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Files}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := common.File{ + File: "evidence.pdf", + Purpose: common.DisputesEvidence, +} + +response, err := api.Disputes.UploadFile(request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/files@{file_id}/get.go b/nas_spec/code_samples/Go/files@{file_id}/get.go new file mode 100644 index 000000000..097dff173 --- /dev/null +++ b/nas_spec/code_samples/Go/files@{file_id}/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Files}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Disputes.GetFileDetails("file_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/financial-actions/get.go b/nas_spec/code_samples/Go/financial-actions/get.go new file mode 100644 index 000000000..eb297ff16 --- /dev/null +++ b/nas_spec/code_samples/Go/financial-actions/get.go @@ -0,0 +1,42 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/financial" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.FinancialActions}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +query := financial.QueryFilter{ + PaymentId: "payment_id", + ActionId: "action_id", + Limit: 20, +} + +response, err := api.Financial.GetFinancialActions(query) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/forex@quotes/post.go b/nas_spec/code_samples/Go/forex@quotes/post.go new file mode 100644 index 000000000..daace0703 --- /dev/null +++ b/nas_spec/code_samples/Go/forex@quotes/post.go @@ -0,0 +1,44 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/forex" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Fx}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := forex.QuoteRequest{ + SourceCurrency: common.GBP, + SourceAmount: 30000, + DestinationCurrency: common.USD, + ProcessingChannelId: "process_channel_id", +} + +response, err := api.Forex.RequestQuote(request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/hosted-payments/post.go b/nas_spec/code_samples/Go/hosted-payments/post.go new file mode 100644 index 000000000..c03e4d4e4 --- /dev/null +++ b/nas_spec/code_samples/Go/hosted-payments/post.go @@ -0,0 +1,90 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/payments" + "github.com/checkout/checkout-sdk-go/payments/hosted" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +address := common.Address{ + AddressLine1: "Checkout.com", + AddressLine2: "90 Tottenham Court Road", + City: "London", + State: "London", + Zip: "W1T 4TJ", + Country: common.GB, +} + +phone := common.Phone{ + CountryCode: "1", + Number: "415 555 2671", +} + +request := hosted.HostedPaymentRequest{ + Amount: 10, + Currency: common.GBP, + PaymentType: payments.Regular, + BillingDescriptor: &payments.BillingDescriptor{ + Name: "Name", + City: "London", + }, + Reference: "Reference", + Description: "Description", + Customer: &common.CustomerRequest{ + Email: "email@docs.checkout.com", + Name: "Name", + }, + Shipping: &payments.ShippingDetails{ + Address: &address, + Phone: &phone, + }, + Billing: &payments.BillingInformation{ + Address: &address, + Phone: &phone, + }, + Recipient: &payments.PaymentRecipient{ + DateOfBirth: "1985-05-15", + AccountNumber: "999999999", + Zip: "12345", + LastName: "LastName", + }, + Processing: &payments.ProcessingSettings{Aft: true}, + Products: []payments.Product{ + { + Name: "name", + Quantity: 1, + Price: 200, + }, + }, + Risk: &payments.RiskRequest{Enabled: false}, + SuccessUrl: "https://docs.checkout.com/payments/success", + CancelUrl: "https://docs.checkout.com/payments/cancel", + FailureUrl: "https://docs.checkout.com/payments/failure", + Locale: "en-GB", + ThreeDs: &payments.ThreeDsRequest{ + Enabled: false, + AttemptN3D: false, + ChallengeIndicator: common.NoChallengeRequested, + }, + Capture: true, + CaptureOn: time.Now().AddDate(0, 0, 30), +} + +response, err := api.Hosted.CreateHostedPaymentsPageSession(request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/hosted-payments@{id}/get.go b/nas_spec/code_samples/Go/hosted-payments@{id}/get.go new file mode 100644 index 000000000..4e0079fff --- /dev/null +++ b/nas_spec/code_samples/Go/hosted-payments@{id}/get.go @@ -0,0 +1,23 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Hosted.GetHostedPaymentsPageDetails("hosted_payment_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/instruments/post.go b/nas_spec/code_samples/Go/instruments/post.go new file mode 100644 index 000000000..d64328c91 --- /dev/null +++ b/nas_spec/code_samples/Go/instruments/post.go @@ -0,0 +1,57 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/instruments/nas" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Gateway}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := nas.NewCreateTokenInstrumentRequest() +request.Token = "token" +request.AccountHolder = &common.AccountHolder{ + FirstName: "FirstName", + LastName: "LastName", + BillingAddress: &common.Address{ + AddressLine1: "Checkout.com", + AddressLine2: "90 Tottenham Court Road", + City: "London", + State: "London", + Zip: "W1T 4TJ", + Country: common.GB, + }, + Phone: &common.Phone{ + CountryCode: "1", + Number: "415 555 2671", + }, +} +request.Customer = &nas.CreateCustomerInstrumentRequest{Id: "customer_id"} + +response, err := api.Instruments.Create(request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/instruments@{id}/delete.go b/nas_spec/code_samples/Go/instruments@{id}/delete.go new file mode 100644 index 000000000..d51b19d48 --- /dev/null +++ b/nas_spec/code_samples/Go/instruments@{id}/delete.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Gateway}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Instruments.Delete("instrument_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/instruments@{id}/get.go b/nas_spec/code_samples/Go/instruments@{id}/get.go new file mode 100644 index 000000000..17c99ae0a --- /dev/null +++ b/nas_spec/code_samples/Go/instruments@{id}/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Gateway}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Instruments.Get("instrument_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/instruments@{id}/patch.go b/nas_spec/code_samples/Go/instruments@{id}/patch.go new file mode 100644 index 000000000..9b3c7ffc1 --- /dev/null +++ b/nas_spec/code_samples/Go/instruments@{id}/patch.go @@ -0,0 +1,62 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/instruments/nas" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Gateway}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := nas.NewUpdateCardInstrumentRequest() +request.ExpiryMonth = 10 +request.ExpiryYear = 2027 +request.Name = "name" +request.Customer = &common.UpdateCustomerRequest{ + Id: "customer_id", + Default: true, +} +request.AccountHolder = &common.AccountHolder{ + FirstName: "FirstName", + LastName: "LastName", + BillingAddress: &common.Address{ + AddressLine1: "Checkout.com", + AddressLine2: "90 Tottenham Court Road", + City: "London", + State: "London", + Zip: "W1T 4TJ", + Country: common.GB, + }, + Phone: &common.Phone{ + CountryCode: "1", + Number: "415 555 2671", + }, +} + +response, err := api.Instruments.Update("instrument_id", request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/metadata@card/post.go b/nas_spec/code_samples/Go/metadata@card/post.go new file mode 100644 index 000000000..05ca371bb --- /dev/null +++ b/nas_spec/code_samples/Go/metadata@card/post.go @@ -0,0 +1,42 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/metadata" + "github.com/checkout/checkout-sdk-go/metadata/sessions" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.VaultCardMetadata}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := metadata.CardMetadataRequest{ + Source: sources.NewRequestCardSource("card_number"), + Format: metadata.Basic, +} + +response, err := api.Metadata.RequestCardMetadata(request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/payment-links/post.go b/nas_spec/code_samples/Go/payment-links/post.go new file mode 100644 index 000000000..c61350df1 --- /dev/null +++ b/nas_spec/code_samples/Go/payment-links/post.go @@ -0,0 +1,89 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/payments" + "github.com/checkout/checkout-sdk-go/payments/links" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +address := common.Address{ + AddressLine1: "Checkout.com", + AddressLine2: "90 Tottenham Court Road", + City: "London", + State: "London", + Zip: "W1T 4TJ", + Country: common.GB, +} + +phone := common.Phone{ + CountryCode: "1", + Number: "415 555 2671", +} + +request := links.PaymentLinkRequest{ + Amount: 10, + Currency: common.GBP, + PaymentType: payments.Regular, + BillingDescriptor: &payments.BillingDescriptor{ + Name: "Name", + City: "London", + }, + Reference: "Reference", + Description: "Description", + ExpiresIn: 604800, + Customer: &common.CustomerRequest{ + Email: "email@docs.checkout.com", + Name: "Name", + }, + Shipping: &payments.ShippingDetails{ + Address: &address, + Phone: &phone, + }, + Billing: &payments.BillingInformation{ + Address: &address, + Phone: &phone, + }, + Recipient: &payments.PaymentRecipient{ + DateOfBirth: "1985-05-15", + AccountNumber: "999999999", + Zip: "12345", + LastName: "LastName", + }, + Processing: &payments.ProcessingSettings{Aft: true}, + Products: []payments.Product{ + { + Name: "name", + Quantity: 1, + Price: 200, + }, + }, + Risk: &payments.RiskRequest{Enabled: false}, + ReturnUrl: "https://docs.checkout.com/return", + Locale: "en-GB", + ThreeDs: &payments.ThreeDsRequest{ + Enabled: false, + AttemptN3D: false, + ChallengeIndicator: common.NoChallengeRequested, + }, + Capture: true, + CaptureOn: time.Now().AddDate(0, 0, 30), +} + +response, err := api.Links.CreatePaymentLink(request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/payment-links@{id}/get.go b/nas_spec/code_samples/Go/payment-links@{id}/get.go new file mode 100644 index 000000000..41a0db20e --- /dev/null +++ b/nas_spec/code_samples/Go/payment-links@{id}/get.go @@ -0,0 +1,23 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Links.GetPaymentLink("request_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/payments/get.go b/nas_spec/code_samples/Go/payments/get.go new file mode 100644 index 000000000..5fb59faaa --- /dev/null +++ b/nas_spec/code_samples/Go/payments/get.go @@ -0,0 +1,42 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/payments" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Gateway, configuration.GatewayPayment}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +query := payments.QueryRequest{ + Limit: 10, + Skip: 0, + Reference: "reference", +} + +response, err := api.Payments.RequestPaymentList(query) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/payments/post.go b/nas_spec/code_samples/Go/payments/post.go new file mode 100644 index 000000000..d3bd0dbbc --- /dev/null +++ b/nas_spec/code_samples/Go/payments/post.go @@ -0,0 +1,79 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/payments" + "github.com/checkout/checkout-sdk-go/payments/nas" + "github.com/checkout/checkout-sdk-go/payments/nas/sessions" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Gateway, configuration.GatewayPayment}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +source := sources.NewRequestCardSource() +source.Number = "123456789" +source.ExpiryMonth = 10 +source.ExpiryYear = 2027 +source.Cvv = "123" +source.Stored = false + +sender := nas.NewRequestIndividualSender() +sender.FirstName = "FirstName" +sender.LastName = "LastName" +sender.Address = &common.Address{ + AddressLine1: "Checkout.com", + AddressLine2: "90 Tottenham Court Road", + City: "London", + State: "London", + Zip: "W1T 4TJ", + Country: common.GB, +} +sender.Identification = &nas.Identification{ + Type: nas.DrivingLicence, + Number: "1234", + IssuingCountry: common.GB, +} + +request := nas.PaymentRequest{ + Source: source, + Amount: 10, + Currency: common.GBP, + Reference: "reference", + Capture: false, + ThreeDsRequest: &payments.ThreeDsRequest{ + Enabled: true, + ChallengeIndicator: common.NoChallengeRequested, + }, + ProcessingChannelId: "processing_channel_id", + SuccessUrl: "https://docs.checkout.com/success", + FailureUrl: "https://docs.checkout.com/failure", + Sender: sender, +} + +response, err := api.Payments.RequestPayment(request, nil) // or "RequestPayout(request PayoutRequest, idempotencyKey *string)" +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/payments@{id}/get.go b/nas_spec/code_samples/Go/payments@{id}/get.go new file mode 100644 index 000000000..5c9dfa8fc --- /dev/null +++ b/nas_spec/code_samples/Go/payments@{id}/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Gateway, configuration.GatewayPayment}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Payments.GetPaymentDetails("payment_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/payments@{id}@actions/get.go b/nas_spec/code_samples/Go/payments@{id}@actions/get.go new file mode 100644 index 000000000..099843d92 --- /dev/null +++ b/nas_spec/code_samples/Go/payments@{id}@actions/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Gateway, configuration.GatewayPayment}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Payments.GetPaymentActions("payment_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/payments@{id}@captures/post.go b/nas_spec/code_samples/Go/payments@{id}@captures/post.go new file mode 100644 index 000000000..a25cc6f84 --- /dev/null +++ b/nas_spec/code_samples/Go/payments@{id}@captures/post.go @@ -0,0 +1,42 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/payments/nas" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Gateway, configuration.GatewayPayment}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := nas.CaptureRequest{ + Amount: 10, + Reference: "partial capture", + Metadata: map[string]interface{}{}, +} + +response, err := api.Payments.CapturePayment("payment_id", request, nil) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/payments@{id}@refunds/post.go b/nas_spec/code_samples/Go/payments@{id}@refunds/post.go new file mode 100644 index 000000000..d7c3f735a --- /dev/null +++ b/nas_spec/code_samples/Go/payments@{id}@refunds/post.go @@ -0,0 +1,42 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/payments" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Gateway, configuration.GatewayPayment}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := payments.RefundRequest{ + Amount: 10, + Reference: "partial refund", + Metadata: map[string]interface{}{}, +} + +response, err := api.Payments.RefundPayment("payment_id", request, nil) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/payments@{id}@voids/post.go b/nas_spec/code_samples/Go/payments@{id}@voids/post.go new file mode 100644 index 000000000..98be1fd19 --- /dev/null +++ b/nas_spec/code_samples/Go/payments@{id}@voids/post.go @@ -0,0 +1,41 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/payments" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Gateway, configuration.GatewayPayment}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := payments.VoidRequest{ + Reference: "reference", + Metadata: map[string]interface{}{}, +} + +response, err := api.Payments.VoidPayment("payment_id", request, nil) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/reports/get.go b/nas_spec/code_samples/Go/reports/get.go new file mode 100644 index 000000000..3d4fdeb3d --- /dev/null +++ b/nas_spec/code_samples/Go/reports/get.go @@ -0,0 +1,43 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/reports" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Reports}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +query := reports.QueryFilter{ + CreatedAfter: time.Parse("2006-01-02", time.Now().AddDate(0, 0, -10).Format("2006-01-02")), + CreatedBefore: time.Parse("2006-01-02", time.Now().Format("2006-01-02")), + EntityId: "entity_id", + Limit: 20, +} + +response, err := api.Reports.GetAllReports(query) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/reports@{id}/get.go b/nas_spec/code_samples/Go/reports@{id}/get.go new file mode 100644 index 000000000..e4c5368db --- /dev/null +++ b/nas_spec/code_samples/Go/reports@{id}/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Reports}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Reports.GetReportDetails("report_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/reports@{id}@files@{fileId}/get.go b/nas_spec/code_samples/Go/reports@{id}@files@{fileId}/get.go new file mode 100644 index 000000000..bf77173b9 --- /dev/null +++ b/nas_spec/code_samples/Go/reports@{id}@files@{fileId}/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Reports}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Reports.GetReportFile("report_id", "file_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/sessions/post.go b/nas_spec/code_samples/Go/sessions/post.go new file mode 100644 index 000000000..bff598413 --- /dev/null +++ b/nas_spec/code_samples/Go/sessions/post.go @@ -0,0 +1,71 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/sessions" + "github.com/checkout/checkout-sdk-go/sessions/completion" + "github.com/checkout/checkout-sdk-go/sessions/sources" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.SessionsApp, configuration.SessionsBrowser}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +source := sources.NewSessionCardSource() +source.Number = "12345678" +source.ExpiryMonth = 10 +source.ExpiryYear = 2027 + +completion := completion.NewHostedCompletion() +completion.SuccessUrl = "https://docs.checkout.com/sessions/success" +completion.FailureUrl = "https://docs.checkout.com/sessions/fail" + +request := sessions.SessionRequest{ + Source: source, + Amount: 10, + Currency: common.GBP, + ProcessingChannelId: "processing_channel_id", + AuthenticationType: sessions.RegularAuthType, + AuthenticationCategory: sessions.Payment, + ChallengeIndicator: common.NoPreference, + Reference: "reference", + TransactionType: sessions.GoodsService, + ShippingAddress: &sources.SessionAddress{ + Address: common.Address{ + AddressLine1: "Checkout.com", + AddressLine2: "90 Tottenham Court Road", + City: "London", + State: "London", + Zip: "W1T 4TJ", + Country: common.GB, + }, + }, + Completion: completion, +} + +response, err := api.Sessions.RequestSession(request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/sessions@{id}/get.go b/nas_spec/code_samples/Go/sessions@{id}/get.go new file mode 100644 index 000000000..722d78be9 --- /dev/null +++ b/nas_spec/code_samples/Go/sessions@{id}/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.SessionsApp, configuration.SessionsBrowser}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Sessions.GetSessionDetails("session_id", "session_secret") // "session_secret" is optional +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/sessions@{id}@collect-data/put.go b/nas_spec/code_samples/Go/sessions@{id}@collect-data/put.go new file mode 100644 index 000000000..4387a5676 --- /dev/null +++ b/nas_spec/code_samples/Go/sessions@{id}@collect-data/put.go @@ -0,0 +1,49 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/sessions/channels" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.SessionsApp, configuration.SessionsBrowser}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +channel := channels.NewBrowserSession() +channel.AcceptHeader = "Accept: *.*, q=0.1" +channel.JavaEnabled = true +channel.Language = "FR-fr" +channel.ColorDepth = "16" +channel.ScreenWidth = "1920" +channel.ScreenHeight = "1080" +channel.Timezone = "60" +channel.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" +channel.ThreeDsMethodCompletion = common.Y +channel.IpAddress = "1.12.123.255" + +response, err := api.Sessions.UpdateSession("session_id", channel,"session_secret") // "session_secret" is optional +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/sessions@{id}@complete/post.go b/nas_spec/code_samples/Go/sessions@{id}@complete/post.go new file mode 100644 index 000000000..34a9fa91f --- /dev/null +++ b/nas_spec/code_samples/Go/sessions@{id}@complete/post.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.SessionsApp, configuration.SessionsBrowser}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Sessions.CompleteSession("session_id", "session_secret") // "session_secret" is optional +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/sessions@{id}@issuer-fingerprint/put.go b/nas_spec/code_samples/Go/sessions@{id}@issuer-fingerprint/put.go new file mode 100644 index 000000000..400aad12b --- /dev/null +++ b/nas_spec/code_samples/Go/sessions@{id}@issuer-fingerprint/put.go @@ -0,0 +1,39 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/sessions" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.SessionsApp, configuration.SessionsBrowser}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := sessions.ThreeDsMethodCompletionRequest{ThreeDsMethodCompletion: common.Y} + +response, err := api.Sessions.Update3dsMethodCompletion("session_id", request, "session_secret") // "session_secret" is optional +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/tokens/post.go b/nas_spec/code_samples/Go/tokens/post.go new file mode 100644 index 000000000..58f0cee98 --- /dev/null +++ b/nas_spec/code_samples/Go/tokens/post.go @@ -0,0 +1,46 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/tokens" +) + +// API Keys +api, err := checkout. + Builder(). + Previous(). + WithPublicKey("public_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := tokens.CardTokenRequest{ + Type: tokens.Card, + Number: "123456789", + ExpiryMonth: 10, + ExpiryYear: 2025, + Name: "Name", + CVV: "123", + BillingAddress: &common.Address{ + AddressLine1: "Checkout.com", + AddressLine2: "90 Tottenham Court Road", + City: "London", + State: "London", + Zip: "W1T 4TJ", + Country: common.GB, + }, + Phone: &common.Phone{ + CountryCode: "1", + Number: "415 555 2671", + }, +} + +response, err := api.Tokens.RequestCardToken(request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/transfers/post.go b/nas_spec/code_samples/Go/transfers/post.go new file mode 100644 index 000000000..e41d08b4e --- /dev/null +++ b/nas_spec/code_samples/Go/transfers/post.go @@ -0,0 +1,46 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/transfers" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Transfers}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := transfers.TransferRequest{ + Reference: "reference", + TransferType: transfers.Commission, + Source: &transfers.TransferSourceRequest{ + Id: "entity_id", + Amount: 100, + }, + Destination: &transfers.TransferDestinationRequest{Id: "destination_id"}, +} + +response, err := api.Transfers.InitiateTransferOfFounds(request, nil) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/transfers@{id}/get.go b/nas_spec/code_samples/Go/transfers@{id}/get.go new file mode 100644 index 000000000..02b713251 --- /dev/null +++ b/nas_spec/code_samples/Go/transfers@{id}/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Transfers}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.Transfers.RetrieveTransfer("transfer_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/validation@bank-accounts@{country}@{currency}/get.go b/nas_spec/code_samples/Go/validation@bank-accounts@{country}@{currency}/get.go new file mode 100644 index 000000000..e302184c6 --- /dev/null +++ b/nas_spec/code_samples/Go/validation@bank-accounts@{country}@{currency}/get.go @@ -0,0 +1,31 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/common" + "github.com/checkout/checkout-sdk-go/configuration" + instruments "github.com/checkout/checkout-sdk-go/instruments/nas" +) + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.PayoutsBankDetails}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +query := instruments.QueryBankAccountFormatting{ + AccountHolderType: common.Individual, + PaymentNetwork: instruments.Local, +} + +response, err := api.Instruments.GetBankAccountFieldFormatting("GB", "GBP", query) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/workflows/get.go b/nas_spec/code_samples/Go/workflows/get.go new file mode 100644 index 000000000..b104dba4d --- /dev/null +++ b/nas_spec/code_samples/Go/workflows/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Flow, configuration.FlowWorkflows}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.WorkFlows.GetWorkflows() +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/workflows/post.go b/nas_spec/code_samples/Go/workflows/post.go new file mode 100644 index 000000000..c5791395c --- /dev/null +++ b/nas_spec/code_samples/Go/workflows/post.go @@ -0,0 +1,58 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/workflows" + "github.com/checkout/checkout-sdk-go/workflows/actions" + "github.com/checkout/checkout-sdk-go/workflows/conditions" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Flow, configuration.FlowWorkflows}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +entityCondition := conditions.NewEntityConditionRequest() +entityCondition.Entities = []string{"workflow_entity_id"} + +processingChannelCondition := conditions.NewProcessingChannelConditionRequest() +processingChannelCondition.ProcessingChannels = []string{"processing_channel_id"} + +webhookAction := actions.NewWebhookActionRequest() +webhookAction.Url = "https://docs.checkout.com/webhook" +webhookAction.Headers = map[string]string{} +webhookAction.Signature = &actions.WebhookSignature{ + Key: "8V8x0dLK%*DNS8JJr", + Method: "HMACSHA256", +} + +request := workflows.CreateWorkflowRequest{ + Name: "name", + Conditions: []conditions.ConditionsRequest{entityCondition, processingChannelCondition}, + Actions: []actions.ActionsRequest{webhookAction}, +} + +response, err := api.WorkFlows.CreateWorkflow(request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/workflows@event-types/get.go b/nas_spec/code_samples/Go/workflows@event-types/get.go new file mode 100644 index 000000000..27c06d3ea --- /dev/null +++ b/nas_spec/code_samples/Go/workflows@event-types/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Flow, configuration.FlowWorkflows}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.WorkFlows.GetEventTypes() +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/workflows@events@reflow/post.go b/nas_spec/code_samples/Go/workflows@events@reflow/post.go new file mode 100644 index 000000000..817b1fac7 --- /dev/null +++ b/nas_spec/code_samples/Go/workflows@events@reflow/post.go @@ -0,0 +1,41 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/workflows/reflows" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Flow}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := &reflows.ReflowByEventsRequest{ + Events: []string{"event_id_1", "event_id_2"}, + ReflowWorkflows: reflows.ReflowWorkflows{Workflows: []string{"workflow_id_1", "workflow_id_2"}}, +} + +response, err := api.WorkFlows.Reflow(request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/workflows@events@subject@{subjectId}/get.go b/nas_spec/code_samples/Go/workflows@events@subject@{subjectId}/get.go new file mode 100644 index 000000000..9b7f5b0f7 --- /dev/null +++ b/nas_spec/code_samples/Go/workflows@events@subject@{subjectId}/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Flow, configuration.FlowEvents}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.WorkFlows.GetSubjectEvents("subject_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/workflows@events@subject@{subjectId}@reflow/post.go b/nas_spec/code_samples/Go/workflows@events@subject@{subjectId}@reflow/post.go new file mode 100644 index 000000000..ebf13768a --- /dev/null +++ b/nas_spec/code_samples/Go/workflows@events@subject@{subjectId}@reflow/post.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Flow}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.WorkFlows.ReflowBySubject("subject_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow/post.go b/nas_spec/code_samples/Go/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow/post.go new file mode 100644 index 000000000..b5ec1b232 --- /dev/null +++ b/nas_spec/code_samples/Go/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow/post.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Flow}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.WorkFlows.ReflowBySubjectAndWorkflow("subject_id", "workflow_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/workflows@events@{eventId}/get.go b/nas_spec/code_samples/Go/workflows@events@{eventId}/get.go new file mode 100644 index 000000000..82541ab28 --- /dev/null +++ b/nas_spec/code_samples/Go/workflows@events@{eventId}/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Flow, configuration.FlowEvents}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.WorkFlows.GetEvent("event_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/workflows@events@{eventId}@actions@{workflowActionId}/get.go b/nas_spec/code_samples/Go/workflows@events@{eventId}@actions@{workflowActionId}/get.go new file mode 100644 index 000000000..1889cd695 --- /dev/null +++ b/nas_spec/code_samples/Go/workflows@events@{eventId}@actions@{workflowActionId}/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Flow, configuration.FlowEvents, configuration.FlowWorkflows}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.WorkFlows.GetActionInvocations("event_id", "action_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/workflows@events@{eventId}@reflow/post.go b/nas_spec/code_samples/Go/workflows@events@{eventId}@reflow/post.go new file mode 100644 index 000000000..780fdafac --- /dev/null +++ b/nas_spec/code_samples/Go/workflows@events@{eventId}@reflow/post.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Flow}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.WorkFlows.ReflowByEvent("event_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/workflows@events@{eventId}@workflow@{workflowId}@reflow/post.go b/nas_spec/code_samples/Go/workflows@events@{eventId}@workflow@{workflowId}@reflow/post.go new file mode 100644 index 000000000..e73ac3832 --- /dev/null +++ b/nas_spec/code_samples/Go/workflows@events@{eventId}@workflow@{workflowId}@reflow/post.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Flow}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.WorkFlows.ReflowByEventAndWorkflow("event_id", "workflow_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/workflows@{workflowId}/delete.go b/nas_spec/code_samples/Go/workflows@{workflowId}/delete.go new file mode 100644 index 000000000..3390feb15 --- /dev/null +++ b/nas_spec/code_samples/Go/workflows@{workflowId}/delete.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Flow, configuration.FlowWorkflows}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.WorkFlows.RemoveWorkflow("workflow_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/workflows@{workflowId}/get.go b/nas_spec/code_samples/Go/workflows@{workflowId}/get.go new file mode 100644 index 000000000..da60554e1 --- /dev/null +++ b/nas_spec/code_samples/Go/workflows@{workflowId}/get.go @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Flow, configuration.FlowWorkflows}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +response, err := api.WorkFlows.GetWorkflow("workflow_id") +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/workflows@{workflowId}/patch.go b/nas_spec/code_samples/Go/workflows@{workflowId}/patch.go new file mode 100644 index 000000000..78f0d56ec --- /dev/null +++ b/nas_spec/code_samples/Go/workflows@{workflowId}/patch.go @@ -0,0 +1,41 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/workflows" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Flow, configuration.FlowWorkflows}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := workflows.UpdateWorkflowRequest{ + Name: "New Name", + Active: true, +} + +response, err := api.WorkFlows.UpdateWorkflow("workflow_id", request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/workflows@{workflowId}@actions@{workflowActionId}/put.go b/nas_spec/code_samples/Go/workflows@{workflowId}@actions@{workflowActionId}/put.go new file mode 100644 index 000000000..4a48f3034 --- /dev/null +++ b/nas_spec/code_samples/Go/workflows@{workflowId}@actions@{workflowActionId}/put.go @@ -0,0 +1,44 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/workflows/actions" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Flow, configuration.FlowWorkflows}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := actions.NewWebhookActionRequest() +request.Url = "https://docs.checkout.com/webhook" +request.Headers = map[string]string{} +request.Signature = &actions.WebhookSignature{ + Key: "8V8x0dLK%*DNS8JJr", + Method: "HMACSHA256", +} + +response, err := api.WorkFlows.UpdateWorkflowAction("workflow_id", "action_id", request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Go/workflows@{workflowId}@conditions@{workflowConditionId}/put.go b/nas_spec/code_samples/Go/workflows@{workflowId}@conditions@{workflowConditionId}/put.go new file mode 100644 index 000000000..a070dc4f3 --- /dev/null +++ b/nas_spec/code_samples/Go/workflows@{workflowId}@conditions@{workflowConditionId}/put.go @@ -0,0 +1,39 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-go +import ( + "github.com/checkout/checkout-sdk-go" + "github.com/checkout/checkout-sdk-go/configuration" + "github.com/checkout/checkout-sdk-go/workflows/conditions" +) + +// API Keys +api, err := checkout. + Builder(). + StaticKeys(). + WithSecretKey("secret_key"). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +// OAuth +api, err := checkout. + Builder(). + OAuth(). + WithClientCredentials("client_id", "client_secret"). + WithScopes([]string{configuration.Flow, configuration.FlowWorkflows}). + WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION + Build() +if err != nil { + return nil, err +} + +request := conditions.NewEventConditionRequest() +request.Events = map[string][]string{} + +response, err := api.WorkFlows.UpdateWorkflowCondition("workflow_id", "condition_id", request) +if err != nil { + return nil, err +} + +return response, nil diff --git a/nas_spec/code_samples/Java/accounts@entities/post.java b/nas_spec/code_samples/Java/accounts@entities/post.java new file mode 100644 index 000000000..4ae58cda1 --- /dev/null +++ b/nas_spec/code_samples/Java/accounts@entities/post.java @@ -0,0 +1,79 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.accounts.AccountPhone; +import com.checkout.accounts.ContactDetails; +import com.checkout.accounts.DateOfBirth; +import com.checkout.accounts.Document; +import com.checkout.accounts.DocumentType; +import com.checkout.accounts.Identification; +import com.checkout.accounts.Individual; +import com.checkout.accounts.OnboardEntityRequest; +import com.checkout.accounts.OnboardEntityResponse; +import com.checkout.accounts.Profile; +import com.checkout.common.Address; +import com.checkout.common.CountryCode; + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.ACCOUNTS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +OnboardEntityRequest onboardEntityRequest = OnboardEntityRequest.builder() + .reference("reference") + .contactDetails(ContactDetails.builder() + .phone(AccountPhone.builder().number("2345678910").build()) + .build()) + .profile(Profile.builder() + .urls(Arrays.asList("https://docs.checkout.com/1", "https://docs.checkout.com/2")) + .mccs(Collections.singletonList("0742")) + .build()) + .individual(Individual.builder() + .firstName("FirstName") + .lastName("LastName") + .tradingName("TradingName") + .registeredAddress(Address.builder() + .addressLine1("Checkout.com") + .addressLine1("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("WIT 4TJ") + .country(CountryCode.GB) + .build()) + .nationalTaxId("TAX123456") + .dateOfBirth(DateOfBirth.builder() + .day(5) + .month(6) + .year(1990) + .build()) + .identification(Identification.builder() + .nationalIdNumber("AB123456C") + .document(Document.builder() + .back("number") + .front("number") + .type(DocumentType.DRIVING_LICENSE) + .build()) + .build()) + .build()) + .build(); + +try { + OnboardEntityResponse response = api.accountsClient().createEntity(onboardEntityRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/accounts@entities@{id}/get.java b/nas_spec/code_samples/Java/accounts@entities@{id}/get.java new file mode 100644 index 000000000..34b8f05e5 --- /dev/null +++ b/nas_spec/code_samples/Java/accounts@entities@{id}/get.java @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.accounts.OnboardEntityDetailsResponse; + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.ACCOUNTS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + OnboardEntityDetailsResponse response = api.accountsClient().getEntity("entity_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/accounts@entities@{id}/put.java b/nas_spec/code_samples/Java/accounts@entities@{id}/put.java new file mode 100644 index 000000000..6f5acfaf7 --- /dev/null +++ b/nas_spec/code_samples/Java/accounts@entities@{id}/put.java @@ -0,0 +1,79 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.accounts.AccountPhone; +import com.checkout.accounts.ContactDetails; +import com.checkout.accounts.DateOfBirth; +import com.checkout.accounts.Document; +import com.checkout.accounts.DocumentType; +import com.checkout.accounts.Identification; +import com.checkout.accounts.Individual; +import com.checkout.accounts.OnboardEntityRequest; +import com.checkout.accounts.OnboardEntityResponse; +import com.checkout.accounts.Profile; +import com.checkout.common.Address; +import com.checkout.common.CountryCode; + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.ACCOUNTS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +OnboardEntityRequest request = OnboardEntityRequest.builder() + .reference("reference") + .contactDetails(ContactDetails.builder() + .phone(AccountPhone.builder().number("415 555 2671").build()) + .build()) + .profile(Profile.builder() + .urls(Collections.singletonList("https://docs.checkout.com")) + .mccs(Collections.singletonList("0742")) + .build()) + .individual(Individual.builder() + .firstName("FirstName") + .lastName("LastName") + .tradingName("Trading") + .registeredAddress(Address.builder() + .addressLine1("Checkout.com") + .addressLine1("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("WIT 4TJ") + .country(CountryCode.GB) + .build()) + .nationalTaxId("TAX123456") + .dateOfBirth(DateOfBirth.builder() + .day(5) + .month(6) + .year(1995) + .build()) + .identification(Identification.builder() + .nationalIdNumber("AB123456C") + .document(Document.builder() + .back("number") + .front("number") + .type(DocumentType.PASSPORT) + .build()) + .build()) + .build()) + .build(); + +try { + OnboardEntityResponse response = api.accountsClient().updateEntity(request, "entity_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/accounts@entities@{id}@instruments/post.java b/nas_spec/code_samples/Java/accounts@entities@{id}@instruments/post.java new file mode 100644 index 000000000..e948ad390 --- /dev/null +++ b/nas_spec/code_samples/Java/accounts@entities@{id}@instruments/post.java @@ -0,0 +1,52 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.EmptyResponse; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.accounts.AccountsPaymentInstrument; +import com.checkout.accounts.InstrumentDocument; +import com.checkout.common.AccountType; +import com.checkout.common.Address; +import com.checkout.common.BankDetails; +import com.checkout.common.CountryCode; +import com.checkout.common.Currency; + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.ACCOUNTS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +AccountsPaymentInstrument marketplacePaymentInstrument = AccountsPaymentInstrument.builder() + .accountNumber("123456789") + .accountType(AccountType.CASH) + .bank(BankDetails.builder().name("bank_name").address(Address.builder().build()).build()) + .bankCode("bank_code") + .bban("bban") + .branchCode("123") + .country(CountryCode.GB) + .currency(Currency.GBP) + .document(new InstrumentDocument("document", "file")) + .iban("iban") + .label("mkt-1") + .swiftBic("BIC") + .build(); + +try { + EmptyResponse response = api.accountsClient().createPaymentInstrument(marketplacePaymentInstrument, "entity_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/accounts@entities@{id}@payout-schedules/get.java b/nas_spec/code_samples/Java/accounts@entities@{id}@payout-schedules/get.java new file mode 100644 index 000000000..798101143 --- /dev/null +++ b/nas_spec/code_samples/Java/accounts@entities@{id}@payout-schedules/get.java @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.accounts.payout.schedule.response.GetScheduleResponse; + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.ACCOUNTS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + GetScheduleResponse response = api.accountsClient().retrievePayoutSchedule("entity_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/accounts@entities@{id}@payout-schedules/put.java b/nas_spec/code_samples/Java/accounts@entities@{id}@payout-schedules/put.java new file mode 100644 index 000000000..6ab5eaeac --- /dev/null +++ b/nas_spec/code_samples/Java/accounts@entities@{id}@payout-schedules/put.java @@ -0,0 +1,42 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.accounts.payout.schedule.DaySchedule; +import com.checkout.accounts.payout.schedule.request.ScheduleFrequencyWeeklyRequest; +import com.checkout.accounts.payout.schedule.request.UpdateScheduleRequest; +import com.checkout.accounts.payout.schedule.response.VoidResponse; +import com.checkout.common.Currency; + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.ACCOUNTS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +UpdateScheduleRequest request = UpdateScheduleRequest.builder() + .enabled(true) + .threshold(1000) + .recurrence(ScheduleFrequencyWeeklyRequest.builder() + .byDay(DaySchedule.MONDAY) + .build()) + .build(); + +try { + VoidResponse response = api.accountsClient().updatePayoutSchedule("entity_id", Currency.USD, request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/balances@{id}/get.java b/nas_spec/code_samples/Java/balances@{id}/get.java new file mode 100644 index 000000000..12eb233ce --- /dev/null +++ b/nas_spec/code_samples/Java/balances@{id}/get.java @@ -0,0 +1,36 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.balances.BalancesQuery; +import com.checkout.balances.BalancesResponse; +import com.checkout.common.Currency; + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.BALANCES) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +BalancesQuery query = BalancesQuery.builder() + .query("currency:" + Currency.EUR) + .build(); + +try { + BalancesResponse response = api.balancesClient().retrieveEntityBalances("balance_id", query).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/connect@token/post.java b/nas_spec/code_samples/Java/connect@token/post.java new file mode 100644 index 000000000..16a83969a --- /dev/null +++ b/nas_spec/code_samples/Java/connect@token/post.java @@ -0,0 +1,15 @@ +// Please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; + +// SDK instantiation for OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.FILES, OAuthScope.FLOW, OAuthScope.FX, OAuthScope.GATEWAY, + OAuthScope.MARKETPLACE, OAuthScope.SESSIONS_APP, OAuthScope.SESSIONS_BROWSER, + OAuthScope.VAULT, OAuthScope.PAYOUTS_BANK_DETAILS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); diff --git a/nas_spec/code_samples/Java/customers/post.java b/nas_spec/code_samples/Java/customers/post.java new file mode 100644 index 000000000..e547220c3 --- /dev/null +++ b/nas_spec/code_samples/Java/customers/post.java @@ -0,0 +1,47 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.common.IdResponse; +import com.checkout.common.Phone; +import com.checkout.customers.CustomerRequest; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.GATEWAY) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +CustomerRequest request = CustomerRequest.builder() + .email("email@docs.checkout.com") + .name("name") + .phone(Phone.builder().countryCode("1").number("415 555 2671").build()) + .instruments(Arrays.asList("instrument_id_1", "instrument_id_2")) + .metadata(new HashMap<>()) + .build(); + +try { + IdResponse response = api.customersClient().create(request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/customers@{identifier}/delete.java b/nas_spec/code_samples/Java/customers@{identifier}/delete.java new file mode 100644 index 000000000..343812594 --- /dev/null +++ b/nas_spec/code_samples/Java/customers@{identifier}/delete.java @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.EmptyResponse; +import com.checkout.Environment; +import com.checkout.OAuthScope; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.GATEWAY) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + EmptyResponse response = api.customersClient().delete("customer_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/customers@{identifier}/get.java b/nas_spec/code_samples/Java/customers@{identifier}/get.java new file mode 100644 index 000000000..652a54a1a --- /dev/null +++ b/nas_spec/code_samples/Java/customers@{identifier}/get.java @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.customers.CustomerResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.GATEWAY) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + CustomerResponse response = api.customersClient().get("customer_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/customers@{identifier}/patch.java b/nas_spec/code_samples/Java/customers@{identifier}/patch.java new file mode 100644 index 000000000..cfd06d37c --- /dev/null +++ b/nas_spec/code_samples/Java/customers@{identifier}/patch.java @@ -0,0 +1,47 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.EmptyResponse; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.common.Phone; +import com.checkout.customers.CustomerRequest; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.GATEWAY) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +CustomerRequest customerRequest = CustomerRequest.builder() + .email("email@docs.checkout.com") + .name("name") + .phone(Phone.builder().countryCode("1").number("4155552671").build()) + .instruments(Arrays.asList("instrument_id_1", "instrument_id_2")) + .metadata(new HashMap<>()) + .build(); + +try { + EmptyResponse response = api.customersClient().update("customer_id", customerRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/disputes/get.java b/nas_spec/code_samples/Java/disputes/get.java new file mode 100644 index 000000000..4bd721eed --- /dev/null +++ b/nas_spec/code_samples/Java/disputes/get.java @@ -0,0 +1,50 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.disputes.DisputeStatus; +import com.checkout.disputes.DisputesQueryFilter; +import com.checkout.disputes.DisputesQueryResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.DISPUTES) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +DisputesQueryFilter query = DisputesQueryFilter.builder() + .paymentId("payment_id") + .from(LocalDateTime.now().minusMonths(2).toInstant(ZoneOffset.UTC)) + .to(Instant.now()) + .paymentArn("payment_arn") + .paymentReference("payment_reference") + .statuses(String.join(",", DisputeStatus.EVIDENCE_UNDER_REVIEW.getStatus(), DisputeStatus.ARBITRATION_WON.getStatus())) + .limit(10) + .skip(5) + .build(); + +try { + DisputesQueryResponse response = api.disputesClient().query(query).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/disputes@{dispute_id}/get.java b/nas_spec/code_samples/Java/disputes@{dispute_id}/get.java new file mode 100644 index 000000000..5a92be45c --- /dev/null +++ b/nas_spec/code_samples/Java/disputes@{dispute_id}/get.java @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.disputes.DisputeDetailsResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.DISPUTES) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + DisputeDetailsResponse response = api.disputesClient().getDisputeDetails("dispute_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/disputes@{dispute_id}@accept/post.java b/nas_spec/code_samples/Java/disputes@{dispute_id}@accept/post.java new file mode 100644 index 000000000..b1e03f0aa --- /dev/null +++ b/nas_spec/code_samples/Java/disputes@{dispute_id}@accept/post.java @@ -0,0 +1,38 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.EmptyResponse; +import com.checkout.Environment; +import com.checkout.OAuthScope; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.DISPUTES) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + EmptyResponse response = api.disputesClient().accept("dispute_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} + diff --git a/nas_spec/code_samples/Java/disputes@{dispute_id}@evidence/get.java b/nas_spec/code_samples/Java/disputes@{dispute_id}@evidence/get.java new file mode 100644 index 000000000..491fa8b5b --- /dev/null +++ b/nas_spec/code_samples/Java/disputes@{dispute_id}@evidence/get.java @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.disputes.DisputeEvidenceResponse; + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.DISPUTES) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + DisputeEvidenceResponse response = api.disputesClient().getEvidence("dispute_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/disputes@{dispute_id}@evidence/post.java b/nas_spec/code_samples/Java/disputes@{dispute_id}@evidence/post.java new file mode 100644 index 000000000..189c1e07e --- /dev/null +++ b/nas_spec/code_samples/Java/disputes@{dispute_id}@evidence/post.java @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.EmptyResponse; +import com.checkout.Environment; +import com.checkout.OAuthScope; + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.DISPUTES) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + EmptyResponse response = api.disputesClient().submitEvidence("dispute_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/disputes@{dispute_id}@evidence/put.java b/nas_spec/code_samples/Java/disputes@{dispute_id}@evidence/put.java new file mode 100644 index 000000000..86e82347d --- /dev/null +++ b/nas_spec/code_samples/Java/disputes@{dispute_id}@evidence/put.java @@ -0,0 +1,57 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.EmptyResponse; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.disputes.DisputeEvidenceRequest; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.DISPUTES) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +DisputeEvidenceRequest evidenceRequest = DisputeEvidenceRequest.builder() + .proofOfDeliveryOrServiceFile("file_id") + .proofOfDeliveryOrServiceText("proof of delivery or service text") + .invoiceOrReceiptFile("file_id") + .invoiceOrReceiptText("Copy of the invoice") + .invoiceShowingDistinctTransactionsFile("file_id") + .invoiceShowingDistinctTransactionsText("Copy of invoice #1244 showing two transactions") + .customerCommunicationFile("file_id") + .customerCommunicationText("Copy of an email exchange with the cardholder") + .refundOrCancellationPolicyFile("file_id") + .refundOrCancellationPolicyText("Copy of the refund policy") + .recurringTransactionAgreementFile("file_id") + .recurringTransactionAgreementText("Copy of the recurring transaction agreement") + .additionalEvidenceFile("file_id") + .additionalEvidenceText("Scanned document") + .proofOfDeliveryOrServiceDateFile("file_id") + .proofOfDeliveryOrServiceDateText("Copy of the customer receipt showing the merchandise was delivered on 2018-12-20") + .build(); + +try { + EmptyResponse response = api.disputesClient().putEvidence("dispute_id", evidenceRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/files/post.java b/nas_spec/code_samples/Java/files/post.java new file mode 100644 index 000000000..a498d6692 --- /dev/null +++ b/nas_spec/code_samples/Java/files/post.java @@ -0,0 +1,46 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.common.FilePurpose; +import com.checkout.common.FileRequest; +import com.checkout.common.IdResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.FILES) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +File file = new File("evidence.pdf"); +FileRequest fileRequest = FileRequest.builder() + .file(file) + .contentType(ContentType.create("application/pdf")) + .purpose(FilePurpose.DISPUTE_EVIDENCE) + .build(); + +try { + IdResponse response = api.disputesClient().uploadFile(fileRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/files@{file_id}/get.java b/nas_spec/code_samples/Java/files@{file_id}/get.java new file mode 100644 index 000000000..d79ecc8ec --- /dev/null +++ b/nas_spec/code_samples/Java/files@{file_id}/get.java @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.common.FileDetailsResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.FILES) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + FileDetailsResponse response = api.disputesClient().getFileDetails("file_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/forex@quotes/post.java b/nas_spec/code_samples/Java/forex@quotes/post.java new file mode 100644 index 000000000..a91e2bff5 --- /dev/null +++ b/nas_spec/code_samples/Java/forex@quotes/post.java @@ -0,0 +1,39 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.common.Currency; +import com.checkout.forex.QuoteRequest; +import com.checkout.forex.QuoteResponse; + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.FX) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +QuoteRequest request = QuoteRequest.builder() + .sourceCurrency(Currency.GBP) + .sourceAmount(30000L) + .destinationCurrency(Currency.USD) + .processChannelId("process_channel_id") + .build(); + +try { + QuoteResponse response = api.forexClient().requestQuote(request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/hosted-payments/post.java b/nas_spec/code_samples/Java/hosted-payments/post.java new file mode 100644 index 000000000..a789b5df6 --- /dev/null +++ b/nas_spec/code_samples/Java/hosted-payments/post.java @@ -0,0 +1,107 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.common.Address; +import com.checkout.common.ChallengeIndicator; +import com.checkout.common.CountryCode; +import com.checkout.common.Currency; +import com.checkout.common.CustomerRequest; +import com.checkout.common.Phone; +import com.checkout.common.Product; +import com.checkout.payments.BillingDescriptor; +import com.checkout.payments.BillingInformation; +import com.checkout.payments.PaymentRecipient; +import com.checkout.payments.PaymentType; +import com.checkout.payments.ProcessingSettings; +import com.checkout.payments.RiskRequest; +import com.checkout.payments.ShippingDetails; +import com.checkout.payments.ThreeDSRequest; +import com.checkout.payments.hosted.HostedPaymentRequest; +import com.checkout.payments.hosted.HostedPaymentResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +HostedPaymentRequest request = HostedPaymentRequest.builder() + .amount(10L) + .reference("reference") + .currency(Currency.GBP) + .description("Payment") + .customer(new CustomerRequest(null, "email@docs.checkout.com", "Name", null)) + .shipping(ShippingDetails.builder() + .address(Address.builder() + .addressLine1("Checkout") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build()) + .phone(Phone.builder().countryCode("1").number("415 555 2671").build()) + .build()) + .billing(BillingInformation.builder() + .address(Address.builder() + .addressLine1("Checkout") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build()) + .phone(Phone.builder().countryCode("1").number("415 555 2671").build()) + .build()) + .recipient(PaymentRecipient.builder() + .accountNumber("999999999") + .dateOfBirth("1985-05-15") + .lastName("LastName") + .zip("12345") + .build()) + .processing(ProcessingSettings.builder() + .aft(true) + .build()) + .products(Collections.singletonList(Product.builder() + .name("name") + .quantity(1L) + .price(200L) + .build())) + .risk(new RiskRequest(Boolean.FALSE)) + .locale("en-GB") + .threeDS(ThreeDSRequest.builder() + .enabled(Boolean.FALSE) + .attemptN3D(Boolean.FALSE) + .challengeIndicator(ChallengeIndicator.NO_CHALLENGE_REQUESTED) + .build()) + .capture(true) + .captureOn(Instant.now().plus(30, ChronoUnit.DAYS)) + .paymentType(PaymentType.REGULAR) + .billingDescriptor(BillingDescriptor.builder() + .city("London") + .name("name") + .build()) + .successUrl("https://docs.checkout.com/payments/success") + .failureUrl("https://docs.checkout.com/payments/success") + .cancelUrl("https://docs.checkout.com/payments/success") + .build(); + +try { + HostedPaymentResponse response = api.hostedPaymentsClient().createHostedPaymentsPageSession(request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} + diff --git a/nas_spec/code_samples/Java/hosted-payments@{id}/get.java b/nas_spec/code_samples/Java/hosted-payments@{id}/get.java new file mode 100644 index 000000000..16fd109f4 --- /dev/null +++ b/nas_spec/code_samples/Java/hosted-payments@{id}/get.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.payments.hosted.HostedPaymentDetailsResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + HostedPaymentDetailsResponse response = api.hostedPaymentsClient().getHostedPaymentsPageDetails("hosted_payment_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/instruments/post.java b/nas_spec/code_samples/Java/instruments/post.java new file mode 100644 index 000000000..b0f3b3bca --- /dev/null +++ b/nas_spec/code_samples/Java/instruments/post.java @@ -0,0 +1,63 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.common.AccountHolder; +import com.checkout.common.Address; +import com.checkout.common.CountryCode; +import com.checkout.common.Phone; +import com.checkout.instruments.create.CreateCustomerInstrumentRequest; +import com.checkout.instruments.create.CreateInstrumentResponse; +import com.checkout.instruments.create.CreateInstrumentTokenRequest; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.GATEWAY) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +CreateInstrumentTokenRequest request = CreateInstrumentTokenRequest.builder() + .token("token") + .accountHolder(AccountHolder.builder() + .firstName("FirstName") + .lastName("LastName") + .phone(Phone.builder().countryCode("1").number("415 555 2671").build()) + .billingAddress(Address.builder() + .addressLine1("CheckoutSdk.com") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build()) + .build()) + .customer(CreateCustomerInstrumentRequest.builder() + .id("customer_id") + .build()) + .build(); + +try { + CreateInstrumentResponse response = api.instrumentsClient().create(request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/instruments@{id}/delete.java b/nas_spec/code_samples/Java/instruments@{id}/delete.java new file mode 100644 index 000000000..d447ba371 --- /dev/null +++ b/nas_spec/code_samples/Java/instruments@{id}/delete.java @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.EmptyResponse; +import com.checkout.Environment; +import com.checkout.OAuthScope; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.GATEWAY) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + EmptyResponse response = api.instrumentsClient().delete("instrumentId").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/instruments@{id}/get.java b/nas_spec/code_samples/Java/instruments@{id}/get.java new file mode 100644 index 000000000..6b1651d17 --- /dev/null +++ b/nas_spec/code_samples/Java/instruments@{id}/get.java @@ -0,0 +1,39 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.instruments.get.GetCardInstrumentResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.GATEWAY) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + // Or GetBankAccountInstrumentResponse + GetCardInstrumentResponse response = (GetCardInstrumentResponse) api.instrumentsClient().get("instrument_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} + diff --git a/nas_spec/code_samples/Java/instruments@{id}/patch.java b/nas_spec/code_samples/Java/instruments@{id}/patch.java new file mode 100644 index 000000000..770bf3990 --- /dev/null +++ b/nas_spec/code_samples/Java/instruments@{id}/patch.java @@ -0,0 +1,63 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.common.AccountHolder; +import com.checkout.common.Address; +import com.checkout.common.CountryCode; +import com.checkout.common.Phone; +import com.checkout.common.UpdateCustomerRequest; +import com.checkout.instruments.update.UpdateInstrumentCardRequest; +import com.checkout.instruments.update.UpdateInstrumentResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.GATEWAY) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +UpdateInstrumentCardRequest updateRequest = UpdateInstrumentCardRequest.builder() + .expiryMonth(10) + .expiryYear(2027) + .name("name") + .customer(UpdateCustomerRequest.builder().id("customer_id").defaultCustomer(true).build()) + .accountHolder(AccountHolder.builder() + .firstName("FirstName") + .lastName("LastName") + .phone(Phone.builder().countryCode("+1").number("415 555 2671").build()) + .billingAddress(Address.builder() + .addressLine1("CheckoutSdk.com") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build()) + .build()) + .build(); + +try { + UpdateInstrumentResponse response = api.instrumentsClient().update("instrument_id", updateRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/payment-links/post.java b/nas_spec/code_samples/Java/payment-links/post.java new file mode 100644 index 000000000..058961865 --- /dev/null +++ b/nas_spec/code_samples/Java/payment-links/post.java @@ -0,0 +1,98 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.common.Address; +import com.checkout.common.ChallengeIndicator; +import com.checkout.common.CountryCode; +import com.checkout.common.Currency; +import com.checkout.common.CustomerRequest; +import com.checkout.common.Phone; +import com.checkout.common.Product; +import com.checkout.payments.BillingDescriptor; +import com.checkout.payments.BillingInformation; +import com.checkout.payments.PaymentRecipient; +import com.checkout.payments.PaymentType; +import com.checkout.payments.ProcessingSettings; +import com.checkout.payments.RiskRequest; +import com.checkout.payments.ShippingDetails; +import com.checkout.payments.ThreeDSRequest; +import com.checkout.payments.links.PaymentLinkRequest; +import com.checkout.payments.links.PaymentLinkResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +PaymentLinkRequest paymentLinksRequest = PaymentLinkRequest.builder() + .amount(10L) + .currency(Currency.GBP) + .reference("reference") + .description("description") + .expiresIn(604800) + .customer(new CustomerRequest(null, "email@docs.checkout.com", "Name", null)) + .shipping(ShippingDetails.builder() + .address(Address.builder() + .addressLine1("Checkout") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build()) + .phone(Phone.builder().countryCode("1").number("415 555 2671").build()) + .build()) + .billing(BillingInformation.builder() + .address(Address.builder() + .addressLine1("Checkout") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build()) + .phone(Phone.builder().countryCode("1").number("415 555 2671").build()) + .build()) + .recipient(PaymentRecipient.builder() + .accountNumber("999999999") + .dateOfBirth("1985-05-15") + .lastName("LastName") + .zip("12345") + .build()) + .processing(ProcessingSettings.builder() + .aft(true) + .build()) + .capture(true) + .captureOn(Instant.now().plus(30, ChronoUnit.DAYS)) + .products(Collections.singletonList(Product.builder() + .name("name") + .quantity(1L) + .price(200L) + .build())) + .threeDS(ThreeDSRequest.builder() + .enabled(Boolean.FALSE) + .attemptN3D(Boolean.FALSE) + .challengeIndicator(ChallengeIndicator.NO_CHALLENGE_REQUESTED) + .build()) + .risk(new RiskRequest(Boolean.FALSE)) + .returnUrl("https://docs.checkout.com/success") + .locale("en-GB") + .paymentType(PaymentType.REGULAR) + .billingDescriptor(BillingDescriptor.builder() + .city("London") + .name("name") + .build()) + .build(); + +try { + PaymentLinkResponse response = api.paymentLinksClient().createPaymentLink(paymentLinksRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/payment-links@{id}/get.java b/nas_spec/code_samples/Java/payment-links@{id}/get.java new file mode 100644 index 000000000..182bd0014 --- /dev/null +++ b/nas_spec/code_samples/Java/payment-links@{id}/get.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.payments.links.PaymentLinkDetailsResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + PaymentLinkDetailsResponse response = api.paymentLinksClient().getPaymentLink("payment_link_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/payments/post.java b/nas_spec/code_samples/Java/payments/post.java new file mode 100644 index 000000000..61aec9508 --- /dev/null +++ b/nas_spec/code_samples/Java/payments/post.java @@ -0,0 +1,90 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.common.AccountHolderIdentification; +import com.checkout.common.AccountHolderIdentificationType; +import com.checkout.common.Address; +import com.checkout.common.ChallengeIndicator; +import com.checkout.common.CountryCode; +import com.checkout.common.Currency; +import com.checkout.payments.ThreeDSRequest; +import com.checkout.payments.request.PaymentRequest; +import com.checkout.payments.request.source.RequestCardSource; +import com.checkout.payments.response.PaymentResponse; +import com.checkout.payments.sender.PaymentIndividualSender; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.GATEWAY) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +RequestCardSource source = RequestCardSource.builder() + .number("123456789") + .expiryMonth(10) + .expiryYear(2027) + .cvv("123") + .stored(false) + .build(); + +PaymentIndividualSender sender = PaymentIndividualSender.builder() + .firstName("FirstName") + .lastName("LastName") + .address(Address.builder() + .addressLine1("Checkout") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build()) + .identification(AccountHolderIdentification.builder() + .type(AccountHolderIdentificationType.DRIVING_LICENCE) + .number("1234") + .issuingCountry(CountryCode.GB) + .build()) + .build(); + +ThreeDSRequest threeDSRequest = ThreeDSRequest.builder() + .enabled(true) + .challengeIndicator(ChallengeIndicator.NO_CHALLENGE_REQUESTED) + .build(); + +PaymentRequest request = PaymentRequest.builder() + .source(source) + .sender(sender) + .capture(false) + .reference("reference") + .amount(10L) + .currency(Currency.GBP) + .threeDS(threeDSRequest) + .successUrl("https://docs.checkout.com/success") + .failureUrl("https://docs.checkout.com/failure") + .build(); + +try { + PaymentResponse response = api.paymentsClient().requestPayment(request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/payments@{id}/get.java b/nas_spec/code_samples/Java/payments@{id}/get.java new file mode 100644 index 000000000..5ea410bbf --- /dev/null +++ b/nas_spec/code_samples/Java/payments@{id}/get.java @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.payments.response.GetPaymentResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.GATEWAY) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + GetPaymentResponse response = api.paymentsClient().getPayment("payment_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/payments@{id}@actions/get.java b/nas_spec/code_samples/Java/payments@{id}@actions/get.java new file mode 100644 index 000000000..eb819ba9f --- /dev/null +++ b/nas_spec/code_samples/Java/payments@{id}@actions/get.java @@ -0,0 +1,38 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.ItemsResponse; +import com.checkout.OAuthScope; +import com.checkout.payments.PaymentAction; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.GATEWAY) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + ItemsResponse response = api.paymentsClient().getPaymentActions("payment_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/payments@{id}@authorizations/post.java b/nas_spec/code_samples/Java/payments@{id}@authorizations/post.java new file mode 100644 index 000000000..94b5510d5 --- /dev/null +++ b/nas_spec/code_samples/Java/payments@{id}@authorizations/post.java @@ -0,0 +1,44 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.payments.request.AuthorizationRequest; +import com.checkout.payments.response.AuthorizationResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.GATEWAY) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +AuthorizationRequest authorizationRequest = AuthorizationRequest.builder() + .amount(100L) + .reference("reference") + .build(); + +try { + // Optional: idempotencyKey as a third parameter for idempotent requests + AuthorizationResponse response = api.paymentsClient().incrementPaymentAuthorization("payment_id", authorizationRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/payments@{id}@captures/post.java b/nas_spec/code_samples/Java/payments@{id}@captures/post.java new file mode 100644 index 000000000..10439b6bd --- /dev/null +++ b/nas_spec/code_samples/Java/payments@{id}@captures/post.java @@ -0,0 +1,47 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.payments.CaptureRequest; +import com.checkout.payments.CaptureResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.GATEWAY) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +CaptureRequest captureRequest = CaptureRequest.builder() + .amount(10L) + .reference("partial capture") + .metadata(new HashMap<>()) + .build(); + +try { + // or, capturePayment("payment_id") for a full capture + CaptureResponse response = api.paymentsClient().capturePayment("payment_id", captureRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} + + diff --git a/nas_spec/code_samples/Java/payments@{id}@refunds/post.java b/nas_spec/code_samples/Java/payments@{id}@refunds/post.java new file mode 100644 index 000000000..85c898eca --- /dev/null +++ b/nas_spec/code_samples/Java/payments@{id}@refunds/post.java @@ -0,0 +1,45 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.payments.RefundRequest; +import com.checkout.payments.RefundResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.GATEWAY) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +RefundRequest refundRequest = RefundRequest.builder() + .reference("partial refund") + .amount(10L) + .metadata(new HashMap<>()) + .build(); + +try { + // or, refundPayment("payment_id") for a full refund + RefundResponse response = api.paymentsClient().refundPayment("payment_id", refundRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/payments@{id}@voids/post.java b/nas_spec/code_samples/Java/payments@{id}@voids/post.java new file mode 100644 index 000000000..384eb2968 --- /dev/null +++ b/nas_spec/code_samples/Java/payments@{id}@voids/post.java @@ -0,0 +1,44 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.payments.VoidRequest; +import com.checkout.payments.VoidResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.GATEWAY) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +VoidRequest voidRequest = VoidRequest.builder() + .reference("reference") + .metadata(new HashMap<>()) + .build(); + +try { + // or, voidPayment("payment_id") + VoidResponse response = api.paymentsClient().voidPayment("payment_id", voidRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/risk@assessments@pre-authentication/post.java b/nas_spec/code_samples/Java/risk@assessments@pre-authentication/post.java new file mode 100644 index 000000000..da8850452 --- /dev/null +++ b/nas_spec/code_samples/Java/risk@assessments@pre-authentication/post.java @@ -0,0 +1,91 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.common.Address; +import com.checkout.common.CountryCode; +import com.checkout.common.Currency; +import com.checkout.common.CustomerRequest; +import com.checkout.common.Phone; +import com.checkout.risk.Device; +import com.checkout.risk.Location; +import com.checkout.risk.RiskPayment; +import com.checkout.risk.RiskShippingDetails; +import com.checkout.risk.preauthentication.PreAuthenticationAssessmentRequest; +import com.checkout.risk.preauthentication.PreAuthenticationAssessmentResponse; +import com.checkout.risk.source.CardSourcePrism; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +CardSourcePrism cardSourcePrism = CardSourcePrism.builder() + .billingAddress(Address.builder() + .addressLine1("Checkout") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build()) + .expiryMonth(10) + .expiryYear(2027) + .number("123456789") + .phone(Phone.builder().countryCode("1").number("415 555 2671").build()) + .build(); + +PreAuthenticationAssessmentRequest request = PreAuthenticationAssessmentRequest.builder() + .date(Instant.now()) + .source(cardSourcePrism) + .customer(new CustomerRequest(null, "email@docs.checkout.com", "Name", null)) + .payment(RiskPayment.builder().psp("checkout").id("123456789").build()) + .shipping(RiskShippingDetails.builder().address( + Address.builder() + .addressLine1("Checkout") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build() + ).build()) + .reference("reference") + .description("description") + .amount(10L) + .currency(Currency.GBP) + .device(Device.builder() + .ip("90.197.169.245") + .location(Location.builder().longitude("0.1313").latitude("51.5107").build()) + .type("Phone") + .os("iOS") + .model("iPhone X") + .date(Instant.now()) + .userAgent("Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1") + .fingerprint("34304a9e3fg09302") + .build()) + .metadata(Stream.of( + new AbstractMap.SimpleImmutableEntry<>("VoucherCode", "loyalty_10"), + new AbstractMap.SimpleImmutableEntry<>("discountApplied", "10"), + new AbstractMap.SimpleImmutableEntry<>("customer_id", "2190EF321")) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue))) + .build(); + +try { + PreAuthenticationAssessmentResponse response = api.riskClient().requestPreAuthenticationRiskScan(request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/risk@assessments@pre-capture/post.java b/nas_spec/code_samples/Java/risk@assessments@pre-capture/post.java new file mode 100644 index 000000000..c937cccec --- /dev/null +++ b/nas_spec/code_samples/Java/risk@assessments@pre-capture/post.java @@ -0,0 +1,62 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.common.Currency; +import com.checkout.common.CustomerRequest; +import com.checkout.risk.Device; +import com.checkout.risk.RiskPayment; +import com.checkout.risk.RiskShippingDetails; +import com.checkout.risk.precapture.AuthenticationResult; +import com.checkout.risk.precapture.AuthorizationResult; +import com.checkout.risk.precapture.PreCaptureAssessmentRequest; +import com.checkout.risk.precapture.PreCaptureAssessmentResponse; +import com.checkout.risk.source.CustomerSourcePrism; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +PreCaptureAssessmentRequest request = PreCaptureAssessmentRequest.builder() + .date(Instant.MAX) + .source(CustomerSourcePrism.builder().build()) + .customer(new CustomerRequest(null, "email@docs.checkout.com", "Name", null)) + .payment(RiskPayment.builder().build()) + .shipping(RiskShippingDetails.builder().build()) + .amount(10L) + .currency(Currency.GBP) + .device(Device.builder().build()) + .metadata(new HashMap<>()) + .authenticationResult(AuthenticationResult.builder() + .attempted(true) + .challenged(true) + .liabilityShifted(true) + .method("3ds") + .succeeded(true) + .version("2.0") + .build()) + .authorizationResult(AuthorizationResult.builder() + .avsCode("V") + .cvvResult("N") + .build()) + .build(); + +try { + PreCaptureAssessmentResponse response = api.riskClient().requestPreCaptureRiskScan(request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/standalone/post.java b/nas_spec/code_samples/Java/standalone/post.java new file mode 100644 index 000000000..504929d78 --- /dev/null +++ b/nas_spec/code_samples/Java/standalone/post.java @@ -0,0 +1,68 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.common.ChallengeIndicator; +import com.checkout.common.CountryCode; +import com.checkout.common.Currency; +import com.checkout.sessions.AuthenticationType; +import com.checkout.sessions.Category; +import com.checkout.sessions.SessionAddress; +import com.checkout.sessions.SessionRequest; +import com.checkout.sessions.SessionResponse; +import com.checkout.sessions.TransactionType; +import com.checkout.sessions.completion.HostedCompletionInfo; +import com.checkout.sessions.source.SessionCardSource; + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.SESSIONS_APP, OAuthScope.SESSIONS_BROWSER) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +SessionRequest sessionRequest = SessionRequest.builder() + .source(SessionCardSource.builder() + .expiryMonth(10) + .expiryYear(2027) + .number("12345678") + .build()) + .amount(10L) + .currency(Currency.USD) + .processingChannelId("processing_channel_id") + .authenticationType(AuthenticationType.REGULAR) + .authenticationCategory(Category.PAYMENT) + .challengeIndicator(ChallengeIndicator.NO_PREFERENCE) + .reference("reference") + .transactionType(TransactionType.GOODS_SERVICE) + .shippingAddress(SessionAddress.builderSessionAddress() + .addressLine1("Checkout.com") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("ENG") + .country(CountryCode.GB) + .zip("W1T 4TJ") + .build()) + .completion(HostedCompletionInfo.builder() + .successUrl("https://docs.checkout.com/sessions/success") + .failureUrl("https://docs.checkout.com/sessions/fail") + .build()) + .build(); + +try { + SessionResponse response = api.sessionsClient().requestSession(sessionRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/standalone@{id}/get.java b/nas_spec/code_samples/Java/standalone@{id}/get.java new file mode 100644 index 000000000..ecf9f1b0e --- /dev/null +++ b/nas_spec/code_samples/Java/standalone@{id}/get.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.sessions.GetSessionResponse; + +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.SESSIONS_APP, OAuthScope.SESSIONS_BROWSER) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + GetSessionResponse response = api.sessionsClient().getSessionDetails("session_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/standalone@{id}@collect-data/put.java b/nas_spec/code_samples/Java/standalone@{id}@collect-data/put.java new file mode 100644 index 000000000..c4d76a2a2 --- /dev/null +++ b/nas_spec/code_samples/Java/standalone@{id}@collect-data/put.java @@ -0,0 +1,46 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.sessions.GetSessionResponse; +import com.checkout.sessions.channel.BrowserSession; +import com.checkout.sessions.channel.ChannelData; +import com.checkout.sessions.channel.ThreeDsMethodCompletion; + +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.SESSIONS_APP, OAuthScope.SESSIONS_BROWSER) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +ChannelData channelData = BrowserSession.builder() // other channel data types available + .acceptHeader("Accept: *.*, q=0.1") + .javaEnabled(true) + .language("FR-fr") + .colorDepth("16") + .screenWidth("1920") + .screenHeight("1080") + .timezone("60") + .userAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36") + .threeDsMethodCompletion(ThreeDsMethodCompletion.Y) + .ipAddress("1.12.123.255") + .build(); + +try { + GetSessionResponse response = api.sessionsClient().updateSession("session_id", channelData).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} + diff --git a/nas_spec/code_samples/Java/standalone@{id}@complete/post.java b/nas_spec/code_samples/Java/standalone@{id}@complete/post.java new file mode 100644 index 000000000..5862fb127 --- /dev/null +++ b/nas_spec/code_samples/Java/standalone@{id}@complete/post.java @@ -0,0 +1,29 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.EmptyResponse; +import com.checkout.Environment; +import com.checkout.OAuthScope; + +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.SESSIONS_APP, OAuthScope.SESSIONS_BROWSER) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + EmptyResponse response = api.sessionsClient().completeSession("session_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/standalone@{id}@issuer-fingerprint/put.java b/nas_spec/code_samples/Java/standalone@{id}@issuer-fingerprint/put.java new file mode 100644 index 000000000..8f964b606 --- /dev/null +++ b/nas_spec/code_samples/Java/standalone@{id}@issuer-fingerprint/put.java @@ -0,0 +1,35 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.sessions.GetSessionResponseAfterChannelDataSupplied; +import com.checkout.sessions.ThreeDsMethodCompletionRequest; +import com.checkout.sessions.channel.ThreeDsMethodCompletion; + +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.SESSIONS_APP, OAuthScope.SESSIONS_BROWSER) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +ThreeDsMethodCompletionRequest threeDsMethodCompletionRequest = ThreeDsMethodCompletionRequest.builder() + .threeDsMethodCompletion(ThreeDsMethodCompletion.Y) + .build(); + +try { + GetSessionResponseAfterChannelDataSupplied response = api.sessionsClient().update3dsMethodCompletionIndicator("session_id", threeDsMethodCompletionRequest).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/tokens/post.java b/nas_spec/code_samples/Java/tokens/post.java new file mode 100644 index 000000000..a975e3b8b --- /dev/null +++ b/nas_spec/code_samples/Java/tokens/post.java @@ -0,0 +1,46 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.common.Address; +import com.checkout.common.CountryCode; +import com.checkout.tokens.CardTokenRequest; +import com.checkout.tokens.CardTokenResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .publicKey("public_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +CardTokenRequest request = CardTokenRequest.builder() + .number("1234567") + .expiryMonth(10) + .expiryYear(2027) + .billingAddress(Address.builder() + .addressLine1("Checkout") + .addressLine2("90 Tottenham Court Road") + .city("London") + .state("London") + .zip("W1T 4TJ") + .country(CountryCode.GB) + .build()) + .build(); + +try { + CardTokenResponse response = api.tokensClient().requestCardToken(request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/transfers/post.java b/nas_spec/code_samples/Java/transfers/post.java new file mode 100644 index 000000000..59e244630 --- /dev/null +++ b/nas_spec/code_samples/Java/transfers/post.java @@ -0,0 +1,46 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.transfers.CreateTransferResponse; +import com.checkout.transfers.CreateTransferRequest; +import com.checkout.transfers.TransferDestinationRequest; +import com.checkout.transfers.TransferSourceRequest; +import com.checkout.transfers.TransferType; + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.TRANSFERS_CREATE) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +CreateTransferRequest request = CreateTransferRequest.builder() + .reference("reference") + .transferType(TransferType.COMMISSION) + .source(TransferSourceRequest.builder() + .id("entity_id") + .amount(100L) + .build()) + .destination(TransferDestinationRequest.builder() + .id("destination_id") + .build()) + .build(); + +try { + CreateTransferResponse response = api.transfersClient().initiateTransferOfFunds(request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/transfers@{id}/get.java b/nas_spec/code_samples/Java/transfers@{id}/get.java new file mode 100644 index 000000000..9b28a63ce --- /dev/null +++ b/nas_spec/code_samples/Java/transfers@{id}/get.java @@ -0,0 +1,30 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.transfers.TransferDetailsResponse; + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.TRANSFERS_VIEW) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + TransferDetailsResponse response = api.transfersClient().retrieveATransfer("transfer_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/validation@bank-accounts@{country}@{currency}/get.java b/nas_spec/code_samples/Java/validation@bank-accounts@{country}@{currency}/get.java new file mode 100644 index 000000000..c7fa9fc1a --- /dev/null +++ b/nas_spec/code_samples/Java/validation@bank-accounts@{country}@{currency}/get.java @@ -0,0 +1,40 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-javaç +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.common.AccountHolderType; +import com.checkout.common.CountryCode; +import com.checkout.common.Currency; +import com.checkout.instruments.get.BankAccountFieldQuery; +import com.checkout.instruments.get.BankAccountFieldResponse; +import com.checkout.instruments.get.PaymentNetwork; + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.PAYOUTS_BANK_DETAILS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +BankAccountFieldQuery query = BankAccountFieldQuery.builder() + .accountHolderType(AccountHolderType.INDIVIDUAL) + .paymentNetwork(PaymentNetwork.LOCAL) + .build(); + +try { + BankAccountFieldResponse response = api.instrumentsClient().getBankAccountFieldFormatting(CountryCode.GB, Currency.GBP, query).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/workflows/get.java b/nas_spec/code_samples/Java/workflows/get.java new file mode 100644 index 000000000..006dd13ff --- /dev/null +++ b/nas_spec/code_samples/Java/workflows/get.java @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.workflows.GetWorkflowsResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.FLOW_WORKFLOWS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + GetWorkflowsResponse response = api.workflowsClient().getWorkflows().get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/workflows/post.java b/nas_spec/code_samples/Java/workflows/post.java new file mode 100644 index 000000000..492f7a194 --- /dev/null +++ b/nas_spec/code_samples/Java/workflows/post.java @@ -0,0 +1,62 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.workflows.CreateWorkflowRequest; +import com.checkout.workflows.CreateWorkflowResponse; +import com.checkout.workflows.actions.WebhookSignature; +import com.checkout.workflows.actions.request.WebhookWorkflowActionRequest; +import com.checkout.workflows.conditions.request.EntityWorkflowConditionRequest; +import com.checkout.workflows.conditions.request.ProcessingChannelWorkflowConditionRequest; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.FLOW_WORKFLOWS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +WebhookWorkflowActionRequest workflowActionRequest = WebhookWorkflowActionRequest.builder() + .url("https://docs.checkout.com/webhook") + .headers(new HashMap<>()) + .signature(WebhookSignature.builder().key("8V8x0dLK%AyD*DNS8JJr").method("HMACSHA256").build()) + .build(); + +EntityWorkflowConditionRequest condition1 = EntityWorkflowConditionRequest.builder() + .entities(Collections.singletonList("workflow_entity_id")) + .build(); + +ProcessingChannelWorkflowConditionRequest condition2 = ProcessingChannelWorkflowConditionRequest.builder() + .processingChannels(Collections.singletonList("processing_channel_id")) + .build(); + +CreateWorkflowRequest request = CreateWorkflowRequest.builder() + .name("name") + .actions(Collections.singletonList(workflowActionRequest)) + .conditions(Arrays.asList(condition1, condition2)) + .build(); + +try { + CreateWorkflowResponse response = api.workflowsClient().createWorkflow(request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/workflows@event-types/get.java b/nas_spec/code_samples/Java/workflows@event-types/get.java new file mode 100644 index 000000000..902fa7eb2 --- /dev/null +++ b/nas_spec/code_samples/Java/workflows@event-types/get.java @@ -0,0 +1,38 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.ItemsResponse; +import com.checkout.OAuthScope; +import com.checkout.workflows.events.WorkflowEventTypes; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.FLOW_WORKFLOWS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + ItemsResponse response = api.workflowsClient().getEventTypes().get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/workflows@events@reflow/post.java b/nas_spec/code_samples/Java/workflows@events@reflow/post.java new file mode 100644 index 000000000..77d4b9724 --- /dev/null +++ b/nas_spec/code_samples/Java/workflows@events@reflow/post.java @@ -0,0 +1,43 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.workflows.reflow.ReflowByEventsRequest; +import com.checkout.workflows.reflow.ReflowResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.FLOW, OAuthScope.FLOW_WORKFLOWS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +ReflowByEventsRequest request = ReflowByEventsRequest.builder() + .events(Arrays.asList("event_id_1", "event_id_2")) + .workflows(Arrays.asList("workflow_id_1", "workflow_id_2")) + .build(); + +try { + ReflowResponse response = api.workflowsClient().reflow(request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/workflows@events@subject@{subjectId}/get.java b/nas_spec/code_samples/Java/workflows@events@subject@{subjectId}/get.java new file mode 100644 index 000000000..6bcef2167 --- /dev/null +++ b/nas_spec/code_samples/Java/workflows@events@subject@{subjectId}/get.java @@ -0,0 +1,43 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.workflows.events.SubjectEventsResponse; +import com.checkout.workflows.reflow.ReflowByEventsRequest; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.FLOW_EVENTS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +ReflowByEventsRequest request = ReflowByEventsRequest.builder() + .events(Arrays.asList("event_id_1", "event_id_2")) + .workflows(Arrays.asList("workflow_id_1", "workflow_id_2")) + .build(); + +try { + SubjectEventsResponse response = api.workflowsClient().getSubjectEvents("subject_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/workflows@events@subject@{subjectId}@reflow/post.java b/nas_spec/code_samples/Java/workflows@events@subject@{subjectId}@reflow/post.java new file mode 100644 index 000000000..961de0dda --- /dev/null +++ b/nas_spec/code_samples/Java/workflows@events@subject@{subjectId}@reflow/post.java @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.workflows.reflow.ReflowResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.FLOW, OAuthScope.FLOW_WORKFLOWS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + ReflowResponse response = api.workflowsClient().reflowBySubject("subject_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow/post.java b/nas_spec/code_samples/Java/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow/post.java new file mode 100644 index 000000000..9b0fe3bd7 --- /dev/null +++ b/nas_spec/code_samples/Java/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow/post.java @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.workflows.reflow.ReflowResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.FLOW, OAuthScope.FLOW_WORKFLOWS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + ReflowResponse response = api.workflowsClient().reflowBySubjectAndWorkflow("subject_id", "workflow_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/workflows@events@{eventId}/get.java b/nas_spec/code_samples/Java/workflows@events@{eventId}/get.java new file mode 100644 index 000000000..429bee4c4 --- /dev/null +++ b/nas_spec/code_samples/Java/workflows@events@{eventId}/get.java @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.workflows.events.GetEventResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.FLOW_EVENTS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + GetEventResponse response = api.workflowsClient().getEvent("event_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/workflows@events@{eventId}@actions@{workflowActionId}/get.java b/nas_spec/code_samples/Java/workflows@events@{eventId}@actions@{workflowActionId}/get.java new file mode 100644 index 000000000..e22dd5581 --- /dev/null +++ b/nas_spec/code_samples/Java/workflows@events@{eventId}@actions@{workflowActionId}/get.java @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.workflows.actions.response.WorkflowActionInvocationsResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.FLOW_EVENTS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + WorkflowActionInvocationsResponse response = api.workflowsClient().getActionInvocations("event_id", "action_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/workflows@events@{eventId}@reflow/post.java b/nas_spec/code_samples/Java/workflows@events@{eventId}@reflow/post.java new file mode 100644 index 000000000..1b6a86a25 --- /dev/null +++ b/nas_spec/code_samples/Java/workflows@events@{eventId}@reflow/post.java @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.workflows.reflow.ReflowResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.FLOW, OAuthScope.FLOW_WORKFLOWS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + ReflowResponse response = api.workflowsClient().reflowByEvent("event_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/workflows@events@{eventId}@workflow@{workflowId}@reflow/post.java b/nas_spec/code_samples/Java/workflows@events@{eventId}@workflow@{workflowId}@reflow/post.java new file mode 100644 index 000000000..69efd98c5 --- /dev/null +++ b/nas_spec/code_samples/Java/workflows@events@{eventId}@workflow@{workflowId}@reflow/post.java @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.workflows.reflow.ReflowResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.FLOW, OAuthScope.FLOW_WORKFLOWS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + ReflowResponse response = api.workflowsClient().reflowByEventAndWorkflow("event_id", "workflow_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/workflows@{workflowId}/delete.java b/nas_spec/code_samples/Java/workflows@{workflowId}/delete.java new file mode 100644 index 000000000..b82969208 --- /dev/null +++ b/nas_spec/code_samples/Java/workflows@{workflowId}/delete.java @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.EmptyResponse; +import com.checkout.Environment; +import com.checkout.OAuthScope; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth + CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.FLOW, OAuthScope.FLOW_WORKFLOWS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + EmptyResponse response = api.workflowsClient().removeWorkflow("workflow_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/Java/workflows@{workflowId}/get.java b/nas_spec/code_samples/Java/workflows@{workflowId}/get.java new file mode 100644 index 000000000..8313d0d18 --- /dev/null +++ b/nas_spec/code_samples/Java/workflows@{workflowId}/get.java @@ -0,0 +1,37 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.workflows.GetWorkflowResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.FLOW_WORKFLOWS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +try { + GetWorkflowResponse response = api.workflowsClient().getWorkflow("workflow_id").get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/workflows@{workflowId}/patch.java b/nas_spec/code_samples/Java/workflows@{workflowId}/patch.java new file mode 100644 index 000000000..8fc660de8 --- /dev/null +++ b/nas_spec/code_samples/Java/workflows@{workflowId}/patch.java @@ -0,0 +1,42 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.workflows.UpdateWorkflowRequest; +import com.checkout.workflows.UpdateWorkflowResponse; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.FLOW, OAuthScope.FLOW_WORKFLOWS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +UpdateWorkflowRequest request = UpdateWorkflowRequest.builder() + .name("new name") + .build(); + +try { + UpdateWorkflowResponse response = api.workflowsClient().updateWorkflow("workflow_id", request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/workflows@{workflowId}@actions@{workflowActionId}/put.java b/nas_spec/code_samples/Java/workflows@{workflowId}@actions@{workflowActionId}/put.java new file mode 100644 index 000000000..06d5967d5 --- /dev/null +++ b/nas_spec/code_samples/Java/workflows@{workflowId}@actions@{workflowActionId}/put.java @@ -0,0 +1,45 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.EmptyResponse; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.workflows.actions.WebhookSignature; +import com.checkout.workflows.actions.request.WebhookWorkflowActionRequest; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.FLOW_WORKFLOWS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +WebhookWorkflowActionRequest request = WebhookWorkflowActionRequest.builder() + .signature(WebhookSignature.builder().key("8V8x0dLK%AyD*DNS8JJr").method("HMACSHA256").build()) + .headers(new HashMap<>()) + .url("https://docs.checkout.com/fail") + .build(); + +try { + EmptyResponse response = api.workflowsClient().updateWorkflowAction("workflow_id", "action_id", request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Java/workflows@{workflowId}@conditions@{workflowConditionId}/put.java b/nas_spec/code_samples/Java/workflows@{workflowId}@conditions@{workflowConditionId}/put.java new file mode 100644 index 000000000..ed36ec448 --- /dev/null +++ b/nas_spec/code_samples/Java/workflows@{workflowId}@conditions@{workflowConditionId}/put.java @@ -0,0 +1,42 @@ +// For more information please refer to https://github.com/checkout/checkout-sdk-java +import com.checkout.CheckoutApi; +import com.checkout.CheckoutApiException; +import com.checkout.CheckoutArgumentException; +import com.checkout.CheckoutAuthorizationException; +import com.checkout.CheckoutSdk; +import com.checkout.EmptyResponse; +import com.checkout.Environment; +import com.checkout.OAuthScope; +import com.checkout.workflows.conditions.request.EventWorkflowConditionRequest; + +// API Keys +CheckoutApi api = CheckoutSdk.builder() + .staticKeys() + .secretKey("secret_key") + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +// OAuth +CheckoutApi api = CheckoutSdk.builder() + .oAuth() + .clientCredentials("client_id", "client_secret") + .scopes(OAuthScope.FLOW_WORKFLOWS) // more scopes available + .environment(Environment.SANDBOX) // or Environment.PRODUCTION + .build(); + +EventWorkflowConditionRequest request = EventWorkflowConditionRequest.builder() + .events(new HashMap<>()) + .build(); + +try { + EmptyResponse response = api.workflowsClient().updateWorkflowCondition("workflow_id", "condition_id", request).get(); +} catch (CheckoutApiException e) { + // API error + String requestId = e.getRequestId(); + int statusCode = e.getHttpStatusCode(); + Map errorDetails = e.getErrorDetails(); +} catch (CheckoutArgumentException e) { + // Bad arguments +} catch (CheckoutAuthorizationException e) { + // Invalid authorization +} diff --git a/nas_spec/code_samples/Node/applepay@certificates/post.js b/nas_spec/code_samples/Node/applepay@certificates/post.js new file mode 100644 index 000000000..a4d675c49 --- /dev/null +++ b/nas_spec/code_samples/Node/applepay@certificates/post.js @@ -0,0 +1,13 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('sk_sbox_XXXXX', { + pk: 'pk_sbox_XXXXX', +}); + +try { + const apple = await cko.applePay.upload({ + content: 'XXXXXXX', // make sure you escape the characters + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/applepay@signing-requests/post.js b/nas_spec/code_samples/Node/applepay@signing-requests/post.js new file mode 100644 index 000000000..421c19fa8 --- /dev/null +++ b/nas_spec/code_samples/Node/applepay@signing-requests/post.js @@ -0,0 +1,11 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('sk_sbox_XXXXX', { + pk: 'pk_sbox_XXXXX', +}); + +try { + const apple = await cko.applePay.generate(); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/connect@token/post.js b/nas_spec/code_samples/Node/connect@token/post.js new file mode 100644 index 000000000..b518db24e --- /dev/null +++ b/nas_spec/code_samples/Node/connect@token/post.js @@ -0,0 +1,14 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout(); + +try { + const access_token = await cko.access.request({ + grant_type: 'client_credentials', + client_id: 'ack_XXXX', + client_secret: 'XXXXX', + scope: 'gateway', + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/customers/post.js b/nas_spec/code_samples/Node/customers/post.js new file mode 100644 index 000000000..0f8ae8103 --- /dev/null +++ b/nas_spec/code_samples/Node/customers/post.js @@ -0,0 +1,27 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const customerResponse = await cko.customers.create({ + email: 'JohnTest@test.com', + name: 'John Test', + phone: { + country_code: '+1', + number: '4155552671', + }, + metadata: { + coupon_code: 'NY2018', + partner_id: 123989, + }, + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/customers@{identifier}/delete.js b/nas_spec/code_samples/Node/customers@{identifier}/delete.js new file mode 100644 index 000000000..ee34e3034 --- /dev/null +++ b/nas_spec/code_samples/Node/customers@{identifier}/delete.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const customerResponse = await cko.customers.delete('cus_2tvaccfvs3lulevzg42vgyvtdq'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/customers@{identifier}/get.js b/nas_spec/code_samples/Node/customers@{identifier}/get.js new file mode 100644 index 000000000..e61d9f2a3 --- /dev/null +++ b/nas_spec/code_samples/Node/customers@{identifier}/get.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const customerResponse = await cko.customers.get('cus_2tvaccfvs3lulevzg42vgyvtdq'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/customers@{identifier}/patch.js b/nas_spec/code_samples/Node/customers@{identifier}/patch.js new file mode 100644 index 000000000..b6a556c11 --- /dev/null +++ b/nas_spec/code_samples/Node/customers@{identifier}/patch.js @@ -0,0 +1,18 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const customerResponse = await cko.customers.update('cus_2tvaccfvs3lulevzg42vgyvtdq', { + name: 'James Bond', + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/customers@{identifier}/update.js b/nas_spec/code_samples/Node/customers@{identifier}/update.js new file mode 100644 index 000000000..e61d9f2a3 --- /dev/null +++ b/nas_spec/code_samples/Node/customers@{identifier}/update.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const customerResponse = await cko.customers.get('cus_2tvaccfvs3lulevzg42vgyvtdq'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/customers@{id}/delete.js b/nas_spec/code_samples/Node/customers@{id}/delete.js new file mode 100644 index 000000000..b12b1d2a5 --- /dev/null +++ b/nas_spec/code_samples/Node/customers@{id}/delete.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const customerResponse = await cko.customers.delete('cus_2tvaccfvs3lulevzg42vgyvtdq'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/disputes/get.js b/nas_spec/code_samples/Node/disputes/get.js new file mode 100644 index 000000000..c1d08d0f3 --- /dev/null +++ b/nas_spec/code_samples/Node/disputes/get.js @@ -0,0 +1,19 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const disputes = await cko.disputes.get({ + limit: 5, + id: 'dsp_bc94ebda8d275i461229', + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/disputes@{dispute_id}/get.js b/nas_spec/code_samples/Node/disputes@{dispute_id}/get.js new file mode 100644 index 000000000..9b267bc08 --- /dev/null +++ b/nas_spec/code_samples/Node/disputes@{dispute_id}/get.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const disputeDetails = await cko.disputes.getDetails('dsp_bc94ebda8d275i461229'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/disputes@{dispute_id}@accept/post.js b/nas_spec/code_samples/Node/disputes@{dispute_id}@accept/post.js new file mode 100644 index 000000000..d3f190076 --- /dev/null +++ b/nas_spec/code_samples/Node/disputes@{dispute_id}@accept/post.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const accept = await cko.disputes.accept('dsp_bc94ebda8d275i461229'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/disputes@{dispute_id}@evidence/get.js b/nas_spec/code_samples/Node/disputes@{dispute_id}@evidence/get.js new file mode 100644 index 000000000..8475c2b36 --- /dev/null +++ b/nas_spec/code_samples/Node/disputes@{dispute_id}@evidence/get.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const getEvidence = await cko.disputes.getEvidence('dsp_bc94ebda8d275i461229'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/disputes@{dispute_id}@evidence/post.js b/nas_spec/code_samples/Node/disputes@{dispute_id}@evidence/post.js new file mode 100644 index 000000000..eedc48575 --- /dev/null +++ b/nas_spec/code_samples/Node/disputes@{dispute_id}@evidence/post.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const submitEvidence = await cko.disputes.submit('dsp_bc94ebda8d275i461229'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/disputes@{dispute_id}@evidence/put.js b/nas_spec/code_samples/Node/disputes@{dispute_id}@evidence/put.js new file mode 100644 index 000000000..b6165b553 --- /dev/null +++ b/nas_spec/code_samples/Node/disputes@{dispute_id}@evidence/put.js @@ -0,0 +1,18 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const evidence = await cko.disputes.provideEvidence('dsp_bc94ebda8d275i461229', { + proof_of_delivery_or_service_text: 'http://checkout.com/document.pdf', + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/files/post.js b/nas_spec/code_samples/Node/files/post.js new file mode 100644 index 000000000..999c1175d --- /dev/null +++ b/nas_spec/code_samples/Node/files/post.js @@ -0,0 +1,19 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const file = await cko.files.upload({ + path: fs.createReadStream('./test/files/evidence.jpg'), + purpose: 'dispute_evidence', + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/files@{file_id}/get.js b/nas_spec/code_samples/Node/files@{file_id}/get.js new file mode 100644 index 000000000..952f82305 --- /dev/null +++ b/nas_spec/code_samples/Node/files@{file_id}/get.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const getFile = await cko.files.getFile('file_zna32sccqbwevd3ldmejtplbhu'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/forex@quotes/post.js b/nas_spec/code_samples/Node/forex@quotes/post.js new file mode 100644 index 000000000..6c301b573 --- /dev/null +++ b/nas_spec/code_samples/Node/forex@quotes/post.js @@ -0,0 +1,21 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let forex = await cko.forex.request({ + source_currency: 'GBP', + source_amount: 30000, + destination_currency: 'USD', + processing_channel_id: 'pc_zs5fqhybzc2e3jmq3efvybybpq', + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/instruments/post.js b/nas_spec/code_samples/Node/instruments/post.js new file mode 100644 index 000000000..80e99a45a --- /dev/null +++ b/nas_spec/code_samples/Node/instruments/post.js @@ -0,0 +1,19 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const instrument = await cko.instruments.create({ + // infered type "token", + token: 'tok_bzi43qc6jeee5mmnfo4gnsnera', // Generated by Checkout.Frames + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/instruments@{id}/delete.js b/nas_spec/code_samples/Node/instruments@{id}/delete.js new file mode 100644 index 000000000..02bfdb01d --- /dev/null +++ b/nas_spec/code_samples/Node/instruments@{id}/delete.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const deleteOutcome = await cko.instruments.delete(instrument.id); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/instruments@{id}/get.js b/nas_spec/code_samples/Node/instruments@{id}/get.js new file mode 100644 index 000000000..7ccc36204 --- /dev/null +++ b/nas_spec/code_samples/Node/instruments@{id}/get.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const instrument = await cko.instruments.get('src_udfsqsgpjykutgs26fiejgizau'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/instruments@{id}/patch.js b/nas_spec/code_samples/Node/instruments@{id}/patch.js new file mode 100644 index 000000000..2f39df04f --- /dev/null +++ b/nas_spec/code_samples/Node/instruments@{id}/patch.js @@ -0,0 +1,18 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const instrumentResponse = await cko.instruments.update('src_udfsqsgpjykutgs26fiejgizau', { + expiry_year: 2030, + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/marketplace@entities/post.js b/nas_spec/code_samples/Node/marketplace@entities/post.js new file mode 100644 index 000000000..0ce9183a5 --- /dev/null +++ b/nas_spec/code_samples/Node/marketplace@entities/post.js @@ -0,0 +1,67 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['marketplace'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let marketplace = await cko.marketplace.onboardSubEntity({ + reference: 'superhero1234', + contact_details: { + phone: { + number: '2345678910', + }, + }, + profile: { + urls: ['https://www.superheroexample.com'], + mccs: ['0742'], + }, + company: { + business_registration_number: '452349600005', + legal_name: 'Super Hero Masks Inc.', + trading_name: 'Super Hero Masks', + principal_address: { + address_line1: '90 Tottenham Court Road', + city: 'London', + zip: 'W1T4TJ', + country: 'GB', + }, + registered_address: { + address_line1: '90 Tottenham Court Road', + city: 'London', + zip: 'W1T4TJ', + country: 'GB', + }, + representatives: [ + { + first_name: 'John', + last_name: 'Doe', + address: { + address_line1: '90 Tottenham Court Road', + city: 'London', + zip: 'W1T4TJ', + country: 'GB', + }, + identification: { + national_id_number: 'AB123456C', + }, + phone: { + number: '2345678910', + }, + date_of_birth: { + day: 5, + month: 6, + year: 1995, + }, + }, + ], + }, + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/marketplace@entities@{id}/get.js b/nas_spec/code_samples/Node/marketplace@entities@{id}/get.js new file mode 100644 index 000000000..86d7a775d --- /dev/null +++ b/nas_spec/code_samples/Node/marketplace@entities@{id}/get.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['marketplace'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let marketplace = await cko.marketplace.getSubEntityDetails('ent_aneh5mtyobxzazriwuevngrz6y'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/marketplace@entities@{id}/put.js b/nas_spec/code_samples/Node/marketplace@entities@{id}/put.js new file mode 100644 index 000000000..342358776 --- /dev/null +++ b/nas_spec/code_samples/Node/marketplace@entities@{id}/put.js @@ -0,0 +1,67 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['marketplace'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let marketplace = await cko.marketplace.updateSubEntityDetails('ent_aneh5mtyobxzazriwuevngrz6y', { + reference: 'superhero12346', + contact_details: { + phone: { + number: '2345678910', + }, + }, + profile: { + urls: ['https://www.superheroexample.com'], + mccs: ['0742'], + }, + company: { + business_registration_number: '452349600005', + legal_name: 'Super Hero Masks Inc.', + trading_name: 'Super Hero Masks', + principal_address: { + address_line1: '90 Tottenham Court Road', + city: 'London', + zip: 'W1T4TJ', + country: 'GB', + }, + registered_address: { + address_line1: '90 Tottenham Court Road', + city: 'London', + zip: 'W1T4TJ', + country: 'GB', + }, + representatives: [ + { + first_name: 'John', + last_name: 'Doe', + address: { + address_line1: '90 Tottenham Court Road', + city: 'London', + zip: 'W1T4TJ', + country: 'GB', + }, + identification: { + national_id_number: 'AB123456C', + }, + phone: { + number: '2345678910', + }, + date_of_birth: { + day: 5, + month: 6, + year: 1995, + }, + }, + ], + }, + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/marketplace@entities@{id}@instruments/post.js b/nas_spec/code_samples/Node/marketplace@entities@{id}@instruments/post.js new file mode 100644 index 000000000..cd314854f --- /dev/null +++ b/nas_spec/code_samples/Node/marketplace@entities@{id}@instruments/post.js @@ -0,0 +1,38 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['marketplace'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let marketplace = await cko.marketplace.addPaymentInstrument('ent_aneh5mtyobxzazriwuevngrz6y', { + label: "Peter's Personal Account", + type: 'bank_account', + account_number: '12345678', + bank_code: '050389', + currency: 'GBP', + country: 'GB', + account_holder: { + first_name: 'Peter', + last_name: 'Parker', + billing_address: { + address_line1: '90 Tottenham Court Road', + city: 'London', + state: 'London', + zip: 'W1T 4TJ', + country: 'GB', + }, + }, + document: { + type: 'bank_statement', + file_id: 'file_wxglze3wwywujg4nna5fb7ldli', + }, + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/payments/post.js b/nas_spec/code_samples/Node/payments/post.js new file mode 100644 index 000000000..1351b73a1 --- /dev/null +++ b/nas_spec/code_samples/Node/payments/post.js @@ -0,0 +1,45 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const payment = await cko.payments.request({ + source: { + // inferred type: "token" + token: 'tok_bzi43qc6jeee5mmnfo4gnsnera', // Generated by Checkout.Frames + billing_address: { + address_line1: 'Wall Street', + address_line2: 'Dollar Avenue', + city: 'London', + state: 'London', + zip: 'W1W W1W', + country: 'GB', + }, + phone: { + country_code: '44', + number: '7123456789', + }, + }, + currency: 'USD', + amount: 1000, + payment_type: 'Regular', + reference: 'ORDER 1234', + description: 'Mint Tea', + customer: { + email: 'new_user@email.com', + name: 'John Smith', + }, + metadata: { + value: 'My value', + }, + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/payments@{id}/get.js b/nas_spec/code_samples/Node/payments@{id}/get.js new file mode 100644 index 000000000..f45600e29 --- /dev/null +++ b/nas_spec/code_samples/Node/payments@{id}/get.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const payment = await cko.payments.get('pay_je5hbbb4u3oe7k4u3lbwlu3zkq'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/payments@{id}@actions/get.js b/nas_spec/code_samples/Node/payments@{id}@actions/get.js new file mode 100644 index 000000000..1803817b7 --- /dev/null +++ b/nas_spec/code_samples/Node/payments@{id}@actions/get.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const payment = await cko.payments.getActions('pay_je5hbbb4u3oe7k4u3lbwlu3zkq'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/payments@{id}@authorizations/post.js b/nas_spec/code_samples/Node/payments@{id}@authorizations/post.js new file mode 100644 index 000000000..96274cc2c --- /dev/null +++ b/nas_spec/code_samples/Node/payments@{id}@authorizations/post.js @@ -0,0 +1,18 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const increment = await cko.payments.increment('pay_bvxdyo7xdssuhcx3e74dpcrfmu', { + amount: 200, + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/payments@{id}@captures/post.js b/nas_spec/code_samples/Node/payments@{id}@captures/post.js new file mode 100644 index 000000000..e37ef84fa --- /dev/null +++ b/nas_spec/code_samples/Node/payments@{id}@captures/post.js @@ -0,0 +1,22 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const payment = await cko.payments.capture('pay_je5hbbb4u3oe7k4u3lbwlu3zkq', { + amount: 1000, + reference: 'CAPTURE ORDER 1234', + metadata: { + value: 'my value', + }, + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/payments@{id}@refunds/post.js b/nas_spec/code_samples/Node/payments@{id}@refunds/post.js new file mode 100644 index 000000000..8f9b0e42f --- /dev/null +++ b/nas_spec/code_samples/Node/payments@{id}@refunds/post.js @@ -0,0 +1,22 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const payment = await cko.payments.refund('pay_je5hbbb4u3oe7k4u3lbwlu3zkq', { + amount: 1000, + reference: 'REFUND ORDER 1234', + metadata: { + value: 'my value', + }, + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/payments@{id}@voids/post.js b/nas_spec/code_samples/Node/payments@{id}@voids/post.js new file mode 100644 index 000000000..d51bfa45f --- /dev/null +++ b/nas_spec/code_samples/Node/payments@{id}@voids/post.js @@ -0,0 +1,22 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const payment = await cko.payments.void('pay_je5hbbb4u3oe7k4u3lbwlu3zkq', { + amount: 1000, + reference: 'VOID ORDER 1234', + metadata: { + value: 'my value', + }, + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/risk@assessments@pre-authentication/post.js b/nas_spec/code_samples/Node/risk@assessments@pre-authentication/post.js new file mode 100644 index 000000000..5e7f4639e --- /dev/null +++ b/nas_spec/code_samples/Node/risk@assessments@pre-authentication/post.js @@ -0,0 +1,21 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const risk = await cko.risk.requestPreAuthentication({ + source: { + type: 'token', + token: 'tok_XXX', + }, + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/risk@assessments@pre-capture/post.js b/nas_spec/code_samples/Node/risk@assessments@pre-capture/post.js new file mode 100644 index 000000000..da636bc52 --- /dev/null +++ b/nas_spec/code_samples/Node/risk@assessments@pre-capture/post.js @@ -0,0 +1,21 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const risk = await cko.risk.requestPreCapture({ + source: { + type: 'token', + token: 'tok_XXX', + }, + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/standalone/post.js b/nas_spec/code_samples/Node/standalone/post.js new file mode 100644 index 000000000..b696dc456 --- /dev/null +++ b/nas_spec/code_samples/Node/standalone/post.js @@ -0,0 +1,43 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['sessions:browser'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use API keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let session = await cko.sessions.request({ + source: { + type: 'card', + number: '4485040371536584', + expiry_month: 1, + expiry_year: 2030, + }, + amount: 100, + currency: 'USD', + authentication_type: 'regular', + authentication_category: 'payment', + challenge_indicator: 'no_preference', + reference: 'ORD-5023-4E89', + transaction_type: 'goods_service', + processing_channel_id: 'pc_zs5fqhybzc2e3jmq3efvybybpq', + shipping_address: { + address_line1: 'Checkout.com', + address_line2: '90 Tottenham Court Road', + city: 'London', + state: 'GB', + zip: 'W1T 4TJ', + country: 'GB', + }, + completion: { + type: 'non_hosted', + callback_url: 'https://example.com/sessions/callback', + }, + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/standalone@{id}/get.js b/nas_spec/code_samples/Node/standalone@{id}/get.js new file mode 100644 index 000000000..1b3342191 --- /dev/null +++ b/nas_spec/code_samples/Node/standalone@{id}/get.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['sessions:browser'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use API keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let getSession = await cko.sessions.get('sid_jlfm4ithpgpefdxgzzdnc3xrc4'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/standalone@{id}@collect-data/put.js b/nas_spec/code_samples/Node/standalone@{id}@collect-data/put.js new file mode 100644 index 000000000..0e6420530 --- /dev/null +++ b/nas_spec/code_samples/Node/standalone@{id}@collect-data/put.js @@ -0,0 +1,28 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['sessions:browser'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use API keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let session = await cko.sessions.update('sid_rwhwl4kb3eeenglibbvej2qtdy', { + channel: 'browser', + accept_header: 'Accept: *.*, q=0.1', + java_enabled: true, + language: 'FR-fr', + color_depth: '16', + screen_height: '1080', + screen_width: '1920', + timezone: '60', + user_agent: + 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36', + ip_address: '1.12.123.255', + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/standalone@{id}@complete/post.js b/nas_spec/code_samples/Node/standalone@{id}@complete/post.js new file mode 100644 index 000000000..566735003 --- /dev/null +++ b/nas_spec/code_samples/Node/standalone@{id}@complete/post.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['sessions:browser'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use API keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let session = await cko.sessions.complete('sid_j47vcmk3uaaerlv3zv7xhzg6du'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/standalone@{id}@issuer-fingerprint/put.js b/nas_spec/code_samples/Node/standalone@{id}@issuer-fingerprint/put.js new file mode 100644 index 000000000..918768246 --- /dev/null +++ b/nas_spec/code_samples/Node/standalone@{id}@issuer-fingerprint/put.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['sessions:browser'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use API keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let updated = await cko.sessions.update3DSMethodCompletionIndicator('sid_aurdb2b3yv6eniu7mbrl7nfopm', 'U'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/tokens/post.js b/nas_spec/code_samples/Node/tokens/post.js new file mode 100644 index 000000000..a5fbc5c0b --- /dev/null +++ b/nas_spec/code_samples/Node/tokens/post.js @@ -0,0 +1,28 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const token = await cko.tokens.request({ + // infered type: "applepay" + token_data: { + version: 'EC_v1', + data: 't7GeajLB9skXB6QSWfEpPA4WPhDqB7ekdd+F7588arLzve...', + signature: 'MIAGCSqGbGUg...', + header: { + ephemeralPublicKey: 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgA...', + publicKeyHash: 'tqYV+tmG9aMh+l/K6cicUnPqkb1gUiLjSTM9gEz6...', + transactionId: '3cee89679130a4b...', + }, + }, + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/validation@bank-accounts@{country}@{currency}/get.js b/nas_spec/code_samples/Node/validation@bank-accounts@{country}@{currency}/get.js new file mode 100644 index 000000000..da5d34f0e --- /dev/null +++ b/nas_spec/code_samples/Node/validation@bank-accounts@{country}@{currency}/get.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + const bank = await cko.instruments.getBankAccountFieldFormatting('GB', 'GBP'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/workflows/get.js b/nas_spec/code_samples/Node/workflows/get.js new file mode 100644 index 000000000..d9acf4e6d --- /dev/null +++ b/nas_spec/code_samples/Node/workflows/get.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let workflows = await cko.workflows.getAll(); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/workflows/post.js b/nas_spec/code_samples/Node/workflows/post.js new file mode 100644 index 000000000..ba91e95f3 --- /dev/null +++ b/nas_spec/code_samples/Node/workflows/post.js @@ -0,0 +1,47 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let workflows = await cko.workflows.add({ + name: 'Webhooks workflow', + conditions: [ + { + type: 'event', + events: { + gateway: ['payment_approved', 'payment_declined'], + }, + }, + { + type: 'entity', + entities: ['ent_djigcqx4clmufo2sasgomgpqsq'], + }, + { + type: 'processing_channel', + processing_channels: ['pc_zs5fqhybzc2e3jmq3efvybybpq'], + }, + ], + actions: [ + { + type: 'webhook', + url: 'https://example.com/webhooks', + headers: { + Authorization: '70ed20ff-ba31-4ea3-b3ef-772f2be1cbdf', + }, + signature: { + method: 'HMACSHA256', + key: '8V8x0dLK%AyD*DNS8JJr', + }, + }, + ], + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/workflows@event-types/get.js b/nas_spec/code_samples/Node/workflows@event-types/get.js new file mode 100644 index 000000000..86bcd5d7e --- /dev/null +++ b/nas_spec/code_samples/Node/workflows@event-types/get.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let workflows = await cko.workflows.getEventTypes(); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/workflows@events@reflow/post.js b/nas_spec/code_samples/Node/workflows@events@reflow/post.js new file mode 100644 index 000000000..befe7da46 --- /dev/null +++ b/nas_spec/code_samples/Node/workflows@events@reflow/post.js @@ -0,0 +1,19 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let workflows = await cko.workflows.reflowEventsByEventAndWorkflowIds( + ['evt_hsfxtjwidv6ulah5gdbiqwqnka'], + ['wf_6p73pesh75vu7fqo6p6exhpe54'] + ); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/workflows@events@subject@{subjectId}/get.js b/nas_spec/code_samples/Node/workflows@events@subject@{subjectId}/get.js new file mode 100644 index 000000000..33f2681ef --- /dev/null +++ b/nas_spec/code_samples/Node/workflows@events@subject@{subjectId}/get.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let workflows = await cko.workflows.getSubjectEvents('pay_ymhp72mhubcejmjjwcupzalm5e'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/workflows@events@subject@{subjectId}@reflow/post.js b/nas_spec/code_samples/Node/workflows@events@subject@{subjectId}@reflow/post.js new file mode 100644 index 000000000..f203d13d6 --- /dev/null +++ b/nas_spec/code_samples/Node/workflows@events@subject@{subjectId}@reflow/post.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let workflows = await cko.workflows.reflowBySubject('pay_ymhp72mhubcejmjjwcupzalm5e'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow/post.js b/nas_spec/code_samples/Node/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow/post.js new file mode 100644 index 000000000..9c63217bf --- /dev/null +++ b/nas_spec/code_samples/Node/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow/post.js @@ -0,0 +1,19 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let workflows = await cko.workflows.reflowBySubjectAndWorkflow( + 'pay_ymhp72mhubcejmjjwcupzalm5e', + 'wf_6p73pesh75vu7fqo6p6exhpe54' + ); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/workflows@events@{eventId}/get.js b/nas_spec/code_samples/Node/workflows@events@{eventId}/get.js new file mode 100644 index 000000000..f2a058a1f --- /dev/null +++ b/nas_spec/code_samples/Node/workflows@events@{eventId}/get.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let workflows = await cko.workflows.getEvent('evt_hsfxtjwidv6ulah5gdbiqwqnka'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/workflows@events@{eventId}@reflow/post.js b/nas_spec/code_samples/Node/workflows@events@{eventId}@reflow/post.js new file mode 100644 index 000000000..26a7987af --- /dev/null +++ b/nas_spec/code_samples/Node/workflows@events@{eventId}@reflow/post.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let workflows = await cko.workflows.reflowByEvent('evt_hsfxtjwidv6ulah5gdbiqwqnka'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/workflows@events@{eventId}@workflow@{workflowId}@reflow/post.js b/nas_spec/code_samples/Node/workflows@events@{eventId}@workflow@{workflowId}@reflow/post.js new file mode 100644 index 000000000..d343b7caf --- /dev/null +++ b/nas_spec/code_samples/Node/workflows@events@{eventId}@workflow@{workflowId}@reflow/post.js @@ -0,0 +1,19 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let workflows = await cko.workflows.reflowByEventAndWorkflow( + 'evt_hsfxtjwidv6ulah5gdbiqwqnka', + 'wf_6p73pesh75vu7fqo6p6exhpe54' + ); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/workflows@{workflowId}/delete.js b/nas_spec/code_samples/Node/workflows@{workflowId}/delete.js new file mode 100644 index 000000000..eccf370f3 --- /dev/null +++ b/nas_spec/code_samples/Node/workflows@{workflowId}/delete.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let workflows = await cko.workflows.remove('wf_rou7m32mhmyeblg4xebx5pueoi'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/workflows@{workflowId}/get.js b/nas_spec/code_samples/Node/workflows@{workflowId}/get.js new file mode 100644 index 000000000..4c5f7f4e6 --- /dev/null +++ b/nas_spec/code_samples/Node/workflows@{workflowId}/get.js @@ -0,0 +1,16 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let workflows = await cko.workflows.get('wf_5zm7uccsc6bencaujumvutvfem'); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/workflows@{workflowId}/patch.js b/nas_spec/code_samples/Node/workflows@{workflowId}/patch.js new file mode 100644 index 000000000..0de24896c --- /dev/null +++ b/nas_spec/code_samples/Node/workflows@{workflowId}/patch.js @@ -0,0 +1,18 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let workflows = await cko.workflows.patch('wf_2i7z3lwdoe5uzmomm7yzrytqdy', { + name: 'Webhooks workflow updated', + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/workflows@{workflowId}@actions@{workflowActionId}/put.js b/nas_spec/code_samples/Node/workflows@{workflowId}@actions@{workflowActionId}/put.js new file mode 100644 index 000000000..2057a5cb5 --- /dev/null +++ b/nas_spec/code_samples/Node/workflows@{workflowId}@actions@{workflowActionId}/put.js @@ -0,0 +1,19 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let workflows = await cko.workflows.updateAction('wf_2i7z3lwdoe5uzmomm7yzrytqdy', 'wfa_5qxwp7stgcqufj63mkr42xyeqi', { + type: 'webhook', + url: 'https://example.com/updated', + }); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/Node/workflows@{workflowId}@conditions@{workflowConditionId}/put.js b/nas_spec/code_samples/Node/workflows@{workflowId}@conditions@{workflowConditionId}/put.js new file mode 100644 index 000000000..b850816aa --- /dev/null +++ b/nas_spec/code_samples/Node/workflows@{workflowId}@conditions@{workflowConditionId}/put.js @@ -0,0 +1,25 @@ +import { Checkout } from 'checkout-sdk-node'; + +let cko = new Checkout('your_client_secret_here', { + client: 'ack_XXXXXXXXXXXX', + scope: ['gateway'], // array of scopes + environment: 'sandbox', // or "production" +}); + +// Or if you use api keys: +// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}}); + +try { + let workflows = await cko.workflows.updateCondition( + 'wf_2i7z3lwdoe5uzmomm7yzrytqdy', + 'wfc_ybu4t6aruwju5l6ymlc67ya5ne', + { + type: 'event', + events: { + gateway: ['card_verification_declined', 'card_verified', 'payment_approved'], + }, + } + ); +} catch (err) { + console.log(err.name); +} diff --git a/nas_spec/code_samples/PHP/accounts@entities/post.php b/nas_spec/code_samples/PHP/accounts@entities/post.php new file mode 100644 index 000000000..df1a70b52 --- /dev/null +++ b/nas_spec/code_samples/PHP/accounts@entities/post.php @@ -0,0 +1,69 @@ +oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Accounts]) + ->environment(Environment::sandbox()) + ->build(); + +$address = new Address(); +$address->address_line1 = "CheckoutSdk.com"; +$address->address_line2 = "90 Tottenham Court Road"; +$address->city = "London"; +$address->state = "London"; +$address->zip = "W1T 4TJ"; +$address->country = Country::$GB; + +$phone = new Phone(); +$phone->country_code = "+1"; +$phone->number = "415 555 2671"; + +$dateOfBirth = new DateOfBirth(); +$dateOfBirth->day = 5; +$dateOfBirth->month = 6; +$dateOfBirth->year = 1996; + +$identification = new Identification(); +$identification->national_id_number = "AB123456C"; + +$request = new OnboardEntityRequest(); +$request->reference = uniqid(); +$request->contact_details = new ContactDetails(); +$request->contact_details->phone = $phone; +$request->profile = new Profile(); +$request->profile->urls = array("https://www.superheroexample.com"); +$request->profile->mccs = array("0742"); +$request->individual = new Individual(); +$request->individual->first_name = "Bruce"; +$request->individual->last_name = "Wayne"; +$request->individual->trading_name = "Batman's Super Hero Masks"; +$request->individual->registered_address = $address; +$request->individual->national_tax_id = "TAX123456"; +$request->individual->date_of_birth = $dateOfBirth; +$request->individual->identification = $identification; + +try { + $response = $api->getAccountsClient()->createEntity($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/accounts@entities@{id}/get.php b/nas_spec/code_samples/PHP/accounts@entities@{id}/get.php new file mode 100644 index 000000000..6251a97a5 --- /dev/null +++ b/nas_spec/code_samples/PHP/accounts@entities@{id}/get.php @@ -0,0 +1,24 @@ +oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Accounts]) + ->environment(Environment::sandbox()) + ->build(); + +try { + $response = $api->getAccountsClient()->getEntity("entity_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/accounts@entities@{id}/put.php b/nas_spec/code_samples/PHP/accounts@entities@{id}/put.php new file mode 100644 index 000000000..8c52f3c29 --- /dev/null +++ b/nas_spec/code_samples/PHP/accounts@entities@{id}/put.php @@ -0,0 +1,69 @@ +oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Accounts]) + ->environment(Environment::sandbox()) + ->build(); + +$address = new Address(); +$address->address_line1 = "CheckoutSdk.com"; +$address->address_line2 = "90 Tottenham Court Road"; +$address->city = "London"; +$address->state = "London"; +$address->zip = "W1T 4TJ"; +$address->country = Country::$GB; + +$phone = new Phone(); +$phone->country_code = "+1"; +$phone->number = "415 555 2671"; + +$dateOfBirth = new DateOfBirth(); +$dateOfBirth->day = 5; +$dateOfBirth->month = 6; +$dateOfBirth->year = 1996; + +$identification = new Identification(); +$identification->national_id_number = "AB123456C"; + +$request = new OnboardEntityRequest(); +$request->reference = uniqid(); +$request->contact_details = new ContactDetails(); +$request->contact_details->phone = $phone; +$request->profile = new Profile(); +$request->profile->urls = array("https://www.superheroexample.com"); +$request->profile->mccs = array("0742"); +$request->individual = new Individual(); +$request->individual->first_name = "Bruce"; +$request->individual->last_name = "Wayne"; +$request->individual->trading_name = "Batman's Super Hero Masks"; +$request->individual->registered_address = $address; +$request->individual->national_tax_id = "TAX123456"; +$request->individual->date_of_birth = $dateOfBirth; +$request->individual->identification = $identification; + +try { + $response = $api->getAccountsClient()->updateEntity($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/accounts@entities@{id}@instruments/post.php b/nas_spec/code_samples/PHP/accounts@entities@{id}@instruments/post.php new file mode 100644 index 000000000..9350f5481 --- /dev/null +++ b/nas_spec/code_samples/PHP/accounts@entities@{id}@instruments/post.php @@ -0,0 +1,57 @@ +oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Accounts]) + ->environment(Environment::sandbox()) + ->build(); + +$address = new Address(); +$address->address_line1 = "CheckoutSdk.com"; +$address->address_line2 = "90 Tottenham Court Road"; +$address->city = "London"; +$address->state = "London"; +$address->zip = "W1T 4TJ"; +$address->country = Country::$GB; + +$accountHolder = new AccountHolder(); +$accountHolder->first_name = "FirstName"; +$accountHolder->last_name = "LastName"; +$accountHolder->billing_address = $address; + +$instrumentDocument = new InstrumentDocument(); +$instrumentDocument->type = "bank_statement"; +$instrumentDocument->file_id = "file_wxglze3wwywujg4nna5fb7ldli"; + +$request = new AccountsPaymentInstrument(); +$request->label = "Peter's Personal Account"; +$request->account_number = "12345678"; +$request->bank_cod = "050389"; +$request->currency = Currency::$GBP; +$request->country = Country::$GB; +$request->account_holder = $accountHolder; +$request->document = $instrumentDocument; + + +try { + $response = $api->getAccountsClient()->createPaymentInstrument("entity_id", $request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/accounts@entities@{id}@payout-schedules/get.php b/nas_spec/code_samples/PHP/accounts@entities@{id}@payout-schedules/get.php new file mode 100644 index 000000000..4505ba943 --- /dev/null +++ b/nas_spec/code_samples/PHP/accounts@entities@{id}@payout-schedules/get.php @@ -0,0 +1,24 @@ +oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Accounts]) + ->environment(Environment::sandbox()) + ->build(); + +try { + $response = $api->getAccountsClient()->retrievePayoutSchedule("entity_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/accounts@entities@{id}@payout-schedules/put.php b/nas_spec/code_samples/PHP/accounts@entities@{id}@payout-schedules/put.php new file mode 100644 index 000000000..b06a97b03 --- /dev/null +++ b/nas_spec/code_samples/PHP/accounts@entities@{id}@payout-schedules/put.php @@ -0,0 +1,29 @@ +oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Balances]) + ->environment(Environment::sandbox()) + ->build(); + +$query = new BalancesQuery(); +$query->query = "currency:" . Currency::$GBP; + +try { + $response = $api->getBalancesClient()->retrieveEntityBalances("entity_id", $query); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/balances@{id}/get.php b/nas_spec/code_samples/PHP/balances@{id}/get.php new file mode 100644 index 000000000..b06a97b03 --- /dev/null +++ b/nas_spec/code_samples/PHP/balances@{id}/get.php @@ -0,0 +1,29 @@ +oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Balances]) + ->environment(Environment::sandbox()) + ->build(); + +$query = new BalancesQuery(); +$query->query = "currency:" . Currency::$GBP; + +try { + $response = $api->getBalancesClient()->retrieveEntityBalances("entity_id", $query); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/connect@token/post.php b/nas_spec/code_samples/PHP/connect@token/post.php new file mode 100644 index 000000000..585edb7d5 --- /dev/null +++ b/nas_spec/code_samples/PHP/connect@token/post.php @@ -0,0 +1,12 @@ +oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Balances]) + ->environment(Environment::sandbox()) + ->build(); \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/customers/post.php b/nas_spec/code_samples/PHP/customers/post.php new file mode 100644 index 000000000..dd07a01b7 --- /dev/null +++ b/nas_spec/code_samples/PHP/customers/post.php @@ -0,0 +1,43 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Gateway]) + ->environment(Environment::sandbox()) + ->build(); + +$phone = new Phone(); +$phone->country_code = "+1"; +$phone->number = "415 555 2671"; + +$request = new CustomerRequest(); +$request->email = "email@docs.checkout.com"; +$request->name = "name"; +$request->phone = $phone; +$request->instruments = ["instrument_id_1", "instrument_id_2"]; + +try { + $response = $api->getCustomersClient()->create($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/customers@{identifier}/delete.php b/nas_spec/code_samples/PHP/customers@{identifier}/delete.php new file mode 100644 index 000000000..95c9921fb --- /dev/null +++ b/nas_spec/code_samples/PHP/customers@{identifier}/delete.php @@ -0,0 +1,31 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Vault]) + ->environment(Environment::sandbox()) + ->build(); + +try { + $response = $api->getCustomersClient()->delete("customer_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/customers@{identifier}/get.php b/nas_spec/code_samples/PHP/customers@{identifier}/get.php new file mode 100644 index 000000000..9bfb5e3d1 --- /dev/null +++ b/nas_spec/code_samples/PHP/customers@{identifier}/get.php @@ -0,0 +1,31 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Gateway]) + ->environment(Environment::sandbox()) + ->build(); + +try { + $response = $api->getCustomersClient()->get("customer_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/customers@{identifier}/patch.php b/nas_spec/code_samples/PHP/customers@{identifier}/patch.php new file mode 100644 index 000000000..dec458421 --- /dev/null +++ b/nas_spec/code_samples/PHP/customers@{identifier}/patch.php @@ -0,0 +1,43 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Gateway]) + ->environment(Environment::sandbox()) + ->build(); + +$phone = new Phone(); +$phone->country_code = "+1"; +$phone->number = "415 555 2671"; + +$request = new CustomerRequest(); +$request->email = "email@docs.checkout.com"; +$request->name = "name"; +$request->phone = $phone; +$request->instruments = ["instrument_id_1", "instrument_id_2"]; + +try { + $response = $api->getCustomersClient()->update("customer_id", $request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/disputes/get.php b/nas_spec/code_samples/PHP/disputes/get.php new file mode 100644 index 000000000..6adf5a751 --- /dev/null +++ b/nas_spec/code_samples/PHP/disputes/get.php @@ -0,0 +1,46 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Gateway]) + ->environment(Environment::sandbox()) + ->build(); + +$query = new DisputesQueryFilter(); +$query->payment_id = "payment_id"; +$query->payment_arn = "payment_arn"; +$query->payment_reference = "payment_reference"; +$query->statuses = "comma,separated,list,statuses"; +$query->limit = 10; +$query->skip = 5; +$query->to = new DateTime(); // UTC, now + +$from = new DateTime(); +$from->setTimezone(new DateTimeZone("America/Mexico_City")); +$from->sub(new DateInterval("P1M")); +$query->from = $from; + +try { + $response = $api->getDisputesClient()->query($query); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/disputes@{dispute_id}/get.php b/nas_spec/code_samples/PHP/disputes@{dispute_id}/get.php new file mode 100644 index 000000000..f92a81496 --- /dev/null +++ b/nas_spec/code_samples/PHP/disputes@{dispute_id}/get.php @@ -0,0 +1,31 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Disputes]) + ->environment(Environment::sandbox()) + ->build(); + +try { + $response = $api->getDisputesClient()->getDisputeDetails("dispute_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/disputes@{dispute_id}@accept/post.php b/nas_spec/code_samples/PHP/disputes@{dispute_id}@accept/post.php new file mode 100644 index 000000000..fe7b8faf2 --- /dev/null +++ b/nas_spec/code_samples/PHP/disputes@{dispute_id}@accept/post.php @@ -0,0 +1,31 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Disputes]) + ->environment(Environment::sandbox()) + ->build(); + +try { + $response = $api->getDisputesClient()->accept("dispute_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/disputes@{dispute_id}@evidence/get.php b/nas_spec/code_samples/PHP/disputes@{dispute_id}@evidence/get.php new file mode 100644 index 000000000..52eccc37c --- /dev/null +++ b/nas_spec/code_samples/PHP/disputes@{dispute_id}@evidence/get.php @@ -0,0 +1,31 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Disputes]) + ->environment(Environment::sandbox()) + ->build(); + +try { + $response = $api->getDisputesClient()->getEvidence("dispute_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/disputes@{dispute_id}@evidence/post.php b/nas_spec/code_samples/PHP/disputes@{dispute_id}@evidence/post.php new file mode 100644 index 000000000..26236d355 --- /dev/null +++ b/nas_spec/code_samples/PHP/disputes@{dispute_id}@evidence/post.php @@ -0,0 +1,31 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Disputes]) + ->environment(Environment::sandbox()) + ->build(); + +try { + $response = $api->getDisputesClient()->submitEvidence("dispute_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/disputes@{dispute_id}@evidence/put.php b/nas_spec/code_samples/PHP/disputes@{dispute_id}@evidence/put.php new file mode 100644 index 000000000..276b8e294 --- /dev/null +++ b/nas_spec/code_samples/PHP/disputes@{dispute_id}@evidence/put.php @@ -0,0 +1,42 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Disputes]) + ->environment(Environment::sandbox()) + ->build(); + +$request = new DisputeEvidenceRequest(); +$request->proof_of_delivery_or_service_file = "file_id"; +$request->proof_of_delivery_or_service_text = "proof of delivery or service text"; +$request->invoice_or_receipt_file = "file_id"; +$request->invoice_or_receipt_text = "Copy of the invoice"; +$request->customer_communication_file = "file_id"; +$request->customer_communication_text = "Copy of an email exchange with the cardholder"; +$request->additional_evidence_file = "file_id"; +$request->additional_evidence_text = "Scanned document"; + +try { + $api->getDisputesClient()->putEvidence("dispute_id", $request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/files/post.php b/nas_spec/code_samples/PHP/files/post.php new file mode 100644 index 000000000..7e3d02954 --- /dev/null +++ b/nas_spec/code_samples/PHP/files/post.php @@ -0,0 +1,36 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Disputes]) + ->environment(Environment::sandbox()) + ->build(); + +$fileRequest = new FileRequest(); +$fileRequest->file = "path/to/file"; +$fileRequest->purpose = "dispute_evidence"; + +try { + $response = $api->getDisputesClient()->uploadFile($fileRequest); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/files@{file_id}/get.php b/nas_spec/code_samples/PHP/files@{file_id}/get.php new file mode 100644 index 000000000..a6593d02b --- /dev/null +++ b/nas_spec/code_samples/PHP/files@{file_id}/get.php @@ -0,0 +1,31 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Disputes]) + ->environment(Environment::sandbox()) + ->build(); + +try { + $response = $api->getDisputesClient()->getFileDetails("file_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/forex@quotes/post.php b/nas_spec/code_samples/PHP/forex@quotes/post.php new file mode 100644 index 000000000..08f569b50 --- /dev/null +++ b/nas_spec/code_samples/PHP/forex@quotes/post.php @@ -0,0 +1,32 @@ +oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Fx]) + ->environment(Environment::sandbox()) + ->build(); + +$request = new QuoteRequest(); +$request->source_currency = Currency::$GBP; +$request->source_amount = 30000; +$request->destination_currency = Currency::$USD; +$request->process_channel_id = "pc_abcdefghijklmnopqrstuvwxyz"; + +try { + $response = $api->getForexClient()->requestQuote($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/hosted-payments/post.php b/nas_spec/code_samples/PHP/hosted-payments/post.php new file mode 100644 index 000000000..376c04cad --- /dev/null +++ b/nas_spec/code_samples/PHP/hosted-payments/post.php @@ -0,0 +1,112 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$phone = new Phone(); +$phone->country_code = "+1"; +$phone->number = "415 555 2671"; + +$address = new Address(); +$address->address_line1 = "CheckoutSdk.com"; +$address->address_line2 = "90 Tottenham Court Road"; +$address->city = "London"; +$address->state = "London"; +$address->zip = "W1T 4TJ"; +$address->country = Country::$GB; + +$customerRequest = new CustomerRequest(); +$customerRequest->email = "email@docs.checkout.com"; +$customerRequest->name = "Name"; + +$billingInformation = new BillingInformation(); +$billingInformation->address = $address; +$billingInformation->phone = $phone; + +$shippingDetails = new ShippingDetails(); +$shippingDetails->address = $address; +$shippingDetails->phone = $phone; + +$recipient = new PaymentRecipient(); +$recipient->account_number = "1234567"; +$recipient->dob = "1985-05-15"; +$recipient->last_name = "LastName"; +$recipient->zip = "12345"; + +$product = new Product(); +$product->name = "Product"; +$product->quantity = 1; +$product->price = 10; + +$products = array($product); + +$theeDsRequest = new ThreeDsRequest(); +$theeDsRequest->enabled = false; +$theeDsRequest->attempt_n3d = false; + +$processing = new ProcessingSettings(); +$processing->aft = true; + +$risk = new RiskRequest(); +$risk->enabled = false; + +$billingDescriptor = new BillingDescriptor(); +$billingDescriptor->city = "London"; +$billingDescriptor->name = "Awesome name"; + +$request = new HostedPaymentsSessionRequest(); +$request->amount = 100; +$request->reference = "reference"; +$request->currency = Currency::$GBP; +$request->description = "Payment for Gold Necklace"; +$request->customer = $customerRequest; +$request->shipping = $shippingDetails; +$request->billing = $billingInformation; +$request->recipient = $recipient; +$request->processing = $processing; +$request->products = $products; +$request->risk = $risk; +$request->success_url = "https://example.com/payments/success"; +$request->cancel_url = "https://example.com/payments/cancel"; +$request->failure_url = "https://example.com/payments/failure"; +$request->locale = "en-GB"; +$request->three_ds = $theeDsRequest; +$request->capture = true; +$request->payment_type = PaymentType::$regular; +$request->billing_descriptor = $billingDescriptor; +$request->allow_payment_methods = array(PaymentSourceType::$card, PaymentSourceType::$ideal); + +try { + $response = $api->getHostedPaymentsClient()->createHostedPaymentsPageSession($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} + diff --git a/nas_spec/code_samples/PHP/hosted-payments@{id}/get.php b/nas_spec/code_samples/PHP/hosted-payments@{id}/get.php new file mode 100644 index 000000000..daaae3868 --- /dev/null +++ b/nas_spec/code_samples/PHP/hosted-payments@{id}/get.php @@ -0,0 +1,24 @@ +previous() + ->staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getHostedPaymentsClient()->getHostedPaymentsPageDetails("hosted_payment_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/nas_spec/code_samples/PHP/instruments/post.php b/nas_spec/code_samples/PHP/instruments/post.php new file mode 100644 index 000000000..ef59c6d77 --- /dev/null +++ b/nas_spec/code_samples/PHP/instruments/post.php @@ -0,0 +1,63 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Vault]) + ->environment(Environment::sandbox()) + ->build(); + +$phone = new Phone(); +$phone->country_code = "+1"; +$phone->number = "415 555 2671"; + +$address = new Address(); +$address->address_line1 = "CheckoutSdk.com"; +$address->address_line2 = "90 Tottenham Court Road"; +$address->city = "London"; +$address->state = "London"; +$address->zip = "W1T 4TJ"; +$address->country = Country::$GB; + +$accountHolder = new AccountHolder(); +$accountHolder->first_name = "John"; +$accountHolder->last_name = "Smith"; +$accountHolder->phone = $phone; +$accountHolder->billing_address = $address; + +$createCustomerInstrumentRequest = new CreateCustomerInstrumentRequest(); +$createCustomerInstrumentRequest->id = "customer_id"; + +$request = new CreateTokenInstrumentRequest(); +$request->token = "token"; +$request->account_holder = $accountHolder; +$request->customer = $createCustomerInstrumentRequest; + +try { + $response = $api->getInstrumentsClient()->create($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/instruments@{id}/delete.php b/nas_spec/code_samples/PHP/instruments@{id}/delete.php new file mode 100644 index 000000000..30d22ea25 --- /dev/null +++ b/nas_spec/code_samples/PHP/instruments@{id}/delete.php @@ -0,0 +1,31 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Vault]) + ->environment(Environment::sandbox()) + ->build(); + +try { + $response = $api->getInstrumentsClient()->delete("instrument_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/instruments@{id}/get.php b/nas_spec/code_samples/PHP/instruments@{id}/get.php new file mode 100644 index 000000000..687de0b89 --- /dev/null +++ b/nas_spec/code_samples/PHP/instruments@{id}/get.php @@ -0,0 +1,31 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Vault]) + ->environment(Environment::sandbox()) + ->build(); + +try { + $response = $api->getInstrumentsClient()->get("instrument_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/instruments@{id}/patch.php b/nas_spec/code_samples/PHP/instruments@{id}/patch.php new file mode 100644 index 000000000..4eb0a6fea --- /dev/null +++ b/nas_spec/code_samples/PHP/instruments@{id}/patch.php @@ -0,0 +1,35 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Vault]) + ->environment(Environment::sandbox()) + ->build(); + +$request = new UpdateTokenInstrumentRequest(); +$request->token = "new_token"; + +try { + $response = $api->getInstrumentsClient()->update("instrument_id", $request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/payment-links/post.php b/nas_spec/code_samples/PHP/payment-links/post.php new file mode 100644 index 000000000..1943187d9 --- /dev/null +++ b/nas_spec/code_samples/PHP/payment-links/post.php @@ -0,0 +1,98 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$phone = new Phone(); +$phone->country_code = "+1"; +$phone->number = "415 555 2671"; + +$address = new Address(); +$address->address_line1 = "CheckoutSdk.com"; +$address->address_line2 = "90 Tottenham Court Road"; +$address->city = "London"; +$address->state = "London"; +$address->zip = "W1T 4TJ"; +$address->country = Country::$GB; + +$customerRequest = new CustomerRequest(); +$customerRequest->email = ""; +$customerRequest->name = "Name"; + +$billingInformation = new BillingInformation(); +$billingInformation->address = $address; +$billingInformation->phone = $phone; + +$shippingDetails = new ShippingDetails(); +$shippingDetails->address = $address; +$shippingDetails->phone = $phone; + +$recipient = new PaymentRecipient(); +$recipient->account_number = "1234567"; +$recipient->dob = "1985-05-15"; +$recipient->last_name = "Last"; +$recipient->zip = "12345"; + +$product = new Product(); +$product->name = "Product"; +$product->quantity = 1; +$product->price = 10; + +$products = array($product); + +$theeDsRequest = new ThreeDsRequest(); +$theeDsRequest->enabled = false; +$theeDsRequest->attempt_n3d = false; + +$processing = new ProcessingSettings(); +$processing->aft = true; + +$risk = new RiskRequest(); +$risk->enabled = false; + +$request = new PaymentLinkRequest(); +$request->amount = 1000; +$request->reference = "reference"; +$request->currency = Currency::$GBP; +$request->description = "Description"; +$request->customer = $customerRequest; +$request->shipping = $shippingDetails; +$request->billing = $billingInformation; +$request->recipient = $recipient; +$request->processing = $processing; +$request->products = $products; +$request->risk = $risk; +$request->locale = "en-GB"; +$request->three_ds = $theeDsRequest; +$request->capture = true; + +try { + $response = $api->getPaymentLinksClient()->createPaymentLink($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/nas_spec/code_samples/PHP/payment-links@{id}/get.php b/nas_spec/code_samples/PHP/payment-links@{id}/get.php new file mode 100644 index 000000000..685abd241 --- /dev/null +++ b/nas_spec/code_samples/PHP/payment-links@{id}/get.php @@ -0,0 +1,22 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +try { + $response = $api->getPaymentLinksClient()->getPaymentLink("payment_link_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/nas_spec/code_samples/PHP/payments/post.php b/nas_spec/code_samples/PHP/payments/post.php new file mode 100644 index 000000000..f570918dd --- /dev/null +++ b/nas_spec/code_samples/PHP/payments/post.php @@ -0,0 +1,86 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Gateway]) + ->environment(Environment::sandbox()) + ->build(); + +$phone = new Phone(); +$phone->country_code = "+1"; +$phone->number = "415 555 2671"; + +$address = new Address(); +$address->address_line1 = "CheckoutSdk.com"; +$address->address_line2 = "90 Tottenham Court Road"; +$address->city = "London"; +$address->state = "London"; +$address->zip = "W1T 4TJ"; +$address->country = Country::$GB; + +$requestCardSource = new RequestCardSource(); +$requestCardSource->name = "Name"; +$requestCardSource->number = "Number"; +$requestCardSource->expiry_year = 2026; +$requestCardSource->expiry_month = 10; +$requestCardSource->cvv = "123"; +$requestCardSource->billing_address = $address; +$requestCardSource->phone = $phone; + +$customerRequest = new CustomerRequest(); +$customerRequest->email = "email@docs.checkout.com"; +$customerRequest->name = "Customer"; + +$identification = new Identification(); +$identification->issuing_country = Country::$GT; +$identification->number = "1234"; +$identification->type = IdentificationType::$drivingLicence; + +$paymentIndividualSender = new PaymentIndividualSender(); +$paymentIndividualSender->fist_name = "FirstName"; +$paymentIndividualSender->last_name = "LastName"; +$paymentIndividualSender->address = $address; +$paymentIndividualSender->identification = $identification; + +$request = new PaymentRequest(); +$request->source = $requestCardSource; +$request->capture = true; +$request->reference = "reference"; +$request->amount = 10; +$request->currency = Currency::$USD; +$request->customer = $customerRequest; +$request->sender = $paymentIndividualSender; + +try { + $response = $api->getPaymentsClient()->requestPayment($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/payments@{id}/get.php b/nas_spec/code_samples/PHP/payments@{id}/get.php new file mode 100644 index 000000000..abbd1a351 --- /dev/null +++ b/nas_spec/code_samples/PHP/payments@{id}/get.php @@ -0,0 +1,31 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Gateway]) + ->environment(Environment::sandbox()) + ->build(); + +try { + $response = $api->getPaymentsClient()->getPaymentDetails("payment_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/payments@{id}@actions/get.php b/nas_spec/code_samples/PHP/payments@{id}@actions/get.php new file mode 100644 index 000000000..8be60be6f --- /dev/null +++ b/nas_spec/code_samples/PHP/payments@{id}@actions/get.php @@ -0,0 +1,31 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Gateway]) + ->environment(Environment::sandbox()) + ->build(); + +try { + $response = $api->getPaymentsClient()->getPaymentActions("payment_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/payments@{id}@authorizations/post.php b/nas_spec/code_samples/PHP/payments@{id}@authorizations/post.php new file mode 100644 index 000000000..33a04a8ce --- /dev/null +++ b/nas_spec/code_samples/PHP/payments@{id}@authorizations/post.php @@ -0,0 +1,38 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Gateway]) + ->environment(Environment::sandbox()) + ->build(); + +$request = new AuthorizationRequest(); +$request->amount = 10; +$request->reference = "reference"; +$request->metadata = array("param1" => "value1", "param2" => "value2"); + +try { + // Optional: idempotencyKey as a third parameter for idempotent requests + $response = $api->getPaymentsClient()->incrementPaymentAuthorization("payment_id", $request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/payments@{id}@captures/post.php b/nas_spec/code_samples/PHP/payments@{id}@captures/post.php new file mode 100644 index 000000000..63551a76b --- /dev/null +++ b/nas_spec/code_samples/PHP/payments@{id}@captures/post.php @@ -0,0 +1,37 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Gateway]) + ->environment(Environment::sandbox()) + ->build(); + +$request = new CaptureRequest(); +$request->reference = "partial capture"; +$request->amount = 5; + +try { + // or, capturePayment("payment_id") for a full capture + $response = $api->getPaymentsClient()->capturePayment("payment_id", $request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/payments@{id}@refunds/post.php b/nas_spec/code_samples/PHP/payments@{id}@refunds/post.php new file mode 100644 index 000000000..7512c1498 --- /dev/null +++ b/nas_spec/code_samples/PHP/payments@{id}@refunds/post.php @@ -0,0 +1,37 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Gateway]) + ->environment(Environment::sandbox()) + ->build(); + +$request = new RefundRequest(); +$request->reference = "reference"; +$request->amount = 10; + +try { + // or, refundPayment("payment_id") for a full refund + $response = $api->getPaymentsClient()->refundPayment("payment_id", $request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/payments@{id}@voids/post.php b/nas_spec/code_samples/PHP/payments@{id}@voids/post.php new file mode 100644 index 000000000..9bfe12583 --- /dev/null +++ b/nas_spec/code_samples/PHP/payments@{id}@voids/post.php @@ -0,0 +1,36 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Gateway]) + ->environment(Environment::sandbox()) + ->build(); + +$request = new VoidRequest(); +$request->reference = "reference"; + +try { + // or, voidPayment("payment_id") + $response = $api->getPaymentsClient()->voidPayment("payment_id", $request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/risk@assessments@pre-authentication/post.php b/nas_spec/code_samples/PHP/risk@assessments@pre-authentication/post.php new file mode 100644 index 000000000..fa17e2c35 --- /dev/null +++ b/nas_spec/code_samples/PHP/risk@assessments@pre-authentication/post.php @@ -0,0 +1,83 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$address = new Address(); +$address->address_line1 = "CheckoutSdk.com"; +$address->address_line2 = "90 Tottenham Court Road"; +$address->city = "London"; +$address->state = "London"; +$address->zip = "W1T 4TJ"; +$address->country = Country::$GB; + +$cardSourcePrism = new CardSourcePrism(); +$cardSourcePrism->billing_address = $address; +$cardSourcePrism->expiry_month = 10; +$cardSourcePrism->expiry_year = 2027; +$cardSourcePrism->number = "number"; + +$customerRequest = new CustomerRequest(); +$customerRequest->email = "email@docs.checkout.com"; +$customerRequest->name = "Name"; + +$riskPayment = new RiskPayment(); +$riskPayment->psp = "psp"; +$riskPayment->id = "78453878"; + +$riskShippingDetails = new RiskShippingDetails(); +$riskShippingDetails->address = $address; + +$location = new Location(); +$location->latitude = "51.5107"; +$location->longitude = "0.1313"; + +$device = new Device(); +$device->location = $location; +$device->type = "Phone"; +$device->os = "ISO"; +$device->model = "iPhone X"; +$device->date = new DateTime(); +$device->user_agent = "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1"; +$device->fingerprint = "34304a9e3fg09302"; + +$request = new PreAuthenticationAssessmentRequest(); +$request->date = new DateTime(); +$request->source = $cardSourcePrism; +$request->customer = $customerRequest; +$request->payment = $riskPayment; +$request->shipping = $riskShippingDetails; +$request->reference = "ORD-1011-87AH"; +$request->description = "Set of 3 masks"; +$request->amount = 10; +$request->currency = Currency::$GBP; +$request->device = $device; +$request->metadata = array("VoucherCode" => "loyalty_10", "discountApplied" => "10", "customer_id" => "2190EF321"); + +try { + $response = $api->getRiskClient()->requestPreAuthenticationRiskScan($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/nas_spec/code_samples/PHP/risk@assessments@pre-capture/post.php b/nas_spec/code_samples/PHP/risk@assessments@pre-capture/post.php new file mode 100644 index 000000000..1346eaa9d --- /dev/null +++ b/nas_spec/code_samples/PHP/risk@assessments@pre-capture/post.php @@ -0,0 +1,91 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +$address = new Address(); +$address->address_line1 = "CheckoutSdk.com"; +$address->address_line2 = "90 Tottenham Court Road"; +$address->city = "London"; +$address->state = "London"; +$address->zip = "W1T 4TJ"; +$address->country = Country::$GB; + +$customerRequest = new CustomerRequest(); +$customerRequest->email = "email@docs.checkout.com"; +$customerRequest->name = "name"; + +$riskPayment = new RiskPayment(); +$riskPayment->psp = "psp"; +$riskPayment->id = "78453878"; + +$riskShippingDetails = new RiskShippingDetails(); +$riskShippingDetails->address = $address; + +$authenticationResult = new AuthenticationResult(); +$authenticationResult->attempted = true; +$authenticationResult->challenged = true; +$authenticationResult->liability_shifted = true; +$authenticationResult->method = "3ds"; +$authenticationResult->succeeded = true; +$authenticationResult->version = "2.0"; + +$authorizationResult = new AuthorizationResult(); +$authorizationResult->avs_code = "V"; +$authorizationResult->cvv_result = "N"; + +$location = new Location(); +$location->latitude = "51.5107"; +$location->longitude = "0.1313"; + +$device = new Device(); +$device->location = $location; +$device->type = "Phone"; +$device->os = "ISO"; +$device->model = "iPhone X"; +$device->date = new DateTime(); +$device->user_agent = "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1"; +$device->fingerprint = "34304a9e3fg09302"; + +$request = new PreCaptureAssessmentRequest(); +$request->date = new DateTime(); +$request->source = new CardSourcePrism(); +$request->customer = $customerRequest; +$request->payment = $riskPayment; +$request->shipping = $riskShippingDetails; +$request->amount = 6540; +$request->currency = Currency::$GBP; +$request->device = $device; +$request->metadata = array("VoucherCode" => "loyalty_10", "discountApplied" => "10", "customer_id" => "2190EF321"); +$request->authentication_result = $authenticationResult; +$request->authorization_result = $authorizationResult; + +try { + $response = $api->getRiskClient()->requestPreCaptureRiskScan($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/nas_spec/code_samples/PHP/standalone/post.php b/nas_spec/code_samples/PHP/standalone/post.php new file mode 100644 index 000000000..152fb2d79 --- /dev/null +++ b/nas_spec/code_samples/PHP/standalone/post.php @@ -0,0 +1,110 @@ +oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$SessionsApp, OAuthScope::$SessionsBrowser]) + ->environment(Environment::sandbox()) + ->build(); + +$phone = new Phone(); +$phone->country_code = "+1"; +$phone->number = "415 555 2671"; + +$billingAddress = new SessionAddress(); +$billingAddress->address_line1 = "CheckoutSdk.com"; +$billingAddress->address_line2 = "90 Tottenham Court Road"; +$billingAddress->city = "London"; +$billingAddress->state = "ENG"; +$billingAddress->country = Country::$GB; + +$sessionCardSource = new SessionCardSource(); +$sessionCardSource->billing_address = $billingAddress; +$sessionCardSource->number = "number"; +$sessionCardSource->expiry_month = 10; +$sessionCardSource->expiry_year = 2026; +$sessionCardSource->name = "Name"; +$sessionCardSource->email = "email@docs.checkout.com"; +$sessionCardSource->home_phone = $phone; +$sessionCardSource->work_phone = $phone; +$sessionCardSource->mobile_phone = $phone; + +$shippingAddress = new SessionAddress(); +$shippingAddress->address_line1 = "CheckoutSdk.com"; +$shippingAddress->address_line2 = "90 Tottenham Court Road"; +$shippingAddress->city = "London"; +$shippingAddress->state = "London"; +$shippingAddress->zip = "W1T 4TJ"; +$shippingAddress->country = Country::$GB; + +$marketPlaceData = new SessionMarketplaceData(); +$marketPlaceData->sub_entity_id = "ent_123456789"; + +$billingDescriptor = new SessionsBillingDescriptor(); +$billingDescriptor->name = "Name"; + +$nonHostedCompletionInfo = new NonHostedCompletionInfo(); +$nonHostedCompletionInfo->callback_url = "https://docs.checkout.com/callback"; + +$sdkEphemeralPublicKey = new SdkEphemeralPublicKey(); +$sdkEphemeralPublicKey->kty = "EC"; +$sdkEphemeralPublicKey->crv = "P-256"; +$sdkEphemeralPublicKey->x = "f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU"; +$sdkEphemeralPublicKey->y = "x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0"; + +$appSession = new AppSession(); +$appSession->sdk_app_id = "dbd64fcb-c19a-4728-8849-e3d50bfdde39"; +$appSession->sdk_max_timeout = 5; +$appSession->sdk_encrypted_data = "{}"; +$appSession->sdk_ephem_pub_key = $sdkEphemeralPublicKey; +$appSession->sdk_reference_number = "3DS_LOA_SDK_PPFU_020100_00007"; +$appSession->sdk_transaction_id = "b2385523-a66c-4907-ac3c-91848e8c0067"; +$appSession->sdk_interface_type = SdkInterfaceType::$both; +$appSession->sdk_ui_elements = array(UIElements::$single_select, UIElements::$html_other); + +$request = new SessionRequest(); +$request->source = $sessionCardSource; +$request->amount = 100; +$request->currency = Currency::$USD; +$request->processing_channel_id = "pc_123456789"; +$request->marketplace = $marketPlaceData; +$request->authentication_category = Category::$payment; +$request->challenge_indicator = ChallengeIndicatorType::$no_preference; +$request->billing_descriptor = $billingDescriptor; +$request->reference = "reference"; +$request->transaction_type = TransactionType::$goods_service; +$request->shipping_address = $shippingAddress; +$request->completion = $nonHostedCompletionInfo; +$request->channel_data = $appSession; + +try { + $response = $api->getSessionsClient()->requestSession($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/standalone@{id}/get.php b/nas_spec/code_samples/PHP/standalone@{id}/get.php new file mode 100644 index 000000000..a3afa1b82 --- /dev/null +++ b/nas_spec/code_samples/PHP/standalone@{id}/get.php @@ -0,0 +1,24 @@ +oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$SessionsApp, OAuthScope::$SessionsBrowser]) + ->environment(Environment::sandbox()) + ->build(); + +try { + $response = $api->getSessionsClient()->getSessionDetails("session_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/standalone@{id}@collect-data/put.php b/nas_spec/code_samples/PHP/standalone@{id}@collect-data/put.php new file mode 100644 index 000000000..9948cabdf --- /dev/null +++ b/nas_spec/code_samples/PHP/standalone@{id}@collect-data/put.php @@ -0,0 +1,38 @@ +oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$SessionsApp, OAuthScope::$SessionsBrowser]) + ->environment(Environment::sandbox()) + ->build(); + +$browserSession = new BrowserSession(); +$browserSession->accept_header = "Accept: *.*, q=0.1"; +$browserSession->java_enabled = true; +$browserSession->language = "FR-fr"; +$browserSession->color_depth = "16"; +$browserSession->screen_width = "1920"; +$browserSession->screen_height = "1080"; +$browserSession->timezone = "60"; +$browserSession->user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"; +$browserSession->three_ds_method_completion = ThreeDsMethodCompletion::$y; +$browserSession->ip_address = "1.12.123.255"; + +try { + $response = $api->getSessionsClient()->updateSession("session_id", $browserSession); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/standalone@{id}@complete/post.php b/nas_spec/code_samples/PHP/standalone@{id}@complete/post.php new file mode 100644 index 000000000..9db5b3425 --- /dev/null +++ b/nas_spec/code_samples/PHP/standalone@{id}@complete/post.php @@ -0,0 +1,24 @@ +oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$SessionsApp, OAuthScope::$SessionsBrowser]) + ->environment(Environment::sandbox()) + ->build(); + +try { + $response = $api->getSessionsClient()->completeSession("session_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/standalone@{id}@issuer-fingerprint/put.php b/nas_spec/code_samples/PHP/standalone@{id}@issuer-fingerprint/put.php new file mode 100644 index 000000000..36bbe4be2 --- /dev/null +++ b/nas_spec/code_samples/PHP/standalone@{id}@issuer-fingerprint/put.php @@ -0,0 +1,29 @@ +oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$SessionsApp, OAuthScope::$SessionsBrowser]) + ->environment(Environment::sandbox()) + ->build(); + +$request = new ThreeDsMethodCompletionRequest(); +$request->three_ds_method_completion = ThreeDsMethodCompletion::$y; + +try { + $api->getSessionsClient()->updateThreeDsMethodCompletionIndicator("session_id", $request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/tokens/post.php b/nas_spec/code_samples/PHP/tokens/post.php new file mode 100644 index 000000000..2a3d024c0 --- /dev/null +++ b/nas_spec/code_samples/PHP/tokens/post.php @@ -0,0 +1,48 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->publicKey("public_ey") + ->build(); + +$phone = new Phone(); +$phone->country_code = "+1"; +$phone->number = "415 555 2671"; + +$address = new Address(); +$address->address_line1 = "CheckoutSdk.com"; +$address->address_line2 = "90 Tottenham Court Road"; +$address->city = "London"; +$address->state = "London"; +$address->zip = "W1T 4TJ"; +$address->country = Country::$GB; + +$request = new CardTokenRequest(); +$request->name = "Name"; +$request->number = "123456789"; +$request->expiry_year = 2027; +$request->expiry_month = 10; +$request->cvv = "123"; +$request->billing_address = $address; +$request->phone = $phone; + +try { + $response = $api->getTokensClient()->requestCardToken($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} diff --git a/nas_spec/code_samples/PHP/transfers/post.php b/nas_spec/code_samples/PHP/transfers/post.php new file mode 100644 index 000000000..68b0310a1 --- /dev/null +++ b/nas_spec/code_samples/PHP/transfers/post.php @@ -0,0 +1,40 @@ +oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Transfers]) + ->environment(Environment::sandbox()) + ->build(); + +$transferSource = new TransferSource(); +$transferSource->id = "ent_kidtcgc3ge5unf4a5i6enhnr5m"; +$transferSource->amount = 100; + +$transferDestination = new TransferDestination(); +$transferDestination->id = "ent_w4jelhppmfiufdnatam37wrfc4"; + +$request = new CreateTransferRequest(); +$request->transfer_type = TransferType::$commission; +$request->source = $transferSource; +$request->destination = $transferDestination; + +try { + $response = $api->getTransfersClient()->initiateTransferOfFunds($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/transfers@{id}/get.php b/nas_spec/code_samples/PHP/transfers@{id}/get.php new file mode 100644 index 000000000..237e685bc --- /dev/null +++ b/nas_spec/code_samples/PHP/transfers@{id}/get.php @@ -0,0 +1,24 @@ +oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Transfers]) + ->environment(Environment::sandbox()) + ->build(); + +try { + $response = $api->getTransfersClient()->retrieveATransfer("transfer_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/validation@bank-accounts@{country}@{currency}/get.php b/nas_spec/code_samples/PHP/validation@bank-accounts@{country}@{currency}/get.php new file mode 100644 index 000000000..68d2df12a --- /dev/null +++ b/nas_spec/code_samples/PHP/validation@bank-accounts@{country}@{currency}/get.php @@ -0,0 +1,33 @@ +oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$PayoutsBankDetails]) + ->environment(Environment::sandbox()) + ->build(); + +$request = new BankAccountFieldQuery(); +$request->payment_network = PaymentNetwork::$local; +$request->account_holder_type = AccountHolderType::$individual; + +try { + $response = $api->getInstrumentsClient()->getBankAccountFieldFormatting(Country::$GB, Currency::$GBP, $request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/workflows/get.php b/nas_spec/code_samples/PHP/workflows/get.php new file mode 100644 index 000000000..38ed8ddbc --- /dev/null +++ b/nas_spec/code_samples/PHP/workflows/get.php @@ -0,0 +1,32 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Flow]) + ->environment(Environment::sandbox()) + ->build(); + + +try { + $response = $api->getWorkflowsClient()->getWorkflows(); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/workflows/post.php b/nas_spec/code_samples/PHP/workflows/post.php new file mode 100644 index 000000000..209c9627f --- /dev/null +++ b/nas_spec/code_samples/PHP/workflows/post.php @@ -0,0 +1,80 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Flow]) + ->environment(Environment::sandbox()) + ->build(); + +$signature = new WebhookSignature(); +$signature->key = "8V8x0dLK%AyD*DNS8JJr"; +$signature->method = "HMACSHA256"; + +$actionRequest = new WebhookWorkflowActionRequest(); +$actionRequest->url = "https://google.com/fail"; +$actionRequest->signature = $signature; + +$entityWorkflowConditionRequest = new EntityWorkflowConditionRequest(); +$entityWorkflowConditionRequest->entities = ["entity_id"]; + +$eventWorkflowConditionRequest = new EventWorkflowConditionRequest(); +$eventWorkflowConditionRequest->events = [ + "gateway" => ["payment_approved", + "payment_declined", + "card_verification_declined", + "card_verified", + "payment_authorization_incremented", + "payment_authorization_increment_declined", + "payment_capture_declined", + "payment_captured", + "payment_refund_declined", + "payment_refunded", + "payment_void_declined", + "payment_voided"], + "dispute" => ["dispute_canceled", + "dispute_evidence_required", + "dispute_expired", + "dispute_lost", + "dispute_resolved", + "dispute_won"] +]; + +$processingChannelWorkflowConditionRequest = new ProcessingChannelWorkflowConditionRequest(); +$processingChannelWorkflowConditionRequest->processing_channels = ["pc_sdsdsdwdewdsdds"]; + +$request = new CreateWorkflowRequest(); +$request->actions = [$actionRequest]; +$request->conditions = [$entityWorkflowConditionRequest, $eventWorkflowConditionRequest, + $processingChannelWorkflowConditionRequest]; +$request->name = "Workflow"; +$request->active = true; + +try { + $response = $api->getWorkflowsClient()->createWorkflow($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/workflows@event-types/get.php b/nas_spec/code_samples/PHP/workflows@event-types/get.php new file mode 100644 index 000000000..966822c62 --- /dev/null +++ b/nas_spec/code_samples/PHP/workflows@event-types/get.php @@ -0,0 +1,32 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Flow]) + ->environment(Environment::sandbox()) + ->build(); + + +try { + $response = $api->getWorkflowsClient()->getEventTypes(); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/workflows@events@reflow/post.php b/nas_spec/code_samples/PHP/workflows@events@reflow/post.php new file mode 100644 index 000000000..887b80a26 --- /dev/null +++ b/nas_spec/code_samples/PHP/workflows@events@reflow/post.php @@ -0,0 +1,36 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Flow]) + ->environment(Environment::sandbox()) + ->build(); + +$request = new ReflowByEventsRequest(); +$request->events = array("evt_lzmo6p0i3612judj754w1ngtil"); +$request->workflows = array("wf_sq8jnqi9i749hhb470bu308uk2"); + +try { + $response = $api->getWorkflowsClient()->reflow($request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/workflows@events@subject@{subjectId}/get.php b/nas_spec/code_samples/PHP/workflows@events@subject@{subjectId}/get.php new file mode 100644 index 000000000..37fd90e99 --- /dev/null +++ b/nas_spec/code_samples/PHP/workflows@events@subject@{subjectId}/get.php @@ -0,0 +1,32 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Flow]) + ->environment(Environment::sandbox()) + ->build(); + + +try { + $response = $api->getWorkflowsClient()->getSubjectEvents("subject_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/workflows@events@subject@{subjectId}@reflow/post.php b/nas_spec/code_samples/PHP/workflows@events@subject@{subjectId}@reflow/post.php new file mode 100644 index 000000000..244b80145 --- /dev/null +++ b/nas_spec/code_samples/PHP/workflows@events@subject@{subjectId}@reflow/post.php @@ -0,0 +1,32 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Flow]) + ->environment(Environment::sandbox()) + ->build(); + + +try { + $response = $api->getWorkflowsClient()->reflowBySubject("subject_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow/post.php b/nas_spec/code_samples/PHP/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow/post.php new file mode 100644 index 000000000..1693cb49e --- /dev/null +++ b/nas_spec/code_samples/PHP/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow/post.php @@ -0,0 +1,32 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Flow]) + ->environment(Environment::sandbox()) + ->build(); + + +try { + $response = $api->getWorkflowsClient()->reflowBySubjectAndWorkflow("subject_id", "workflow_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/workflows@events@{eventId}/get.php b/nas_spec/code_samples/PHP/workflows@events@{eventId}/get.php new file mode 100644 index 000000000..7854d66f5 --- /dev/null +++ b/nas_spec/code_samples/PHP/workflows@events@{eventId}/get.php @@ -0,0 +1,32 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Flow]) + ->environment(Environment::sandbox()) + ->build(); + + +try { + $response = $api->getWorkflowsClient()->getEvent("event_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/workflows@events@{eventId}@actions@{workflowActionId}/get.php b/nas_spec/code_samples/PHP/workflows@events@{eventId}@actions@{workflowActionId}/get.php new file mode 100644 index 000000000..ff4f9839a --- /dev/null +++ b/nas_spec/code_samples/PHP/workflows@events@{eventId}@actions@{workflowActionId}/get.php @@ -0,0 +1,32 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Flow]) + ->environment(Environment::sandbox()) + ->build(); + + +try { + $response = $api->getWorkflowsClient()->getActionInvocations("event_id", "action_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/workflows@events@{eventId}@reflow/post.php b/nas_spec/code_samples/PHP/workflows@events@{eventId}@reflow/post.php new file mode 100644 index 000000000..e5e962e9e --- /dev/null +++ b/nas_spec/code_samples/PHP/workflows@events@{eventId}@reflow/post.php @@ -0,0 +1,32 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Flow]) + ->environment(Environment::sandbox()) + ->build(); + + +try { + $response = $api->getWorkflowsClient()->reflowByEvent("event_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/workflows@events@{eventId}@workflow@{workflowId}@reflow/post.php b/nas_spec/code_samples/PHP/workflows@events@{eventId}@workflow@{workflowId}@reflow/post.php new file mode 100644 index 000000000..4668777b2 --- /dev/null +++ b/nas_spec/code_samples/PHP/workflows@events@{eventId}@workflow@{workflowId}@reflow/post.php @@ -0,0 +1,32 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Flow]) + ->environment(Environment::sandbox()) + ->build(); + + +try { + $response = $api->getWorkflowsClient()->reflowByEventAndWorkflow("event_id", "workflow_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/workflows@{workflowId}/delete.php b/nas_spec/code_samples/PHP/workflows@{workflowId}/delete.php new file mode 100644 index 000000000..e15a75a66 --- /dev/null +++ b/nas_spec/code_samples/PHP/workflows@{workflowId}/delete.php @@ -0,0 +1,32 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Flow]) + ->environment(Environment::sandbox()) + ->build(); + + +try { + $response = $api->getWorkflowsClient()->removeWorkflow("workflow_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/workflows@{workflowId}/get.php b/nas_spec/code_samples/PHP/workflows@{workflowId}/get.php new file mode 100644 index 000000000..a2df509b8 --- /dev/null +++ b/nas_spec/code_samples/PHP/workflows@{workflowId}/get.php @@ -0,0 +1,32 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Flow]) + ->environment(Environment::sandbox()) + ->build(); + + +try { + $response = $api->getWorkflowsClient()->getWorkflow("workflow_id"); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/workflows@{workflowId}/patch.php b/nas_spec/code_samples/PHP/workflows@{workflowId}/patch.php new file mode 100644 index 000000000..fb747bbb8 --- /dev/null +++ b/nas_spec/code_samples/PHP/workflows@{workflowId}/patch.php @@ -0,0 +1,35 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Flow]) + ->environment(Environment::sandbox()) + ->build(); + +$request = new UpdateWorkflowRequest(); +$request->name = "workflow_name"; + +try { + $response = $api->getWorkflowsClient()->updateWorkflow("workflow_id", $request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/workflows@{workflowId}@actions@{workflowActionId}/put.php b/nas_spec/code_samples/PHP/workflows@{workflowId}@actions@{workflowActionId}/put.php new file mode 100644 index 000000000..65a58354c --- /dev/null +++ b/nas_spec/code_samples/PHP/workflows@{workflowId}@actions@{workflowActionId}/put.php @@ -0,0 +1,41 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Flow]) + ->environment(Environment::sandbox()) + ->build(); + +$webhookSignature = new WebhookSignature(); +$webhookSignature->method = "HMACSHA256"; +$webhookSignature->key = "public-signing-key"; + +$request = new WebhookWorkflowActionRequest(); +$request->url = "workflow_name"; +$request->signature = "workflow_name"; + +try { + $response = $api->getWorkflowsClient()->updateWorkflowAction("workflow_id", "action_id", $request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/PHP/workflows@{workflowId}@conditions@{workflowConditionId}/put.php b/nas_spec/code_samples/PHP/workflows@{workflowId}@conditions@{workflowConditionId}/put.php new file mode 100644 index 000000000..3f61610fa --- /dev/null +++ b/nas_spec/code_samples/PHP/workflows@{workflowId}@conditions@{workflowConditionId}/put.php @@ -0,0 +1,34 @@ +staticKeys() + ->environment(Environment::sandbox()) + ->secretKey("secret_key") + ->build(); + +//OAuth +$api = CheckoutSdk::builder()->oAuth() + ->clientCredentials("client_id", "client_secret") + ->scopes([OAuthScope::$Flow]) + ->environment(Environment::sandbox()) + ->build(); + +$request = new EntityWorkflowConditionRequest(); + +try { + $response = $api->getWorkflowsClient()->updateWorkflowCondition("workflow_id", "condition_id", $request); +} catch (CheckoutApiException $e) { + // API error + $error_details = $e->error_details; + $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; +} catch (CheckoutAuthorizationException $e) { + // Bad Invalid authorization +} \ No newline at end of file diff --git a/nas_spec/code_samples/Python/accounts@entities/post.py b/nas_spec/code_samples/Python/accounts@entities/post.py new file mode 100644 index 000000000..157c44fda --- /dev/null +++ b/nas_spec/code_samples/Python/accounts@entities/post.py @@ -0,0 +1,63 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.accounts.accounts import OnboardEntityRequest, ContactDetails, Profile, Individual, DateOfBirth, Identification +from checkout_sdk.common.common import Phone, Address +from checkout_sdk.common.enums import Country +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.ACCOUNTS]) \\ + .build() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +address = Address() +address.address_line1 = 'CheckoutSdk.com' +address.address_line2 = '90 Tottenham Court Road' +address.city = 'London' +address.state = 'London' +address.zip = 'W1T 4TJ' +address.country = Country.GB + +request = OnboardEntityRequest() +request.reference = 'reference' +request.contact_details = ContactDetails() +request.contact_details.phone = phone +request.profile = Profile() +request.profile.urls = ['https://docs.checkout.com/url'] +request.profile.mccs = ['0742'] +request.individual = Individual() +request.individual.first_name = 'First' +request.individual.last_name = 'Last' +request.individual.trading_name = "Batman's Super Hero Masks" +request.individual.registered_address = address +request.individual.national_tax_id = 'TAX123456' +request.individual.date_of_birth = DateOfBirth() +request.individual.date_of_birth.day = 5 +request.individual.date_of_birth.month = 6 +request.individual.date_of_birth.year = 1996 +request.individual.identification = Identification() +request.individual.identification.national_id_number = 'AB123456C' + +try: + response = api.accounts.create_entity(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/accounts@entities@{id}/get.py b/nas_spec/code_samples/Python/accounts@entities@{id}/get.py new file mode 100644 index 000000000..bee58d7f1 --- /dev/null +++ b/nas_spec/code_samples/Python/accounts@entities@{id}/get.py @@ -0,0 +1,28 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.ACCOUNTS]) \\ + .build() + +try: + response = api.accounts.get_entity('entity_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/accounts@entities@{id}/put.py b/nas_spec/code_samples/Python/accounts@entities@{id}/put.py new file mode 100644 index 000000000..6e86867d6 --- /dev/null +++ b/nas_spec/code_samples/Python/accounts@entities@{id}/put.py @@ -0,0 +1,63 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.accounts.accounts import OnboardEntityRequest, ContactDetails, Profile, Individual, DateOfBirth, Identification +from checkout_sdk.common.common import Phone, Address +from checkout_sdk.common.enums import Country +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.ACCOUNTS]) \\ + .build() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +address = Address() +address.address_line1 = 'CheckoutSdk.com' +address.address_line2 = '90 Tottenham Court Road' +address.city = 'London' +address.state = 'London' +address.zip = 'W1T 4TJ' +address.country = Country.GB + +request = OnboardEntityRequest() +request.reference = 'reference' +request.contact_details = ContactDetails() +request.contact_details.phone = phone +request.profile = Profile() +request.profile.urls = ['https://docs.checkout.com/url'] +request.profile.mccs = ['0742'] +request.individual = Individual() +request.individual.first_name = 'First' +request.individual.last_name = 'Last' +request.individual.trading_name = "Batman's Super Hero Masks" +request.individual.registered_address = address +request.individual.national_tax_id = 'TAX123456' +request.individual.date_of_birth = DateOfBirth() +request.individual.date_of_birth.day = 5 +request.individual.date_of_birth.month = 6 +request.individual.date_of_birth.year = 1996 +request.individual.identification = Identification() +request.individual.identification.national_id_number = 'AB123456C' + +try: + response = api.accounts.update_entity("entity_id", request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/accounts@entities@{id}@instruments/post.py b/nas_spec/code_samples/Python/accounts@entities@{id}@instruments/post.py new file mode 100644 index 000000000..c1269c89e --- /dev/null +++ b/nas_spec/code_samples/Python/accounts@entities@{id}@instruments/post.py @@ -0,0 +1,63 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.accounts.accounts import AccountsPaymentInstrument, AccountsAccountHolder, AccountHolderType, InstrumentDocument +from checkout_sdk.common.common import Phone, Address +from checkout_sdk.common.enums import Country, Currency +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.ACCOUNTS]) \\ + .build() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +address = Address() +address.address_line1 = 'CheckoutSdk.com' +address.address_line2 = '90 Tottenham Court Road' +address.city = 'London' +address.state = 'London' +address.zip = 'W1T 4TJ' +address.country = Country.GB + +account_holder = AccountsAccountHolder() +account_holder.type = AccountHolderType.INDIVIDUAL +account_holder.first_name = "Peter" +account_holder.last_name = "Parker" +account_holder.phone = phone +account_holder.billing_address = address + +document = InstrumentDocument() +document.type = "bank_statement" +document.file_id = "file_id" + +accounts_payment_instrument = AccountsPaymentInstrument() +accounts_payment_instrument.label = "Peter's Personal Account" +accounts_payment_instrument.account_number = "12345678" +accounts_payment_instrument.bank_code = "050389" +accounts_payment_instrument.currency = Currency.GBP +accounts_payment_instrument.country = Country.GB +accounts_payment_instrument.account_holder = account_holder +accounts_payment_instrument.document = document + +try: + response = api.accounts.create_payment_instrument('entity_id', accounts_payment_instrument) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/accounts@entities@{id}@payout-schedules/get.py b/nas_spec/code_samples/Python/accounts@entities@{id}@payout-schedules/get.py new file mode 100644 index 000000000..ca7667528 --- /dev/null +++ b/nas_spec/code_samples/Python/accounts@entities@{id}@payout-schedules/get.py @@ -0,0 +1,28 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.ACCOUNTS]) \\ + .build() + +try: + response = api.accounts.retrieve_payout_schedule("entity_id") +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/accounts@entities@{id}@payout-schedules/put.py b/nas_spec/code_samples/Python/accounts@entities@{id}@payout-schedules/put.py new file mode 100644 index 000000000..c4f8c4fdb --- /dev/null +++ b/nas_spec/code_samples/Python/accounts@entities@{id}@payout-schedules/put.py @@ -0,0 +1,41 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.accounts.accounts import UpdateScheduleRequest, ScheduleRequest, ScheduleFrequencyWeeklyRequest, DaySchedule +from checkout_sdk.common.enums import Currency +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.ACCOUNTS]) \\ + .build() + +frequency = ScheduleFrequencyWeeklyRequest() +frequency.by_day = DaySchedule.MONDAY + +schedule = ScheduleRequest() +schedule.frequency = frequency + +request = UpdateScheduleRequest() +request.enabled = True +request.threshold = 1000 +request.recurrence = schedule + +try: + response = api.accounts.update_payout_schedule("entity_id", Currency.USD, request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/balances@{id}/get.py b/nas_spec/code_samples/Python/balances@{id}/get.py new file mode 100644 index 000000000..6b85730a2 --- /dev/null +++ b/nas_spec/code_samples/Python/balances@{id}/get.py @@ -0,0 +1,31 @@ +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes +from checkout_sdk.balances.balances import BalancesQuery + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.BALANCES]) \\ + .build() + +query = BalancesQuery() +query.query = "string" + +try: + response = api.balances.retrieve_entity_balances("entity_id", query) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/connect@token/post.py b/nas_spec/code_samples/Python/connect@token/post.py new file mode 100644 index 000000000..422e2f7bd --- /dev/null +++ b/nas_spec/code_samples/Python/connect@token/post.py @@ -0,0 +1,13 @@ +# please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.oauth_scopes import OAuthScopes + +# SDK instantiation for OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .scopes([OAuthScopes.GATEWAY, OAuthScopes.VAULT, OAuthScopes.PAYOUTS_BANK_DETAILS, + OAuthScopes.SESSIONS_APP, OAuthScopes.SESSIONS_BROWSER, OAuthScopes.FX, OAuthScopes.MARKETPLACE, + OAuthScopes.FILES, OAuthScopes.TRANSFERS, OAuthScopes.BALANCES_VIEW]) \\ + .build() diff --git a/nas_spec/code_samples/Python/customers/post.py b/nas_spec/code_samples/Python/customers/post.py new file mode 100644 index 000000000..ed50c8aa5 --- /dev/null +++ b/nas_spec/code_samples/Python/customers/post.py @@ -0,0 +1,47 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone +from checkout_sdk.customers.customers import CustomerRequest +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.GATEWAY]) \\ + .build() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +request = CustomerRequest() +request.email = 'email@docs.checkout.com' +request.name = 'Name' +request.phone = phone +request.instruments = ['instrument_id_1', 'instrument_id_2'] + +try: + response = api.customers.create(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/customers@{identifier}/delete.py b/nas_spec/code_samples/Python/customers@{identifier}/delete.py new file mode 100644 index 000000000..e0e474723 --- /dev/null +++ b/nas_spec/code_samples/Python/customers@{identifier}/delete.py @@ -0,0 +1,35 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.GATEWAY]) \\ + .build() + +try: + response = api.customers.delete("customer_id") +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/customers@{identifier}/get.py b/nas_spec/code_samples/Python/customers@{identifier}/get.py new file mode 100644 index 000000000..70629c7a7 --- /dev/null +++ b/nas_spec/code_samples/Python/customers@{identifier}/get.py @@ -0,0 +1,35 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.GATEWAY]) \\ + .build() + +try: + response = api.customers.get("customer_id") +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/customers@{identifier}/patch.py b/nas_spec/code_samples/Python/customers@{identifier}/patch.py new file mode 100644 index 000000000..8819a2f1e --- /dev/null +++ b/nas_spec/code_samples/Python/customers@{identifier}/patch.py @@ -0,0 +1,47 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone +from checkout_sdk.customers.customers import CustomerRequest +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.GATEWAY]) \\ + .build() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +request = CustomerRequest() +request.email = 'email@docs.checkout.com' +request.name = 'Name' +request.phone = phone +request.instruments = ['instrument_id_1', 'instrument_id_2'] + +try: + response = api.customers.update(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/disputes/get.py b/nas_spec/code_samples/Python/disputes/get.py new file mode 100644 index 000000000..ff2fece3a --- /dev/null +++ b/nas_spec/code_samples/Python/disputes/get.py @@ -0,0 +1,45 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.disputes.disputes import DisputesQueryFilter +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.DISPUTES, OAuthScopes.DISPUTES_VIEW]) \\ + .build() + +query = DisputesQueryFilter() +now = datetime.now(timezone.utc) +query.from_ = now - relativedelta(months=6) +query.to = now +query.payment_arn = 'payment_arn' +query.payment_reference = 'payment_reference' +query.limit = 10 +query.skip = 5 + +try: + response = api.disputes.query(query) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/disputes@{dispute_id}/get.py b/nas_spec/code_samples/Python/disputes@{dispute_id}/get.py new file mode 100644 index 000000000..4e350bcc9 --- /dev/null +++ b/nas_spec/code_samples/Python/disputes@{dispute_id}/get.py @@ -0,0 +1,35 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.DISPUTES, OAuthScopes.DISPUTES_VIEW]) \\ + .build() + +try: + response = api.disputes.get_dispute_details('dispute_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/disputes@{dispute_id}@accept/post.py b/nas_spec/code_samples/Python/disputes@{dispute_id}@accept/post.py new file mode 100644 index 000000000..ede8ebf65 --- /dev/null +++ b/nas_spec/code_samples/Python/disputes@{dispute_id}@accept/post.py @@ -0,0 +1,36 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.DISPUTES, OAuthScopes.DISPUTES_ACCEPT]) \\ + .build() + +try: + response = api.disputes.accept('dispute_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization + diff --git a/nas_spec/code_samples/Python/disputes@{dispute_id}@evidence/get.py b/nas_spec/code_samples/Python/disputes@{dispute_id}@evidence/get.py new file mode 100644 index 000000000..859d57306 --- /dev/null +++ b/nas_spec/code_samples/Python/disputes@{dispute_id}@evidence/get.py @@ -0,0 +1,28 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.DISPUTES, OAuthScopes.DISPUTES_VIEW]) \\ + .build() + +try: + response = api.disputes.get_evidence('dispute_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/disputes@{dispute_id}@evidence/post.py b/nas_spec/code_samples/Python/disputes@{dispute_id}@evidence/post.py new file mode 100644 index 000000000..a8de31c26 --- /dev/null +++ b/nas_spec/code_samples/Python/disputes@{dispute_id}@evidence/post.py @@ -0,0 +1,28 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.DISPUTES, OAuthScopes.DISPUTES_VIEW]) \\ + .build() + +try: + response = api.disputes.submit_evidence('dispute_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/disputes@{dispute_id}@evidence/put.py b/nas_spec/code_samples/Python/disputes@{dispute_id}@evidence/put.py new file mode 100644 index 000000000..fc5aba951 --- /dev/null +++ b/nas_spec/code_samples/Python/disputes@{dispute_id}@evidence/put.py @@ -0,0 +1,46 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.disputes.disputes import DisputeEvidenceRequest +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.DISPUTES, OAuthScopes.DISPUTES_PROVIDE_EVIDENCE]) \\ + .build() + +evidence_request = DisputeEvidenceRequest() +evidence_request.proof_of_delivery_or_service_file = 'proof_of_delivery_or_service_file' +evidence_request.proof_of_delivery_or_service_text = 'proof of delivery or service text' +evidence_request.invoice_or_receipt_file = 'invoice_or_receipt_file' +evidence_request.invoice_or_receipt_text = 'invoice_or_receipt_text' +evidence_request.customer_communication_file = 'customer_communication_file' +evidence_request.customer_communication_text = 'customer_communication_text' +evidence_request.additional_evidence_file = 'additional_evidence_file' +evidence_request.additional_evidence_text = 'additional_evidence_text' + +try: + response = api.disputes.put_evidence('dispute_id', evidence_request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/files/post.py b/nas_spec/code_samples/Python/files/post.py new file mode 100644 index 000000000..7789d0302 --- /dev/null +++ b/nas_spec/code_samples/Python/files/post.py @@ -0,0 +1,40 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.files.files import FileRequest +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.FILES, OAuthScopes.FILES_UPLOAD]) \\ + .build() + +request = FileRequest() +request.file = 'path/to/file' +request.purpose = 'dispute_evidence' + +try: + response = api.disputes.upload_file(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/files@{file_id}/get.py b/nas_spec/code_samples/Python/files@{file_id}/get.py new file mode 100644 index 000000000..2bd63ffa3 --- /dev/null +++ b/nas_spec/code_samples/Python/files@{file_id}/get.py @@ -0,0 +1,35 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.FILES]) \\ + .build() + +try: + response = api.disputes.get_file_details("file_id") +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/forex@quotes/post.py b/nas_spec/code_samples/Python/forex@quotes/post.py new file mode 100644 index 000000000..2b7b1b6f7 --- /dev/null +++ b/nas_spec/code_samples/Python/forex@quotes/post.py @@ -0,0 +1,36 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.enums import Currency +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.forex.forex import QuoteRequest +from checkout_sdk.oauth_scopes import OAuthScopes + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.FX]) \\ + .build() + +quote_request = QuoteRequest() +quote_request.source_currency = Currency.GBP +quote_request.source_amount = 10 +quote_request.destination_currency = Currency.USD +quote_request.process_channel_id = 'pc_abcdefghijklmnopqrstuvwxyz' + +try: + response = api.forex.request_quote(quote_request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: +# Bad arguments + +except CheckoutAuthorizationException as err: +# Invalid authorization diff --git a/nas_spec/code_samples/Python/hosted-payments/post.py b/nas_spec/code_samples/Python/hosted-payments/post.py new file mode 100644 index 000000000..c2389bcf5 --- /dev/null +++ b/nas_spec/code_samples/Python/hosted-payments/post.py @@ -0,0 +1,97 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone, Address, CustomerRequest, Product +from checkout_sdk.common.enums import Country, Currency, PaymentSourceType +from checkout_sdk.payments.hosted.hosted_payments import HostedPaymentsSessionRequest +from checkout_sdk.payments.payments_previous import BillingInformation +from checkout_sdk.payments.payments import ThreeDsRequest, ProcessingSettings, RiskRequest, ShippingDetails, PaymentRecipient +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +address = Address() +address.address_line1 = 'CheckoutSdk.com' +address.address_line2 = '90 Tottenham Court Road' +address.city = 'London' +address.state = 'London' +address.zip = 'W1T 4TJ' +address.country = Country.GB + +customer_request = CustomerRequest() +customer_request.email = 'email@docs.checkout.com' +customer_request.name = 'Name' + +billing_information = BillingInformation() +billing_information.address = address +billing_information.phone = phone + +shipping_details = ShippingDetails() +shipping_details.address = address +shipping_details.phone = phone + +recipient = PaymentRecipient() +recipient.account_number = '123456789' +recipient.country = Country.ES +recipient.dob = '1985-05-18' +recipient.first_name = 'First' +recipient.last_name = 'Last' +recipient.zip = '12345' + +product = Product() +product.name = 'Name' +product.quantity = 1 +product.price = 10 + +three_ds_request = ThreeDsRequest() +three_ds_request.enabled = True +three_ds_request.attempt_n3d = False + +processing_settings = ProcessingSettings() +processing_settings.aft = True + +risk_request = RiskRequest() +risk_request.enabled = True + +request = HostedPaymentsSessionRequest() +request.amount = 10 +request.reference = 'reference' +request.currency = Currency.GBP +request.description = 'Payment for Gold Necklace' +request.customer = customer_request +request.shipping = shipping_details +request.billing = billing_information +request.recipient = recipient +request.processing = processing_settings +request.products = [product] +request.risk = risk_request +request.success_url = 'https://docs.checkout.com/payments/success' +request.failure_url = 'https://docs.checkout.com/payments/failure' +request.cancel_url = 'https://docs.checkout.com/payments/cancel' +request.locale = 'en-GB' +request.three_ds = three_ds_request +request.capture = True +request.allow_payment_methods = [PaymentSourceType.CARD, PaymentSourceType.KLARNA] + +try: + response = api.hosted_payments.create_hosted_payments_page_session(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/hosted-payments@{id}/get.py b/nas_spec/code_samples/Python/hosted-payments@{id}/get.py new file mode 100644 index 000000000..fe8462edf --- /dev/null +++ b/nas_spec/code_samples/Python/hosted-payments@{id}/get.py @@ -0,0 +1,25 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.hosted_payments.get_hosted_payments_page_details('hosted_payment_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/instruments/post.py b/nas_spec/code_samples/Python/instruments/post.py new file mode 100644 index 000000000..9a0dd5c18 --- /dev/null +++ b/nas_spec/code_samples/Python/instruments/post.py @@ -0,0 +1,57 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone, AccountHolder +from checkout_sdk.environment import Environment +from checkout_sdk.instruments.instruments import CreateTokenInstrumentRequest, CreateCustomerInstrumentRequest +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.VAULT_INSTRUMENTS]) \\ + .build() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +customer = CreateCustomerInstrumentRequest() +customer.email = 'email@docs.checkout.com' +customer.name = 'Name' +customer.default = True +customer.phone = phone + +account_holder = AccountHolder() +account_holder.first_name = 'First' +account_holder.last_name = 'Last' +account_holder.phone = phone + +request = CreateTokenInstrumentRequest() +request.token = 'token' +request.account_holder = account_holder +request.customer = customer + +try: + response = api.instruments.create(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: +# Bad arguments + +except CheckoutAuthorizationException as err: +# Invalid authorization diff --git a/nas_spec/code_samples/Python/instruments@{id}/delete.py b/nas_spec/code_samples/Python/instruments@{id}/delete.py new file mode 100644 index 000000000..90b349eba --- /dev/null +++ b/nas_spec/code_samples/Python/instruments@{id}/delete.py @@ -0,0 +1,35 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.VAULT_INSTRUMENTS]) \\ + .build() + +try: + response = api.instruments.delete('instrument_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/instruments@{id}/get.py b/nas_spec/code_samples/Python/instruments@{id}/get.py new file mode 100644 index 000000000..3051cdcb3 --- /dev/null +++ b/nas_spec/code_samples/Python/instruments@{id}/get.py @@ -0,0 +1,36 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.VAULT_INSTRUMENTS]) \\ + .build() + +try: + response = api.instruments.get('instrument_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization + diff --git a/nas_spec/code_samples/Python/instruments@{id}/patch.py b/nas_spec/code_samples/Python/instruments@{id}/patch.py new file mode 100644 index 000000000..afdb0957b --- /dev/null +++ b/nas_spec/code_samples/Python/instruments@{id}/patch.py @@ -0,0 +1,67 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone, Address, AccountHolder, UpdateCustomerRequest +from checkout_sdk.common.enums import Country +from checkout_sdk.environment import Environment +from checkout_sdk.instruments.instruments import UpdateCardInstrumentRequest +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.VAULT_INSTRUMENTS]) \\ + .build() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +address = Address() +address.address_line1 = 'CheckoutSdk.com' +address.address_line2 = '90 Tottenham Court Road' +address.city = 'London' +address.state = 'London' +address.zip = 'W1T 4TJ' +address.country = Country.GB + +account_holder = AccountHolder() +account_holder.first_name = "First" +account_holder.last_name = "Last" +account_holder.phone = phone +account_holder.billing_address = address + +update_customer_request = UpdateCustomerRequest() +update_customer_request.id = "customer_id" +update_customer_request.default = True + +request = UpdateCardInstrumentRequest() +request.name = 'New Name' +request.expiry_year = 2027 +request.expiry_month = 10 +request.account_holder = account_holder +request.customer = update_customer_request + +try: + response = api.instruments.update('instrument_id', request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/payment-links/post.py b/nas_spec/code_samples/Python/payment-links/post.py new file mode 100644 index 000000000..221dbd1b0 --- /dev/null +++ b/nas_spec/code_samples/Python/payment-links/post.py @@ -0,0 +1,97 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone, Address, CustomerRequest, Product +from checkout_sdk.common.enums import Country, Currency, PaymentSourceType +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.payments.links.payments_links import PaymentLinkRequest +from checkout_sdk.payments.payments import ThreeDsRequest, ProcessingSettings, RiskRequest, ShippingDetails, PaymentRecipient +from checkout_sdk.payments.payments_previous import BillingInformation + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +address = Address() +address.address_line1 = 'CheckoutSdk.com' +address.address_line2 = '90 Tottenham Court Road' +address.city = 'London' +address.state = 'London' +address.zip = 'W1T 4TJ' +address.country = Country.GB + +customer_request = CustomerRequest() +customer_request.email = 'email@docs.checkout.com' +customer_request.name = 'Name' + +billing_information = BillingInformation() +billing_information.address = address +billing_information.phone = phone + +shipping_details = ShippingDetails() +shipping_details.address = address +shipping_details.phone = phone + +recipient = PaymentRecipient() +recipient.account_number = '123456789' +recipient.country = Country.ES +recipient.dob = '1985-05-18' +recipient.first_name = 'First' +recipient.last_name = 'Last' +recipient.zip = '12345' + +product = Product() +product.name = 'Product Name' +product.quantity = 1 +product.price = 10 + +three_ds_request = ThreeDsRequest() +three_ds_request.enabled = True +three_ds_request.attempt_n3d = False + +processing_settings = ProcessingSettings() +processing_settings.aft = True + +risk_request = RiskRequest() +risk_request.enabled = True + +request = PaymentLinkRequest() +request.amount = 10 +request.reference = 'reference' +request.currency = Currency.GBP +request.description = 'Payment for Gold Necklace' +request.customer = customer_request +request.shipping = shipping_details +request.billing = billing_information +request.recipient = recipient +request.processing = processing_settings +request.products = [product] +request.risk = risk_request +request.return_url = 'https://docs.checkout.com/payments/return' +request.locale = 'en-GB' +request.three_ds = three_ds_request +request.expires_in = 6400 +request.capture = True +request.allow_payment_methods = [PaymentSourceType.CARD, PaymentSourceType.IDEAL] + +try: + response = api.payments_links.create_payment_link(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/payment-links@{id}/get.py b/nas_spec/code_samples/Python/payment-links@{id}/get.py new file mode 100644 index 000000000..83739b42c --- /dev/null +++ b/nas_spec/code_samples/Python/payment-links@{id}/get.py @@ -0,0 +1,25 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException + +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +try: + response = api.payments_links.get_payment_link('payment_link_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/payments/post.py b/nas_spec/code_samples/Python/payments/post.py new file mode 100644 index 000000000..c3511743c --- /dev/null +++ b/nas_spec/code_samples/Python/payments/post.py @@ -0,0 +1,84 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone, Address, CustomerRequest +from checkout_sdk.common.enums import Country, Currency +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes +from checkout_sdk.payments.payments import PaymentRequestCardSource, Identification, IdentificationType, \\ + PaymentIndividualSender, PaymentRequest + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.GATEWAY]) \\ + .build() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +address = Address() +address.address_line1 = 'CheckoutSdk.com' +address.address_line2 = '90 Tottenham Court Road' +address.city = 'London' +address.state = 'London' +address.zip = 'W1T 4TJ' +address.country = Country.GB + +request_card_source = PaymentRequestCardSource() +request_card_source.number = 'number' +request_card_source.expiry_month = 10 +request_card_source.expiry_year = 2027 +request_card_source.cvv = 123 +request_card_source.name = 'Name' +request_card_source.billing_address = address +request_card_source.phone = phone + +customer_request = CustomerRequest() +customer_request.email = 'email@docs.checkout.com' +customer_request.name = 'Name' + +identification = Identification() +identification.issuing_country = Country.GT +identification.number = '1234' +identification.type = IdentificationType.DRIVING_LICENSE + +payment_individual_sender = PaymentIndividualSender() +payment_individual_sender.first_name = 'First' +payment_individual_sender.last_name = 'Last' +payment_individual_sender.address = address +payment_individual_sender.identification = identification + +request = PaymentRequest() +request.source = request_card_source +request.reference = 'reference' +request.amount = 10 +request.currency = Currency.USD +request.capture = False +request.customer = customer_request +request.sender = payment_individual_sender + +try: + response = api.payments.request_payment(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: +# Bad arguments + +except CheckoutAuthorizationException as err: +# Invalid authorization diff --git a/nas_spec/code_samples/Python/payments@{id}/get.py b/nas_spec/code_samples/Python/payments@{id}/get.py new file mode 100644 index 000000000..cc7808eac --- /dev/null +++ b/nas_spec/code_samples/Python/payments@{id}/get.py @@ -0,0 +1,35 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.GATEWAY]) \\ + .build() + +try: + response = api.payments.get_payment_details('payment_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/payments@{id}@actions/get.py b/nas_spec/code_samples/Python/payments@{id}@actions/get.py new file mode 100644 index 000000000..a75d7b665 --- /dev/null +++ b/nas_spec/code_samples/Python/payments@{id}@actions/get.py @@ -0,0 +1,35 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.GATEWAY, OAuthScopes.GATEWAY_PAYMENT_DETAILS]) \\ + .build() + +try: + response = api.payments.get_payment_actions('payment_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/payments@{id}@authorizations/post.py b/nas_spec/code_samples/Python/payments@{id}@authorizations/post.py new file mode 100644 index 000000000..2419336e4 --- /dev/null +++ b/nas_spec/code_samples/Python/payments@{id}@authorizations/post.py @@ -0,0 +1,41 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes +from checkout_sdk.payments.payments import AuthorizationRequest + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.GATEWAY]) \\ + .build() + +request = AuthorizationRequest() +request.amount = 10 +request.reference = 'reference' + +try: + # Optional: idempotencyKey as a third parameter for idempotent requests + response = api.payments.increment_payment_authorization('payment_id', request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: +# Bad arguments + +except CheckoutAuthorizationException as err: +# Invalid authorization diff --git a/nas_spec/code_samples/Python/payments@{id}@captures/post.py b/nas_spec/code_samples/Python/payments@{id}@captures/post.py new file mode 100644 index 000000000..1a7170116 --- /dev/null +++ b/nas_spec/code_samples/Python/payments@{id}@captures/post.py @@ -0,0 +1,43 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes +from checkout_sdk.payments.payments import CaptureRequest + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.GATEWAY]) \\ + .build() + +request = CaptureRequest() +request.reference = 'reference' +request.amount = 10 + +try: + # or, capture_payment('payment_id') for a full capture + response = api.payments.capture_payment('payment_id', request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: +# Bad arguments + +except CheckoutAuthorizationException as err: +# Invalid authorization + + diff --git a/nas_spec/code_samples/Python/payments@{id}@refunds/post.py b/nas_spec/code_samples/Python/payments@{id}@refunds/post.py new file mode 100644 index 000000000..b1265e1ae --- /dev/null +++ b/nas_spec/code_samples/Python/payments@{id}@refunds/post.py @@ -0,0 +1,41 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes +from checkout_sdk.payments.payments import RefundRequest + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.GATEWAY]) \\ + .build() + +request = RefundRequest() +request.reference = 'reference' +request.amount = 10 + +try: + # or, refundPayment('payment_id') for a full refund + response = api.payments.refund_payment('payment_id', request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: +# Bad arguments + +except CheckoutAuthorizationException as err: +# Invalid authorization diff --git a/nas_spec/code_samples/Python/payments@{id}@voids/post.py b/nas_spec/code_samples/Python/payments@{id}@voids/post.py new file mode 100644 index 000000000..fdeaaf92d --- /dev/null +++ b/nas_spec/code_samples/Python/payments@{id}@voids/post.py @@ -0,0 +1,40 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes +from checkout_sdk.payments.payments import VoidRequest + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.GATEWAY]) \\ + .build() + +request = VoidRequest() +request.reference = 'reference' + +try: + # or, void_payment('payment_id') + response = api.payments.void_payment('payment_id', request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: +# Bad arguments + +except CheckoutAuthorizationException as err: +# Invalid authorization diff --git a/nas_spec/code_samples/Python/risk@assessments@pre-authentication/post.py b/nas_spec/code_samples/Python/risk@assessments@pre-authentication/post.py new file mode 100644 index 000000000..478d7863b --- /dev/null +++ b/nas_spec/code_samples/Python/risk@assessments@pre-authentication/post.py @@ -0,0 +1,87 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone, Address, CustomerRequest +from checkout_sdk.common.enums import Country, Currency +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.risk.risk import RiskRequestTokenSource, RiskPayment, RiskShippingDetails, Location, Device, PreAuthenticationAssessmentRequest + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +address = Address() +address.address_line1 = 'CheckoutSdk.com' +address.address_line2 = '90 Tottenham Court Road' +address.city = 'London' +address.state = 'London' +address.zip = 'W1T 4TJ' +address.country = Country.GB + +token_source = RiskRequestTokenSource() +token_source.token = 'token' +token_source.phone = phone +token_source.billing_address = address + +customer_request = CustomerRequest() +customer_request.email = 'email@docs.checkout.com' +customer_request.name = 'Name' + +risk_payment = RiskPayment() +risk_payment.psp = 'CheckoutSdk.com' +risk_payment.id = '78453878' + +shipping_details = RiskShippingDetails() +shipping_details.address = address + +location = Location() +location.longitude = '0.1313' +location.latitude = '51.5107' + +device = Device() +device.location = location +device.type = 'Phone' +device.os = 'ISO' +device.model = 'iPhone X' +device.date = datetime.now(timezone.utc) +device.user_agent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, ' \\\\ + 'like Gecko) Version/11.0 Mobile/15A372 Safari/604.1 ' +device.fingerprint = '34304a9e3fg09302' + +request = PreAuthenticationAssessmentRequest() +request.date = datetime.now(timezone.utc) +request.source = token_source +request.customer = customer_request +request.payment = risk_payment +request.shipping = shipping_details +request.reference = 'reference' +request.description = 'description' +request.amount = 10 +request.currency = Currency.GBP +request.device = device +request.metadata = { + 'VoucherCode': 'loyalty_10', + 'discountApplied': '10', + 'customer_id': '2190EF321'} + +try: + response = api.risk.request_pre_authentication_risk_scan(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/risk@assessments@pre-capture/post.py b/nas_spec/code_samples/Python/risk@assessments@pre-capture/post.py new file mode 100644 index 000000000..2b3abf8de --- /dev/null +++ b/nas_spec/code_samples/Python/risk@assessments@pre-capture/post.py @@ -0,0 +1,100 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone, Address, CustomerRequest +from checkout_sdk.common.enums import Country, Currency +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.risk.risk import RiskRequestTokenSource, RiskPayment, RiskShippingDetails, Location, Device, \\ + AuthenticationResult, AuthorizationResult, PreCaptureAssessmentRequest + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +address = Address() +address.address_line1 = 'CheckoutSdk.com' +address.address_line2 = '90 Tottenham Court Road' +address.city = 'London' +address.state = 'London' +address.zip = 'W1T 4TJ' +address.country = Country.GB + +token_source = RiskRequestTokenSource() +token_source.token = 'token' +token_source.phone = phone +token_source.billing_address = address + +customer_request = CustomerRequest() +customer_request.email = 'email@docs.checkout.com' +customer_request.name = 'Name' + +risk_payment = RiskPayment() +risk_payment.psp = 'CheckoutSdk.com' +risk_payment.id = '78453878' + +shipping_details = RiskShippingDetails() +shipping_details.address = address + +location = Location() +location.longitude = '0.1313' +location.latitude = '51.5107' + +device = Device() +device.location = location +device.type = 'Phone' +device.os = 'ISO' +device.model = 'iPhone X' +device.date = datetime.now(timezone.utc) +device.user_agent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, ' \\\\ + 'like Gecko) Version/11.0 Mobile/15A372 Safari/604.1 ' +device.fingerprint = '34304a9e3fg09302' + +authentication_result = AuthenticationResult() +authentication_result.attempted = True +authentication_result.challenged = True +authentication_result.liability_shifted = True +authentication_result.method = '3ds' +authentication_result.succeeded = True +authentication_result.version = '2.0' + +authorization_result = AuthorizationResult() +authorization_result.avs_code = 'Y' +authorization_result.cvv_result = 'N' + +request = PreCaptureAssessmentRequest() +request.date = datetime.now(timezone.utc) +request.source = token_source +request.customer = customer_request +request.payment = risk_payment +request.shipping = shipping_details +request.amount = 10 +request.currency = Currency.GBP +request.device = device +request.authentication_result = authentication_result +request.authorization_result = authorization_result +request.metadata = { + 'VoucherCode': 'loyalty_10', + 'discountApplied': '10', + 'customer_id': '2190EF321'} + +try: + response = api.risk.request_pre_capture_risk_scan(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/standalone/post.py b/nas_spec/code_samples/Python/standalone/post.py new file mode 100644 index 000000000..3ef5ce050 --- /dev/null +++ b/nas_spec/code_samples/Python/standalone/post.py @@ -0,0 +1,100 @@ +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone +from checkout_sdk.common.enums import Country, Currency +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes +from checkout_sdk.sessions.sessions import SessionAddress, SessionCardSource, SessionMarketplaceData, SessionsBillingDescriptor, \\ + NonHostedCompletionInfo, BrowserSession, ThreeDsMethodCompletion, SessionRequest, \\ + Category, ChallengeIndicator, TransactionType + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.SESSIONS_APP, OAuthScopes.SESSIONS_BROWSER]) \\ + .build() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +billing_address = SessionAddress() +billing_address.address_line1 = 'CheckoutSdk.com' +billing_address.address_line2 = '90 Tottenham Court Road' +billing_address.city = 'London' +billing_address.state = 'ENG' +billing_address.country = Country.GB + +session_card_source = SessionCardSource() +session_card_source.billing_address = billing_address +session_card_source.number = 'number' +session_card_source.expiry_month = 10 +session_card_source.expiry_year = 2027 +session_card_source.name = 'Name' +session_card_source.email = 'email@docs.checkout.com' +session_card_source.home_phone = phone +session_card_source.work_phone = phone +session_card_source.mobile_phone = phone + +shipping_address = SessionAddress() +shipping_address.address_line1 = 'CheckoutSdk.com' +shipping_address.address_line2 = 'ABC building' +shipping_address.address_line3 = '14 Wells Mews' +shipping_address.city = 'London' +shipping_address.state = 'ENG' +shipping_address.zip = 'W1T 4TJ' +shipping_address.country = Country.GB + +marketplace_data = SessionMarketplaceData() +marketplace_data.sub_entity_id = 'ent_ocw5i74vowfg2edpy66izhts2u' + +billing_descriptor = SessionsBillingDescriptor() +billing_descriptor.name = 'Name' + +non_hosted_completion_info = NonHostedCompletionInfo() +non_hosted_completion_info.callback_url = 'https://docs.checkout.com/callback' + +browser_session = BrowserSession() +browser_session.accept_header = 'Accept: *.*, q=0.1' +browser_session.java_enabled = True +browser_session.language = 'FR-fr' +browser_session.color_depth = '16' +browser_session.screen_width = '1920' +browser_session.screen_height = '1080' +browser_session.timezone = '60' +browser_session.user_agent = 'Mozilla/5.0 (Windows NT 10.0 Win64 x64) AppleWebKit/537.36 (KHTML, like Gecko) ' \\\\ + 'Chrome/69.0.3497.100 Safari/537.36 ' +browser_session.three_ds_method_completion = ThreeDsMethodCompletion.Y +browser_session.ip_address = '1.12.123.255' + +request = SessionRequest() +request.source = session_card_source +request.amount = 10 +request.currency = Currency.USD +request.processing_channel_id = 'pc_5jp2az55l3cuths25t5p3xhwru' +request.marketplace = marketplace_data +request.authentication_category = Category.PAYMENT +request.challenge_indicator = ChallengeIndicator.NO_PREFERENCE +request.billing_descriptor = billing_descriptor +request.reference = 'ORD-5023-4E89' +request.transaction_type = TransactionType.GOODS_SERVICE +request.shipping_address = shipping_address +request.completion = non_hosted_completion_info +request.channel_data = browser_session + +try: + response = api.sessions.request_session(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/standalone@{id}/get.py b/nas_spec/code_samples/Python/standalone@{id}/get.py new file mode 100644 index 000000000..d2648d130 --- /dev/null +++ b/nas_spec/code_samples/Python/standalone@{id}/get.py @@ -0,0 +1,29 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.SESSIONS_APP, OAuthScopes.SESSIONS_BROWSER]) \\ + .build() + +try: + # Optional: session_secret instead of OAuth + response = api.sessions.get_session_details('session_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/standalone@{id}@collect-data/put.py b/nas_spec/code_samples/Python/standalone@{id}@collect-data/put.py new file mode 100644 index 000000000..83cd65e5f --- /dev/null +++ b/nas_spec/code_samples/Python/standalone@{id}@collect-data/put.py @@ -0,0 +1,42 @@ +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes +from checkout_sdk.sessions.sessions import BrowserSession, ThreeDsMethodCompletion + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.SESSIONS_APP, OAuthScopes.SESSIONS_BROWSER]) \\ + .build() + +request = BrowserSession() +request.accept_header = 'Accept: *.*, q=0.1' +request.java_enabled = True +request.language = 'FR-fr' +request.color_depth = '16' +request.screen_width = '1920' +request.screen_height = '1080' +request.timezone = '60' +request.user_agent = 'Mozilla/5.0 (Windows NT 10.0 Win64 x64) AppleWebKit/537.36 (KHTML, like Gecko) ' \\\\ + 'Chrome/69.0.3497.100 Safari/537.36 ' +request.three_ds_method_completion = ThreeDsMethodCompletion.Y +request.ip_address = '1.12.123.255' + +try: + # Optional: session_secret instead of OAuth + response = api.sessions.update_session('session_id', request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/standalone@{id}@complete/post.py b/nas_spec/code_samples/Python/standalone@{id}@complete/post.py new file mode 100644 index 000000000..b5db2c3ba --- /dev/null +++ b/nas_spec/code_samples/Python/standalone@{id}@complete/post.py @@ -0,0 +1,29 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.SESSIONS_APP, OAuthScopes.SESSIONS_BROWSER]) \\ + .build() + +try: + # Optional: session_secret instead of OAuth + response = api.sessions.complete_session('session_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/standalone@{id}@issuer-fingerprint/put.py b/nas_spec/code_samples/Python/standalone@{id}@issuer-fingerprint/put.py new file mode 100644 index 000000000..ccb425ad6 --- /dev/null +++ b/nas_spec/code_samples/Python/standalone@{id}@issuer-fingerprint/put.py @@ -0,0 +1,32 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes +from checkout_sdk.sessions.sessions import ThreeDsMethodCompletionRequest, ThreeDsMethodCompletion + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.SESSIONS_APP, OAuthScopes.SESSIONS_BROWSER]) \\ + .build() + +request = ThreeDsMethodCompletionRequest() +request.three_ds_method_completion = ThreeDsMethodCompletion.Y + +try: + response = api.sessions.update_3ds_method_completion('session_id', request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/tokens/post.py b/nas_spec/code_samples/Python/tokens/post.py new file mode 100644 index 000000000..db321dd41 --- /dev/null +++ b/nas_spec/code_samples/Python/tokens/post.py @@ -0,0 +1,50 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.common import Phone, Address +from checkout_sdk.common.enums import Country +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.tokens.tokens import CardTokenRequest + +# API Keys +api = CheckoutSdk.builder() \\ + .public_key('public_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +phone = Phone() +phone.country_code = '44' +phone.number = '4155552671' + +address = Address() +address.address_line1 = 'CheckoutSdk.com' +address.address_line2 = '90 Tottenham Court Road' +address.city = 'London' +address.state = 'London' +address.zip = 'W1T 4TJ' +address.country = Country.GB + +request = CardTokenRequest() +request.number = 'number' +request.expiry_month = 10 +request.expiry_year = 2027 +request.cvv = 123 +request.name = 'Name' +request.billing_address = address +request.phone = phone + +try: + response = api.tokens.request_card_token(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/transfers/post.py b/nas_spec/code_samples/Python/transfers/post.py new file mode 100644 index 000000000..53c1ec500 --- /dev/null +++ b/nas_spec/code_samples/Python/transfers/post.py @@ -0,0 +1,42 @@ +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes +from checkout_sdk.transfers.transfers import CreateTransferRequest, TransferType, TransferSource, TransferDestination + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.TRANSFERS]) \\ + .build() + +source = TransferSource() +source.id = "source_id" +source.amount = 100 + +destination = TransferDestination() +destination.id = "destination_id" + +request = CreateTransferRequest() +request.reference = "superhero1234" +request.transfer_type = TransferType.COMMISSION +request.source = source +request.destination = destination + +try: + # Optional: idempotencyKey as a second parameter for idempotent requests + response = api.transfers.initiate_transfer_of_funds(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/transfers@{id}/get.py b/nas_spec/code_samples/Python/transfers@{id}/get.py new file mode 100644 index 000000000..76bb91fc4 --- /dev/null +++ b/nas_spec/code_samples/Python/transfers@{id}/get.py @@ -0,0 +1,27 @@ +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.TRANSFERS]) \\ + .build() + +try: + response = api.transfers.retrieve_a_transfer("transfer_id") +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/validation@bank-accounts@{country}@{currency}/get.py b/nas_spec/code_samples/Python/validation@bank-accounts@{country}@{currency}/get.py new file mode 100644 index 000000000..c15930542 --- /dev/null +++ b/nas_spec/code_samples/Python/validation@bank-accounts@{country}@{currency}/get.py @@ -0,0 +1,34 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.instruments.instruments import BankAccountFieldQuery, AccountHolderType, PaymentNetwork +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.common.enums import Country, Currency +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.PAYOUTS_BANK_DETAILS]) \\ + .build() + +query = BankAccountFieldQuery() +query.account_holder_type = AccountHolderType.INDIVIDUAL +query.payment_network = PaymentNetwork.LOCAL + +try: + response = api.instruments.get_bank_account_field_formatting(Country.GB, Currency.GBP, query) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/workflows/get.py b/nas_spec/code_samples/Python/workflows/get.py new file mode 100644 index 000000000..644335faa --- /dev/null +++ b/nas_spec/code_samples/Python/workflows/get.py @@ -0,0 +1,35 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \\ + .build() + +try: + response = api.workflows.get_workflows() +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/workflows/post.py b/nas_spec/code_samples/Python/workflows/post.py new file mode 100644 index 000000000..3092dd159 --- /dev/null +++ b/nas_spec/code_samples/Python/workflows/post.py @@ -0,0 +1,79 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes +from checkout_sdk.workflows.workflows import WebhookSignature, WebhookWorkflowActionRequest, EntityWorkflowConditionRequest, \\ + EventWorkflowConditionRequest, ProcessingChannelWorkflowConditionRequest, CreateWorkflowRequest + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \\ + .build() + +signature = WebhookSignature() +signature.key = 'signature' +signature.method = 'HMACSHA256' + +action_request = WebhookWorkflowActionRequest() +action_request.url = 'https://docs.checkout.com/fail' +action_request.headers = {} +action_request.signature = signature + +entity_condition_request = EntityWorkflowConditionRequest() +entity_condition_request.entities = ['entity_id'] + +event_condition_request = EventWorkflowConditionRequest() +event_condition_request.events = {'gateway': ['payment_approved', + 'payment_declined', + 'card_verification_declined', + 'card_verified', + 'payment_authorization_incremented', + 'payment_authorization_increment_declined', + 'payment_capture_declined', + 'payment_captured', + 'payment_refund_declined', + 'payment_refunded', + 'payment_void_declined', + 'payment_voided'], + 'dispute': ['dispute_canceled', + 'dispute_evidence_required', + 'dispute_expired', + 'dispute_lost', + 'dispute_resolved', + 'dispute_won']} + +processing_channel_condition_request = ProcessingChannelWorkflowConditionRequest() +processing_channel_condition_request.processing_channels = ['processing_channel_id'] + +request = CreateWorkflowRequest() +request.actions = [action_request] +request.conditions = [entity_condition_request, event_condition_request, + processing_channel_condition_request] +request.name = 'Name' +request.active = True + +try: + response = api.workflows.create_workflow(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/workflows@event-types/get.py b/nas_spec/code_samples/Python/workflows@event-types/get.py new file mode 100644 index 000000000..00756c51c --- /dev/null +++ b/nas_spec/code_samples/Python/workflows@event-types/get.py @@ -0,0 +1,35 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \\ + .build() + +try: + response = api.workflows.get_event_types() +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/workflows@events@reflow/post.py b/nas_spec/code_samples/Python/workflows@events@reflow/post.py new file mode 100644 index 000000000..cf7f85c30 --- /dev/null +++ b/nas_spec/code_samples/Python/workflows@events@reflow/post.py @@ -0,0 +1,40 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes +from checkout_sdk.workflows.workflows import ReflowByEventsRequest + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \\ + .build() + +request = ReflowByEventsRequest() +request.events = ['event_id_1', 'event_id_2'] +request.workflows = ['workflow_id_1', 'workflow_id_2'] + +try: + response = api.workflows.reflow(request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/workflows@events@subject@{subjectId}/get.py b/nas_spec/code_samples/Python/workflows@events@subject@{subjectId}/get.py new file mode 100644 index 000000000..db93a6f46 --- /dev/null +++ b/nas_spec/code_samples/Python/workflows@events@subject@{subjectId}/get.py @@ -0,0 +1,35 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_EVENTS]) \\ + .build() + +try: + response = api.workflows.get_subject_events('subject_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/workflows@events@subject@{subjectId}@reflow/post.py b/nas_spec/code_samples/Python/workflows@events@subject@{subjectId}@reflow/post.py new file mode 100644 index 000000000..790c66c76 --- /dev/null +++ b/nas_spec/code_samples/Python/workflows@events@subject@{subjectId}@reflow/post.py @@ -0,0 +1,35 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \\ + .build() + +try: + response = api.workflows.reflow_by_subject('subject_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow/post.py b/nas_spec/code_samples/Python/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow/post.py new file mode 100644 index 000000000..db1b6e8e0 --- /dev/null +++ b/nas_spec/code_samples/Python/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow/post.py @@ -0,0 +1,35 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \\ + .build() + +try: + response = api.workflows.reflow_by_subject_and_workflow('subject_id', 'workflow_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/workflows@events@{eventId}/get.py b/nas_spec/code_samples/Python/workflows@events@{eventId}/get.py new file mode 100644 index 000000000..22ce18442 --- /dev/null +++ b/nas_spec/code_samples/Python/workflows@events@{eventId}/get.py @@ -0,0 +1,35 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_EVENTS]) \\ + .build() + +try: + response = api.workflows.get_event('event_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/workflows@events@{eventId}@actions@{workflowActionId}/get.py b/nas_spec/code_samples/Python/workflows@events@{eventId}@actions@{workflowActionId}/get.py new file mode 100644 index 000000000..60791f8ba --- /dev/null +++ b/nas_spec/code_samples/Python/workflows@events@{eventId}@actions@{workflowActionId}/get.py @@ -0,0 +1,35 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_EVENTS, OAuthScopes.FLOW_WORKFLOWS]) \\ + .build() + +try: + response = api.workflows.get_action_invocations('event_id', 'action_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/workflows@events@{eventId}@reflow/post.py b/nas_spec/code_samples/Python/workflows@events@{eventId}@reflow/post.py new file mode 100644 index 000000000..2add6627e --- /dev/null +++ b/nas_spec/code_samples/Python/workflows@events@{eventId}@reflow/post.py @@ -0,0 +1,35 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.FLOW]) \\ + .build() + +try: + response = api.workflows.reflow_by_event('event_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/workflows@events@{eventId}@workflow@{workflowId}@reflow/post.py b/nas_spec/code_samples/Python/workflows@events@{eventId}@workflow@{workflowId}@reflow/post.py new file mode 100644 index 000000000..fec850b9e --- /dev/null +++ b/nas_spec/code_samples/Python/workflows@events@{eventId}@workflow@{workflowId}@reflow/post.py @@ -0,0 +1,35 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \\ + .build() + +try: + response = api.workflows.reflow_by_event_and_workflow('event_id', 'workflow_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/workflows@{workflowId}/delete.py b/nas_spec/code_samples/Python/workflows@{workflowId}/delete.py new file mode 100644 index 000000000..63d632503 --- /dev/null +++ b/nas_spec/code_samples/Python/workflows@{workflowId}/delete.py @@ -0,0 +1,35 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \\ + .build() + +try: + response = api.workflows.remove_workflow('workflow_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/workflows@{workflowId}/get.py b/nas_spec/code_samples/Python/workflows@{workflowId}/get.py new file mode 100644 index 000000000..da3d25a42 --- /dev/null +++ b/nas_spec/code_samples/Python/workflows@{workflowId}/get.py @@ -0,0 +1,35 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \\ + .build() + +try: + response = api.workflows.get_workflow('workflow_id') +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization diff --git a/nas_spec/code_samples/Python/workflows@{workflowId}/patch.py b/nas_spec/code_samples/Python/workflows@{workflowId}/patch.py new file mode 100644 index 000000000..b3d1867fc --- /dev/null +++ b/nas_spec/code_samples/Python/workflows@{workflowId}/patch.py @@ -0,0 +1,40 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes +from checkout_sdk.workflows.workflows import UpdateWorkflowRequest + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \\ + .build() + +request = UpdateWorkflowRequest() +request.name = 'New name' +request.active = False + +try: + response = api.workflows.update_workflow('workflow_id', request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/workflows@{workflowId}@actions@{workflowActionId}/put.py b/nas_spec/code_samples/Python/workflows@{workflowId}@actions@{workflowActionId}/put.py new file mode 100644 index 000000000..83e72341e --- /dev/null +++ b/nas_spec/code_samples/Python/workflows@{workflowId}@actions@{workflowActionId}/put.py @@ -0,0 +1,44 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes +from checkout_sdk.workflows.workflows import WebhookSignature, WebhookWorkflowActionRequest + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \\ + .build() + +signature = WebhookSignature() +signature.key = '8V8x0dLK%AyD*DNS8JJr' +signature.method = 'HMACSHA256' + +request = WebhookWorkflowActionRequest() +request.url = 'https://docs.checkout.com/fail/fake' +request.signature = signature + +try: + response = api.workflows.update_workflow_action('workflow_id', 'action_id', request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/Python/workflows@{workflowId}@conditions@{workflowConditionId}/put.py b/nas_spec/code_samples/Python/workflows@{workflowId}@conditions@{workflowConditionId}/put.py new file mode 100644 index 000000000..7f944e5e3 --- /dev/null +++ b/nas_spec/code_samples/Python/workflows@{workflowId}@conditions@{workflowConditionId}/put.py @@ -0,0 +1,52 @@ +# For more information please refer to https://github.com/checkout/checkout-sdk-python +import checkout_sdk +from checkout_sdk.checkout_sdk import CheckoutSdk +from checkout_sdk.environment import Environment +from checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException +from checkout_sdk.oauth_scopes import OAuthScopes +from checkout_sdk.workflows.workflows import EventWorkflowConditionRequest + +# API Keys +api = CheckoutSdk.builder() \\ + .secret_key('secret_key') \\ + .environment(Environment.sandbox()) \\ + .build() + # or Environment.production() + +# OAuth +api = CheckoutSdk.builder() \\ + .oauth() \\ + .client_credentials('client_id', 'client_secret') \\ + .environment(Environment.sandbox()) \\ + .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \\ + .build() + +request = EventWorkflowConditionRequest() +request.events = {'gateway': ['card_verified', + 'card_verification_declined', + 'payment_approved', + 'payment_pending', + 'payment_declined', + 'payment_voided', + 'payment_captured', + 'payment_refunded'], + 'dispute': ['dispute_canceled', + 'dispute_evidence_required', + 'dispute_expired', + 'dispute_lost', + 'dispute_resolved', + 'dispute_won']} + +try: + response = api.workflows.update_workflow_condition('workflow_id', 'condition_id', request) +except CheckoutApiException as err: + # API error + request_id = err.request_id + status_code = err.http_status_code + error_details = err.error_details + http_response = err.http_response +except CheckoutArgumentException as err: + # Bad arguments + +except CheckoutAuthorizationException as err: + # Invalid authorization \ No newline at end of file diff --git a/nas_spec/code_samples/README.md b/nas_spec/code_samples/README.md new file mode 100644 index 000000000..feae70233 --- /dev/null +++ b/nas_spec/code_samples/README.md @@ -0,0 +1,9 @@ +# Code samples + +Generate [x-code-samples](https://github.com/Rebilly/ReDoc/blob/master/docs/redoc-vendor-extensions.md#x-code-samples) +Path `//.` where: + +- `` - name of the language from [this](https://github.com/github/linguist/blob/master/lib/linguist/popular.yml) list. +- `` - path of target method, where all slashes replaced with `@` sign. +- `` - verb of target method. +- `` - ignored. diff --git a/nas_spec/code_samples/cURL/connect@token/post.sh b/nas_spec/code_samples/cURL/connect@token/post.sh new file mode 100644 index 000000000..7dd74e29e --- /dev/null +++ b/nas_spec/code_samples/cURL/connect@token/post.sh @@ -0,0 +1,5 @@ +curl --location --request POST 'https://access.checkout.com/connect/token' + --header 'Content-Type: application/x-www-form-urlencoded' + --header 'Authorization: Basic dGVzdC1hY2Nlc3Mta2V5LWlkOnRlc3QtYWNjZXNzLWtleS1zZWNyZXQ=' + --data-urlencode 'grant_type=client_credentials' + --data-urlencode 'scope=gateway' \ No newline at end of file diff --git a/nas_spec/code_samples/cURL/connect@{token}/post.sh b/nas_spec/code_samples/cURL/connect@{token}/post.sh new file mode 100644 index 000000000..91572d8bb --- /dev/null +++ b/nas_spec/code_samples/cURL/connect@{token}/post.sh @@ -0,0 +1,6 @@ + +curl --location --request POST 'https://access.checkout.com/connect/token' + --header 'Content-Type: application/x-www-form-urlencoded' + --header 'Authorization: Basic dGVzdC1hY2Nlc3Mta2V5LWlkOnRlc3QtYWNjZXNzLWtleS1zZWNyZXQ=' + --data-urlencode 'grant_type=client_credentials' + --data-urlencode 'scope=gateway' \ No newline at end of file diff --git a/nas_spec/components/headers/Cko-Correlation-Id.yaml b/nas_spec/components/headers/Cko-Correlation-Id.yaml new file mode 100644 index 000000000..3b1877498 --- /dev/null +++ b/nas_spec/components/headers/Cko-Correlation-Id.yaml @@ -0,0 +1,8 @@ +in: header +name: Cko-Correlation-Id +schema: + type: string +required: true +description: + A unique correlation ID for this request +example: 09bce2c6-5ec1-40e3-91e2-9d8f170afa28 \ No newline at end of file diff --git a/nas_spec/components/headers/Cko-Request-Id.yaml b/nas_spec/components/headers/Cko-Request-Id.yaml new file mode 100644 index 000000000..329bee12b --- /dev/null +++ b/nas_spec/components/headers/Cko-Request-Id.yaml @@ -0,0 +1,3 @@ +description: The unique identifier of the request +schema: + type: string diff --git a/nas_spec/components/headers/Cko-Version.yaml b/nas_spec/components/headers/Cko-Version.yaml new file mode 100644 index 000000000..9757c9654 --- /dev/null +++ b/nas_spec/components/headers/Cko-Version.yaml @@ -0,0 +1,3 @@ +description: The version of the API +schema: + type: string diff --git a/nas_spec/components/parameters/EntityId.yaml b/nas_spec/components/parameters/EntityId.yaml new file mode 100644 index 000000000..3b8352dcf --- /dev/null +++ b/nas_spec/components/parameters/EntityId.yaml @@ -0,0 +1,9 @@ +name: id +in: path +description: The ID of the entity. +required: true +allowEmptyValue: false +example: ent_w4jelhppmfiufdnatam37wrfc4 +style: simple +schema: + type: string diff --git a/nas_spec/components/parameters/Query.yaml b/nas_spec/components/parameters/Query.yaml new file mode 100644 index 000000000..f4e654c6c --- /dev/null +++ b/nas_spec/components/parameters/Query.yaml @@ -0,0 +1,9 @@ +name: query +in: query +description: The query to apply to limit the currency accounts. +required: false +allowEmptyValue: false +example: currency:EUR +style: form +schema: + type: string diff --git a/nas_spec/components/parameters/ckoCorrelationId.yaml b/nas_spec/components/parameters/ckoCorrelationId.yaml new file mode 100644 index 000000000..d54b08836 --- /dev/null +++ b/nas_spec/components/parameters/ckoCorrelationId.yaml @@ -0,0 +1,3 @@ +description: The unique correlation ID for the request +schema: + type: string diff --git a/nas_spec/components/parameters/ckoIdempotencyKey.yaml b/nas_spec/components/parameters/ckoIdempotencyKey.yaml new file mode 100644 index 000000000..e87d8a44d --- /dev/null +++ b/nas_spec/components/parameters/ckoIdempotencyKey.yaml @@ -0,0 +1,6 @@ +in: header +name: Cko-Idempotency-Key +schema: + type: string +required: false +description: An optional idempotency key for safely retrying payment requests diff --git a/nas_spec/components/parameters/ckoIdempotencyKeyRequired.yaml b/nas_spec/components/parameters/ckoIdempotencyKeyRequired.yaml new file mode 100644 index 000000000..8c10528eb --- /dev/null +++ b/nas_spec/components/parameters/ckoIdempotencyKeyRequired.yaml @@ -0,0 +1,6 @@ +in: header +name: Cko-Idempotency-Key +schema: + type: string +required: true +description: An idempotency key for safely retrying transfer requests diff --git a/nas_spec/components/parameters/collectionCriteria.yaml b/nas_spec/components/parameters/collectionCriteria.yaml new file mode 100644 index 000000000..ba182328b --- /dev/null +++ b/nas_spec/components/parameters/collectionCriteria.yaml @@ -0,0 +1,5 @@ +name: criteria +in: query +schema: + type: string +description: The json criteria for collection diff --git a/nas_spec/components/parameters/collectionExpand.yaml b/nas_spec/components/parameters/collectionExpand.yaml new file mode 100644 index 000000000..ca67a11b1 --- /dev/null +++ b/nas_spec/components/parameters/collectionExpand.yaml @@ -0,0 +1,7 @@ +name: expand +in: query +schema: + type: string +description: >- + Expand response to get full related object intead of ID. See the expand + guide for more info. diff --git a/nas_spec/components/parameters/collectionFields.yaml b/nas_spec/components/parameters/collectionFields.yaml new file mode 100644 index 000000000..341a9e1e3 --- /dev/null +++ b/nas_spec/components/parameters/collectionFields.yaml @@ -0,0 +1,7 @@ +name: fields +in: query +schema: + type: string +description: >- + Limit the returned fields to the list specified, separated by comma. Note + that id is always returned. diff --git a/nas_spec/components/parameters/collectionFilter.yaml b/nas_spec/components/parameters/collectionFilter.yaml new file mode 100644 index 000000000..33fcc2937 --- /dev/null +++ b/nas_spec/components/parameters/collectionFilter.yaml @@ -0,0 +1,8 @@ +name: filter +in: query +schema: + type: string +description: | + The collection items filter requires a special format. + Use "," for multiple allowed values. Use ";" for multiple fields. + See the filter guide for more options and examples about this format. diff --git a/nas_spec/components/parameters/collectionLimit.yaml b/nas_spec/components/parameters/collectionLimit.yaml new file mode 100644 index 000000000..d4f085dde --- /dev/null +++ b/nas_spec/components/parameters/collectionLimit.yaml @@ -0,0 +1,7 @@ +name: limit +in: query +description: The collection items limit +schema: + type: integer + minimum: 0 + maximum: 1000 diff --git a/nas_spec/components/parameters/collectionOffset.yaml b/nas_spec/components/parameters/collectionOffset.yaml new file mode 100644 index 000000000..56ff20102 --- /dev/null +++ b/nas_spec/components/parameters/collectionOffset.yaml @@ -0,0 +1,6 @@ +name: offset +in: query +description: The collection items offset +schema: + type: integer + minimum: 0 diff --git a/nas_spec/components/parameters/collectionQuery.yaml b/nas_spec/components/parameters/collectionQuery.yaml new file mode 100644 index 000000000..b6f3c3716 --- /dev/null +++ b/nas_spec/components/parameters/collectionQuery.yaml @@ -0,0 +1,5 @@ +name: q +in: query +schema: + type: string +description: The partial search of the text fields. diff --git a/nas_spec/components/parameters/collectionSort.yaml b/nas_spec/components/parameters/collectionSort.yaml new file mode 100644 index 000000000..ee583edee --- /dev/null +++ b/nas_spec/components/parameters/collectionSort.yaml @@ -0,0 +1,10 @@ +name: sort +in: query +style: form +schema: + type: array + items: + type: string +description: >- + The collection items sort field and order (prefix with "-" for descending + sort). diff --git a/nas_spec/components/parameters/hash.yaml b/nas_spec/components/parameters/hash.yaml new file mode 100644 index 000000000..2584ba0ad --- /dev/null +++ b/nas_spec/components/parameters/hash.yaml @@ -0,0 +1,6 @@ +name: hash +in: path +description: The token identifier string +schema: + type: string +required: true diff --git a/nas_spec/components/parameters/mediaType.yaml b/nas_spec/components/parameters/mediaType.yaml new file mode 100644 index 000000000..55cda33e8 --- /dev/null +++ b/nas_spec/components/parameters/mediaType.yaml @@ -0,0 +1,8 @@ +name: Accept +in: header +schema: + type: string + enum: + - application/json + default: application/json +description: The response media type diff --git a/nas_spec/components/parameters/resourceId.yaml b/nas_spec/components/parameters/resourceId.yaml new file mode 100644 index 000000000..f22fc2c8f --- /dev/null +++ b/nas_spec/components/parameters/resourceId.yaml @@ -0,0 +1,6 @@ +name: id +in: path +description: The resource identifier string +schema: + type: string +required: true diff --git a/nas_spec/components/parameters/rulesVersion.yaml b/nas_spec/components/parameters/rulesVersion.yaml new file mode 100644 index 000000000..a4cb6d722 --- /dev/null +++ b/nas_spec/components/parameters/rulesVersion.yaml @@ -0,0 +1,9 @@ +name: version +in: path +schema: + type: integer + minimum: 1 +required: true +description: >- + The rule set version. Expand response to get full related object instead + of ID. See the expand guide for more info. diff --git a/nas_spec/components/parameters/systemEventType.yaml b/nas_spec/components/parameters/systemEventType.yaml new file mode 100644 index 000000000..c59c351fc --- /dev/null +++ b/nas_spec/components/parameters/systemEventType.yaml @@ -0,0 +1,6 @@ +name: eventType +in: path +description: The event type +schema: + type: string +required: true diff --git a/nas_spec/components/responses/AccessForbidden.yaml b/nas_spec/components/responses/AccessForbidden.yaml new file mode 100644 index 000000000..b9747e8ea --- /dev/null +++ b/nas_spec/components/responses/AccessForbidden.yaml @@ -0,0 +1,5 @@ +description: 'Access forbidden, invalid API-KEY was used' +content: + application/json: + schema: + $ref: '#/components/schemas/Error' diff --git a/nas_spec/components/responses/Conflict.yaml b/nas_spec/components/responses/Conflict.yaml new file mode 100644 index 000000000..05e9b98ef --- /dev/null +++ b/nas_spec/components/responses/Conflict.yaml @@ -0,0 +1,5 @@ +description: Conflict +content: + application/json: + schema: + $ref: '#/components/schemas/Error' diff --git a/nas_spec/components/responses/InvalidDataError.yaml b/nas_spec/components/responses/InvalidDataError.yaml new file mode 100644 index 000000000..d0201c8a7 --- /dev/null +++ b/nas_spec/components/responses/InvalidDataError.yaml @@ -0,0 +1,5 @@ +description: Invalid data was sent +content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' diff --git a/nas_spec/components/responses/NotFound.yaml b/nas_spec/components/responses/NotFound.yaml new file mode 100644 index 000000000..b944fcf81 --- /dev/null +++ b/nas_spec/components/responses/NotFound.yaml @@ -0,0 +1,5 @@ +description: Resource was not found +content: + application/json: + schema: + $ref: '#/components/schemas/Error' diff --git a/nas_spec/components/schemas/Address.yaml b/nas_spec/components/schemas/Address.yaml new file mode 100644 index 000000000..58c6ef0e2 --- /dev/null +++ b/nas_spec/components/schemas/Address.yaml @@ -0,0 +1,32 @@ +type: object +properties: + address_line1: + type: string + description: The first line of the address. Required if `source.type` is `tamara` + maxLength: 200 + example: Checkout.com + address_line2: + type: string + description: The second line of the address + maxLength: 200 + example: 90 Tottenham Court Road + city: + type: string + description: The address city. Required if `source.type` is `tamara`, `giropay` + maxLength: 50 + example: London + state: + type: string + description: The state or province of the address country (ISO 3166-2 code of up to two alphanumeric characters). + maxLength: 2 + zip: + type: string + description: The address zip/postal code. Required if `source.type` is `giropay` + maxLength: 50 + example: W1T 4TJ + country: + type: string + description: The two-letter ISO country code of the address. Required if `source.type` is `tamara`, `giropay` + example: GB + maxLength: 2 + minLength: 2 diff --git a/nas_spec/components/schemas/ApplePay/ApplePayCertificateRequest.yaml b/nas_spec/components/schemas/ApplePay/ApplePayCertificateRequest.yaml new file mode 100644 index 000000000..78ff873f7 --- /dev/null +++ b/nas_spec/components/schemas/ApplePay/ApplePayCertificateRequest.yaml @@ -0,0 +1,9 @@ +type: object +description: Certificate content to be added an account +required: + - value +properties: + content: + type: string + description: The certificate content + example: MIIBSDCB8AIBADCBjzELMAkGA1UEBhMCR0IxDzANBgNVBAgMBkxvbmRvbjEPMA0GA1UEBwwGTG9uZG9uMRUwEwYDVQQKDAxDaGVja291dC5jb20xCzAJBgNVBA8MAklUMRUwEwYDVQQDDAxjaGVja291dC5jb20xIzAhBgkqhkiG9w0BCQEWFHN1cHBvcnRAY2hlY2tvdXQuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEXf/MDFRLSblykajGm0GE+lUNoOIEa0DbWc7Bv3s55bYtW1fJo2/MJIPojUKuKUx2VsEfGmmqXKbq4IhAr0bM8TAKBggqhkjOPQQDAgNHADBEAiAo1Dv4TXTacSeIfy4HDjzPMQY2+OxTW6szRJjGyfKgXQIgdHAX0BmI+1rozysjXv8MvoxehQIGACQ+UWJle+UZ2ms= diff --git a/nas_spec/components/schemas/ApplePay/ApplePayCertificateResponse.yaml b/nas_spec/components/schemas/ApplePay/ApplePayCertificateResponse.yaml new file mode 100644 index 000000000..c1559fc3a --- /dev/null +++ b/nas_spec/components/schemas/ApplePay/ApplePayCertificateResponse.yaml @@ -0,0 +1,30 @@ +type: object +description: Response for an attached certificate for an account +required: + - id + - public_key_hash + - valid_from + - valid_until +properties: + id: + type: string + pattern: ^(alpc)_(\\w{26})$ + description: The identifier of the account domain + example: aplc_hefptsiydvkexnzzb35zrlqgfq + + public_key_hash: + type: string + description: Hash of the certificate public key + example: tqYV+tmG9aMh+l/K6cicUnPqkb1gUiLjSTM9gEz6Nl0= + + valid_from: + type: string + format: date-time + description: When the certificate is valid from + example: 2021-01-01T17:32:28Z + + valid_until: + type: string + format: date-time + description: When the certificate is valid until + example: 2025-01-01T17:32:28Z diff --git a/nas_spec/components/schemas/ApplePay/ApplePaySigningRequestResponse.yaml b/nas_spec/components/schemas/ApplePay/ApplePaySigningRequestResponse.yaml new file mode 100644 index 000000000..b9fb74690 --- /dev/null +++ b/nas_spec/components/schemas/ApplePay/ApplePaySigningRequestResponse.yaml @@ -0,0 +1,9 @@ +type: object +description: Retrieve a signing request for an account to begin certification process +required: + - value +properties: + content: + type: string + description: The signing request content + example: -----BEGIN CERTIFICATE REQUEST-----MIIBSDCB8AIBADCBjzELMAkGA1UEBhMCR0IxDzANBgNVBAgMBkxvbmRvbjEPMA0GA1UEBwwGTG9uZG9uMRUwEwYDVQQKDAxDaGVja291dC5jb20xCzAJBgNVBA8MAklUMRUwEwYDVQQDDAxjaGVja291dC5jb20xIzAhBgkqhkiG9w0BCQEWFHN1cHBvcnRAY2hlY2tvdXQuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEXf/MDFRLSblykajGm0GE+lUNoOIEa0DbWc7Bv3s55bYtW1fJo2/MJIPojUKuKUx2VsEfGmmqXKbq4IhAr0bM8TAKBggqhkjOPQQDAgNHADBEAiAo1Dv4TXTacSeIfy4HDjzPMQY2+OxTW6szRJjGyfKgXQIgdHAX0BmI+1rozysjXv8MvoxehQIGACQ+UWJle+UZ2ms=-----END CERTIFICATE REQUEST----- diff --git a/nas_spec/components/schemas/Balances/Balance.yaml b/nas_spec/components/schemas/Balances/Balance.yaml new file mode 100644 index 000000000..5b922a9fa --- /dev/null +++ b/nas_spec/components/schemas/Balances/Balance.yaml @@ -0,0 +1,20 @@ +type: object +title: Balance values +description: The respective balance values. +properties: + pending: + type: number + description: Funds on the way to the sub-entity's account. These funds will be added to Available once settled. + example: 10 + available: + type: number + description: The funds available to be used for transactions such as transfers or payouts. + example: 50 + payable: + type: number + description: Funds being paid out of the sub-entity's account, but not yet settled. + example: 0 + collateral: + type: number + description: The collateral balance. + example: 0 diff --git a/nas_spec/components/schemas/Balances/BalancesResponse.yaml b/nas_spec/components/schemas/Balances/BalancesResponse.yaml new file mode 100644 index 000000000..25514d67c --- /dev/null +++ b/nas_spec/components/schemas/Balances/BalancesResponse.yaml @@ -0,0 +1,10 @@ +type: object +title: Balances response +description: A list of balances for each currency account returned from the request. +properties: + data: + type: array + title: Balances + description: The list of requested balances. + items: + $ref: '#/components/schemas/CurrencyAccountBalance' diff --git a/nas_spec/components/schemas/Balances/CurrencyAccountBalance.yaml b/nas_spec/components/schemas/Balances/CurrencyAccountBalance.yaml new file mode 100644 index 000000000..d7ef9d1c9 --- /dev/null +++ b/nas_spec/components/schemas/Balances/CurrencyAccountBalance.yaml @@ -0,0 +1,14 @@ +type: object +title: Currency Account Balance +description: The currency account details and balance. +properties: + descriptor: + type: string + description: A descriptor for the currency account. + example: Revenue Account 1 + holding_currency: + type: string + description: The holding currency of the currency account (the three character ISO 4217 code). + example: EUR + balances: + $ref: '#/components/schemas/Balance' diff --git a/nas_spec/components/schemas/Batches/Batch.yaml b/nas_spec/components/schemas/Batches/Batch.yaml new file mode 100644 index 000000000..354a3a113 --- /dev/null +++ b/nas_spec/components/schemas/Batches/Batch.yaml @@ -0,0 +1,27 @@ +type: object +required: + - id + - status + - _links +properties: + id: + type: string + description: Batch identifier + pattern: "^bat_(\\w{26})$" + example: bat_cyukd74c4xoezfuarvuwdcpzou + status: + type: string + description: The status of the batch + example: Processing + _links: + type: object + required: + - self + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the batch + example: + href: 'https://api.checkout.com/batches/bat_fa72f568492b4d3eb6d81e0645e320f6' diff --git a/nas_spec/components/schemas/Batches/SubmitBatchRequest.yaml b/nas_spec/components/schemas/Batches/SubmitBatchRequest.yaml new file mode 100644 index 000000000..f4edb7567 --- /dev/null +++ b/nas_spec/components/schemas/Batches/SubmitBatchRequest.yaml @@ -0,0 +1,21 @@ +type: object +description: The batch request +required: + - file_id + - action +properties: + file_id: + type: string + pattern: "^file_(\\w{26})$" + description: The identifier of the batch file previously uploaded via the [Files API](#tag/Files) + example: 'file_6lbss42ezvoufcb2beo76rvwly' + action: + type: string + description: The action to be performed against the batch + enum: + - payment + example: 'payment' + reference: + type: string + description: Your reference for the batch. If provided, this will be validated against the batch file's header + example: payments-20180701 diff --git a/nas_spec/components/schemas/Batches/SubmitBatchResponse.yaml b/nas_spec/components/schemas/Batches/SubmitBatchResponse.yaml new file mode 100644 index 000000000..66795fe32 --- /dev/null +++ b/nas_spec/components/schemas/Batches/SubmitBatchResponse.yaml @@ -0,0 +1,27 @@ +type: object +required: + - id + - status + - _links +properties: + id: + type: string + description: Batch identifier + pattern: "^bat_(\\w{26})$" + example: bat_cyukd74c4xoezfuarvuwdcpzou + status: + type: string + description: The batch status + example: Processing + _links: + type: object + required: + - self + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the batch + example: + href: 'https://api.checkout.com/batches/bat_fa72f568492b4d3eb6d81e0645e320f6' diff --git a/nas_spec/components/schemas/CardPayouts/CardPayoutAcceptedResponse.yaml b/nas_spec/components/schemas/CardPayouts/CardPayoutAcceptedResponse.yaml new file mode 100644 index 000000000..50cdb73de --- /dev/null +++ b/nas_spec/components/schemas/CardPayouts/CardPayoutAcceptedResponse.yaml @@ -0,0 +1,54 @@ +type: object +description: Payout accepted response +required: + - id + - status +properties: + id: + type: string + description: The payment's unique identifier + pattern: '^(pay)_(\w{26})$' + maxLength: 30 + minLength: 30 + example: pay_8n2n4o4dsasergngxiq3cx4xtu + status: + type: string + enum: + - Accepted + - Rejected + description: The status of the payout + example: Accepted + reference: + type: string + description: Your reference for the payout request + maxLength: 50 + example: example payout + destination: + type: object + description: The destination of the payout + properties: + account_holder: + type: object + description: The account holder details + properties: + id: + type: string + description: The payment destination identifier (e.g., a card source identifier) + pattern: '^(src)_(\w{26})$' + minLength: 30 + maxLength: 30 + example: src_nwd3m4in3hkuddfpjsaevunhdy + links: + type: object + description: The links related to the payout. + required: + - href + properties: + self: + type: object + description: The URI of the payout + properties: + href: + type: string + description: The link URL + example: https://api.sandbox.checkout.com/payments/pay_8n2n4o4dsasergngxiq3cx4xtu \ No newline at end of file diff --git a/nas_spec/components/schemas/CardPayouts/CardPayoutActionsResponse.yaml b/nas_spec/components/schemas/CardPayouts/CardPayoutActionsResponse.yaml new file mode 100644 index 000000000..54eea9af8 --- /dev/null +++ b/nas_spec/components/schemas/CardPayouts/CardPayoutActionsResponse.yaml @@ -0,0 +1,72 @@ +type: object +description: Payout accepted response +required: + - id + - type + - processed_on + - amount + - approved +properties: + id: + type: string + description: The unique identifier of the payout action + pattern: '^(act)_(\w{26})$' + maxLength: 30 + minLength: 30 + example: pay_8n2n4o4dsasergngxiq3cx4xtu + type: + type: string + description: The type of action + enum: + - 'Card Payout' + example: Card Payout + processed_on: + type: string + description: The date/time the action was processed + format: date-time + example: '2019-08-24T14:15:22Z' + amount: + type: number + description: Amount paid out to the recipient + example: 100 + approved: + type: bool + nullable: true + description: One of `true` , `false` , or `null` (whilst still being processed) + example: true + response_code: + type: string + maxLength: 5 + minLength: 5 + description: The response code + example: 10000 + response_summary: + type: string + description: The response summary + example: Approved + reference: + type: string + description: Your reference for the action + maxLength: 50 + example: example payout + processing: + type: object + description: Returns information related to the processing of the payment + properties: + retrieval_reference_number: + type: string + description: A unique identifier for the authorization that is submitted to the card scheme during processing + example: 466731013597 + acquirer_reference_number: + type: string + description: A unique identifier for the payout that is submitted to the card scheme during processing (Mastercard only) + example: 3726308385 + acquirer_transaction_id: + type: string + description: A unique identifier for the transaction generated by the acquirer + example: Acquirer Ref + metadata: + type: object + description: A set of key-value pairs that you can attach to an action + example: { 'payout_ref': 'MQIBN2' } + diff --git a/nas_spec/components/schemas/CardPayouts/CardPayoutDetails.yaml b/nas_spec/components/schemas/CardPayouts/CardPayoutDetails.yaml new file mode 100644 index 000000000..401aa6e23 --- /dev/null +++ b/nas_spec/components/schemas/CardPayouts/CardPayoutDetails.yaml @@ -0,0 +1,269 @@ +type: object +description: Payout accepted response +required: + - id + - requested_on + - processed_on + - source + - destination + - amount + - currency + - status + - links +properties: + id: + type: string + description: Unique payment identifier + pattern: '^(pay)_(\w{26})$' + maxLength: 30 + minLength: 30 + example: pay_8n2n4o4dsasergngxiq3cx4xtu + requested_on: + type: string + format: date-time + description: The date/time the payment was requested + example: "2019-08-24T14:15:22Z" + processed_on: + type: string + format: date-time + nullable: true + description: The date/time the payment was either approved/declined. Present if payout has completed processing with scheme. + example: "2019-08-24T14:15:22Z" + source: + type: object + description: The source of the payout + required: + - type + - id + - amount + - currency + properties: + type: + type: string + description: The source to fund the payout + enum: + - currency_account + example: currency_account + id: + type: string + description: The currency account ID to fund the payout + pattern: '^(ca)_(\w{26})$' + maxLength: 29 + minLength: 29 + example: ca_y3oqhf46pyzuxjbcn2giaqnb44 + amount: + type: integer + description: Amount to be paid out from currency account + example: 100 + currency: + type: string + maxLength: 3 + minLength: 3 + description: The [three-letter currency code](https://checkout.com/docs/four/resources/codes/currency-codes) associated with the currency account + example: GBP + destination: + type: object + description: The destination of the payout + required: + - type + - expiry_year + - expiry_month + - account_holder + - last4 + - fingerprint + - bin + properties: + type: + type: string + description: The payout destination type + enum: + - token + - id + - card + example: token + token: + type: string + maxLength: 30 + minLength: 30 + description: If `type` = `token`. The Checkout.com token (eg a card, wallet or token) + pattern: '^(tok)_(\w{26})$' + example: tok_ihvkileifkzebkgnhkskbglyte + id: + type: string + description: The payment source identifier (eg a card source identifier) + example: ca_y3oqhf46pyzuxjbcn2giaqnb44 + expiry_year: + type: integer + description: The expiry year of the card + maxLength: 4 + minLength: 4 + example: 2024 + expiry_month: + type: integer + description: The expiry month of the card + maxLength: 2 + minLength: 1 + example: 12 + account_holder: + type: object + description: The account holder details + required: + - type + properties: + type: + type: string + description: The account holder type + enum: + - individual + - corporate + - government + example: individual + first_name: + type: string + maxLength: 35 + description: Present if `destination.account_holder.type` = `individual` + example: John + last_name: + type: string + maxLength: 35 + description: Present if `destination.account_holder.type` = `individual` + example: Smith + company_name: + type: string + maxLength: 35 + description: Present if `destination.account_holder.type` = `corporate` or `government` + example: ABC International + scheme: + type: string + description: The card scheme + example: visa + last4: + type: string + description: The last four digits of the card number + example: 4242 + fingerprint: + type: string + description: Unique fingerprint of the card + example: 436d1eb12c4b92b9eeb1e798dea93a718c78f5362c7fb5d84b51c72a869b6101 + card_type: + type: string + description: The card type + enum: + - unknown + - credit + - debit + - charge + - prepaid + - deferred_debit + example: credit + card_category: + type: string + description: The card category + enum: + - unknown + - commercial + - consumer + example: consumer + issuer: + type: string + description: The issuer name + example: ABC Bank + issuer_country: + type: string + description: The issuer country + example: GB + product_id: + type: string + description: The issuer/card scheme product identifier + example: A + product_type: + type: string + description: The issuer/card scheme product type + example: Visa Traditional + amount: + type: integer + description: Amount to be paid out to the recipient. This is the destination.amount + example: 100 + currency: + type: string + description: The [three-letter currency code](https://checkout.com/docs/four/resources/codes/currency-codes). This is the destination.currency + example: GBP + reference: + type: string + description: An internal reference client can later use to identify this payout. + maxLength: 50 + example: example payout + billing_descriptor: + type: object + description: Details about the billing descriptor. + properties: + reference: + type: string + maxLength: 14 + description: The dynamic billing descriptor displayed on the recipient bank account statement. A-Z 0-9 + example: Card Payout from Checkout.com + status: + type: string + description: The status of the payout + enum: + - pending + - approved + - declined + example: approved + sender: + type: object + description: Details about the sender of the payout's funds + properties: + type: + type: string + description: Only present for clients with certain funds transfer types + enum: + - individual + - corporate + - government + example: individual + first_name: + type: string + maxLength: 35 + description: Present if `sender.type` = `individual` + example: Hayley + last_name: + type: string + maxLength: 35 + description: Present if `sender.type` = `individual` + example: Jones + company_name: + type: string + maxLength: 35 + description: Present if `sender.type` = `corporate` or `government` + example: "YXZ International" + scheme_id: + type: string + description: The scheme transaction identifier + example: 199254206471459 + instruction: + type: object + description: Details about the instruction for the payout + properties: + funds_transfer_type: + type: string + description: Scheme categorisation of the client (FD, MT, AA etc.) + example: AA + metadata: + type: object + description: A set of key-value pairs that you can attach to a payment. It can be useful for storing additional information in a structured format + example: { 'payout_ref': 'MQIBN2' } + links: + type: object + description: The links related to the payment + properties: + self: + type: object + description: The URI of the payout + required: + - href + properties: + href: + type: string + description: The link URL + example: https://api.sandbox.checkout.com/payments/pay_8n2n4o4dsasergngxiq3cx4xtu diff --git a/nas_spec/components/schemas/CardPayouts/CardPayoutRequest.yaml b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest.yaml new file mode 100644 index 000000000..36a968d79 --- /dev/null +++ b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest.yaml @@ -0,0 +1,98 @@ +type: object +required: + - source + - destination + - currency + - instruction + - processing_channel_id +properties: + source: + type: object + description: The source of the payout + required: + - type + - id + properties: + type: + type: string + description: The payout source type + enum: + - currency_account + id: + type: string + description: ID of the currency account to be debited + pattern: '^(ca)_(\w{26})$' + maxLength: 29 + minLength: 29 + amount: + type: integer + description: | + The amount you want to pay out from your currency account. The exact format [depends on the currency](https://checkout.com/docs/four/resources/calculating-the-amount), which is determined by Checkout.com from the currency account defined in `source.id`. + + ***Conditional*** - you must specify either `source.amount` or `amount` + minimum: 0 + destination: + $ref: '#/components/schemas/CardPayoutRequestDestination' + amount: + type: integer + description: | + The payout destination amount in minor units. The exact format [depends on the currency](https://checkout.com/docs/four/resources/calculating-the-amount) defined in `currency`. + + ***Conditional*** - you must specify either `source.amount` or `amount` + minimum: 0 + currency: + type: string + description: The [three-letter currency code](https://checkout.com/docs/four/resources/codes/currency-codes) of the payout destination `amount` + instruction: + type: object + required: + - funds_transfer_type + description: Details about the instruction for a payout + properties: + funds_transfer_type: + type: string + description: The funds transfer type assigned to your specific use case by Checkout.com and the card networks + purpose: + type: string + description: | + The purpose of the payout + + ***Conditional*** - required when the [card metadata](https://api-reference.checkout.com/#operation/requestCardMetadata!c=200&path=issuer_country&t=response) `issuer_country` = `AR` (Argentina), `BD` (Bangladesh), `EG` (Egypt) or `IN` (India) + enum: + - family_support + - expatriation + - travel_and_tourism + - education + - medical_treatment + - emergency_need + - leisure + - savings + - gifts + - donations + - financial_services + - it_services + - investment + - insurance + - loan_payment + - pension + - royalties + - other + - income + processing_channel_id: + type: string + description: The processing channel identifier + pattern: '^(pc)_(\w{26})$' + minLength: 29 + maxLength: 29 + sender: + $ref: '#/components/schemas/CardPayoutRequestSender' + reference: + type: string + description: A reference you can later use to identify this payout, such as an order number + maxLength: 50 + metadata: + type: object + description: | + Allows you to store additional information about a transaction with custom fields and up to five user-defined fields (udf1 to udf5), which can be used for reporting purposes. udf1 is also used for some of our risk rules. + + Note that this object only allows one level of depth, so cannot accept non-primitive data types such as objects or arrays. \ No newline at end of file diff --git a/nas_spec/components/schemas/CardPayouts/CardPayoutRequestDestination.yaml b/nas_spec/components/schemas/CardPayouts/CardPayoutRequestDestination.yaml new file mode 100644 index 000000000..832cfd245 --- /dev/null +++ b/nas_spec/components/schemas/CardPayouts/CardPayoutRequestDestination.yaml @@ -0,0 +1,15 @@ +type: object +description: The destination of the payout +required: + - type +discriminator: + propertyName: type + mapping: + token: '#/components/schemas/01_CardPayoutRequest_DestinationTypeToken' + id: '#/components/schemas/02_CardPayoutRequest_DestinationTypeId' + card: '#/components/schemas/03_CardPayoutRequest_DestinationTypeCard' +properties: + type: + type: string + description: The payout destination type + example: 'card' \ No newline at end of file diff --git a/nas_spec/components/schemas/CardPayouts/CardPayoutRequestSender.yaml b/nas_spec/components/schemas/CardPayouts/CardPayoutRequestSender.yaml new file mode 100644 index 000000000..f1d257ae4 --- /dev/null +++ b/nas_spec/components/schemas/CardPayouts/CardPayoutRequestSender.yaml @@ -0,0 +1,18 @@ +type: object +description: | + The sender of the payout + + ***Conditional*** - required for Money Transfer and Third-Party Funds Disbursement Card Payout requests +required: + - type +discriminator: + propertyName: type + mapping: + individual: '#/components/schemas/01_CardPayoutRequest_SenderAccountHolderIndividual' + corporate: '#/components/schemas/02_CardPayoutRequest_SenderAccountHolderCorporate' + government: '#/components/schemas/03_CardPayoutRequest_SenderAccountHolderGovernment' +properties: + type: + type: string + description: The type of card holder + example: 'individual' diff --git a/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationAccountHolderTypes/01_CardPayoutRequest_DestinationAccountHolderIndividual.yaml b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationAccountHolderTypes/01_CardPayoutRequest_DestinationAccountHolderIndividual.yaml new file mode 100644 index 000000000..c5232f639 --- /dev/null +++ b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationAccountHolderTypes/01_CardPayoutRequest_DestinationAccountHolderIndividual.yaml @@ -0,0 +1,32 @@ +type: object +description: The account holder details +required: + - type + - first_name + - last_name +properties: + type: + type: string + description: The type of payout destination owner + example: 'individual' + first_name: + type: string + description: | + The payout destination owner's first name + + *A valid and legal name must be populated in this field. The populated value cannot be only one character or all numeric.* + maxLength: 35 + middle_name: + type: string + description: | + The payout destination owner's middle name + + ***Conditional*** - required when the [card metadata](https://api-reference.checkout.com/#operation/requestCardMetadata!c=200&path=issuer_country&t=response) `issuer_country` = `SA` (South Africa) + maxLength: 35 + last_name: + type: string + description: | + The payout destination owner's last name + + *A valid and legal name must be populated in this field. The populated value cannot be only one character or all numeric.* + maxLength: 35 diff --git a/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationAccountHolderTypes/01_CardPayoutRequest_DestinationTypeCardAccountHolderIndividual.yaml b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationAccountHolderTypes/01_CardPayoutRequest_DestinationTypeCardAccountHolderIndividual.yaml new file mode 100644 index 000000000..af5dd209d --- /dev/null +++ b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationAccountHolderTypes/01_CardPayoutRequest_DestinationTypeCardAccountHolderIndividual.yaml @@ -0,0 +1,141 @@ +type: object +description: The account holder details +required: + - type + - first_name + - last_name +properties: + type: + type: string + description: The type of payout destination owner + example: 'individual' + first_name: + type: string + description: | + The payout destination owner's first name + + *A valid and legal name must be populated in this field. The populated value cannot be only one character or all numeric.* + maxLength: 35 + middle_name: + type: string + description: | + The payout destination owner's middle name + + ***Conditional*** - required when the [card metadata](https://api-reference.checkout.com/#operation/requestCardMetadata!c=200&path=issuer_country&t=response) `issuer_country` = `SA` (South Africa) + maxLength: 35 + last_name: + type: string + description: | + The payout destination owner's last name. + + *A valid and legal name must be populated in this field. The populated value cannot be only one character or all numeric.* + maxLength: 35 + billing_address: + type: object + description: | + Information about the payout destination owner's billing address + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US + properties: + address_line1: + type: string + description: | + The first line of the address + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US + maxLength: 50 + address_line2: + type: string + description: The second line of the address + maxLength: 50 + city: + type: string + description: | + The address city + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US + maxLength: 25 + state: + type: string + description: | + The address state + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US + maxLength: 3 + minLength: 2 + zip: + type: string + description: | + The address ZIP (postal) code + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US; the format for US ZIPs must be `nnnnn` or `nnnnn-nnnn` + maxLength: 10 + country: + type: string + description: | + The [two-letter ISO country code](https://checkout.com/docs/four/resources/codes/country-codes) of the address + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US + maxLength: 2 + minLength: 2 + phone: + type: object + description: The payout destination owner's phone number + required: + - country_code + - number + properties: + country_code: + type: string + description: The [international country calling code](https://checkout.com/docs/four/resources/codes/country-codes) of the address + maxLength: 7 + minLength: 1 + number: + type: string + description: The phone number + maxLength: 25 + minLength: 6 + identification: + type: object + required: + - type + - number + description: The payout destination owner's identification + properties: + type: + type: string + description: The payout destination owner's identification type + enum: + - passport + - driving_license + - national_id + - company_registration + - tax_id + number: + type: string + description: The payout destination owner's identification number + maxLength: 25 + issuing_country: + type: string + description: If applicable, the [two-letter ISO country code](https://checkout.com/docs/four/resources/codes/country-codes) of the issuing country of the payout destination owner's identification + maxLength: 2 + minLength: 2 + date_of_expiry: + type: string + description: If applicable, the expiration date of the payout destination owner's identification. Format `yyyy-mm-dd` + maxLength: 10 + minLength: 10 + email: + type: string + description: The payout destination owner's email address + maxLength: 255 + date_of_birth: + type: string + description: The payout destination owner's date of birth. Format `yyyy-mm-dd` + maxLength: 10 + minLength: 10 + country_of_birth: + type: string + description: The [two-letter ISO country code](https://checkout.com/docs/four/resources/codes/country-codes) for the payout destination owner's country of birth + maxLength: 2 + minLength: 2 diff --git a/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationAccountHolderTypes/02_CardPayoutRequest_DestinationAccountHolderCorporate.yaml b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationAccountHolderTypes/02_CardPayoutRequest_DestinationAccountHolderCorporate.yaml new file mode 100644 index 000000000..5c2f5a734 --- /dev/null +++ b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationAccountHolderTypes/02_CardPayoutRequest_DestinationAccountHolderCorporate.yaml @@ -0,0 +1,17 @@ +type: object +description: The account holder details +required: + - type + - company_name +properties: + type: + type: string + description: The type of payout destination owner + example: 'corporate' + company_name: + type: string + description: | + The payout destination owner's company name + + *A valid and legal name must be populated in this field. The populated value cannot be only one character or all numeric* + maxLength: 35 \ No newline at end of file diff --git a/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationAccountHolderTypes/02_CardPayoutRequest_DestinationTypeCardAccountHolderCorporate.yaml b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationAccountHolderTypes/02_CardPayoutRequest_DestinationTypeCardAccountHolderCorporate.yaml new file mode 100644 index 000000000..e0d5a6808 --- /dev/null +++ b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationAccountHolderTypes/02_CardPayoutRequest_DestinationTypeCardAccountHolderCorporate.yaml @@ -0,0 +1,116 @@ +type: object +description: The account holder details +required: + - type + - company_name +properties: + type: + type: string + description: The type of payout destination owner + example: 'corporate' + company_name: + type: string + description: | + The payout destination owner's company name + + *A valid and legal name must be populated in this field. The populated value cannot be only one character or all numeric* + maxLength: 35 + billing_address: + type: object + description: | + Information about the payout destination owner's billing address + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US + properties: + address_line1: + type: string + description: | + The first line of the address + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US + maxLength: 50 + address_line2: + type: string + description: The second line of the address + maxLength: 50 + city: + type: string + description: | + The address city + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US + maxLength: 25 + state: + type: string + description: | + The address state + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US + maxLength: 3 + minLength: 2 + zip: + type: string + description: | + The address ZIP (postal) code + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US; the format for US ZIPs must be `nnnnn` or `nnnnn-nnnn` + maxLength: 10 + country: + type: string + description: | + The [two-letter ISO country code](https://checkout.com/docs/four/resources/codes/country-codes) of the address + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US + maxLength: 2 + minLength: 2 + phone: + type: object + description: The payout destination owner's phone number + required: + - country_code + - number + properties: + country_code: + type: string + description: The [international country calling code](https://checkout.com/docs/four/resources/codes/country-codes) of the address + maxLength: 7 + minLength: 1 + number: + type: string + description: The phone number + maxLength: 25 + minLength: 6 + identification: + type: object + required: + - type + - number + description: The payout destination owner's identification + properties: + type: + type: string + description: The payout destination owner's identification type + enum: + - passport + - driving_license + - national_id + - company_registration + - tax_id + number: + type: string + description: The payout destination owner's identification number + maxLength: 25 + issuing_country: + type: string + description: If applicable, [two-letter ISO country code](https://checkout.com/docs/four/resources/codes/country-codes) of the issuing country of the payout destination owner's identification + maxLength: 2 + minLength: 2 + date_of_expiry: + type: string + description: If applicable, the expiration date of the payout destination owner's identification. Format `yyyy-mm-dd` + maxLength: 10 + minLength: 10 + email: + type: string + description: The payout destination owner's email address + maxLength: 255 \ No newline at end of file diff --git a/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationAccountHolderTypes/03_CardPayoutRequest_DestinationAccountHolderGovernment.yaml b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationAccountHolderTypes/03_CardPayoutRequest_DestinationAccountHolderGovernment.yaml new file mode 100644 index 000000000..1a6c853bc --- /dev/null +++ b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationAccountHolderTypes/03_CardPayoutRequest_DestinationAccountHolderGovernment.yaml @@ -0,0 +1,17 @@ +type: object +description: The account holder details +required: + - type + - company_name +properties: + type: + type: string + description: The type of payout destination owner + example: 'government' + company_name: + type: string + description: | + The payout destination owner's company name + + *A valid and legal name must be populated in this field. The populated value cannot be only one character or all numeric* + maxLength: 35 \ No newline at end of file diff --git a/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationAccountHolderTypes/03_CardPayoutRequest_DestinationTypeCardAccountHolderGovernment.yaml b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationAccountHolderTypes/03_CardPayoutRequest_DestinationTypeCardAccountHolderGovernment.yaml new file mode 100644 index 000000000..2e048d2cf --- /dev/null +++ b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationAccountHolderTypes/03_CardPayoutRequest_DestinationTypeCardAccountHolderGovernment.yaml @@ -0,0 +1,116 @@ +type: object +description: The account holder details +required: + - type + - company_name +properties: + type: + type: string + description: The type of payout destination owner + example: 'government' + company_name: + type: string + description: | + The payout destination owner's company name + + *A valid and legal name must be populated in this field. The populated value cannot be only one character or all numeric* + maxLength: 35 + billing_address: + type: object + description: | + Information about the payout destination owner's billing address + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US + properties: + address_line1: + type: string + description: | + The first line of the address + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US + maxLength: 50 + address_line2: + type: string + description: The second line of the address + maxLength: 50 + city: + type: string + description: | + The address city + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US + maxLength: 25 + state: + type: string + description: | + The address state + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US + maxLength: 3 + minLength: 2 + zip: + type: string + description: | + The address ZIP (postal) code + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US; the format for US ZIPs must `nnnnn` or `nnnnn-nnnn` + maxLength: 10 + country: + type: string + description: | + The [two-letter ISO country code](https://checkout.com/docs/four/resources/codes/country-codes) of the address + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US + maxLength: 2 + minLength: 2 + phone: + type: object + description: The payout destination owner's phone number + required: + - country_code + - number + properties: + country_code: + type: string + description: The [international country calling code](https://checkout.com/docs/four/resources/codes/country-codes) of the address + maxLength: 7 + minLength: 1 + number: + type: string + description: The phone number + maxLength: 25 + minLength: 6 + identification: + type: object + required: + - type + - number + description: The payout destination owner's identification + properties: + type: + type: string + description: The payout destination owner's identification type + enum: + - passport + - driving_license + - national_id + - company_registration + - tax_id + number: + type: string + description: The payout destination owner's identification number + maxLength: 25 + issuing_country: + type: string + description: If applicable, [two-letter ISO country code](https://checkout.com/docs/four/resources/codes/country-codes) of the issuing country of the payout destination owner's identification + maxLength: 2 + minLength: 2 + date_of_expiry: + type: string + description: If applicable, the expiration date of the payout destination owner's identification. Format `yyyy-mm-dd` + maxLength: 10 + minLength: 10 + email: + type: string + description: The payout destination owner's email address + maxLength: 255 diff --git a/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationTypes/01_CardPayoutRequest_DestinationTypeToken.yaml b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationTypes/01_CardPayoutRequest_DestinationTypeToken.yaml new file mode 100644 index 000000000..5667c9579 --- /dev/null +++ b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationTypes/01_CardPayoutRequest_DestinationTypeToken.yaml @@ -0,0 +1,29 @@ +type: object +description: The destination of the payout +required: + - type + - token + - account_holder +properties: + type: + type: string + description: The payout destination type + token: + type: string + pattern: ^(tok)_(\w{26})$ + maxLength: 30 + minLength: 30 + description: The Checkout.com token (for example, a card token) + account_holder: + type: object + description: Information about the payout destination owner (the recipient cardholder) + discriminator: + propertyName: type + mapping: + individual: '#/components/schemas/01_CardPayoutRequest_DestinationAccountHolderIndividual' + corporate: '#/components/schemas/02_CardPayoutRequest_DestinationAccountHolderCorporate' + government: '#/components/schemas/03_CardPayoutRequest_DestinationAccountHolderGovernment' + properties: + type: + type: string + example: 'individual' \ No newline at end of file diff --git a/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationTypes/02_CardPayoutRequest_DestinationTypeId.yaml b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationTypes/02_CardPayoutRequest_DestinationTypeId.yaml new file mode 100644 index 000000000..eb97f7a7f --- /dev/null +++ b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationTypes/02_CardPayoutRequest_DestinationTypeId.yaml @@ -0,0 +1,29 @@ +type: object +description: The destination of the payout +required: + - type + - id + - account_holder +properties: + type: + type: string + description: The payout destination type + id: + type: string + pattern: ^(src)_(\w{26})$ + maxLength: 30 + minLength: 30 + description: The payment source identifier (for example, a card source identifier) + account_holder: + type: object + description: Information about the payout destination owner (the recipient cardholder) + discriminator: + propertyName: type + mapping: + individual: '#/components/schemas/01_CardPayoutRequest_DestinationAccountHolderIndividual' + corporate: '#/components/schemas/02_CardPayoutRequest_DestinationAccountHolderCorporate' + government: '#/components/schemas/03_CardPayoutRequest_DestinationAccountHolderGovernment' + properties: + type: + type: string + example: 'individual' \ No newline at end of file diff --git a/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationTypes/03_CardPayoutRequest_DestinationTypeCard.yaml b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationTypes/03_CardPayoutRequest_DestinationTypeCard.yaml new file mode 100644 index 000000000..8fbf5652d --- /dev/null +++ b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_DestinationTypes/03_CardPayoutRequest_DestinationTypeCard.yaml @@ -0,0 +1,39 @@ +type: object +description: The destination of the payout +required: + - type + - number + - expiry_month + - expiry_year + - account_holder +properties: + type: + type: string + description: The payout destination type + number: + type: string + description: The card number + maxLength: 19 + expiry_month: + type: integer + description: The expiry month of the card + maxLength: 2 + minLength: 1 + expiry_year: + type: integer + description: The expiry year of the card + maxLength: 4 + minLength: 4 + account_holder: + type: object + description: Information about the payout destination owner (the recipient cardholder) + discriminator: + propertyName: type + mapping: + individual: '#/components/schemas/01_CardPayoutRequest_DestinationTypeCardAccountHolderIndividual' + corporate: '#/components/schemas/02_CardPayoutRequest_DestinationTypeCardAccountHolderCorporate' + government: '#/components/schemas/03_CardPayoutRequest_DestinationTypeCardAccountHolderGovernment' + properties: + type: + type: string + example: 'individual' \ No newline at end of file diff --git a/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_SenderAccountHolderTypes/01_CardPayoutRequest_SenderAccountHolderIndividual.yaml b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_SenderAccountHolderTypes/01_CardPayoutRequest_SenderAccountHolderIndividual.yaml new file mode 100644 index 000000000..b3daf8d58 --- /dev/null +++ b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_SenderAccountHolderTypes/01_CardPayoutRequest_SenderAccountHolderIndividual.yaml @@ -0,0 +1,150 @@ +type: object +required: + - type + - first_name + - last_name + - address + - reference + - reference_type + - source_of_funds +properties: + type: + type: string + description: The type of sender + example: 'individual' + first_name: + type: string + description: | + The sender's first name + + *A valid and legal name must be populated in this field. The populated value cannot be only one character or all numeric* + maxLength: 35 + middle_name: + type: string + description: The sender's middle name + maxLength: 35 + last_name: + type: string + description: | + The sender's last name + + *A valid and legal name must be populated in this field. The populated value cannot be only one character or all numeric* + maxLength: 35 + address: + type: object + required: + - address_line1 + - city + - country + description: The residential address of the sender + properties: + address_line1: + type: string + description: The first line of the sender's residential address + maxLength: 50 + address_line2: + type: string + description: The second line of the sender's residential address + maxLength: 50 + city: + type: string + description: The city of the sender's residential address + maxLength: 25 + state: + type: string + description: | + The state of the sender's residential address + + ***Conditional*** - required when `sender.address.country` = `US` + maxLength: 3 + minLength: 2 + zip: + type: string + description: | + The ZIP (postal) code of the sender's residential address + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US; the format for US ZIPs must be `nnnnn` or `nnnnn-nnnn` + maxLength: 10 + country: + type: string + description: The [two-letter ISO country code](https://checkout.com/docs/four/resources/codes/country-codes) of the sender's residential address + maxLength: 2 + minLength: 2 + reference: + type: string + description: | + The unique identifying reference of the sender (for example, customer number) + + *Only alphanumeric characters are allowed* + maxLength: 15 + minLength: 5 + reference_type: + type: string + description: The type of `sender.reference` + enum: + # - rtn_and_ban + # - iban + # - card_account + # - email + # - phone_number + # - ban_and_bic + # - wallet_id + # - social_network_id + - other + source_of_funds: + type: string + enum: + - credit + - debit + - prepaid + - deposit_account + - mobile_money_account + - cash + description: The source of funds used to fund the Card Payout + identification: + type: object + description: | + The sender's identification + + ***Conditional*** - required when the [card metadata](https://api-reference.checkout.com/#operation/requestCardMetadata!c=200&path=issuer_country&t=response) `issuer_country` = `AR` (Argentina), `BR` (Brazil), `CO` (Columbia) or `PR` (Peru) + required: + - type + - number + properties: + type: + type: string + description: The sender's identification type + enum: + - passport + - driving_license + - national_id + - company_registration + - tax_id + number: + type: string + description: The sender's identification number + issuing_country: + type: string + description: If applicable, [two-letter ISO country code](https://checkout.com/docs/four/resources/codes/country-codes) of the issuing country of the sender's identification + minLength: 2 + maxLength: 2 + date_of_expiry: + type: string + description: If applicable, the expiration date of the sender's identification. Format `yyyy-mm-dd` + maxLength: 10 + minLength: 10 + date_of_birth: + type: string + description: | + The sender's date of birth. Format `yyyy-mm-dd` + maxLength: 10 + minLength: 10 + country_of_birth: + type: string + description: The [two-letter ISO country code](https://checkout.com/docs/four/resources/codes/country-codes) of the sender's country of birth + maxLength: 2 + minLength: 2 + nationality: + description: The [two-letter ISO country code](https://checkout.com/docs/four/resources/codes/country-codes) of the sender's nationality + maxLength: 2 + minLength: 2 \ No newline at end of file diff --git a/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_SenderAccountHolderTypes/02_CardPayoutRequest_SenderAccountHolderCorporate.yaml b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_SenderAccountHolderTypes/02_CardPayoutRequest_SenderAccountHolderCorporate.yaml new file mode 100644 index 000000000..4f27b3d76 --- /dev/null +++ b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_SenderAccountHolderTypes/02_CardPayoutRequest_SenderAccountHolderCorporate.yaml @@ -0,0 +1,123 @@ +type: object +required: + - type + - company_name + - address + - reference + - reference_type + - source_of_funds +properties: + type: + type: string + description: The type of sender + example: 'corporate' + company_name: + type: string + description: | + The sender's company name + + *A valid and legal name must be populated in this field. The populated value cannot be only one character or all numeric* + maxLength: 35 + address: + type: object + description: The registered address of the sender + required: + - address_line1 + - city + - country + properties: + address_line1: + type: string + description: The first line of the sender's registered address + maxLength: 50 + address_line2: + type: string + description: The second line of the sender's registered address + maxLength: 50 + city: + type: string + description: The city of the sender's registered address + maxLength: 25 + state: + type: string + description: | + The state of the sender's registered address + + ***Conditional*** - required when `sender.address.country` = `US` + maxLength: 3 + minLength: 2 + zip: + type: string + description: | + The ZIP (postal) code of the sender's registered address + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US; the format for US ZIPs must be `nnnnn` or `nnnnn-nnnn` + maxLength: 10 + country: + type: string + description: The [two-letter ISO country code](https://checkout.com/docs/four/resources/codes/country-codes) of the sender's registered address + maxLength: 2 + minLength: 2 + reference: + type: string + description: | + The unique identifying reference of the sender (for example, customer number) + + *Only alphanumeric characters are allowed* + maxLength: 15 + minLength: 5 + reference_type: + type: string + description: The type of `sender.reference` + enum: + # - rtn_and_ban + # - iban + # - card_account + # - email + # - phone_number + # - ban_and_bic + # - wallet_id + # - social_network_id + - other + source_of_funds: + type: string + enum: + - credit + - debit + - prepaid + - deposit_account + - mobile_money_account + - cash + description: The source of funds used to fund the Card Payout + identification: + type: object + description: | + The sender's identification + + ***Conditional*** - required when the [card metadata](https://api-reference.checkout.com/#operation/requestCardMetadata!c=200&path=issuer_country&t=response) `issuer_country` = `AR` (Argentina), `BR` (Brazil), `CO` (Columbia) or `PR` (Peru) + required: + - type + - number + properties: + type: + type: string + description: The sender's identification type + enum: + - passport + - driving_license + - national_id + - company_registration + - tax_id + number: + type: string + description: The sender's identification number + issuing_country: + type: string + description: If applicable, the [two-letter ISO country code](https://checkout.com/docs/four/resources/codes/country-codes) of the issuing country of the sender's identification + minLength: 2 + maxLength: 2 + date_of_expiry: + type: string + description: If applicable, the expiration date of the sender's identification. Format `yyyy-mm-dd` + maxLength: 10 + minLength: 10 \ No newline at end of file diff --git a/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_SenderAccountHolderTypes/03_CardPayoutRequest_SenderAccountHolderGovernment.yaml b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_SenderAccountHolderTypes/03_CardPayoutRequest_SenderAccountHolderGovernment.yaml new file mode 100644 index 000000000..919ead2c5 --- /dev/null +++ b/nas_spec/components/schemas/CardPayouts/CardPayoutRequest_SenderAccountHolderTypes/03_CardPayoutRequest_SenderAccountHolderGovernment.yaml @@ -0,0 +1,123 @@ +type: object +required: + - type + - company_name + - address + - reference + - reference_type + - source_of_funds +properties: + type: + type: string + description: The type of sender + example: 'government' + company_name: + type: string + description: | + The sender's company name + + *A valid and legal name must be populated in this field. The populated value cannot be only one character or all numeric* + maxLength: 35 + address: + type: object + description: The registered address of the sender + required: + - address_line1 + - city + - country + properties: + address_line1: + type: string + description: The first line of the sender's registered address + maxLength: 50 + address_line2: + type: string + description: The second line of the sender's registered address + maxLength: 50 + city: + type: string + description: The city of the sender's registered address + maxLength: 25 + state: + type: string + description: | + The state of the sender's registered address + + ***Conditional*** - required when `sender.address.country` = `US` + maxLength: 3 + minLength: 2 + zip: + type: string + description: | + The ZIP (postal) code of the sender's registered address + + ***Conditional*** - required for all Card Payouts requests by merchants incorporated in the US; the format for US ZIPs must be `nnnnn` or `nnnnn-nnnn` + maxLength: 10 + country: + type: string + description: The [two-letter ISO country code](https://checkout.com/docs/four/resources/codes/country-codes) of the sender's registered address + maxLength: 2 + minLength: 2 + reference: + type: string + description: | + The unique identifying reference of the sender (for example, customer number) + + *Only alphanumeric characters are allowed* + maxLength: 15 + minLength: 5 + reference_type: + type: string + description: The type of `sender.reference` + enum: + # - rtn_and_ban + # - iban + # - card_account + # - email + # - phone_number + # - ban_and_bic + # - wallet_id + # - social_network_id + - other + source_of_funds: + type: string + enum: + - credit + - debit + - prepaid + - deposit_account + - mobile_money_account + - cash + description: The source of funds used to fund the Card Payout + identification: + type: object + description: | + The sender's identification + + ***Conditional*** - required when the [card metadata](https://api-reference.checkout.com/#operation/requestCardMetadata!c=200&path=issuer_country&t=response) `issuer_country` = `AR` (Argentina), `BR` (Brazil), `CO` (Columbia) or `PR` (Peru) + required: + - type + - number + properties: + type: + type: string + description: The sender's identification type + enum: + - passport + - driving_license + - national_id + - company_registration + - tax_id + number: + type: string + description: The sender's identification number + issuing_country: + type: string + description: If applicable, the [two-letter ISO country code](https://checkout.com/docs/four/resources/codes/country-codes) of the issuing country of the sender's identification + minLength: 2 + maxLength: 2 + date_of_expiry: + type: string + description: If applicable, the expiration date of the sender's identification. Format `yyyy-mm-dd` + maxLength: 10 + minLength: 10 \ No newline at end of file diff --git a/nas_spec/components/schemas/CustomerRequest.yaml b/nas_spec/components/schemas/CustomerRequest.yaml new file mode 100644 index 000000000..f300e3bbc --- /dev/null +++ b/nas_spec/components/schemas/CustomerRequest.yaml @@ -0,0 +1,29 @@ +type: object +description: The customer's details. Required if `source.type` is `tamara` +properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + description: The identifier of an existing customer + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' + email: + type: string + format: email + description: The customer's email address. Required if `source.type` is `tamara` + maxLength: 255 + example: 'brucewayne@gmail.com' + name: + type: string + description: The customer's name. Required if `source.type` is `tamara` + maxLength: 255 + example: 'Bruce Wayne' + tax_number: + type: string + description: Contains the customer’s value-added tax (VAT) registration number. + maxLength: 13 + example: '1350693505279' + phone: + type: object + description: The customer's phone number. Required if `source.type` is `tamara` + allOf: + - $ref: '#/components/schemas/PhoneNumber' \ No newline at end of file diff --git a/nas_spec/components/schemas/CustomerResponse.yaml b/nas_spec/components/schemas/CustomerResponse.yaml new file mode 100644 index 000000000..6189476c9 --- /dev/null +++ b/nas_spec/components/schemas/CustomerResponse.yaml @@ -0,0 +1,23 @@ +type: object +description: Stored customer details +required: + - id +properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + description: The customer's unique identifier. This can be passed as a source when making a payment + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' + email: + type: string + description: The customer's email address + example: 'brucewayne@gmail.com' + name: + type: string + description: The customer's name + example: 'Bruce Wayne' + phone: + type: object + description: The customer's phone number + allOf: + - $ref: '#/components/schemas/PhoneNumber' diff --git a/nas_spec/components/schemas/Disputes/Dispute.yaml b/nas_spec/components/schemas/Disputes/Dispute.yaml new file mode 100644 index 000000000..1c3df699a --- /dev/null +++ b/nas_spec/components/schemas/Disputes/Dispute.yaml @@ -0,0 +1,117 @@ +type: object +properties: + id: + type: string + pattern: "^(dsp)_(\\w{22})$" + description: The dispute identifier. This is the same as the payment action ID + example: 'dsp_rbhwd2qrg13uhrp2newf' + entity_id: + type: string + description: The client entity linked to this dispute + example: 'ent_wxglze3wwywujg4nna5fb7ldli' + sub_entity_id: + type: string + description: The sub-entity linked to this dispute + example: 'ent_uzm3uxtssvmuxnyrfdffcyjxeu' + category: + type: string + description: The reason for the dispute. [Find out more](https://www.checkout.com/docs/risk-management/disputes/responding-to-disputes/dispute-reasons-and-recommended-evidence) + enum: + [ + fraudulent, + unrecognized, + canceled_recurring, + product_service_not_received, + not_as_described, + credit_not_issued, + duplicate, + incorrect_amount, + general, + ] + example: 'fraudulent' + amount: + type: number + description: The amount that is being disputed, in the processing currency. This amount can be positive or negative depending on the type of transaction the dispute is received against + example: 999 + currency: + type: string + description: The processing currency + example: 'GBP' + reason_code: + type: string + description: The reason code provided by the card scheme + example: '10.4' + status: + type: string + description: The current status of the dispute + enum: + [ + evidence_required, + evidence_under_review, + resolved, + won, + lost, + canceled, + expired, + accepted, + arbitration_under_review, + arbitration_won, + arbitration_lost, + ] + example: 'evidence_required' + resolved_reason: + type: string + description: If the dispute is automatically resolved, `resolved_reason` will contain the reason why it was resolved + enum: [ rapid_dispute_resolution, negative_amount, already_refunded ] + example: 'already_refunded' + relevant_evidence: + type: array + description: This list and the dispute categories will change over time. Your evidence logic should be informed by this field, not hard coded. + items: + type: array + items: + type: string + enum: + [ + proof_of_delivery_or_service, + invoice_or_receipt, + invoice_showing_distinct_transactions, + customer_communication, + refund_or_cancellation_policy, + recurring_transaction_agreement, + additional_evidence, + ] + example: 'proof_of_delivery_or_service' + evidence_required_by: + type: string + format: date-time + description: The deadline by which to respond to the dispute. This corresponds to `received_on` + `n`, where `n` is a number of calendar days set by the scheme/acquirer + example: '2018-08-21T00:00:00Z' + received_on: + type: string + format: date-time + description: The date and time at which the dispute was issued + example: '2018-08-01T04:00:10Z' + last_update: + type: string + format: date-time + description: The date and time at which the dispute was last updated + example: '2018-08-04T10:53:13Z' + payment: + type: object + description: Provides details for the payment linked to the dispute + allOf: + - $ref: '#/components/schemas/PaymentData' + _links: + type: object + properties: + self: + description: The dispute retrieval endpoint + properties: + href: + example: 'https://api.checkout.com/disputes/dsp_rbhwd2qrg13uhrp2newf' + evidence: + description: The dispute evidence retrieval endpoint + properties: + href: + example: 'https://api.checkout.com/disputes/dsp_rbhwd2qrg13uhrp2newf/evidence' diff --git a/nas_spec/components/schemas/Disputes/DisputePaged.yaml b/nas_spec/components/schemas/Disputes/DisputePaged.yaml new file mode 100644 index 000000000..3656e7575 --- /dev/null +++ b/nas_spec/components/schemas/Disputes/DisputePaged.yaml @@ -0,0 +1,67 @@ +type: object +properties: + limit: + type: integer + description: The numbers of items to return + example: 10 + skip: + type: integer + description: The number of results to skip + example: 10 + from: + type: string + format: date-time + description: The date and time from which to filter disputes, based on the dispute's `last_update` field + example: '2018-08-12T01:15:56Z' + to: + type: string + format: date-time + description: The date and time until which to filter disputes, based on the dispute's `last_update` field + example: '2018-08-13T11:09:01Z' + id: + type: string + pattern: "^(dsp)_(\\w{22})$" + description: The unique identifier of the dispute + example: 'dsp_rbhwd2qrg13uhrp2newf' + entity_ids: + type: string + description: One or more comma-separated client entities. This works like a logical *OR* operator + example: 'ent_wxglze3wwywujg4nna5fb7ldli,ent_vkb5zcy64zoe3cwfmaqvqyqyku' + sub_entity_ids: + type: string + description: One or more comma-separated sub-entities. This works like a logical *OR* operator + example: 'ent_uzm3uxtssvmuxnyrfdffcyjxeu,ent_hy5wtzwzeuwefmsnjtdhw4scfi' + statuses: + type: string + description: One or more comma-separated statuses. This works like a logical *OR* operator + example: 'evidence_required,evidence_under_review' + payment_id: + type: string + pattern: "^(pay)_(\\w{26})$" + description: The unique identifier of the payment + example: 'pay_88cb4e671m1da22e9bbbyx' + payment_reference: + type: string + description: An optional reference (such as an order ID) that you can use later to identify the payment. Previously known as `TrackId` + example: 'th7zxa1kcnqmes8' + payment_arn: + type: string + description: The acquirer reference number (ARN) that you can use to query the issuing bank + example: '74548998294293193445538' + payment_mcc: + type: string + description: The merchant category code (MCC) of the payment (ISO 18245) + example: '5021' + this_channel_only: + type: boolean + description: If `true`, only returns disputes of the specific channel that the secret key is associated with. Otherwise, returns all disputes for that business + example: true + total_count: + type: integer + description: The total number of disputes retrieved (without taking into consideration skip and limit parameters) + example: 1 + data: + type: array + description: The list of disputes + items: + $ref: '#/components/schemas/DisputeSummary' diff --git a/nas_spec/components/schemas/Disputes/DisputeSummary.yaml b/nas_spec/components/schemas/Disputes/DisputeSummary.yaml new file mode 100644 index 000000000..76274b9ff --- /dev/null +++ b/nas_spec/components/schemas/Disputes/DisputeSummary.yaml @@ -0,0 +1,113 @@ +type: object +properties: + id: + type: string + pattern: "^(dsp)_(\\w{22})$" + description: The dispute identifier. This is the same as the action ID in the reconciliation API or the charge ID in the Hub. + example: 'dsp_rbhwd2qrg13uhrp2newf' + entity_id: + type: string + description: The client entity linked to this dispute + example: 'ent_wxglze3wwywujg4nna5fb7ldli' + sub_entity_id: + type: string + description: The sub-entity linked to this dispute + example: 'ent_uzm3uxtssvmuxnyrfdffcyjxeu' + category: + type: string + description: The reason for the dispute. [Find out more](https://www.checkout.com/docs/risk-management/disputes/responding-to-disputes/dispute-reasons-and-recommended-evidence) + enum: + [ + fraudulent, + unrecognized, + canceled_recurring, + product_service_not_received, + not_as_described, + credit_not_issued, + duplicate, + incorrect_amount, + general, + ] + example: 'fraudulent' + status: + type: string + description: The current status of the dispute + enum: + [ + evidence_required, + evidence_under_review, + resolved, + won, + lost, + canceled, + expired, + accepted, + arbitration_under_review, + arbitration_won, + arbitration_lost, + ] + example: 'evidence_required' + amount: + type: number + description: The amount that is being disputed, in the processing currency + example: 999 + currency: + type: string + description: The currency the payment was made in + example: 'GBP' + reason_code: + type: string + description: The reason code provided by the card scheme + example: '10.4' + payment_id: + type: string + description: The unique payment identifier + example: 'pay_88cb4e671m1da22e9bbbyx' + payment_action_id: + type: string + description: The unique identifier of the payment action + example: 'act_mbabizu24mvu3mela5njyhpit4' + payment_reference: + type: string + description: An optional reference (such as an order ID) a merchant can use to later identify the charge. Previously known as TrackId + example: 'th7zxa1kcnqmes8' + payment_arn: + type: string + description: The acquirer reference number that can be used to query the issuing bank + example: '74548998294293193445538' + payment_mcc: + type: string + description: The merchant category code (MCC) of the payment (ISO 18245) + example: '5021' + payment_method: + type: string + description: The payment method/card scheme + example: VISA + evidence_required_by: + type: string + format: date-time + description: The deadline by which to respond to the dispute. This corresponds to `received_on` + `n`, where `n` is a number of calendar days set by the scheme/acquirer + example: '2018-08-22T00:00:00Z' + received_on: + type: string + format: date-time + description: The date and time at which the dispute was issued + example: '2018-08-01T01:15:56Z' + last_update: + type: string + format: date-time + description: The date and time at which the dispute was last updated + example: '2018-08-12T04:15:56Z' + resolved_reason: + type: string + description: If the dispute is automatically resolved, `resolved_reason` will contain the reason it was resolved + enum: [ rapid_dispute_resolution, negative_amount, already_refunded ] + example: 'already_refunded' + _links: + type: object + properties: + self: + description: The dispute retrieval endpoint + properties: + href: + example: 'https://api.checkout.com/disputes/dsp_rbhwd2qrg13uhrp2newf' diff --git a/nas_spec/components/schemas/Disputes/Evidence.yaml b/nas_spec/components/schemas/Disputes/Evidence.yaml new file mode 100644 index 000000000..1eeb0fe79 --- /dev/null +++ b/nas_spec/components/schemas/Disputes/Evidence.yaml @@ -0,0 +1,14 @@ +type: object +properties: + proof_of_delivery_or_service_file: + type: string + description: The file ID of the file you uploaded as a proof of delivery or service + example: 'file_jmbfgkjromvcrn9t4qu4' + proof_of_delivery_or_service_text: + type: string + description: A brief text description of the file. You can also use this field to provide a link + example: 'Delivery slip signed by the customer' + proof_of_delivery_or_service_date_text: + type: string + description: The date on which the item was delivered. You can also use this field to provide a link + example: 'Merchandise was delivered on 2018-12-30' diff --git a/nas_spec/components/schemas/Disputes/File.yaml b/nas_spec/components/schemas/Disputes/File.yaml new file mode 100644 index 000000000..5fae59d66 --- /dev/null +++ b/nas_spec/components/schemas/Disputes/File.yaml @@ -0,0 +1,13 @@ +type: object +required: + - file + - purpose +properties: + file: + type: string + description: The path of the file to upload, and its type.
This must be a local path. + example: 'file=@/path/receipt.png;type=image/png' + purpose: + type: string + description: The purpose of the file upload. You must set this to `dispute_evidence` + example: 'dispute_evidence' diff --git a/nas_spec/components/schemas/Disputes/FilePurpose.yaml b/nas_spec/components/schemas/Disputes/FilePurpose.yaml new file mode 100644 index 000000000..d57933dc4 --- /dev/null +++ b/nas_spec/components/schemas/Disputes/FilePurpose.yaml @@ -0,0 +1,5 @@ +type: string +description: The list of file upload purposes. Currently this is only `dispute_evidence` +example: 'dispute_evidence' +enum: + - dispute_evidence diff --git a/nas_spec/components/schemas/Disputes/FileResult.yaml b/nas_spec/components/schemas/Disputes/FileResult.yaml new file mode 100644 index 000000000..4f08a23cd --- /dev/null +++ b/nas_spec/components/schemas/Disputes/FileResult.yaml @@ -0,0 +1,35 @@ +type: object +description: File was retrieved successfully +properties: + id: + type: string + description: The file identifier + example: 'file_6lbss42ezvoufcb2beo76rvwly' + filename: + type: string + description: The filename, including its extension + example: 'receipt.jpg' + purpose: + $ref: '#/components/schemas/FilePurpose' + size: + type: integer + description: The size of the file upload object (in bytes) + example: 1024 + uploaded_on: + type: string + format: date-time + description: The date and time file was uploaded (in UTC) + example: '2019-05-17T16:48:52Z' + _links: + type: object + properties: + self: + description: The file information retrieval URL + properties: + href: + example: 'https://api.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly' + download: + description: The temporary file download URL. This expires after 60 minutes + properties: + href: + example: 'https://file-bucket.s3.eu-west-1.amazonaws.com/ucdac/ucdac/6lbss42ezvoufcb2beo76rvwly?X-Amz-Expires=3600&x-amz-security-token=FQoDYXdzENL%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEa' diff --git a/nas_spec/components/schemas/Disputes/FileUploadResponse.yaml b/nas_spec/components/schemas/Disputes/FileUploadResponse.yaml new file mode 100644 index 000000000..a832445b3 --- /dev/null +++ b/nas_spec/components/schemas/Disputes/FileUploadResponse.yaml @@ -0,0 +1,15 @@ +type: object +description: File uploaded successfully +properties: + id: + type: string + description: The file identifier + example: 'file_6lbss42ezvoufcb2beo76rvwly' + _links: + type: object + properties: + self: + description: The file information retrieval URL + properties: + href: + example: 'https://api.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly' diff --git a/nas_spec/components/schemas/Disputes/PaymentData.yaml b/nas_spec/components/schemas/Disputes/PaymentData.yaml new file mode 100644 index 000000000..605fb320a --- /dev/null +++ b/nas_spec/components/schemas/Disputes/PaymentData.yaml @@ -0,0 +1,65 @@ +type: object +properties: + id: + type: string + description: The payment's unique identifier + example: 'pay_mbabizu24mvu3mela5njyhpit4' + action_id: + type: string + description: The unique identifier of the payment action + example: 'act_mbabizu24mvu3mela5njyhpit4' + processing_channel_id: + type: string + pattern: "^(pc)_(\\w{26})$" + description: The processing channel used for the payment + example: 'pc_q4dbxom5jbgudnjzjpz7j2z6uq' + amount: + type: number + description: The amount that is being disputed, in the processing currency + example: 999 + currency: + type: string + description: The payment currency + example: 'GBP' + method: + type: string + description: The payment method used + example: 'Visa' + arn: + type: string + description: The acquirer reference number (ARN) + example: 'AA246873253573571073808' + mcc: + type: string + description: The merchant category code (MCC) for the payment (ISO 18245) + example: '5021' + 3ds: + type: object + description: Provides information relating to the processing of 3D Secure payments + properties: + enrolled: + type: string + description: > + Indicates the 3D Secure enrollment status of the issuer + * `Y` - Issuer enrolled + * `N` - Customer not enrolled + * `U` - Unknown + example: Y + version: + type: string + description: Indicates the version of 3D Secure that was used for authentication + example: '2.1.0' + eci: + type: string + description: | + The final Electronic Commerce Indicator (ECI) security level used to authorize the payment. + Applicable for 3D Secure and network token payments + example: '06' + has_refund: + type: boolean + description: Indicates if there is any refund against the payment + processed_on: + type: string + format: date-time + description: The date and time at which the payment was requested + example: '2018-08-01T08:18:10Z' diff --git a/nas_spec/components/schemas/Disputes/ProvideEvidenceRequest.yaml b/nas_spec/components/schemas/Disputes/ProvideEvidenceRequest.yaml new file mode 100644 index 000000000..03d9c1460 --- /dev/null +++ b/nas_spec/components/schemas/Disputes/ProvideEvidenceRequest.yaml @@ -0,0 +1,87 @@ +type: object +properties: + proof_of_delivery_or_service_file: + type: string + description: A file containing proof of delivery of goods or services + example: 'file_jmbfgkjromvcrn9t4qu4' + proof_of_delivery_or_service_text: + type: string + maximum: 500 + description: A brief text description of the file. You can also use this field to provide a link + example: 'http://checkout.com/document.pdf' + invoice_or_receipt_file: + type: string + description: A file containing an invoice/receipt + example: 'file_jmbfgkjromvcrn9t4qu4' + invoice_or_receipt_text: + type: string + maximum: 500 + description: A brief text description of the file. You can also use this field to provide a link + example: 'Copy of the invoice' + invoice_showing_distinct_transactions_file: + type: string + description: A file containing invoice showing two distinct transactions + example: 'file_jmbfgkjromvcrn9t4qu4' + invoice_showing_distinct_transactions_text: + type: string + maximum: 500 + description: A brief text description of the file. You can also use this field to provide a link + example: 'Copy of invoice #1244 showing two transactions' + customer_communication_file: + type: string + description: A file containing customer communication + example: 'file_jmbfgkjromvcrn9t4qu4' + customer_communication_text: + type: string + maximum: 500 + description: A brief text description of the file. You can also use this field to provide a link + example: 'Copy of an email exchange with the cardholder' + refund_or_cancellation_policy_file: + type: string + description: A file containing refund/cancellation policy + example: 'file_jmbfgkjromvcrn9t4qu4' + refund_or_cancellation_policy_text: + type: string + maximum: 500 + description: A brief text description of the file. You can also use this field to provide a link + example: 'Copy of the refund policy' + recurring_transaction_agreement_file: + type: string + description: A file containing the recurring transaction agreement + example: 'file_jmbfgkjromvcrn9t4qu4' + recurring_transaction_agreement_text: + type: string + maximum: 500 + description: A brief text description of the file. You can also use this field to provide a link + example: 'Copy of the recurring transaction agreement' + additional_evidence_file: + type: string + description: A file containing additional supporting documents + example: 'file_jmbfgkjromvcrn9t4qu4' + additional_evidence_text: + type: string + maximum: 500 + description: A brief text description of the file. You can also use this field to provide a link + example: 'Scanned document' + proof_of_delivery_or_service_date_file: + type: string + description: A file showing the delivery date of the provided service/merchandise + example: 'file_jmbfgkjromvcrn9t4qu4' + proof_of_delivery_or_service_date_text: + type: string + maximum: 500 + description: A brief text description of the file. You can also use this field to provide a link + example: 'Copy of the customer receipt showing the merchandise was delivered on 2018-12-20' + _links: + type: object + properties: + self: + description: The evidence retrieval endpoint + properties: + href: + example: 'https://api.checkout.com/disputes/dsp_rbhwd2qrg13uhrp2newf/evidence' + parent: + description: The dispute retrieval endpoint + properties: + href: + example: 'https://api.checkout.com/disputes/dsp_rbhwd2qrg13uhrp2newf' diff --git a/nas_spec/components/schemas/Disputes/SchemeFileResponse.yaml b/nas_spec/components/schemas/Disputes/SchemeFileResponse.yaml new file mode 100644 index 000000000..1d3ac5fa1 --- /dev/null +++ b/nas_spec/components/schemas/Disputes/SchemeFileResponse.yaml @@ -0,0 +1,29 @@ +type: object +properties: + id: + type: string + pattern: "^(dsp)_(\\w{22})$" + description: The dispute identifier + example: 'dsp_rbhwd2qrg13uhrp2newf' + files: + type: array + description: The scheme files of a dispute + items: + type: object + properties: + dispute_status: + type: string + description: The dispute status of the scheme file + example: 'dispute_lost' + file: + type: string + description: The scheme file identifier + example: file_6lbss42ezvoufcb2beo76rvwly + _links: + type: object + properties: + self: + description: The dispute scheme files retrieval endpoint + properties: + href: + example: 'https://api.checkout.com/disputes/dsp_rbhwd2qrg13uhrp2newf/schemefiles' \ No newline at end of file diff --git a/nas_spec/components/schemas/Error.yaml b/nas_spec/components/schemas/Error.yaml new file mode 100644 index 000000000..7890829aa --- /dev/null +++ b/nas_spec/components/schemas/Error.yaml @@ -0,0 +1,8 @@ +type: object +properties: + request_id: + type: string + example: 0HL80RJLS76I7 + error_type: + type: string + example: request_malformed diff --git a/nas_spec/components/schemas/Events/BillingDetails.yaml b/nas_spec/components/schemas/Events/BillingDetails.yaml new file mode 100644 index 000000000..70ade7fec --- /dev/null +++ b/nas_spec/components/schemas/Events/BillingDetails.yaml @@ -0,0 +1,22 @@ +type: object +properties: + address_line_1: + type: string + example: 372 Weimann Lane + address_line_2: + type: string + example: Rolfson Alley + post_code: + type: string + example: ew1 7zb + country: + type: string + example: SJ + city: + type: string + example: North Benedicthaven + state: + type: string + example: Georgia + phone: + $ref: '#/components/schemas/Phone' diff --git a/nas_spec/components/schemas/Events/Card.yaml b/nas_spec/components/schemas/Events/Card.yaml new file mode 100644 index 000000000..1edab3b47 --- /dev/null +++ b/nas_spec/components/schemas/Events/Card.yaml @@ -0,0 +1,34 @@ +type: object +properties: + customer_id: + type: string + example: cust_7508EA38E86A4569AF12E483519E332D + expiry_month: + type: string + example: '06' + expiry_year: + type: string + example: 2018 + billing_details: + $ref: '#/components/schemas/BillingDetails' + id: + type: string + example: card_D44D7F4CCC6348698717CD80072808B0 + last4: + type: string + example: 424242******4242 + payment_method: + type: string + example: VISA + fingerprint: + type: string + example: f639cab2745bee4140bf86df6b6d6e255c5945aac3788d923fa047ea4c208622 + name: + type: string + example: Test Customer + cvv_check: + type: string + example: 'Y' + avs_check: + type: string + example: S diff --git a/nas_spec/components/schemas/Events/CustomerPaymentPlan.yaml b/nas_spec/components/schemas/Events/CustomerPaymentPlan.yaml new file mode 100644 index 000000000..4c6de05ff --- /dev/null +++ b/nas_spec/components/schemas/Events/CustomerPaymentPlan.yaml @@ -0,0 +1,38 @@ +type: object +properties: + id: + type: string + customer_plan_id: + type: string + card_id: + type: string + customer_id: + type: string + name: + type: string + plan_track_id: + type: string + auto_cap_time: + type: string + value: + type: integer + currency: + type: string + cycle: + type: string + recurring_count: + type: integer + recurring_count_left: + type: integer + total_collected_value: + type: integer + total_collected_count: + type: integer + current_recurring_status: + type: integer + start_date: + type: string + previous_recurring_date: + type: string + next_recurring_date: + type: string diff --git a/nas_spec/components/schemas/Events/Data.yaml b/nas_spec/components/schemas/Events/Data.yaml new file mode 100644 index 000000000..e0a5bf3a3 --- /dev/null +++ b/nas_spec/components/schemas/Events/Data.yaml @@ -0,0 +1,88 @@ +type: object +description: The event data +properties: + id: + description: The payment unique identifier + allOf: + - $ref: '#/components/schemas/PaymentId' + action_id: + description: The unique identifier for the action performed against this payment + allOf: + - $ref: '#/components/schemas/ActionId' + amount: + type: integer + description: The payment amount + example: 6540 + currency: + type: string + description: The currency in which the payment was made (three-letter ISO code) + example: USD + maxLength: 3 + minLength: 3 + approved: + type: boolean + description: Whether the payment request was approved + example: true + status: + type: string + description: The status of the payment + enum: + - Pending + - Authorized + - Voided + - Partially Captured + - Captured + - Partially Refunded + - Refunded + - Declined + - Canceled + example: Authorized + auth_code: + type: string + description: The acquirer authorization code, if the payment was authorized. + example: '643381' + response_code: + type: string + description: The gateway response code + example: '10000' + response_summary: + type: string + description: The gateway response summary + example: 'Approved' + 3ds: + type: object + description: Provides 3D Secure enrollment status if the payment was downgraded to non-3D Secure + allOf: + - $ref: '#/components/schemas/3dsEnrollmentData' + example: + downgraded: true + enrolled: N + flagged: + type: boolean + description: Whether the payment was flagged by a risk check + default: false + example: true + source: + description: The source of the payment + type: object + allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + customer: + type: object + description: The customer to which this payment is linked + allOf: + - $ref: '#/components/schemas/CustomerResponse' + processed_on: + description: The date/time the payment was processed + allOf: + - $ref: '#/components/schemas/ServerTimestamp' + reference: + type: string + description: Your reference for the payment + example: ORD-5023-4E89 + metadata: + type: object + description: A set of key-value pairs that you can attach to a payment. It can be useful for storing additional information in a structured format. + example: + coupon_code: 'NY2018' + partner_id: 123989 diff --git a/nas_spec/components/schemas/Events/EventId.yaml b/nas_spec/components/schemas/Events/EventId.yaml new file mode 100644 index 000000000..3ad29860e --- /dev/null +++ b/nas_spec/components/schemas/Events/EventId.yaml @@ -0,0 +1,5 @@ +type: string +description: The unique event identifier +maxLength: 30 +minLength: 30 +example: 'evt_az5sblvku4ge3dwpztvyizgcau' diff --git a/nas_spec/components/schemas/Events/EventLinks.yaml b/nas_spec/components/schemas/Events/EventLinks.yaml new file mode 100644 index 000000000..2e9dfd915 --- /dev/null +++ b/nas_spec/components/schemas/Events/EventLinks.yaml @@ -0,0 +1,17 @@ +type: object +description: The links related to the event +properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the event + example: + href: 'https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau' + webhooks-retry: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to retry all of the webhooks configured for the event + example: + href: 'https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/webhooks/retry' diff --git a/nas_spec/components/schemas/Events/EventObject.yaml b/nas_spec/components/schemas/Events/EventObject.yaml new file mode 100644 index 000000000..72da9623b --- /dev/null +++ b/nas_spec/components/schemas/Events/EventObject.yaml @@ -0,0 +1,25 @@ +type: object +properties: + id: + $ref: '#/components/schemas/EventId' + type: + type: string + description: The event type + example: payment_approved + version: + type: string + description: Determines the version of the event sent + example: '2.0' + created_on: + description: The date/time the event occurred + allOf: + - $ref: '#/components/schemas/ServerTimestamp' + data: + $ref: '#/components/schemas/Data' + notifications: + type: array + description: The notifications (e.g., webhooks) that have been sent for the event + items: + $ref: '#/components/schemas/NotificationSummary' + _links: + $ref: '#/components/schemas/EventLinks' diff --git a/nas_spec/components/schemas/Events/EventResult.yaml b/nas_spec/components/schemas/Events/EventResult.yaml new file mode 100644 index 000000000..61c9eca06 --- /dev/null +++ b/nas_spec/components/schemas/Events/EventResult.yaml @@ -0,0 +1,28 @@ +type: object +properties: + total_count: + type: integer + example: 100 + description: The total number of events + limit: + type: integer + description: The `limit` query parameter + example: 10 + skip: + type: integer + example: 10 + description: The `skip` query parameter + from: + type: string + format: date-time + description: The `from` query parameter + example: '2018-01-01T00:00:00Z' + to: + type: string + format: date-time + example: '2018-01-15T12:00:00Z' + description: The `to` query parameter + data: + type: array + items: + $ref: '#/components/schemas/EventSummary' diff --git a/nas_spec/components/schemas/Events/EventSummary.yaml b/nas_spec/components/schemas/Events/EventSummary.yaml new file mode 100644 index 000000000..017cd14ab --- /dev/null +++ b/nas_spec/components/schemas/Events/EventSummary.yaml @@ -0,0 +1,18 @@ +type: object +properties: + id: + type: string + maxLength: 30 + minLength: 30 + description: The event identifier + example: evt_az5sblvku4ge3dwpztvyizgcau + type: + type: string + description: The event type + example: payment_approved + created_on: + description: The date/time the event occurred + allOf: + - $ref: '#/components/schemas/ServerTimestamp' + _links: + $ref: '#/components/schemas/EventLinks' diff --git a/nas_spec/components/schemas/Events/EventTypesObject.yaml b/nas_spec/components/schemas/Events/EventTypesObject.yaml new file mode 100644 index 000000000..0a1f57069 --- /dev/null +++ b/nas_spec/components/schemas/Events/EventTypesObject.yaml @@ -0,0 +1,34 @@ +type: object +properties: + version: + type: string + example: '2.0' + event_types: + type: array + items: + type: string + example: + - card_verification_declined + - card_verified + - dispute_canceled + - dispute_evidence_required + - dispute_expired + - dispute_lost + - dispute_resolved + - dispute_won + - payment_approved + - payment_risk_matched + - payment_pending + - payment_declined + - payment_expired + - payment_cancelled + - payment_voided + - payment_void_declined + - payment_captured + - payment_capture_declined + - payment_capture_pending + - payment_refunded + - payment_refund_declined + - payment_refund_pending + - payment_chargeback + - payment_retrieval diff --git a/nas_spec/components/schemas/Events/Notification.yaml b/nas_spec/components/schemas/Events/Notification.yaml new file mode 100644 index 000000000..2b47ac208 --- /dev/null +++ b/nas_spec/components/schemas/Events/Notification.yaml @@ -0,0 +1,39 @@ +type: object +properties: + id: + $ref: '#/components/schemas/NotificationId' + url: + type: string + description: The notification endpoint + example: https://example.com/webhooks + success: + type: boolean + description: Whether the notification eventually succeeded + example: false + content_type: + type: string + description: The content type of the data sent to the endpoint + example: json + attempts: + type: array + description: The notification events ordered by timestamp in descending order (latest first) + items: + $ref: '#/components/schemas/NotificationAttempt' + _links: + type: object + description: The links related to the notification + properties: + self: + type: object + description: The URI of the notification + allOf: + - $ref: '#/components/schemas/Link' + example: + href: https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/notifications/ntf_az5sblvku4ge3dwpztvyizgcau + retry: + type: object + description: A link to retry the notification to the configured webhook + allOf: + - $ref: '#/components/schemas/Link' + example: + href: https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/webhooks/wh_5nuzkt62ddxuho5rwsvt6pyesi/retry diff --git a/nas_spec/components/schemas/Events/NotificationAttempt.yaml b/nas_spec/components/schemas/Events/NotificationAttempt.yaml new file mode 100644 index 000000000..7fff44c8d --- /dev/null +++ b/nas_spec/components/schemas/Events/NotificationAttempt.yaml @@ -0,0 +1,21 @@ +type: object +properties: + status_code: + type: integer + description: The HTTP status code returned from the target server + example: 400 + response_body: + type: string + description: The response body returned from the target server + example: Bad Request + retry_mode: + type: string + description: Whether the notification was sent automatically or requested manually + enum: + - Automatic + - Manual + timestamp: + type: string + description: The date/time the attempt was made + allOf: + - $ref: '#/components/schemas/ServerTimestamp' diff --git a/nas_spec/components/schemas/Events/NotificationId.yaml b/nas_spec/components/schemas/Events/NotificationId.yaml new file mode 100644 index 000000000..3a8c7f72f --- /dev/null +++ b/nas_spec/components/schemas/Events/NotificationId.yaml @@ -0,0 +1,5 @@ +type: string +description: The unique notification identifier +maxLength: 30 +minLength: 30 +example: 'ntf_az5sblvku4ge3dwpztvyizgcau' diff --git a/nas_spec/components/schemas/Events/NotificationSummary.yaml b/nas_spec/components/schemas/Events/NotificationSummary.yaml new file mode 100644 index 000000000..0fb771765 --- /dev/null +++ b/nas_spec/components/schemas/Events/NotificationSummary.yaml @@ -0,0 +1,20 @@ +type: object +properties: + id: + $ref: '#/components/schemas/NotificationId' + url: + type: string + description: The notification endpoint + example: https://example.com/webhooks + success: + type: boolean + description: Whether the notification eventually succeeded + example: false + _links: + type: object + description: The links related to the notification + properties: + self: + type: string + example: + href: https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/notifications/ntf_az5sblvku4ge3dwpztvyizgcau diff --git a/nas_spec/components/schemas/Events/Phone.yaml b/nas_spec/components/schemas/Events/Phone.yaml new file mode 100644 index 000000000..83267cf61 --- /dev/null +++ b/nas_spec/components/schemas/Events/Phone.yaml @@ -0,0 +1,8 @@ +type: object +properties: + country_code: + type: string + example: '975' + number: + type: string + example: '174217187' diff --git a/nas_spec/components/schemas/Events/Product.yaml b/nas_spec/components/schemas/Events/Product.yaml new file mode 100644 index 000000000..6f29d74f9 --- /dev/null +++ b/nas_spec/components/schemas/Events/Product.yaml @@ -0,0 +1,26 @@ +type: object +properties: + name: + type: string + example: Tablet 1 gold limited + description: + type: string + example: Nokia Lumia + sku: + type: string + example: 1aab2aa + price: + type: integer + example: 100 + quantity: + type: integer + example: 1 + image: + type: string + example: 'http://www.test_Jabari.com/' + shipping_cost: + type: integer + example: 10 + tracking_url: + type: string + example: 'https://www.tracker.com' diff --git a/nas_spec/components/schemas/Events/ShippingDetails.yaml b/nas_spec/components/schemas/Events/ShippingDetails.yaml new file mode 100644 index 000000000..fbac31955 --- /dev/null +++ b/nas_spec/components/schemas/Events/ShippingDetails.yaml @@ -0,0 +1,22 @@ +type: object +properties: + address_line_1: + type: string + example: 333 Cormier Bypass + address_line_2: + type: string + example: Rolfson Alley + post_code: + type: string + example: BR3 6TK + country: + type: string + example: GB + city: + type: string + example: Bromley + state: + type: string + example: Greater London + phone: + $ref: '#/components/schemas/Phone' diff --git a/nas_spec/components/schemas/FinancialActions/FinancialAction.yaml b/nas_spec/components/schemas/FinancialActions/FinancialAction.yaml new file mode 100644 index 000000000..791559b05 --- /dev/null +++ b/nas_spec/components/schemas/FinancialActions/FinancialAction.yaml @@ -0,0 +1,122 @@ +type: object +required: + - payment_id + - action_id + - action_type + - entity_id + - currency_account_id + - processed_on + - requested_on +properties: + payment_id: + type: string + description: The unique ID of the payment to which a financial action is associated. + example: pay_qqufsd3rfnqufngwklghlxrzpm + pattern: "^(pay)_(\\w{26})$" + action_id: + type: string + description: The unique ID of a given financial action impacting your balances. + example: act_wsnyzbzmr2huxcekoj7qqhxwuy + pattern: "^(act)_(\\w{26})$" + action_type: + type: string + description: The type of action processed. For example, authorization, capture, refund, chargeback, pay to card. + example: Capture + entity_id: + type: string + description: The unique ID of the entity for which the payment was processed. + example: ent_xozz5q2yvxsetbslrvjxugbsyy + pattern: "^(ent)_(\\w{26})$" + sub_entity_id: + type: string + description: The unique ID of the sub-entity for which the payment was processed. + example: ent_6akzb5simnkejihbnw6udjpecq + pattern: "^(ent)_(\\w{26})$" + currency_account_id: + type: string + description: The unique ID of the currency account to which the financial action amount was charged. + example: ca_oo5z564in66ujcsxlbhjsar3p4 + pattern: "^(ca)_(\\w{26})$" + payment_method: + type: string + description: The payment method associated with the financial action. + example: MASTERCARD + processing_channel_id: + type: string + description: The unique ID for processing channel configurations. + example: pc_y7hikmc5flhuvav47blunjsdui + pattern: "^(pc)_(\\w{26})$" + reference: + type: string + description: An optional ID used to track financial actions. + example: SAMPLE6V6OR + mid: + type: string + description: An optional merchant ID used to segment your payments traffic with card schemes. + example: mid-12345 + response_code: + type: string + description: The payment request response code. + example: 10000 + response_description: + type: string + description: A description of the payment request response code. + example: Approved + region: + type: string + description: The region where this payment occurred. + enum: + - Domestic + - EEA + - International + example: International + card_type: + type: string + description: The card type used to make the payment. For example, credit or debit card. + example: Debit + card_category: + type: string + description: The card category used to make the payment. For example, consumer or commercial. + example: Consumer + issuer_country: + type: string + description: Two-digit ISO country code of the country where the payment is processed. + example: US + merchant_category_code: + type: string + description: Four-digit code for retail financial services expressed in ISO 18245 format, classifying the types of goods or services you provide. + example: 5311 + fx_trade_id: + type: string + description: The unique ID of the foreign exchange trade executed in fulfillment of a financial action. + example: trd_intsaxljgi6uzkxnv6lex3xayu + acquirer_reference_number: + type: string + description: The unique number assigned to a transaction when it moves through the payment flow between the merchant bank and the cardholder's bank. + example: 01234567890123456789012 + account_funding_transaction: + type: boolean + description: A flag to mark if a transaction debited funds from an account to fund a non-merchant account. For example, to load a prepaid card or top up a wallet. + example: true + scheme_fx_adjustment_eligible: + type: boolean + description: A flag to mark if the transaction honors the scheme exchange rate applicable at the time of authorization for both authorization and settlement movements. + example: true + processed_on: + type: string + description: An ISO 8601 timestamp of when the action was processed and impacted your balances, in UTC. + format: date-time + example: '2022-02-18T13:00:12.357Z' + requested_on: + type: string + description: An ISO 8601 timestamp of when a gateway request was made for an action, in UTC. + format: date-time + example: '2022-02-18T13:00:11.724Z' + breakdown: + type: array + description: The breakdown of amounts within this financial action. + items: + type: object + $ref: '#/components/schemas/FinancialActionBreakdown' +additionalProperties: false +description: Financial actions response details. \ No newline at end of file diff --git a/nas_spec/components/schemas/FinancialActions/FinancialActionBreakdown.yaml b/nas_spec/components/schemas/FinancialActions/FinancialActionBreakdown.yaml new file mode 100644 index 000000000..8a382fb21 --- /dev/null +++ b/nas_spec/components/schemas/FinancialActions/FinancialActionBreakdown.yaml @@ -0,0 +1,87 @@ +type: object +required: + - breakdown_type + - fx_rate_applied + - holding_currency + - holding_currency_amount + - processing_currency + - processing_currency_amount +properties: + breakdown_type: + type: string + description: A description of the type of fee or amount. For example, authorization fee. + example: Scheme Fixed Fee + fx_rate_applied: + type: number + description: The foreign exchange rate applied to a processed financial action. + example: 1.24 + holding_currency: + type: string + description: Three-digit ISO currency code of the currency a financial action is held and paid out in. + example: USD + holding_currency_amount: + type: number + description: The associated amount of the financial action in the holding currency. + example: 0.19526938 + processing_currency: + type: string + description: Three-digit ISO currency code of a financial action when processed. + example: GBP + processing_currency_amount: + type: number + description: The associated amount of the financial action in the processing currency. + example: 0.15816820 + transaction_currency: + type: string + description: The currency of the transaction. + example: EUR + transaction_currency_amount: + type: number + description: The transaction amount, expressed in the transaction currency. + example: 0.18031175 + processing_to_transaction_currency_fx_rate: + type: number + description: The foreign exchange rate between the processing currency and the transaction currency. + example: 1.14 + transaction_to_holding_currency_fx_rate: + type: number + description: The foreign exchange rate between the transaction currency and the holding currency. This rate is inferred from both the FX Rate and Processing to Transaction Currency FX Rate columns to account for foreign exchange rates from multiple rate ticks. + example: 1.08 + fee_detail: + type: string + description: The additional level of granularity for predicted scheme fees applied. + example: Visa Fixed Acquirer Network Fee + reserve_rate: + type: string + description: The percentage amount reserved from the payment. + example: 5% + reserve_release_date: + type: string + description: The date that the reserve is scheduled to be released for a Rolling Reserve Deducted, or the date that the reserve is released for a Rolling Reserve Released financial action. + format: date-time + example: '2023-06-21T09:15:34.782Z' + reserve_deducted_date: + type: string + description: The date the reserve was deducted from the payment. + format: date-time + example: '2022-02-18T13:00:12.357Z' + tax_fx_rate: + type: number + description: The foreign exchange rate between the holding currency and the tax currency at the point the financial action was processed. + example: 1.45 + scheme_fx_adjustment_processing_currency: + type: string + description: The processing currency of the transactions covered by the scheme FX adjustment. + example: GBP + scheme_fx_adjustment_rate_applied: + type: number + description: The rate applied to calculate the scheme FX adjustment over eligible transactions. + example: 1.45 + entity_country_tax_currency: + type: string + description: The currency of the country your entity resides in for tax purposes, if applicable. + example: AUD + tax_currency_amount: + type: number + description: The amount of tax applied, expressed in the tax currency. + example: AUD \ No newline at end of file diff --git a/nas_spec/components/schemas/FinancialActions/FinancialActionErrorResponse.yaml b/nas_spec/components/schemas/FinancialActions/FinancialActionErrorResponse.yaml new file mode 100644 index 000000000..efd895155 --- /dev/null +++ b/nas_spec/components/schemas/FinancialActions/FinancialActionErrorResponse.yaml @@ -0,0 +1,22 @@ +type: object +properties: + request_id: + type: string + description: Request ID + example: '0HMJGFVAQ35TL:00000117' + error_type: + type: string + description: > + The type of error.
+ • `invalid_request`: Usually occurs with an HTTP status code `422`. The request payload failed validation.
+ • `not_found`: Usually occurs with an HTTP status code `404`. The requested resource was not found.
+ error_codes: + type: array + items: + type: string + description: > + Error response code. Full list of error codes below:
+ • `invalid_some_field`: Usually occurs with an error type `invalid_request` and HTTP status code `422 Unprocessable entity`. The field `some_field` failed validation. Please consult the API spec.
+ • `some_resource_not_found`: Usually occurs with an error type `not_found`. The resource you are trying to retrieve does not exist.
+additionalProperties: false +description: Error Response \ No newline at end of file diff --git a/nas_spec/components/schemas/FinancialActions/FinancialActionListResponse.yaml b/nas_spec/components/schemas/FinancialActions/FinancialActionListResponse.yaml new file mode 100644 index 000000000..487068647 --- /dev/null +++ b/nas_spec/components/schemas/FinancialActions/FinancialActionListResponse.yaml @@ -0,0 +1,43 @@ +type: object +properties: + count: + type: integer + description: The total number of financial actions on the current page. + format: int32 + example: 1 + limit: + type: integer + description: The maximum number of results included per page. + format: int32 + example: 5 + minimum: 1 + maximum: 100 + default: 100 + data: + type: array + items: + type: object + $ref: '#/components/schemas/FinancialAction' + description: The list of financial actions from the current page. + _links: + type: object + description: The `links` object. + properties: + self: + type: object + description: The `self` object. + allOf: + - $ref: '#/components/schemas/FinancialActionsSelfLink' + example: + href: https://api.checkout.com/financial-actions?payment_id=pay_qqufsd3rfnqufngwklghlxrzpm&limit=5 + additionalProperties: false + next: + type: object + description: The `next` object. + allOf: + - $ref: '#/components/schemas/FinancialActionsNextLink' + example: + href: 'https://api.checkout.com/financial-actions?payment_id=pay_qqufsd3rfnqufngwklghlxrzpm&limit=5&pagination_token=string' + additionalProperties: false +additionalProperties: false +description: The list of financial actions in the response. \ No newline at end of file diff --git a/nas_spec/components/schemas/FinancialActions/Links/FinancialActionsLink.yaml b/nas_spec/components/schemas/FinancialActions/Links/FinancialActionsLink.yaml new file mode 100644 index 000000000..5e1122cd9 --- /dev/null +++ b/nas_spec/components/schemas/FinancialActions/Links/FinancialActionsLink.yaml @@ -0,0 +1,4 @@ +type: object +properties: + href: + type: string diff --git a/nas_spec/components/schemas/FinancialActions/Links/FinancialActionsNextLink.yaml b/nas_spec/components/schemas/FinancialActions/Links/FinancialActionsNextLink.yaml new file mode 100644 index 000000000..7c4b5d629 --- /dev/null +++ b/nas_spec/components/schemas/FinancialActions/Links/FinancialActionsNextLink.yaml @@ -0,0 +1,5 @@ +allOf: + - $ref: '#/components/schemas/FinancialActionsLink' +properties: + href: + description: This link allows you to move to the next page of results (if there's any) in the response. diff --git a/nas_spec/components/schemas/FinancialActions/Links/FinancialActionsSelfLink.yaml b/nas_spec/components/schemas/FinancialActions/Links/FinancialActionsSelfLink.yaml new file mode 100644 index 000000000..d91dd2cbe --- /dev/null +++ b/nas_spec/components/schemas/FinancialActions/Links/FinancialActionsSelfLink.yaml @@ -0,0 +1,5 @@ +allOf: + - $ref: '#/components/schemas/FinancialActionsLink' +properties: + href: + description: This is a direct link to the response associated with the submitted request. \ No newline at end of file diff --git a/nas_spec/components/schemas/Flow/events/get-event-action-response.yaml b/nas_spec/components/schemas/Flow/events/get-event-action-response.yaml new file mode 100644 index 000000000..7ef3e191e --- /dev/null +++ b/nas_spec/components/schemas/Flow/events/get-event-action-response.yaml @@ -0,0 +1,72 @@ +type: object +properties: + event_id: + type: string + description: The unique event identifier + example: evt_az5sblvku4ge3dwpztvyizgcau + workflow_action_id: + type: string + description: The worfklow action identifier + example: wfa_uzkxpffkvpiu5fe3h5ira7sqpa + type: + type: string + description: The workflow action type + example: webhook + success: + type: boolean + description: Whether the workflow action was successful + example: true + invocations: + type: array + description: The results for each action invocation + items: + type: object + properties: + timestamp: + type: string + format: date-time + description: The date/time the action was invoked for the event + success: + type: boolean + description: Whether the invocation completed successfully + result: + type: object + description: The results returned from the action + final: + type: boolean + description: Whether this is the final attempt + example: false + example: + - timestamp: '2019-05-23T08:26:59Z' + success: true + result: + status_code: 200 + url: 'https://example.com/webhooks' + headers: + Authorization: '' + response_received_timestamp: '2019-05-23T08:26:59Z' + final: true + - timestamp: '2019-05-23T08:27:01Z' + success: false + result: + status_code: 500 + url: 'https://example.com/webhooks' + headers: + Authorization: '' + response_received_timestamp: '2019-05-23T08:26:59Z' + final: false + _links: + type: object + description: Links related to the workflow action + minItems: 1 + required: + - self + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: Workflow action results for this event + example: + self: + href: "https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/actions/wfa_uzkxpffkvpiu5fe3h5ira7sqpa" diff --git a/nas_spec/components/schemas/Flow/events/get-event-response.yaml b/nas_spec/components/schemas/Flow/events/get-event-response.yaml new file mode 100644 index 000000000..ef806daa8 --- /dev/null +++ b/nas_spec/components/schemas/Flow/events/get-event-response.yaml @@ -0,0 +1,65 @@ +type: object +additionalProperties: true +properties: + id: + type: string + description: The unique event identifier + example: evt_az5sblvku4ge3dwpztvyizgcau + source: + type: string + description: The source of the event + example: gateway + type: + type: string + description: The event type + example: payment_approved + timestamp: + type: string + format: date-time + description: The date/time the event occurred + version: + type: string + description: The version of the event + example: 1.0.0 + data: + $ref: '#/components/schemas/event-data' + action_invocations: + type: array + description: The list of the actions that trigger this event. + items: + type: object + properties: + workflow_id: + type: string + pattern: ^wf_[a-z0-9]{26}$ + description: The workflow identifier + example: wf_c7svxlvo2bbuva4f6s3xu4f7wm + workflow_action_id: + type: string + description: The worfklow action identifier + example: wfa_uzkxpffkvpiu5fe3h5ira7sqpa + status: + type: string + description: The status of the workflow action. + enum: + - pending + - successful + - failed + _links: + type: object + description: Links related to the workflow action + minItems: 1 + required: + - self + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: Workflow action results for this event + example: + self: + href: "https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/actions/wfa_uzkxpffkvpiu5fe3h5ira7sqpa" + _links: + allOf: + - $ref: '#/components/schemas/event-links' diff --git a/nas_spec/components/schemas/Flow/events/get-event-types-response.yaml b/nas_spec/components/schemas/Flow/events/get-event-types-response.yaml new file mode 100644 index 000000000..d877b0b63 --- /dev/null +++ b/nas_spec/components/schemas/Flow/events/get-event-types-response.yaml @@ -0,0 +1,34 @@ +type: array +items: + type: object + properties: + id: + type: string + description: The unique identifier of the event source + example: gateway + display_name: + type: string + description: The display name of the event source + example: Gateway + description: + type: string + description: A description of the event source + example: Events from the Checkout.com payment gateway + events: + type: array + description: The events raised by the source + items: + type: object + properties: + id: + type: string + description: The event type identifier + example: payment_approved + display_name: + type: string + description: The display name of the event + example: Payment Authorized + description: + type: string + description: A description of the event + example: Occurs when a payment is successfully authorized by the Checkout.com payment gateway diff --git a/nas_spec/components/schemas/Flow/events/properties/event-data.yaml b/nas_spec/components/schemas/Flow/events/properties/event-data.yaml new file mode 100644 index 000000000..243feb2b6 --- /dev/null +++ b/nas_spec/components/schemas/Flow/events/properties/event-data.yaml @@ -0,0 +1,71 @@ +type: object +description: The event data +example: + { + 'id': 'pay_mbabizu24mvu3mela5njyhpit4', + 'action_id': 'act_y3oqhf46pyzuxjbcn2giaqnb44', + 'amount': 6540, + 'currency': 'USD', + 'approved': true, + 'status': 'Authorized', + 'auth_code': '643381', + 'payment_type': 'Regular', + 'response_code': '10000', + 'response_summary': 'Approved', + 'scheme_id': '745664329470123', + '3ds': { 'downgraded': true, 'enrolled': 'N' }, + 'flagged': true, + 'source': + { + 'type': 'card', + 'id': 'src_nwd3m4in3hkuddfpjsaevunhdy', + 'billing_address': + { + 'line1': 'Checkout.com', + 'line2': '90 Tottenham Court Road', + 'town_city': 'London', + 'state': 'London', + 'zip': 'W1T 4TJ', + 'country': 'GB', + }, + 'phone': { 'country_code': '+1', 'number': '415 555 2671' }, + 'expiry_month': 12, + 'expiry_year': 2025, + 'scheme': VISA', + 'last_4': '4242', + 'fingerprint': '54710B428R6H190D29087FF265D8F48DF1AD34EDE41C27CBFF9D23C1A14D9876', + 'bin': '424242', + 'card_type': 'CREDIT', + 'card_category': 'CONSUMER', + 'issuer': 'MERCHANT UK', + 'issuer_country': 'GB', + 'product_id': 'F', + 'product_type': 'Visa Classic', + 'avs_check': 'G', + 'cvv_check': 'Y' + }, + 'processing': + { + 'acquirer_transaction_id': '501979547418712947435', + 'retrieval_reference_number': '682643929865' + }, + 'balances': + { + 'total_authorized': 6540, + 'total_voided': 0, + 'available_to_void': 6540, + 'total_captured': 0, + 'available_to_capture': 6540, + 'total_refunded': 0, + 'available_to_refund': 0 + }, + 'event_links': + { + 'payment': 'https://api.checkout.com/payments/pay_wlu3wxc26jounofs5iez75qaqa', + 'dispute': 'https://api.checkout.com/disputes/dsp_jfh5iqceqau0qw3ccf3p' + }, + 'customer': { 'id': 'cus_y3oqhf46pyzuxjbcn2giaqnb44', 'email': 'brucewayne@gmail.com', 'name': 'Bruce Wayne' }, + 'processed_on': '2020-02-27T11:26:59Z', + 'reference': 'ORD-5023-4E89', + 'metadata': { 'coupon_code': 'NY2018', 'partner_id': 123989 }, + } diff --git a/nas_spec/components/schemas/Flow/events/properties/event-links.yaml b/nas_spec/components/schemas/Flow/events/properties/event-links.yaml new file mode 100644 index 000000000..fc1e7fd3c --- /dev/null +++ b/nas_spec/components/schemas/Flow/events/properties/event-links.yaml @@ -0,0 +1,18 @@ +type: object +description: Links related to the event +minItems: 1 +required: + - self +properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the event +example: + self: + href: 'https://api.checkout.com/workflows/events/evt_az5sblvku4ge3dwpztvyizgcau' + payment: + href: 'https://api.checkout.com/payments/pay_wlu3wxc26jounofs5iez75qaqa' + dispute: + href: 'https://api.checkout.com/disputes/dsp_jfh5iqceqau0qw3ccf3p' \ No newline at end of file diff --git a/nas_spec/components/schemas/Flow/events/properties/source-events-hashmap.yaml b/nas_spec/components/schemas/Flow/events/properties/source-events-hashmap.yaml new file mode 100644 index 000000000..82152dc88 --- /dev/null +++ b/nas_spec/components/schemas/Flow/events/properties/source-events-hashmap.yaml @@ -0,0 +1,25 @@ +type: object +additionalProperties: + description: The event source + type: array + items: + type: string + description: The source event types + example: payment_approved +example: + gateway: + - card_verified + - card_verification_declined + - payment_approved + - payment_pending + - payment_declined + - payment_voided + - payment_captured + - payment_refunded + disputes: + - dispute_canceled + - dispute_evidence_required + - dispute_expired + - dispute_lost + - dispute_resolved + - dispute_won diff --git a/nas_spec/components/schemas/Flow/events/subject-events-response.yaml b/nas_spec/components/schemas/Flow/events/subject-events-response.yaml new file mode 100644 index 000000000..eb4e20fcc --- /dev/null +++ b/nas_spec/components/schemas/Flow/events/subject-events-response.yaml @@ -0,0 +1,34 @@ +type: object +properties: + data: + type: array + items: + type: object + properties: + id: + type: string + description: The unique event identifier + example: evt_az5sblvku4ge3dwpztvyizgcau + type: + type: string + description: The event type + example: payment_approved + timestamp: + type: string + format: date-time + description: The date/time the event occurred + _links: + $ref: '#/components/schemas/event-links' + example: + - id: evt_zrrgsvsr47ou7fng4shy4mtf64 + type: payment_approved + timestamp: '2019-05-23T08:25:53Z' + _links: + self: + href: https://api.checkout.com/events/evt_zrrgsvsr47ou7fng4shy4mtf64 + - id: evt_wgwdfyem4ode5furs5swyy6b2u + type: payment_captured + timestamp: '2019-05-24T07:00:53Z' + _links: + self: + href: https://api.checkout.com/events/evt_zrrgsvsr47ou7fng4shy4mtf64 diff --git a/nas_spec/components/schemas/Flow/reflow/event-id-validation-error.yaml b/nas_spec/components/schemas/Flow/reflow/event-id-validation-error.yaml new file mode 100644 index 000000000..3cb9f0b00 --- /dev/null +++ b/nas_spec/components/schemas/Flow/reflow/event-id-validation-error.yaml @@ -0,0 +1,13 @@ +type: object +properties: + request_id: + type: string + example: 0HL80RJLS76I7 + error_type: + type: string + example: request_invalid + error_codes: + type: array + items: + type: string + example: event_id_invalid diff --git a/nas_spec/components/schemas/Flow/reflow/ids-validation-error.yaml b/nas_spec/components/schemas/Flow/reflow/ids-validation-error.yaml new file mode 100644 index 000000000..12cef4d66 --- /dev/null +++ b/nas_spec/components/schemas/Flow/reflow/ids-validation-error.yaml @@ -0,0 +1,14 @@ +type: object +properties: + request_id: + type: string + example: 0HL80RJLS76I7 + error_type: + type: string + example: request_invalid + error_codes: + type: array + items: + type: string + example: event_ids_invalid + example: [event_ids_invalid, workflow_ids_invalid] diff --git a/nas_spec/components/schemas/Flow/reflow/reflow-events-by-event-and-workflow-ids.yaml b/nas_spec/components/schemas/Flow/reflow/reflow-events-by-event-and-workflow-ids.yaml new file mode 100644 index 000000000..2d20413e4 --- /dev/null +++ b/nas_spec/components/schemas/Flow/reflow/reflow-events-by-event-and-workflow-ids.yaml @@ -0,0 +1,22 @@ +type: object +required: + - events +properties: + events: + type: array + description: A list of IDs for the events you want reflowed. + items: + type: string + description: The identifiers of the events you want reflowed. + pattern: ^evt_[a-z0-9]{26}$ + example: evt_hnmnr6hdbslqlc38jd8mn35bk9 + example: [evt_lzmo6p0i3612judj754w1ngtil, evt_05z6xuagtti48ajyfbuekg6a0a] + workflows: + type: array + description: A list of IDs for the workflows whose actions you want to retrigger. + items: + type: string + description: The identifiers of the workflows you want retriggered. + pattern: ^wf_[a-z0-9]{26}$ + example: wf_iiutwnpb1p8044f2aq2znez9c6 + example: [wf_sq8jnqi9i749hhb470bu308uk2, wf_bz91q7i4ks4sr0kasmas2xhp56] diff --git a/nas_spec/components/schemas/Flow/reflow/reflow-events-by-subject-and-workflow-ids.yaml b/nas_spec/components/schemas/Flow/reflow/reflow-events-by-subject-and-workflow-ids.yaml new file mode 100644 index 000000000..eba49bd35 --- /dev/null +++ b/nas_spec/components/schemas/Flow/reflow/reflow-events-by-subject-and-workflow-ids.yaml @@ -0,0 +1,22 @@ +type: object +required: + - subjects +properties: + subjects: + type: array + description: A list of subject IDs (for example, payment IDs and disputes IDs). The events associated with these subjects will be reflowed. + items: + type: string + description: The identifiers of the subjects (for example, payment IDs and dispute IDs) whose events you want reflowed. + pattern: ^[a-z]{3}_[a-z0-9]{26}$ + example: pay_hnmnr6hdbslqlc38jd8mn35bk9 + example: [pay_lzmo6p0i3612judj754w1ngtil, pay_ol88zt9jviq4mkark1bo5b4i9sk] + workflows: + type: array + description: A list of IDs for the workflows whose actions you want to retrigger. + items: + type: string + description: The identifiers of the workflows you want retriggered. + pattern: ^wf_[a-z0-9]{26}$ + example: wf_iiutwnpb1p8044f2aq2znez9c6 + example: [wf_sq8jnqi9i749hhb470bu308uk2, wf_bz91q7i4ks4sr0kasmas2xhp56] diff --git a/nas_spec/components/schemas/Flow/reflow/subject-id-validation-error.yaml b/nas_spec/components/schemas/Flow/reflow/subject-id-validation-error.yaml new file mode 100644 index 000000000..3922e4508 --- /dev/null +++ b/nas_spec/components/schemas/Flow/reflow/subject-id-validation-error.yaml @@ -0,0 +1,13 @@ +type: object +properties: + request_id: + type: string + example: 0HL80RJLS76I7 + error_type: + type: string + example: request_invalid + error_codes: + type: array + items: + type: string + example: subject_id_invalid diff --git a/nas_spec/components/schemas/Flow/workflows/actions/email-action.yaml b/nas_spec/components/schemas/Flow/workflows/actions/email-action.yaml new file mode 100644 index 000000000..0782a2b9d --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/actions/email-action.yaml @@ -0,0 +1,34 @@ +type: object +description: Action that sends an email +required: + - to +allOf: + #- $ref: '#/components/schemas/workflow-action' + - type: object + required: + - to + properties: + to: + type: array + items: + type: string + minItems: 1 + maxItems: 5 + description: The email addresses to send the email to + example: ["test@test.com"] + cc: + type: array + items: + type: string + minItems: 0 + maxItems: 5 + description: The email addresses to CC on the email + example: ["test@test.com"] + bcc: + type: array + items: + type: string + minItems: 0 + maxItems: 5 + description: The email addresses to BCC on the email + example: ["test@test.com"] diff --git a/nas_spec/components/schemas/Flow/workflows/actions/get-invocations-response.yaml b/nas_spec/components/schemas/Flow/workflows/actions/get-invocations-response.yaml new file mode 100644 index 000000000..d44421e0e --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/actions/get-invocations-response.yaml @@ -0,0 +1,103 @@ +type: object +properties: + workflow_id: + type: string + pattern: ^wf_[a-z0-9]{26}$ + description: The workflow identifier + example: wf_c7svxlvo2bbuva4f6s3xu4f7wm + event_id: + type: string + description: The unique event identifier. + example: evt_az5sblvku4ge3dwpztvyizgcau + workflow_action_id: + type: string + description: The worklow action identifier. + example: wfa_uzkxpffkvpiu5fe3h5ira7sqpa + action_type: + type: string + description: The workflow action type. + example: webhook + status: + type: string + description: The status of the workflow action. It aggregates the past invocations outcome. + enum: + - pending + - successful + - failed + example: successful + action_invocations: + example: + [ + { + 'invocation_id': 'ivc_az5sblvku4ge3dwpztvyizgcau', + 'timestamp': '2019-05-23T08:26:59Z', + 'retry': false, + 'succeeded': true, + 'final': true, + 'result_details': + { + 'status_code': 200, + 'url': 'https://example.com/webhooks', + 'headers': { 'Authorization': '' }, + 'response_received_timestamp': '2019-05-23T08:27:01Z', + }, + }, + { + 'invocation_id': 'ivc_az5sblvku4ge3dwpztvyizgcau', + 'timestamp': '2019-05-23T08:27:01Z', + 'retry': true, + 'succeeded': false, + 'final': false, + 'result_details': + { + 'status_code': 500, + 'url': 'https://example.com/webhooks', + 'headers': { 'Authorization': '' }, + 'response_received_timestamp': '2019-05-23T08:27:01Z', + }, + }, + ] + type: array + description: The list of the actions that trigger this event. + items: + type: object + properties: + invocation_id: + type: string + description: The invocation identifier. + example: 'ivc_az5sb1vku4ge3dwpztvy' + timestamp: + type: string + format: date-time + description: The date/time the action was invoked for the event. + example: '2019-05-23T08:26:59Z' + retry: + type: boolean + description: Whether the invocation has been retried. + example: true + succeeded: + type: boolean + description: Whether the invocation completed successfully. + example: false + final: + type: boolean + description: Indicates whether this is the final attempt. + example: false + result_details: + type: object + description: The result details returned from the action. + _links: + type: object + description: Links related to the workflow action + minItems: 1 + required: + - self + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: Workflow action results for this event + example: + self: + href: "https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/actions/wfa_uzkxpffkvpiu5fe3h5ira7sqpa" diff --git a/nas_spec/components/schemas/Flow/workflows/actions/get-simulator-action.yaml b/nas_spec/components/schemas/Flow/workflows/actions/get-simulator-action.yaml new file mode 100644 index 000000000..76f24d6c4 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/actions/get-simulator-action.yaml @@ -0,0 +1,16 @@ +type: object +description: Action that invokes the Flow simulator +required: + - api_key +allOf: + #- $ref: '#/components/schemas/get-workflow-action' + - type: object + required: + - api_key + properties: + api_key: + type: string + description: The simulator API key (any value supported) + example: 'secret123' + _links: + $ref: '#/components/schemas/workflow-action-links' diff --git a/nas_spec/components/schemas/Flow/workflows/actions/get-slack-action.yaml b/nas_spec/components/schemas/Flow/workflows/actions/get-slack-action.yaml new file mode 100644 index 000000000..bb753df3b --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/actions/get-slack-action.yaml @@ -0,0 +1,26 @@ +type: object +description: Action that sends a message to Slack +required: + - url +allOf: + #- $ref: '#/components/schemas/get-workflow-action' + - type: object + required: + - url + - channel + properties: + url: + type: string + format: uri + description: Your slack incoming webhook URL + example: 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX' + channel: + type: string + description: The slack channel you wish to send messages to + example: '#notifications' + message_template: + type: string + description: The message template in liquid format you wish to use for slack messages. If no template is provided, the full event data will be provided. + example: 'A payment for {event.amount} {event.currency} was declined' + _links: + $ref: '#/components/schemas/workflow-action-links' diff --git a/nas_spec/components/schemas/Flow/workflows/actions/get-webhook-action.yaml b/nas_spec/components/schemas/Flow/workflows/actions/get-webhook-action.yaml new file mode 100644 index 000000000..0d03c1ca7 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/actions/get-webhook-action.yaml @@ -0,0 +1,41 @@ +type: object +description: Action that sends a webhook +required: + - url +allOf: + - $ref: '#/components/schemas/get-workflow-action' + - type: object + required: + - url + properties: + url: + type: string + format: uri + description: Your webhook endpoint URL + example: 'https://example.com/webhooks/checkout' + headers: + type: object + description: Optional [HTTP headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) added to the request + additionalProperties: + type: string + description: The HTTP header value + example: + Authorization: '' + signature: + type: object + description: + Used to produce a signature of the webhook contents that will be included in the `Cko-Signature` header. + This value can be computed by you on receipt of a webhook to validate its authenticity. + required: + - key + properties: + method: + type: string + description: The signing method, defaults to HMAC SHA256 + example: HMACSHA256 + key: + type: string + description: The key used the sign the webhook + example: public-signing-key + _links: + $ref: '#/components/schemas/workflow-action-links' diff --git a/nas_spec/components/schemas/Flow/workflows/actions/get-workflow-action.yaml b/nas_spec/components/schemas/Flow/workflows/actions/get-workflow-action.yaml new file mode 100644 index 000000000..050168b92 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/actions/get-workflow-action.yaml @@ -0,0 +1,21 @@ +type: object +description: The workflow action +discriminator: + propertyName: type + mapping: + webhook: '#/components/schemas/get-webhook-action' + #email: '#/components/schemas/email-action' + #slack: '#/components/schemas/get-slack-action' + #simulator: '#/components/schemas/get-simulator-action' +required: + - id + - type +properties: + id: + type: string + description: The workflow action identifier + example: wfa_tisekcawefze3l27uaai6hz74y + type: + type: string + description: The type of workflow action + example: webhook diff --git a/nas_spec/components/schemas/Flow/workflows/actions/patch-email-action.yaml b/nas_spec/components/schemas/Flow/workflows/actions/patch-email-action.yaml new file mode 100644 index 000000000..32872fb26 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/actions/patch-email-action.yaml @@ -0,0 +1,34 @@ +type: object +description: The action that sends an email +required: + - to +allOf: + #- $ref: '#/components/schemas/patch-workflow-action' + - type: object + required: + - to + properties: + to: + type: array + items: + type: string + minItems: 1 + maxItems: 5 + description: The email addresses to send the email to + example: ["test@test.com"] + cc: + type: array + items: + type: string + minItems: 0 + maxItems: 5 + description: The email addresses to carbon copy (CC) on the email + example: ["test@test.com"] + bcc: + type: array + items: + type: string + minItems: 0 + maxItems: 5 + description: The email addresses to blind carbon copy (BCC) on the email + example: ["test@test.com"] diff --git a/nas_spec/components/schemas/Flow/workflows/actions/patch-response-email-action.yaml b/nas_spec/components/schemas/Flow/workflows/actions/patch-response-email-action.yaml new file mode 100644 index 000000000..39950d22d --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/actions/patch-response-email-action.yaml @@ -0,0 +1,34 @@ +type: object +description: The action that sends an email +required: + - to +allOf: + #- $ref: '#/components/schemas/patch-response-workflow-action' + - type: object + required: + - to + properties: + to: + type: array + items: + type: string + minItems: 1 + maxItems: 5 + description: The email addresses to send the email to + example: ["test@test.com"] + cc: + type: array + items: + type: string + minItems: 0 + maxItems: 5 + description: The email addresses to carbon copy (CC) on the email + example: ["test@test.com"] + bcc: + type: array + items: + type: string + minItems: 0 + maxItems: 5 + description: The email addresses to blind carbon copy (BCC) on the email + example: ["test@test.com"] diff --git a/nas_spec/components/schemas/Flow/workflows/actions/patch-response-webhook-action.yaml b/nas_spec/components/schemas/Flow/workflows/actions/patch-response-webhook-action.yaml new file mode 100644 index 000000000..9c64e771a --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/actions/patch-response-webhook-action.yaml @@ -0,0 +1,39 @@ +type: object +description: The action that sends a webhook +required: + - url +allOf: + - $ref: '#/components/schemas/patch-response-workflow-action' + - type: object + required: + - url + properties: + url: + type: string + format: uri + description: Your webhook endpoint URL + example: 'https://example.com/webhooks/checkout' + headers: + type: object + description: The optional [HTTP headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) added to the request + additionalProperties: + type: string + description: The HTTP header value + example: + Authorization: '' + signature: + type: object + description: Used to produce a signature of the webhook contents that will be included in the `Cko-Signature` header. + On receipt of a webhook, you can compute this value to validate its authenticity. + required: + - key + properties: + method: + type: enum + - HMACSHA256 + description: The signing method, defaults to `HMACSHA256` + example: HMACSHA256 + key: + type: string + description: The key used the sign the webhook + example: public-signing-key \ No newline at end of file diff --git a/nas_spec/components/schemas/Flow/workflows/actions/patch-response-workflow-action.yaml b/nas_spec/components/schemas/Flow/workflows/actions/patch-response-workflow-action.yaml new file mode 100644 index 000000000..9e2196fe3 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/actions/patch-response-workflow-action.yaml @@ -0,0 +1,19 @@ +type: object +description: The workflow patch action +discriminator: + propertyName: type + mapping: + webhook: '#/components/schemas/patch-response-webhook-action' + #email: '#/components/schemas/patch-response-email-action' +required: + - id + - type +properties: + id: + type: string + description: The workflow action identifier + example: wfa_itja4x7zgzye3andzqq62u4hvq + type: + type: string + description: The type of workflow action + example: webhook \ No newline at end of file diff --git a/nas_spec/components/schemas/Flow/workflows/actions/patch-webhook-action.yaml b/nas_spec/components/schemas/Flow/workflows/actions/patch-webhook-action.yaml new file mode 100644 index 000000000..63533d246 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/actions/patch-webhook-action.yaml @@ -0,0 +1,39 @@ +type: object +description: The action that sends a webhook +required: + - url +allOf: + - $ref: '#/components/schemas/patch-workflow-action' + - type: object + required: + - url + properties: + url: + type: string + format: uri + description: Your webhook endpoint URL + example: 'https://example.com/webhooks/checkout' + headers: + type: object + description: The optional [HTTP headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) added to the request + additionalProperties: + type: string + description: The HTTP header value + example: + Authorization: '' + signature: + type: object + description: Used to produce a signature of the webhook contents that will be included in the `Cko-Signature` header. + On receipt of a webhook, you can compute this value to validate its authenticity. + required: + - key + properties: + method: + type: enum + - HMACSHA256 + description: The signing method, defaults to `HMACSHA256` + example: HMACSHA256 + key: + type: string + description: The key used the sign the webhook + example: public-signing-key \ No newline at end of file diff --git a/nas_spec/components/schemas/Flow/workflows/actions/patch-workflow-action.yaml b/nas_spec/components/schemas/Flow/workflows/actions/patch-workflow-action.yaml new file mode 100644 index 000000000..8412a374b --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/actions/patch-workflow-action.yaml @@ -0,0 +1,18 @@ +type: object +description: The workflow action +discriminator: + propertyName: type + mapping: + webhook: '#/components/schemas/patch-webhook-action' + #email: '#/components/schemas/patch-email-action' +required: + - type +properties: + workflow_action_id: + type: string + description: The workflow action identifier needed to update an existing action ID. Do not include this property if you want to add a new action. + example: wfa_itja4x7zgzye3andzqq62u4hvq + type: + type: string + description: The type of workflow action + example: webhook \ No newline at end of file diff --git a/nas_spec/components/schemas/Flow/workflows/actions/simulator-action.yaml b/nas_spec/components/schemas/Flow/workflows/actions/simulator-action.yaml new file mode 100644 index 000000000..3603879fc --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/actions/simulator-action.yaml @@ -0,0 +1,14 @@ +type: object +description: Action that invokes the Flow simulator +required: + - api_key +allOf: + #- $ref: '#/components/schemas/workflow-action' + - type: object + required: + - api_key + properties: + api_key: + type: string + description: The simulator API key (any value supported) + example: 'secret123' \ No newline at end of file diff --git a/nas_spec/components/schemas/Flow/workflows/actions/slack-action.yaml b/nas_spec/components/schemas/Flow/workflows/actions/slack-action.yaml new file mode 100644 index 000000000..2276751ef --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/actions/slack-action.yaml @@ -0,0 +1,24 @@ +type: object +description: Action that sends a message to Slack +required: + - url +allOf: + #- $ref: '#/components/schemas/workflow-action' + - type: object + required: + - url + - channel + properties: + url: + type: string + format: uri + description: Your slack incoming webhook URL + example: 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX' + channel: + type: string + description: The slack channel you wish to send messages to + example: '#notifications' + message_template: + type: string + description: The message template in liquid format you wish to use for slack messages. If no template is provided, the full event data will be provided. + example: 'A payment for {event.amount} {event.currency} was declined' diff --git a/nas_spec/components/schemas/Flow/workflows/actions/webhook-action.yaml b/nas_spec/components/schemas/Flow/workflows/actions/webhook-action.yaml new file mode 100644 index 000000000..3d9bd45d5 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/actions/webhook-action.yaml @@ -0,0 +1,40 @@ +type: object +description: Action that sends a webhook +required: + - url +allOf: + - $ref: '#/components/schemas/workflow-action' + - type: object + required: + - url + properties: + url: + type: string + format: uri + description: Your webhook endpoint URL + example: 'https://example.com/webhooks/checkout' + headers: + type: object + description: Optional [HTTP headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) added to the request + additionalProperties: + type: string + description: The HTTP header value + example: + Authorization: '' + signature: + type: object + description: + Used to produce a signature of the webhook contents that will be included in the `Cko-Signature` header. + This value can be computed by you on receipt of a webhook to validate its authenticity. + required: + - key + properties: + method: + type: enum + - HMACSHA256 + description: The signing method used to sign the webhook. If no value is specified, the value defaults to `HMAC SHA256`. + example: HMACSHA256 + key: + type: string + description: The key used to sign the webhook + example: public-signing-key \ No newline at end of file diff --git a/nas_spec/components/schemas/Flow/workflows/actions/workflow-action.yaml b/nas_spec/components/schemas/Flow/workflows/actions/workflow-action.yaml new file mode 100644 index 000000000..713f054bf --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/actions/workflow-action.yaml @@ -0,0 +1,15 @@ +type: object +description: The workflow action +discriminator: + propertyName: type + mapping: + webhook: '#/components/schemas/webhook-action' + #email: '#/components/schemas/email-action' + #simulator: '#/components/schemas/simulator-action' +required: + - type +properties: + type: + type: string + description: The type of workflow action + example: webhook \ No newline at end of file diff --git a/nas_spec/components/schemas/Flow/workflows/add-update-workflow-action-request.yaml b/nas_spec/components/schemas/Flow/workflows/add-update-workflow-action-request.yaml new file mode 100644 index 000000000..02233cfe2 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/add-update-workflow-action-request.yaml @@ -0,0 +1,21 @@ +type: object +description: The workflow action +discriminator: + propertyName: type + mapping: + webhook: '#/components/schemas/webhook-action' + #email: '#/components/schemas/email-action' + #simulator: '#/components/schemas/simulator-action' +required: + - type +properties: + type: + type: string + description: The type of workflow action + example: webhook +example: + { + 'type': 'webhook', + 'url': 'https://example.com/webhooks', + 'headers': { 'Authorization': '' }, + } diff --git a/nas_spec/components/schemas/Flow/workflows/add-update-workflow-condition-request.yaml b/nas_spec/components/schemas/Flow/workflows/add-update-workflow-condition-request.yaml new file mode 100644 index 000000000..fbc094d27 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/add-update-workflow-condition-request.yaml @@ -0,0 +1,26 @@ +type: object +description: The workflow condition +discriminator: + propertyName: type + mapping: + event: '#/components/schemas/event-condition' + entity: '#/components/schemas/entity-condition' + processing-channel: '#/components/schemas/processing-channel-condition' +required: + - type +properties: + type: + type: string + description: The type of the workflow condition + example: event +example: + { + "type": "event", + "events": { + "gateway": [ + "payment_approved", + "payment_pending", + "payment_declined" + ] + } + } \ No newline at end of file diff --git a/nas_spec/components/schemas/Flow/workflows/add-workflow-action-response.yaml b/nas_spec/components/schemas/Flow/workflows/add-workflow-action-response.yaml new file mode 100644 index 000000000..74a6d2952 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/add-workflow-action-response.yaml @@ -0,0 +1,8 @@ +type: object +properties: + id: + type: string + description: The workflow action identifier + example: wfa_wlu3wxc26jounofs5iez75qaqa + _links: + $ref: '#/components/schemas/workflow-action-links' diff --git a/nas_spec/components/schemas/Flow/workflows/add-workflow-condition-response.yaml b/nas_spec/components/schemas/Flow/workflows/add-workflow-condition-response.yaml new file mode 100644 index 000000000..e149f23dd --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/add-workflow-condition-response.yaml @@ -0,0 +1,8 @@ +type: object +properties: + id: + type: string + description: The workflow condition identifier + example: wfc_wlu3wxc26jounofs5iez75qaqa + _links: + $ref: '#/components/schemas/workflow-condition-links' diff --git a/nas_spec/components/schemas/Flow/workflows/add-workflow-request.yaml b/nas_spec/components/schemas/Flow/workflows/add-workflow-request.yaml new file mode 100644 index 000000000..4648b41ea --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/add-workflow-request.yaml @@ -0,0 +1,72 @@ +type: object +properties: + name: + type: string + description: A name you can use to describe your workflow + example: Webhooks workflow + active: + type: boolean + description: Indicates whether the workflow is currently active + default: true + example: true + conditions: + type: array + description: Only one condition of the same type is permitted + minItems: 1 + items: + $ref: '#/components/schemas/workflow-condition' + actions: + type: array + description: One or more workflow actions + minItems: 1 + items: + $ref: '#/components/schemas/workflow-action' +example: + { + 'name': 'Webhooks workflow', + 'active': true, + 'conditions': + [ + { + 'type': 'event', + 'events': + { + 'gateway': + [ + 'payment_approved', + 'payment_declined', + 'card_verification_declined', + 'card_verified', + 'payment_authorization_incremented', + 'payment_authorization_increment_declined', + 'payment_capture_declined', + 'payment_captured', + 'payment_refund_declined', + 'payment_refunded', + 'payment_void_declined', + 'payment_voided', + ], + 'dispute': + [ + 'dispute_canceled', + 'dispute_evidence_required', + 'dispute_expired', + 'dispute_lost', + 'dispute_resolved', + 'dispute_won', + ], + }, + }, + { 'type': 'entity', 'entities': [ 'ent_xyfdshfudosfdshfdiosfds', 'ent_fidjosfjdisofdjsifdosfu' ] }, + { 'type': 'processing_channel', 'processing_channels': [ 'pc_axclravnqf5u5ejkweijnp5zc4' ] }, + ], + 'actions': + [ + { + 'type': 'webhook', + 'url': 'https://example.com/webhooks', + 'headers': { 'Authorization': '' }, + 'signature': { 'method': 'HMACSHA256', 'key': '8V8x0dLK%AyD*DNS8JJr' }, + }, + ], + } diff --git a/nas_spec/components/schemas/Flow/workflows/add-workflow-response.yaml b/nas_spec/components/schemas/Flow/workflows/add-workflow-response.yaml new file mode 100644 index 000000000..95d62770b --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/add-workflow-response.yaml @@ -0,0 +1,8 @@ +type: object +properties: + id: + type: string + description: The workflow identifier + example: wf_wlu3wxc26jounofs5iez75qaqa + _links: + $ref: '#/components/schemas/workflow-links' diff --git a/nas_spec/components/schemas/Flow/workflows/conditions/entity-condition.yaml b/nas_spec/components/schemas/Flow/workflows/conditions/entity-condition.yaml new file mode 100644 index 000000000..89d94cf36 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/conditions/entity-condition.yaml @@ -0,0 +1,12 @@ +type: object +description: The condition that filters, based on the NAS entity. It does not apply to MBC accounts. +required: + - entities +allOf: + - $ref: '#/components/schemas/workflow-condition' + - type: object + required: + - entities + properties: + entities: + $ref: '#/components/schemas/source-entity-hashmap' diff --git a/nas_spec/components/schemas/Flow/workflows/conditions/event-condition.yaml b/nas_spec/components/schemas/Flow/workflows/conditions/event-condition.yaml new file mode 100644 index 000000000..d5d92233b --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/conditions/event-condition.yaml @@ -0,0 +1,12 @@ +type: object +description: Condition that enables a source +required: + - events +allOf: + - $ref: '#/components/schemas/workflow-condition' + - type: object + required: + - events + properties: + events: + $ref: '#/components/schemas/source-events-hashmap' diff --git a/nas_spec/components/schemas/Flow/workflows/conditions/get-entity-condition.yaml b/nas_spec/components/schemas/Flow/workflows/conditions/get-entity-condition.yaml new file mode 100644 index 000000000..06f4f61e2 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/conditions/get-entity-condition.yaml @@ -0,0 +1,14 @@ +type: object +description: Condition that filters based on the entity +required: + - entities +allOf: + - $ref: '#/components/schemas/get-workflow-condition' + - type: object + required: + - entities + properties: + entities: + $ref: '#/components/schemas/source-entity-hashmap' + _links: + $ref: '#/components/schemas/workflow-condition-links' diff --git a/nas_spec/components/schemas/Flow/workflows/conditions/get-event-condition.yaml b/nas_spec/components/schemas/Flow/workflows/conditions/get-event-condition.yaml new file mode 100644 index 000000000..d6318ecbf --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/conditions/get-event-condition.yaml @@ -0,0 +1,14 @@ +type: object +description: Condition that enables a source +required: + - events +allOf: + - $ref: '#/components/schemas/get-workflow-condition' + - type: object + required: + - events + properties: + events: + $ref: '#/components/schemas/source-events-hashmap' + _links: + $ref: '#/components/schemas/workflow-condition-links' diff --git a/nas_spec/components/schemas/Flow/workflows/conditions/get-processing-channel-condition.yaml b/nas_spec/components/schemas/Flow/workflows/conditions/get-processing-channel-condition.yaml new file mode 100644 index 000000000..b62cff8dd --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/conditions/get-processing-channel-condition.yaml @@ -0,0 +1,14 @@ +type: object +description: Condition that filters based on the processing channel +required: + - processing_channels +allOf: + - $ref: '#/components/schemas/get-workflow-condition' + - type: object + required: + - processing_channels + properties: + processing_channels: + $ref: '#/components/schemas/source-processing-channel-hashmap' + _links: + $ref: '#/components/schemas/workflow-condition-links' diff --git a/nas_spec/components/schemas/Flow/workflows/conditions/get-workflow-condition.yaml b/nas_spec/components/schemas/Flow/workflows/conditions/get-workflow-condition.yaml new file mode 100644 index 000000000..790225161 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/conditions/get-workflow-condition.yaml @@ -0,0 +1,20 @@ +type: object +description: The get workflow condition +discriminator: + propertyName: type + mapping: + event: '#/components/schemas/get-event-condition' + entity: '#/components/schemas/get-entity-condition' + processing_channel: '#/components/schemas/get-processing-channel-condition' +required: + - id + - type +properties: + id: + type: string + description: The workflow condition identifier + example: wfc_tisekcawefze3l27uaai6hz74y + type: + type: string + description: The type of the workflow condition + example: event diff --git a/nas_spec/components/schemas/Flow/workflows/conditions/patch-entity-condition.yaml b/nas_spec/components/schemas/Flow/workflows/conditions/patch-entity-condition.yaml new file mode 100644 index 000000000..8be88d554 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/conditions/patch-entity-condition.yaml @@ -0,0 +1,12 @@ +type: object +description: The condition that filters, based on the NAS entity. It does not apply to MBC accounts. +required: + - entities +allOf: + - $ref: '#/components/schemas/patch-workflow-condition' + - type: object + required: + - entities + properties: + entities: + $ref: '#/components/schemas/source-entity-hashmap' diff --git a/nas_spec/components/schemas/Flow/workflows/conditions/patch-event-condition.yaml b/nas_spec/components/schemas/Flow/workflows/conditions/patch-event-condition.yaml new file mode 100644 index 000000000..b7d358148 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/conditions/patch-event-condition.yaml @@ -0,0 +1,12 @@ +type: object +description: The condition that enables a source +required: + - events +allOf: + - $ref: '#/components/schemas/patch-workflow-condition' + - type: object + required: + - events + properties: + events: + $ref: '#/components/schemas/source-events-hashmap' diff --git a/nas_spec/components/schemas/Flow/workflows/conditions/patch-processing-channel-condition.yaml b/nas_spec/components/schemas/Flow/workflows/conditions/patch-processing-channel-condition.yaml new file mode 100644 index 000000000..43254e7c1 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/conditions/patch-processing-channel-condition.yaml @@ -0,0 +1,12 @@ +type: object +description: The condition that filters, based on the NAS processing channel. It does not apply to MBC accounts. +required: + - processing_channels +allOf: + - $ref: '#/components/schemas/patch-workflow-condition' + - type: object + required: + - processing_channels + properties: + processing_channels: + $ref: '#/components/schemas/source-processing-channel-hashmap' diff --git a/nas_spec/components/schemas/Flow/workflows/conditions/patch-workflow-condition.yaml b/nas_spec/components/schemas/Flow/workflows/conditions/patch-workflow-condition.yaml new file mode 100644 index 000000000..4641b4572 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/conditions/patch-workflow-condition.yaml @@ -0,0 +1,20 @@ +type: object +description: The workflow condition +discriminator: + propertyName: type + mapping: + event: '#/components/schemas/patch-event-condition' + entity: '#/components/schemas/patch-entity-condition' + processing_channel: '#/components/schemas/patch-processing-channel-condition' +required: + - id + - type +properties: + id: + type: string + description: The workflow condition identifier + example: wfc_tisekcawefze3l27uaai6hz74e + type: + type: string + description: The type of the workflow condition + example: event diff --git a/nas_spec/components/schemas/Flow/workflows/conditions/processing-channel-condition.yaml b/nas_spec/components/schemas/Flow/workflows/conditions/processing-channel-condition.yaml new file mode 100644 index 000000000..d6842e322 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/conditions/processing-channel-condition.yaml @@ -0,0 +1,12 @@ +type: object +description: Condition that filters based on the NAS processing channel. It's not applicable for MBC accounts +required: + - processing_channels +allOf: + - $ref: '#/components/schemas/workflow-condition' + - type: object + required: + - processing-channels + properties: + processing_channels: + $ref: '#/components/schemas/source-processing-channel-hashmap' diff --git a/nas_spec/components/schemas/Flow/workflows/conditions/source-entity-hashmap.yaml b/nas_spec/components/schemas/Flow/workflows/conditions/source-entity-hashmap.yaml new file mode 100644 index 000000000..c14caa333 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/conditions/source-entity-hashmap.yaml @@ -0,0 +1,9 @@ +type: array +items: + type: string +minItems: 1 +pattern: ^ent_[a-z0-9]{26}$ +description: ent_axclravnqf5u5ejkweijnp5zc4 +example: + - ent_axclravnqf5u5ejkweijnp5zc4 + - ent_fidjosfjdisofdjsifdosfuzc4 diff --git a/nas_spec/components/schemas/Flow/workflows/conditions/source-processing-channel-hashmap.yaml b/nas_spec/components/schemas/Flow/workflows/conditions/source-processing-channel-hashmap.yaml new file mode 100644 index 000000000..078c6d74d --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/conditions/source-processing-channel-hashmap.yaml @@ -0,0 +1,7 @@ +type: array +minItems: 1 +pattern: ^pc_[a-z2-7]{26}$ +description: pc_axclravnqf5u5ejkweijnp5zc4 +example: + - pc_axclravnqf5u5ejkweijnp5zc4 + - pc_aascravnas5u5ejkseijnp9zc2 \ No newline at end of file diff --git a/nas_spec/components/schemas/Flow/workflows/conditions/workflow-condition.yaml b/nas_spec/components/schemas/Flow/workflows/conditions/workflow-condition.yaml new file mode 100644 index 000000000..c910e225e --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/conditions/workflow-condition.yaml @@ -0,0 +1,15 @@ +type: object +description: The workflow condition +discriminator: + propertyName: type + mapping: + event: '#/components/schemas/event-condition' + entity: '#/components/schemas/entity-condition' + processing_channel: '#/components/schemas/processing-channel-condition' +required: + - type +properties: + type: + type: string + description: The type of the workflow condition + example: event diff --git a/nas_spec/components/schemas/Flow/workflows/get-all-workflows-response.yaml b/nas_spec/components/schemas/Flow/workflows/get-all-workflows-response.yaml new file mode 100644 index 000000000..0d94b5ca1 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/get-all-workflows-response.yaml @@ -0,0 +1,22 @@ +type: object +properties: + data: + type: array + items: + type: object + properties: + id: + type: string + pattern: ^wf_[a-z0-9]{26}$ + description: The unique identifier of the workflow + example: wf_wlu3wxc26jounofs5iez75qaqa + name: + type: string + description: The name of your workflow + example: Webhooks workflow + active: + type: boolean + description: Indicates whether the workflow is currently active + example: true + _links: + $ref: '#/components/schemas/workflow-links' diff --git a/nas_spec/components/schemas/Flow/workflows/get-workflow-response.yaml b/nas_spec/components/schemas/Flow/workflows/get-workflow-response.yaml new file mode 100644 index 000000000..61820bb56 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/get-workflow-response.yaml @@ -0,0 +1,91 @@ +type: object +properties: + id: + type: string + description: The workflow identifier + example: wf_34pacj7ae6wexju4avpecxvp6e + name: + type: string + description: A name you can use to describe your workflow + example: Webhooks workflow + active: + type: boolean + description: Indicates whether the workflow is currently active + example: true + conditions: + type: array + description: One or more workflow conditions + minItems: 1 + items: + $ref: '#/components/schemas/get-workflow-condition' + actions: + type: array + description: One or more workflow actions + minItems: 1 + items: + $ref: '#/components/schemas/get-workflow-action' + _links: + $ref: '#/components/schemas/workflow-links' +example: + { + 'id': 'wf_34pacj7ae6wexju4avpecxvp6e', + 'name': 'Webhooks workflow', + 'active': true, + 'conditions': + [ + { + 'id': 'wfc_tisekcawefze3l27uaai6hz74e', + 'type': 'event', + 'events': { 'gateway': ['payment_approved', 'payment_pending', 'payment_declined'] }, + '_links': + { + 'self': + { + 'href': 'https://api.checkout.com/workflows/wf_34pacj7ae6wexju4avpecxvp6e/conditions/wfc_tisekcawefze3l27uaai6hz74e', + }, + }, + }, + { + 'id': 'wfc_tisekcawefze3l27uaai6hz74y', + 'type': 'entity', + 'entities': ['ent_xyfdshfudosfdshfdiosfds', 'ent_fidjosfjdisofdjsifdosfu'], + '_links': + { + 'self': + { + 'href': 'https://api.checkout.com/workflows/wf_34pacj7ae6wexju4avpecxvp6e/conditions/wfc_tisekcawefze3l27uaai6hz74y', + }, + }, + }, + { + 'id': 'wfc_tisekcawefze3l27uaai6hz26y', + 'type': 'processing_channel', + 'processing_channels': ['pc_axclravnqf5u5ejkweijnp5zc4'], + '_links': + { + 'self': + { + 'href': 'https://api.checkout.com/workflows/wf_34pacj7ae6wexju4avpecxvp6e/conditions/wfc_tisekcawefze3l27uaai6hz26y', + }, + }, + }, + ], + 'actions': + [ + { + 'id': 'wfa_itja4x7zgzye3andzqq62u4hvq', + 'type': 'webhook', + 'url': 'https://example.com/webhooks', + 'headers': { 'Authorization': '' }, + 'signature': { 'method': 'HMACSHA256', 'key': '8V8x0dLK%AyD*DNS8JJr' }, + '_links': + { + 'self': + { + 'href': 'https://api.checkout.com/workflows/wf_34pacj7ae6wexju4avpecxvp6e/actions/wfa_itja4x7zgzye3andzqq62u4hvq', + }, + }, + }, + ], + '_links': { 'self': { 'href': 'https://api.checkout.com/workflows/wf_wlu3wxc26jounofs5iez75qaqa' } }, + } diff --git a/nas_spec/components/schemas/Flow/workflows/patch-workflow-request.yaml b/nas_spec/components/schemas/Flow/workflows/patch-workflow-request.yaml new file mode 100644 index 000000000..ba10c5f00 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/patch-workflow-request.yaml @@ -0,0 +1,59 @@ +type: object +properties: + name: + type: string + description: A name to describe the workflow + example: Webhooks workflow + active: + type: boolean + description: Indicates whether the workflow is currently active + example: true + conditions: + type: array + description: One or more workflow conditions + minItems: 1 + items: + $ref: '#/components/schemas/workflow-condition' + actions: + type: array + description: One or more workflow actions + minItems: 1 + items: + $ref: '#/components/schemas/patch-workflow-action' +example: + { + "name": "Webhooks workflow", + "active": true, + "conditions": + [ + { + "type": "event", + "events": + { + "gateway": + ["payment_approved", "payment_pending", "payment_declined"], + } + }, + { + "type": "entity", + "entities": + ["ent_xyfdshfudosfdshfdiosfds", "ent_fidjosfjdisofdjsifdosfu"] + }, + { + "type": "processing_channel", + "processing_channels": ["pc_axclravnqf5u5ejkweijnp5zc4"] + } + ], + "actions": + [ + { + "workflow_action_id": "wfa_itja4x7zgzye3andzqq62u4hvq", + "type": "webhook", + "url": "https://example.com/webhooks", + "headers": + { "Authorization": '' }, + "signature": + { "method": "HMACSHA256", "key": "8V8x0dLK%AyD*DNS8JJr" } + } + ] + } diff --git a/nas_spec/components/schemas/Flow/workflows/patch-workflow-response.yaml b/nas_spec/components/schemas/Flow/workflows/patch-workflow-response.yaml new file mode 100644 index 000000000..85308cad3 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/patch-workflow-response.yaml @@ -0,0 +1,76 @@ +type: object +properties: + id: + type: string + description: The workflow identifier + example: wf_c7svxlvo2bbuva4f6s3xu4f7wm + name: + type: string + description: A name you can use to describe your workflow + example: Webhooks workflow + active: + type: boolean + description: Indicates whether the workflow is currently active + example: true + conditions: + type: array + description: One or more workflow conditions + minItems: 1 + items: + $ref: '#/components/schemas/patch-workflow-condition' + actions: + type: array + description: One or more workflow actions + minItems: 1 + items: + $ref: '#/components/schemas/patch-response-workflow-action' + _links: + $ref: '#/components/schemas/workflow-links' +example: + { + "id": "wf_c7svxlvo2bbuva4f6s3xu4f7wm", + "name": "Webhooks workflow", + "active": true, + "conditions": + [ + { + "id": "wfc_tisekcawefze3l27uaai6hz74e", + "type": "event", + "events": + { + "gateway": + ["payment_approved", "payment_pending", "payment_declined"], + } + }, + { + "id": "wfc_tisekcawefze3l27uaai6hz74y", + "type": "entity", + "entities": + ["ent_xyfdshfudosfdshfdiosfds", "ent_fidjosfjdisofdjsifdosfu"] + }, + { + "id": "wfc_tisekcawefze3l27uaai6hz26y", + "type": "processing_channel", + "processing_channels": ["pc_axclravnqf5u5ejkweijnp5zc4"] + } + ], + "actions": + [ + { + "id": "wfa_itja4x7zgzye3andzqq62u4hvq", + "type": "webhook", + "url": "https://example.com/webhooks", + "headers": + { "Authorization": '' }, + "signature": + { "method": "HMACSHA256", "key": "8V8x0dLK%AyD*DNS8JJr" } + } + ], + "_links": + { + "self": + { + "href": "http://flow.cko.lon/client/workflows/wf_c7svxlvo2bbuva4f6s3xu4f7wm", + } + } + } diff --git a/nas_spec/components/schemas/Flow/workflows/properties/workflow-action-links.yaml b/nas_spec/components/schemas/Flow/workflows/properties/workflow-action-links.yaml new file mode 100644 index 000000000..e47f9e07a --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/properties/workflow-action-links.yaml @@ -0,0 +1,12 @@ +type: object +description: Links related to the workflow action +minItems: 1 +properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the workflow action +example: + self: + href: 'https://api.checkout.com/workflows/wf_wlu3wxc26jounofs5iez75qaqa/actions/wfa_wlu3wxc26jounofs5iez75qaqa' diff --git a/nas_spec/components/schemas/Flow/workflows/properties/workflow-condition-links.yaml b/nas_spec/components/schemas/Flow/workflows/properties/workflow-condition-links.yaml new file mode 100644 index 000000000..a0c2300f0 --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/properties/workflow-condition-links.yaml @@ -0,0 +1,12 @@ +type: object +description: Links related to the workflow condition +minItems: 1 +properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the workflow condition +example: + self: + href: 'https://api.checkout.com/workflows/wf_wlu3wxc26jounofs5iez75qaqa/conditions/wfc_wlu3wxc26jounofs5iez75qaqa' diff --git a/nas_spec/components/schemas/Flow/workflows/properties/workflow-links.yaml b/nas_spec/components/schemas/Flow/workflows/properties/workflow-links.yaml new file mode 100644 index 000000000..bb829ea7a --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/properties/workflow-links.yaml @@ -0,0 +1,14 @@ +type: object +description: Links related to the workflow +minItems: 1 +required: + - self +properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the workflow +example: + self: + href: 'https://api.checkout.com/workflows/wf_wlu3wxc26jounofs5iez75qaqa' diff --git a/nas_spec/components/schemas/Flow/workflows/test-workflow-request.yaml b/nas_spec/components/schemas/Flow/workflows/test-workflow-request.yaml new file mode 100644 index 000000000..279aeaf4c --- /dev/null +++ b/nas_spec/components/schemas/Flow/workflows/test-workflow-request.yaml @@ -0,0 +1,31 @@ +type: object +properties: + event_types: + type: array + items: + type: string + description: Event types for which the workflow will execute +example: + { + 'event_types': + [ + 'payment_approved', + 'payment_declined', + 'card_verification_declined', + 'card_verified', + 'payment_authorization_incremented', + 'payment_authorization_increment_declined', + 'payment_capture_declined', + 'payment_captured', + 'payment_refund_declined', + 'payment_refunded', + 'payment_void_declined', + 'payment_voided', + 'dispute_canceled', + 'dispute_evidence_required', + 'dispute_expired', + 'dispute_lost', + 'dispute_resolved', + 'dispute_won', + ], + } diff --git a/nas_spec/components/schemas/Forex/ForexRate.yaml b/nas_spec/components/schemas/Forex/ForexRate.yaml new file mode 100644 index 000000000..de4733eb2 --- /dev/null +++ b/nas_spec/components/schemas/Forex/ForexRate.yaml @@ -0,0 +1,11 @@ +type: object +properties: + exchange_rate: + description: The FX rate with Checkout.com margin applied. Up to eight decimal places provided in response. + type: number + format: double + example: '1.14208777' + currency_pair: + description: Currency pair + type: string + example: 'GBPUSD' \ No newline at end of file diff --git a/nas_spec/components/schemas/Forex/ForexRatesResponse.yaml b/nas_spec/components/schemas/Forex/ForexRatesResponse.yaml new file mode 100644 index 000000000..e3389539d --- /dev/null +++ b/nas_spec/components/schemas/Forex/ForexRatesResponse.yaml @@ -0,0 +1,31 @@ +type: object +properties: + product: + $ref: '#/components/schemas/ForexProduct' + source: + $ref: '#/components/schemas/ForexSource' + rates: + description: List of FX rates with Checkout.com margin applied + type: array + items: + $ref: '#/components/schemas/ForexRate' + invalid_currency_pairs: + description: List of currency pairs that Checkout.com was unable to provide rates for + type: array + items: + type: string + description: Currency pair + example: + - XXX + - AAA + - ZZZ +example: + product: card_payouts + source: visa + rates: + - exchange_rate: 1.14208777 + currency_pair: GBPEUR + - exchange_rate: 0.83708142 + currency_pair: USDGBP + invalid_currency_pairs: + - XXXAAA \ No newline at end of file diff --git a/nas_spec/components/schemas/Forex/properties/ForexProcessingChannelId.yaml b/nas_spec/components/schemas/Forex/properties/ForexProcessingChannelId.yaml new file mode 100644 index 000000000..3bb00b30d --- /dev/null +++ b/nas_spec/components/schemas/Forex/properties/ForexProcessingChannelId.yaml @@ -0,0 +1,4 @@ +type: string +pattern: "^(pc)_(\\w{26})$" +description: The processing channel identifier +example: pc_vxt6yftthv4e5flqak6w2i7rim \ No newline at end of file diff --git a/nas_spec/components/schemas/Forex/properties/ForexProduct.yaml b/nas_spec/components/schemas/Forex/properties/ForexProduct.yaml new file mode 100644 index 000000000..fbeeb77bd --- /dev/null +++ b/nas_spec/components/schemas/Forex/properties/ForexProduct.yaml @@ -0,0 +1,5 @@ +type: string +enum: + - card_payouts +description: The Checkout.com Forex product to return rates for +example: 'card_payouts' diff --git a/nas_spec/components/schemas/Forex/properties/ForexSource.yaml b/nas_spec/components/schemas/Forex/properties/ForexSource.yaml new file mode 100644 index 000000000..794c49b22 --- /dev/null +++ b/nas_spec/components/schemas/Forex/properties/ForexSource.yaml @@ -0,0 +1,6 @@ +type: string +enum: + - visa + - mastercard +description: The source of provided rates +example: 'visa' diff --git a/nas_spec/components/schemas/Forex/properties/QuoteId.yaml b/nas_spec/components/schemas/Forex/properties/QuoteId.yaml new file mode 100644 index 000000000..9e0c4e40c --- /dev/null +++ b/nas_spec/components/schemas/Forex/properties/QuoteId.yaml @@ -0,0 +1,6 @@ +type: string +pattern: "^(qte)_(\\w{26})$" +description: The FX quote identifier +maxLength: 30 +minLength: 30 +example: 'qte_mbabizu24mvu3mela5njyhpit4' diff --git a/nas_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse.yaml b/nas_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse.yaml new file mode 100644 index 000000000..8297c9ccf --- /dev/null +++ b/nas_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse.yaml @@ -0,0 +1,134 @@ +type: object +discriminator: + propertyName: status + mapping: + Payment Pending: '#/components/schemas/GetHostedPaymentsResponseStatusPaymentPending' + Payment Received: '#/components/schemas/GetHostedPaymentsResponseStatusPaymentReceived' + Expired: '#/components/schemas/GetHostedPaymentsResponseStatusExpired' + +required: + - id + - status + - amount + - currency + - billing + - success_url + - cancel_url + - failure_url + - _links + +properties: + id: + example: hpp_xGQBg0AXl3cM + allOf: + - $ref: '#/components/schemas/HostedPaymentId' + status: + type: string + enum: + - Payment Pending + - Payment Received + - Expired + description: | + The status of the Hosted Payments Page: + - `Payment Pending`: The Hosted Payments Page can accept a payment from the customer. A payment may have been attempted by the customer but not completed successfully. + - `Payment Received`: A payment has been received successfully using this Hosted Payments Page. + - `Expired`: The Hosted Payments Page has expired and can no longer be accessed. + example: Payment Pending + payment_id: + type: string + description: Unique identifier for an in progress or completed payment for this Payment Link. + example: + amount: + type: integer + description: The original payment amount. + example: 100 + currency: + type: string + description: The three-letter ISO currency code of the payment.
+ example: GBP + reference: + type: string + description: Your reference for the payment. + example: ORD-123A + description: + type: string + description: A description of the payment. + example: Payment for Gold Necklace + customer: + type: object + description: The customer's details. + properties: + email: + type: string + format: email + description: The email address for the customer. + example: brucewayne@email.com + name: + type: string + description: The customer's name. + example: Bruce Wayne + billing: + type: object + additionalProperties: false + description: The billing details. + required: + - address + properties: + address: + type: object + description: The billing address. + required: + - country + allOf: + - $ref: '#/components/schemas/Address' + phone: + type: object + description: The customer's phone number. + required: + - number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + products: + type: array + description: Details about the provided products. + items: + type: object + additionalProperties: false + required: + - name + - price + properties: + name: + type: string + description: Descriptive item name. + example: Gold Necklace + quantity: + type: integer + description: The item quantity + example: 1 + price: + type: integer + description: Minor units. Includes tax, excludes discounts. + example: 200 + metadata: + type: object + description: Any additional information stored at the point of creation. + additionalProperties: true + success_url: + type: string + format: uri + description: The provided URL your customer will be redirected to upon a successful payment. + example: https://example.com/success + cancel_url: + type: string + format: uri + description: The provided URL your customer will be redirected to if the payment is cancelled. + example: https://example.com/cancel + failure_url: + type: string + format: uri + description: The provided URL your customer will be redirected to upon a failed payment. + example: https://example.com/failure + amount_allocations: + allOf: + - $ref: '#/components/schemas/AmountAllocations' diff --git a/nas_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseLinks.yaml b/nas_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseLinks.yaml new file mode 100644 index 000000000..392bcc388 --- /dev/null +++ b/nas_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseLinks.yaml @@ -0,0 +1,32 @@ +type: object +description: The links related to the Hosted Payments Page. +minItems: 2 +required: + - self + - redirect +properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the Hosted Payments Page details. + redirect: + type: object + description: The link to visit the Hosted Payments Page. + allOf: + - $ref: '#/components/schemas/Link' + payment: + type: object + description: The URI of the in progress or completed payment for this Hosted Payments Page. + allOf: + - $ref: '#/components/schemas/Link' + payment_actions: + type: object + description: The URI of the actions associated with the in progress or completed payment for this Hosted Payments Page. + allOf: + - $ref: '#/components/schemas/Link' +example: + self: + href: 'https://api.sandbox.checkout.com/hosted-payments/hpp_xGQBg0AXl3cM' + redirect: + href: 'https://pay.sandbox.checkout.com/page/hpp_xGQBg0AXl3cM' diff --git a/nas_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseStatusExpired.yaml b/nas_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseStatusExpired.yaml new file mode 100644 index 000000000..f1044ff0a --- /dev/null +++ b/nas_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseStatusExpired.yaml @@ -0,0 +1,9 @@ +type: object +description: An expired Hosted Payments Page. +allOf: + - $ref: '#/components/schemas/GetHostedPaymentsResponse' + - type: object + properties: + _links: + allOf: + - $ref: '#/components/schemas/GetHostedPaymentsResponseLinks' diff --git a/nas_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseStatusPaymentPending.yaml b/nas_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseStatusPaymentPending.yaml new file mode 100644 index 000000000..a82c83b51 --- /dev/null +++ b/nas_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseStatusPaymentPending.yaml @@ -0,0 +1,9 @@ +type: object +description: A Hosted Payments Page that can accept a payment from a customer. +allOf: + - $ref: '#/components/schemas/GetHostedPaymentsResponse' + - type: object + properties: + _links: + allOf: + - $ref: '#/components/schemas/GetHostedPaymentsResponseLinks' diff --git a/nas_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseStatusPaymentReceived.yaml b/nas_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseStatusPaymentReceived.yaml new file mode 100644 index 000000000..003d92e15 --- /dev/null +++ b/nas_spec/components/schemas/HostedPayments/GetHostedPaymentsResponse/GetHostedPaymentsResponseStatusPaymentReceived.yaml @@ -0,0 +1,25 @@ +type: object +description: A Hosted Payments Page that has received a payment +required: + - payment_id +allOf: + - $ref: '#/components/schemas/GetHostedPaymentsResponse' + - type: object + properties: + payment_id: + example: pay_m3s3k65cfpl2hd2rv4by4vl4r4 + _links: + required: + - payment + - payment_actions + allOf: + - $ref: '#/components/schemas/GetHostedPaymentsResponseLinks' + example: + self: + href: https://api.sandbox.checkout.com/hosted-payments/hpp_xGQBg0AXl3cM + redirect: + href: https://pay.sandbox.checkout.com/page/hpp_xGQBg0AXl3cM + payment: + href: https://api.sandbox.checkout.com/payments/pay_m3s3k65cfpl2hd2rv4by4vl4r4 + payment_actions: + href: https://api.sandbox.checkout.com/payments/pay_m3s3k65cfpl2hd2rv4by4vl4r4/actions diff --git a/nas_spec/components/schemas/HostedPayments/HostedPaymentId.yaml b/nas_spec/components/schemas/HostedPayments/HostedPaymentId.yaml new file mode 100644 index 000000000..851f62ca4 --- /dev/null +++ b/nas_spec/components/schemas/HostedPayments/HostedPaymentId.yaml @@ -0,0 +1,5 @@ +type: string +pattern: '^hpp_[A-Za-z0-9_-]{12}$' +description: The unique identifier for a Hosted Payments Page. +maxLength: 16 +minLength: 16 diff --git a/nas_spec/components/schemas/HostedPayments/HostedPaymentsRequest.yaml b/nas_spec/components/schemas/HostedPayments/HostedPaymentsRequest.yaml new file mode 100644 index 000000000..5c6b476dd --- /dev/null +++ b/nas_spec/components/schemas/HostedPayments/HostedPaymentsRequest.yaml @@ -0,0 +1,280 @@ +type: object +required: + - currency + - billing + - success_url + - cancel_url + - failure_url +properties: + amount: + type: integer + description: The payment amount. The exact format depends on the currency + minimum: 1 + example: 1000 + currency: + type: string + description: The three-letter ISO currency code of the payment + example: GBP + minLength: 3 + maxLength: 3 + payment_type: + type: string + description: This must be specified for card payments where the cardholder is not present (i.e., recurring or mail order / telephone order) + enum: + - Regular + - Recurring + default: Regular + payment_ip: + type: string + format: ipv4 + maxLength: 45 + description: The IP address used to make the payment. Used by our risk engine to check the customer's IP address – only accepts IPv4 addresses + billing_descriptor: + type: object + description: An optional description that is displayed on the customer's statement identifying a purchase + required: + - name + - city + properties: + name: + type: string + maxLength: 25 + description: A dynamic description of the change + city: + type: string + minLength: 1 + maxLength: 13 + description: The city from which the charge originated + reference: + type: string + maxLength: 50 + description: The reference shown on the statement. Required for payouts to bank accounts. + reference: + type: string + description: A reference you can later use to identify this payment, such as an order number.
For Amex, the string limit is 30 characters. + example: ORD-123A + maxLength: 50 + description: + type: string + description: A description of the payment + example: Payment for Gold Necklace + maxLength: 100 + processing_channel_id: + type: string + pattern: "^(pc)_(\\w{26})$" + description: The processing channel to be used for the payment + example: 'pc_q4dbxom5jbgudnjzjpz7j2z6uq' + amount_allocations: + allOf: + - $ref: '#/components/schemas/AmountAllocations' + customer: + type: object + description: The customer's details + properties: + email: + type: string + format: email + description: An optional email address to associate with the customer + example: brucewayne@email.com + maxLength: 255 + name: + type: string + description: The customer's name. This will only set the name for new customers + example: Bruce Wayne + maxLength: 255 + shipping: + type: object + description: The address any products are being sent to. + required: + - address + properties: + address: + type: object + description: The customer's address to ship to. + required: + - country + allOf: + - $ref: '#/components/schemas/Address' + phone: + type: object + description: The customer's phone number + required: + - number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + billing: + type: object + additionalProperties: false + description: The billing details + required: + - address + properties: + address: + type: object + description: The billing address + required: + - country + allOf: + - $ref: '#/components/schemas/Address' + phone: + type: object + description: The customer's phone number. This will override the phone number specified during tokenization + required: + - number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + recipient: + $ref: '#/components/schemas/PaymentRecipient' + processing: + type: object + description: Use the processing object to influence or override the data sent during card processing. + properties: + aft: + type: boolean + description: Indicates whether the payment is an [Account Funding Transaction](https://www.checkout.com/docs/payments/manage-payments/account-funding-transactions). + allow_payment_methods: + type: array + description: > + Use to specify which payment methods should render on the page. Check the requirements for each payment method + enum: + - card + - sofort + - ideal + - knet + - bancontact + - p24 + - eps + - multibanco + example: + - card + products: + type: array + description: Details about the products in the order + minItems: 1 + maxItems: 1000 + items: + type: object + additionalProperties: false + required: + - name + - quantity + - price + properties: + name: + type: string + description: Descriptive item name + example: Gold Necklace + quantity: + type: integer + description: The item quantity. Non-negative + minimum: 1 + example: 1 + price: + type: integer + description: 'Minor units. Includes tax, excludes discounts. The exact format depends on the currency' + minimum: 0 + example: 1000 + risk: + $ref: '#/components/schemas/RiskRequest' + success_url: + type: string + format: uri + description: For redirect payment methods, this overrides the default success redirect URL configured on your account + example: https://example.com/payments/success + maxLength: 255 + cancel_url: + type: string + format: uri + description: The URL to which the customer should be directed if they cancel the payment + example: https://example.com/payments/cancel + maxLength: 255 + failure_url: + type: string + format: uri + description: For redirect payment methods, this overrides the default failure redirect URL configured on your account + example: https://example.com/payments/failure + maxLength: 255 + metadata: + type: object + title: The Metadata Schema + description: Allows you to store additional information about the transaction. This object only allows one level of depth, so cannot accept non-primitive data types such as objects or arrays. + additionalProperties: true + locale: + type: string + description: Creates a translated version of the page in the specified language + enum: + - ar + - da-DK + - de-DE + - el + - en-GB + - es-ES + - fi-FI + - fil-PH + - fr-FR + - hi-IN + - id-ID + - it-IT + - ja-JP + - ms-MY + - nb-NO + - nl-NL + - pt-PT + - sv-SE + - th-TH + - vi-VN + - zh-CN + - zh-HK + - zh-TW + default: en-GB + 3ds: + type: object + description: Information required for 3D Secure payments + properties: + enabled: + type: boolean + description: Whether to process this payment as a 3D Secure payment + default: false + example: false + attempt_n3d: + type: boolean + description: Determines whether to attempt a 3D Secure payment as non-3D Secure should the card issuer not be enrolled + default: false + example: false + challenge_indicator: + type: string + description: Indicates the preference for whether or not a 3DS challenge should be performed. The customer’s bank has the final say on whether or not the customer receives the challenge. + enum: + - no_preference + - no_challenge_requested + - challenge_requested + - challenge_requested_mandate + default: no_preference + allow_upgrade: + type: boolean + default: true + description: Whether to process this payment as 3D Secure if the authorization was soft declined because 3DS authentication is required. + exemption: + type: string + enum: + - low_value + - secure_corporate_payment + - trusted_listing + - transaction_risk_assessment + - 3ds_outage + - sca_delegation + - out_of_sca_scope + - other + - low_risk_program + - recurring_operation + description: Specifies an exemption reason so that the payment is not processed using 3D Secure authentication. Learn more about exemptions in our SCA compliance guide. + capture: + type: boolean + description: Whether to capture the payment (if applicable). + example: true + capture_on: + description: | + A timestamp (ISO 8601 code) that determines when the payment should be captured. + Providing this field will automatically set `capture` to true. + allOf: + - $ref: '#/components/schemas/Timestamp' diff --git a/nas_spec/components/schemas/HostedPayments/HostedPaymentsResponse.yaml b/nas_spec/components/schemas/HostedPayments/HostedPaymentsResponse.yaml new file mode 100644 index 000000000..67f0bd1e7 --- /dev/null +++ b/nas_spec/components/schemas/HostedPayments/HostedPaymentsResponse.yaml @@ -0,0 +1,42 @@ +type: object +required: + - id + - _links +properties: + id: + example: 'hpp_xGQBg0AXl3cM' + allOf: + - $ref: '#/components/schemas/HostedPaymentId' + reference: + type: string + description: A reference you can later use to identify this payment, such as an order number. + example: ORD-5023-4E89 + warnings: + type: array + description: Related to the `allow_payment_methods` object in the request. Included in the response if an alternative payment method is passed through, but no card schemes are configured against the account. + _links: + type: object + description: The links related to the hosted payment. + readOnly: true + minItems: 1 + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + example: + href: 'https://api.sandbox.checkout.com/hosted-payments/hpp_xGQBg0AXl3cM' + redirect: + type: object + allOf: + - $ref: '#/components/schemas/Link' + example: + href: 'https://pay.sandbox.checkout.com/page/hpp_xGQBg0AXl3cM' +example: + id: 'hpp_xGQBg0AXl3cM' + reference: 'ORD-123A' + _links: + self: + href: 'https://api.sandbox.checkout.com/hosted-payments/hpp_xGQBg0AXl3cM' + redirect: + href: 'https://pay.sandbox.checkout.com/page/hpp_xGQBg0AXl3cM' diff --git a/nas_spec/components/schemas/IPAddress.yaml b/nas_spec/components/schemas/IPAddress.yaml new file mode 100644 index 000000000..2c300e503 --- /dev/null +++ b/nas_spec/components/schemas/IPAddress.yaml @@ -0,0 +1,4 @@ +type: string +format: ipv4 +maxLength: 45 +example: '90.197.169.245' diff --git a/nas_spec/components/schemas/Instruments/RetrieveBankAccountInstrumentResponse.yaml b/nas_spec/components/schemas/Instruments/RetrieveBankAccountInstrumentResponse.yaml new file mode 100644 index 000000000..75ae5195b --- /dev/null +++ b/nas_spec/components/schemas/Instruments/RetrieveBankAccountInstrumentResponse.yaml @@ -0,0 +1,80 @@ +type: object +description: Bank account details +required: + - type + - id + - fingerprint + - country + - currency +properties: + type: + description: The type of instrument + type: string + id: + description: The unique identifier of the payment source or destination that can be used later for payments + type: string + example: 'src_wmlfc3zyhqzehihu7giusaaawu' + + fingerprint: + type: string + description: A token that can uniquely identify this instrument across all customers + pattern: ^([a-z0-9]{26})$ + example: vnsdrvikkvre3dtrjjvlm5du4q + + account_type: + description: The type of account + type: string + enum: + - savings + - current + - cash + example: savings + + account_number: + description: Number (which can contain letters) that identifies the account + type: string + example: '13654567455' + + bank_code: + description: Code that identifies the bank + type: string + example: 123-456 + + branch_code: + description: Code that identifies the bank branch + type: string + example: '6443' + + iban: + description: Internationally agreed standard for identifying bank account + type: string + example: HU93116000060000000012345676 + + bban: + description: The combination of bank code and/or branch code and account number + type: string + example: 3704 0044 0532 0130 00 + + swift_bic: + description: 8 or 11 character code which identifies the bank or bank branch + type: string + example: '37040044' + + currency: + description: The three-letter ISO currency code of the account's currency + type: string + example: GBP + + country: + description: The two-letter ISO country code of where the account is based + type: string + example: GB + + account_holder: + $ref: '#/components/schemas/AccountHolder' + + bank: + $ref: '#/components/schemas/BankDetails' + + customer: + $ref: '#/components/schemas/RetrieveInstrumentCustomerResponse' diff --git a/nas_spec/components/schemas/Instruments/RetrieveCardInstrumentResponse.yaml b/nas_spec/components/schemas/Instruments/RetrieveCardInstrumentResponse.yaml new file mode 100644 index 000000000..b2cba3c6e --- /dev/null +++ b/nas_spec/components/schemas/Instruments/RetrieveCardInstrumentResponse.yaml @@ -0,0 +1,116 @@ +type: object +description: card instrument response +allOf: + - $ref: '#/components/schemas/RetrieveInstrumentResponse' +required: + - fingerprint + - expiry_month + - expiry_year + - last4 + - bin +properties: + type: + description: The underlying instrument type (for instruments created from Checkout.com tokens, this will reflect the type of instrument that was tokenized). + type: string + example: 'card' + id: + description: The unique identifier of the payment source or destination that can be used later for payments + type: string + example: 'src_wmlfc3zyhqzehihu7giusaaawu' + fingerprint: + type: string + description: A token that can uniquely identify this instrument across all customers + pattern: ^([a-z0-9]{26})$ + example: vnsdrvikkvre3dtrjjvlm5du4q + expiry_month: + type: integer + description: The expiry month + minimum: 1 + example: 6 + maxLength: 2 + expiry_year: + type: integer + description: The expiry year + example: 2025 + minLength: 4 + maxLength: 4 + name: + type: string + description: The name of the cardholder + example: 'John Test' + scheme: + type: string + description: The card scheme + example: 'VISA' + scheme_local: + type: string + description: The local co-branded card scheme + enum: + - cartes_bancaires + example: 'cartes_bancaires' + last4: + type: string + description: The last four digits of the card number + example: '9996' + minLength: 4 + maxLength: 4 + bin: + type: string + description: The card issuer's bank identification number (BIN) + example: '454347' + card_type: + type: string + description: The card type + enum: + - Credit + - Debit + - Prepaid + - Charge + example: Credit + card_category: + type: string + description: The card category + enum: + - Consumer + - Commercial + example: Consumer + issuer: + type: string + description: The name of the card issuer + example: 'GOTHAM STATE BANK' + issuer_country: + type: string + maxLength: 2 + minLength: 2 + description: The card issuer's country (two-letter ISO code) + example: 'US' + product_id: + type: string + description: The issuer/card scheme product identifier + example: 'F' + product_type: + type: string + description: The issuer/card scheme product type + example: CLASSIC + customer: + $ref: '#/components/schemas/RetrieveInstrumentCustomerResponse' + account_holder: + type: object + description: The account holder details + properties: + first_name: + description: The first name of the account holder + type: string + example: 'John' + last_name: + description: The last name of the account holder + type: string + example: 'Smith' + billing_address: + description: The billing address of the account holder + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The phone number of the account holder + allOf: + - $ref: '#/components/schemas/PhoneNumber' diff --git a/nas_spec/components/schemas/Instruments/RetrieveInstrumentResponse.yaml b/nas_spec/components/schemas/Instruments/RetrieveInstrumentResponse.yaml new file mode 100644 index 000000000..e3c513c9a --- /dev/null +++ b/nas_spec/components/schemas/Instruments/RetrieveInstrumentResponse.yaml @@ -0,0 +1,18 @@ +type: object +description: The response for type of instrument stored +required: + - type + - id +discriminator: + propertyName: type + mapping: + bank_account: '#/components/schemas/RetrieveBankAccountInstrumentResponse' + card: '#/components/schemas/RetrieveCardInstrumentResponse' +properties: + type: + description: The underlying instrument type + type: string + id: + description: The unique identifier of the payment source or destination that can be used later for payments + type: string + example: 'src_wmlfc3zyhqzehihu7giusaaawu' diff --git a/nas_spec/components/schemas/Instruments/StoreBankAccountInstrumentRequest.yaml b/nas_spec/components/schemas/Instruments/StoreBankAccountInstrumentRequest.yaml new file mode 100644 index 000000000..aec16c258 --- /dev/null +++ b/nas_spec/components/schemas/Instruments/StoreBankAccountInstrumentRequest.yaml @@ -0,0 +1,79 @@ +type: object +description: Store bank account details +allOf: + - $ref: '#/components/schemas/StoreInstrumentRequest' + - type: object +required: + - currency + - country +properties: + type: + description: The type of instrument. `bank_account` payment instruments only support payouts. + type: string + + account_type: + description: The type of account + type: string + enum: + - savings + - current + - cash + example: savings + + account_number: + description: Number (which can contain letters) that identifies the account + type: string + example: '13654567455' + + bank_code: + description: Code that identifies the bank + type: string + example: 123-456 + + branch_code: + description: Code that identifies the bank branch + type: string + example: '6443' + + iban: + description: Internationally agreed standard for identifying bank account + type: string + example: HU93116000060000000012345676 + + bban: + description: The combination of bank code and/or branch code and account number + type: string + example: 3704 0044 0532 0130 00 + + swift_bic: + description: 8 or 11 character code which identifies the bank or bank branch + type: string + example: '37040044' + + currency: + description: The three-letter ISO currency code of the account's currency + type: string + example: GBP + + country: + description: The two-letter ISO country code of where the account is based + type: string + example: GB + + processing_channel_id: + description: The ID of the primary processing channel this instrument is intended to be used for + type: string + example: pc_u2l6xz5joigedmk7g5vxzt7rqy + + account_holder: + $ref: '#/components/schemas/AccountHolder' + + bank: + $ref: '#/components/schemas/BankDetails' + + # intermediary_bank: + # $ref: "#/components/schemas/bank_account_intermediary_bank" + # description: Details of the intermediary bank + + customer: + $ref: '#/components/schemas/StoreCustomerInstrumentRequest' diff --git a/nas_spec/components/schemas/Instruments/StoreBankAccountInstrumentResponse.yaml b/nas_spec/components/schemas/Instruments/StoreBankAccountInstrumentResponse.yaml new file mode 100644 index 000000000..6307c916f --- /dev/null +++ b/nas_spec/components/schemas/Instruments/StoreBankAccountInstrumentResponse.yaml @@ -0,0 +1,40 @@ +type: object +description: Store bank account instrument response +allOf: + - $ref: '#/components/schemas/StoreInstrumentResponse' +required: + - fingerprint +properties: + type: + description: The underlying instrument type (for instruments created from Checkout.com tokens, this will reflect the type of instrument that was tokenized). + type: string + example: 'card' + id: + description: The unique identifier of the payment source or destination that can be used later for payments + type: string + example: 'src_wmlfc3zyhqzehihu7giusaaawu' + fingerprint: + type: string + description: A token that can uniquely identify this instrument across all customers + pattern: ^([a-z0-9]{26})$ + example: vnsdrvikkvre3dtrjjvlm5du4q + customer: + $ref: '#/components/schemas/CustomerResponse' + bank: + $ref: '#/components/schemas/BankDetails' + swift_bic: + description: 8 or 11 character code which identifies the bank or bank branch + type: string + example: '37040044' + account_number: + description: Number (which can contain letters) that identifies the account + type: string + example: '13654567455' + bank_code: + description: Code that identifies the bank + type: string + example: 123-456 + iban: + description: Internationally agreed standard for identifying bank account + type: string + example: HU93116000060000000012345676 diff --git a/nas_spec/components/schemas/Instruments/StoreCustomerInstrumentRequest.yaml b/nas_spec/components/schemas/Instruments/StoreCustomerInstrumentRequest.yaml new file mode 100644 index 000000000..f2f899392 --- /dev/null +++ b/nas_spec/components/schemas/Instruments/StoreCustomerInstrumentRequest.yaml @@ -0,0 +1,27 @@ +type: object +description: The customer's details +properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + description: The identifier of an existing customer + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' + email: + type: string + format: email + description: An optional email address to associate with the customer + maxLength: 255 + example: 'brucewayne@gmail.com' + name: + type: string + description: The customer's name. This will only set the name for *new* customers. + maxLength: 255 + example: 'Bruce Wayne' + phone: + description: The customer's phone number. This will only set the phone number for *new* customers. + allOf: + - $ref: '#/components/schemas/PhoneNumber' + default: + type: boolean + description: If true, this instrument will become the default for the customer. If a *new* customer is created as a result of this request, the instrument will automatically be the default. + example: true diff --git a/nas_spec/components/schemas/Instruments/StoreInstrumentRequest.yaml b/nas_spec/components/schemas/Instruments/StoreInstrumentRequest.yaml new file mode 100644 index 000000000..6cf4118d9 --- /dev/null +++ b/nas_spec/components/schemas/Instruments/StoreInstrumentRequest.yaml @@ -0,0 +1,13 @@ +type: object +description: The type of instrument to be stored +discriminator: + propertyName: type + mapping: + bank_account: '#/components/schemas/StoreBankAccountInstrumentRequest' + token: '#/components/schemas/StoreTokenInstrumentRequest' +required: + - type +properties: + type: + description: The type of instrument + type: string diff --git a/nas_spec/components/schemas/Instruments/StoreInstrumentResponse.yaml b/nas_spec/components/schemas/Instruments/StoreInstrumentResponse.yaml new file mode 100644 index 000000000..2000e0b47 --- /dev/null +++ b/nas_spec/components/schemas/Instruments/StoreInstrumentResponse.yaml @@ -0,0 +1,18 @@ +type: object +description: The response for type of instrument stored +required: + - type + - id +discriminator: + propertyName: type + mapping: + bank_account: '#/components/schemas/StoreBankAccountInstrumentResponse' + card: '#/components/schemas/StoreTokenInstrumentResponse' +properties: + type: + description: The type of instrument + type: string + id: + description: The unique identifier of the payment source or destination that can be used later for payments + type: string + example: 'src_wmlfc3zyhqzehihu7giusaaawu' diff --git a/nas_spec/components/schemas/Instruments/StoreTokenInstrumentRequest.yaml b/nas_spec/components/schemas/Instruments/StoreTokenInstrumentRequest.yaml new file mode 100644 index 000000000..68c2e1e52 --- /dev/null +++ b/nas_spec/components/schemas/Instruments/StoreTokenInstrumentRequest.yaml @@ -0,0 +1,23 @@ +type: object +description: Store token details +allOf: + - $ref: '#/components/schemas/StoreInstrumentRequest' + - type: object +required: + - token +properties: + type: + description: The type of instrument + type: string + + token: + type: string + description: The Checkout.com token + pattern: ^(tok)_(\w{26})$ | ^(card_tok)_(\w{12})$ + example: tok_asoto22g2fsu7prwomy12sgfsa + + account_holder: + $ref: '#/components/schemas/StoreAccountHolderTokenRequest' + + customer: + $ref: '#/components/schemas/StoreCustomerInstrumentRequest' diff --git a/nas_spec/components/schemas/Instruments/StoreTokenInstrumentResponse.yaml b/nas_spec/components/schemas/Instruments/StoreTokenInstrumentResponse.yaml new file mode 100644 index 000000000..be7f608b7 --- /dev/null +++ b/nas_spec/components/schemas/Instruments/StoreTokenInstrumentResponse.yaml @@ -0,0 +1,92 @@ +type: object +description: card instrument response +allOf: + - $ref: '#/components/schemas/StoreInstrumentResponse' +required: + - fingerprint + - expiry_month + - expiry_year + - last4 + - bin +properties: + type: + description: The underlying instrument type (for instruments created from Checkout.com tokens, this will reflect the type of instrument that was tokenized). + type: string + example: 'card' + id: + description: The unique identifier of the payment source or destination that can be used later for payments + type: string + example: 'src_wmlfc3zyhqzehihu7giusaaawu' + fingerprint: + type: string + description: A token that can uniquely identify this instrument across all customers + pattern: ^([a-z0-9]{26})$ + example: vnsdrvikkvre3dtrjjvlm5du4q + expiry_month: + type: integer + description: The expiry month + minimum: 1 + example: 6 + maxLength: 2 + expiry_year: + type: integer + description: The expiry year + example: 2025 + minLength: 4 + maxLength: 4 + scheme: + type: string + description: The card scheme + example: 'VISA' + scheme_local: + type: string + description: The local co-branded card scheme + enum: + - cartes_bancaires + example: 'cartes_bancaires' + last4: + type: string + description: The last four digits of the card number + example: '9996' + minLength: 4 + maxLength: 4 + bin: + type: string + description: The card issuer's bank identification number (BIN) + example: '454347' + card_type: + type: string + description: The card type + enum: + - Credit + - Debit + - Prepaid + - Charge + example: Credit + card_category: + type: string + description: The card category + enum: + - Consumer + - Commercial + example: Consumer + issuer: + type: string + description: The name of the card issuer + example: 'GOTHAM STATE BANK' + issuer_country: + type: string + maxLength: 2 + minLength: 2 + description: The card issuer's country (two-letter ISO code) + example: 'US' + product_id: + type: string + description: The issuer/card scheme product identifier + example: 'F' + product_type: + type: string + description: The issuer/card scheme product type + example: CLASSIC + customer: + $ref: '#/components/schemas/CustomerResponse' diff --git a/nas_spec/components/schemas/Instruments/UpdateBankInstrumentRequest.yaml b/nas_spec/components/schemas/Instruments/UpdateBankInstrumentRequest.yaml new file mode 100644 index 000000000..017b98e39 --- /dev/null +++ b/nas_spec/components/schemas/Instruments/UpdateBankInstrumentRequest.yaml @@ -0,0 +1,73 @@ +type: object +description: Update bank account details +allOf: + - $ref: '#/components/schemas/UpdateInstrumentRequest' + - type: object +properties: + type: + description: This field is used for illustration purposes and does not need to be provided in the request. + type: string + enum: ['card', 'bank_account'] + + account_type: + description: The type of account + type: string + enum: + - savings + - current + - cash + example: savings + + account_number: + description: Number (which can contain letters) that identifies the account + type: string + example: '13654567455' + + bank_code: + description: Code that identifies the bank + type: string + example: 123-456 + + branch_code: + description: Code that identifies the bank branch + type: string + example: '6443' + + iban: + description: Internationally agreed standard for identifying bank account + type: string + example: HU93116000060000000012345676 + + bban: + description: The combination of bank code and/or branch code and account number + type: string + example: 3704 0044 0532 0130 00 + + swift_bic: + description: 8 or 11 character code which identifies the bank or bank branch + type: string + example: '37040044' + + currency: + description: The three-letter ISO currency code of the account's currency + type: string + example: GBP + + country: + description: The two-letter ISO country code of where the account is based + type: string + example: GB + + processing_channel_id: + description: The ID of the primary processing channel this instrument is intended to be used for + type: string + example: pc_u2l6xz5joigedmk7g5vxzt7rqy + + account_holder: + $ref: '#/components/schemas/AccountHolder' + + bank: + $ref: '#/components/schemas/BankDetails' + + customer: + $ref: '#/components/schemas/UpdateCustomerRequest' diff --git a/nas_spec/components/schemas/Instruments/UpdateBankInstrumentResponse.yaml b/nas_spec/components/schemas/Instruments/UpdateBankInstrumentResponse.yaml new file mode 100644 index 000000000..4f99dc982 --- /dev/null +++ b/nas_spec/components/schemas/Instruments/UpdateBankInstrumentResponse.yaml @@ -0,0 +1,18 @@ +type: object +description: The response for type of instrument stored +required: + - type + - fingerprint +discriminator: + propertyName: type + mapping: + bank_account: '#/components/schemas/UpdateBankInstrumentResponse' +properties: + type: + description: The type of instrument + type: string + fingerprint: + description: A token that can uniquely identify this instrument across all customers + pattern: '^([a-z0-9]{26})$' + type: string + example: 'smoua2sbuqhupeofwbe77n5nsm' diff --git a/nas_spec/components/schemas/Instruments/UpdateCardInstrumentRequest.yaml b/nas_spec/components/schemas/Instruments/UpdateCardInstrumentRequest.yaml new file mode 100644 index 000000000..0ad209f76 --- /dev/null +++ b/nas_spec/components/schemas/Instruments/UpdateCardInstrumentRequest.yaml @@ -0,0 +1,37 @@ +type: object +description: Update bank account details +allOf: + - $ref: '#/components/schemas/UpdateInstrumentRequest' + - type: object +properties: + type: + description: This field is used for illustration purposes and does not need to be provided in the request. + type: string + enum: ['card', 'bank_account'] + + expiry_month: + type: integer + description: The expiry month of the card + minimum: 1 + example: 6 + minLength: 1 + maxLength: 2 + + expiry_year: + type: integer + description: The expiry year of the card + example: 2025 + minLength: 4 + maxLength: 4 + + name: + description: | + Name of the cardholder + type: string + example: 'Mr. J Smith' + + account_holder: + $ref: '#/components/schemas/UpdateCardAccountHolder' + + customer: + $ref: '#/components/schemas/UpdateCustomerRequest' diff --git a/nas_spec/components/schemas/Instruments/UpdateCardInstrumentResponse.yaml b/nas_spec/components/schemas/Instruments/UpdateCardInstrumentResponse.yaml new file mode 100644 index 000000000..dc826bd75 --- /dev/null +++ b/nas_spec/components/schemas/Instruments/UpdateCardInstrumentResponse.yaml @@ -0,0 +1,18 @@ +type: object +description: The response for type of instrument stored +required: + - type + - fingerprint +discriminator: + propertyName: type + mapping: + card: '#/components/schemas/UpdateCardInstrumentResponse' +properties: + type: + description: The type of instrument + type: string + fingerprint: + description: A token that can uniquely identify this instrument across all customers + pattern: '^([a-z0-9]{26})$' + type: string + example: 'smoua2sbuqhupeofwbe77n5nsm' diff --git a/nas_spec/components/schemas/Instruments/UpdateInstrumentRequest.yaml b/nas_spec/components/schemas/Instruments/UpdateInstrumentRequest.yaml new file mode 100644 index 000000000..9d0a481aa --- /dev/null +++ b/nas_spec/components/schemas/Instruments/UpdateInstrumentRequest.yaml @@ -0,0 +1,7 @@ +type: object +description: The type of instrument to be updated +discriminator: + propertyName: type + mapping: + card: '#/components/schemas/UpdateCardInstrumentRequest' + bank_account: '#/components/schemas/UpdateBankInstrumentRequest' diff --git a/nas_spec/components/schemas/Instruments/UpdateInstrumentResponse.yaml b/nas_spec/components/schemas/Instruments/UpdateInstrumentResponse.yaml new file mode 100644 index 000000000..7520819c3 --- /dev/null +++ b/nas_spec/components/schemas/Instruments/UpdateInstrumentResponse.yaml @@ -0,0 +1,7 @@ +type: object +description: The response for type of instrument stored +discriminator: + propertyName: type + mapping: + card: '#/components/schemas/UpdateCardInstrumentResponse' + bank_account: '#/components/schemas/UpdateBankInstrumentResponse' diff --git a/nas_spec/components/schemas/Instruments/properties/AccountHolder.yaml b/nas_spec/components/schemas/Instruments/properties/AccountHolder.yaml new file mode 100644 index 000000000..1e078aefa --- /dev/null +++ b/nas_spec/components/schemas/Instruments/properties/AccountHolder.yaml @@ -0,0 +1,72 @@ +type: object +description: The account holder details +properties: + type: + description: The type of account holder + type: string + enum: + - individual + - corporate + - government + example: individual + + first_name: + description: | + The first name of the account holder + type: string + example: 'John' + + last_name: + description: | + The last name of the account holder + type: string + example: 'Smith' + + company_name: + description: | + The legal name of a registered company that holds the account + type: string + example: Test company + + tax_id: + description: The account holder's tax number/reference + type: string + example: '123456' + + date_of_birth: + description: The account holder's date of birth in `YYYY-MM-DD` format + type: string + format: date + example: '1986-01-01' + + country_of_birth: + description: The two-letter ISO country code of the account holder's country of birth + type: string + example: GB + + residential_status: + description: The account holder's residential status + type: string + enum: + - resident + - non_resident + example: resident + + billing_address: + description: The billing address of the account holder + allOf: + - $ref: '#/components/schemas/Address' + + phone: + description: The phone number of the account holder + allOf: + - $ref: '#/components/schemas/PhoneNumber' + + identification: + $ref: '#/components/schemas/AccountHolderIdentification' + + email: + description: The account holder's email address + type: string + format: email + example: test.user@checkout.com diff --git a/nas_spec/components/schemas/Instruments/properties/AccountHolderAch.yaml b/nas_spec/components/schemas/Instruments/properties/AccountHolderAch.yaml new file mode 100644 index 000000000..0b5b0c31d --- /dev/null +++ b/nas_spec/components/schemas/Instruments/properties/AccountHolderAch.yaml @@ -0,0 +1,33 @@ +type: object +description: The account holder details +required: + - type + - first_name + - last_name +properties: + type: + description: The type of account holder + type: string + enum: + - individual + - corporate + - government + example: individual + + first_name: + description: | + The first name of the account holder + type: string + example: 'John' + + last_name: + description: | + The last name of the account holder + type: string + example: 'Smith' + + company_name: + description: | + The legal name of a registered company that holds the account + type: string + example: Test company diff --git a/nas_spec/components/schemas/Instruments/properties/AccountHolderGiropay.yaml b/nas_spec/components/schemas/Instruments/properties/AccountHolderGiropay.yaml new file mode 100644 index 000000000..6c56779b1 --- /dev/null +++ b/nas_spec/components/schemas/Instruments/properties/AccountHolderGiropay.yaml @@ -0,0 +1,14 @@ +type: object +description: The account holder details +required: + - first_name + - last_name +properties: + first_name: + description: The first name of the account holder + type: string + example: 'John' + last_name: + description: The last name of the account holder + type: string + example: 'Smith' \ No newline at end of file diff --git a/nas_spec/components/schemas/Instruments/properties/AccountHolderIdentification.yaml b/nas_spec/components/schemas/Instruments/properties/AccountHolderIdentification.yaml new file mode 100644 index 000000000..7821753fc --- /dev/null +++ b/nas_spec/components/schemas/Instruments/properties/AccountHolderIdentification.yaml @@ -0,0 +1,21 @@ +type: object +description: Bank account holder's proof of identification +properties: + type: + description: The type of identification used to identify the account holder + type: string + enum: + - passport + - driving_licence + - national_id + - company_registration + - tax_id + example: passport + number: + description: The identification number + type: string + example: 09876 + issuing_country: + description: The two-letter ISO country code of the country that issued the identification + type: string + example: US diff --git a/nas_spec/components/schemas/Instruments/properties/BankDetails.yaml b/nas_spec/components/schemas/Instruments/properties/BankDetails.yaml new file mode 100644 index 000000000..df14cb89c --- /dev/null +++ b/nas_spec/components/schemas/Instruments/properties/BankDetails.yaml @@ -0,0 +1,17 @@ +type: object +description: Details of the bank +properties: + name: + description: The bank's name + type: string + example: Lloyds TSB + + branch: + description: The bank branch's name + type: string + example: Bournemouth + + address: + allOf: + - $ref: '#/components/schemas/Address' + description: The bank's contact address diff --git a/nas_spec/components/schemas/Instruments/properties/RetrieveInstrumentCustomerResponse.yaml b/nas_spec/components/schemas/Instruments/properties/RetrieveInstrumentCustomerResponse.yaml new file mode 100644 index 000000000..8f5f440cb --- /dev/null +++ b/nas_spec/components/schemas/Instruments/properties/RetrieveInstrumentCustomerResponse.yaml @@ -0,0 +1,22 @@ +type: object +description: Stored customer details +required: + - id +properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + description: The customer's unique identifier. This can be passed as a source when making a payment. + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' + email: + type: string + description: The customer's email address + example: 'brucewayne@gmail.com' + name: + type: string + description: The customer's name + example: 'Bruce Wayne' + default: + description: This will be true if this instrument is set as the default for the customer + type: boolean + example: true diff --git a/nas_spec/components/schemas/Instruments/properties/StoreAccountHolderTokenRequest.yaml b/nas_spec/components/schemas/Instruments/properties/StoreAccountHolderTokenRequest.yaml new file mode 100644 index 000000000..537fb7dc4 --- /dev/null +++ b/nas_spec/components/schemas/Instruments/properties/StoreAccountHolderTokenRequest.yaml @@ -0,0 +1,24 @@ +type: object +description: The account holder details +properties: + first_name: + description: | + The first name of the account holder + type: string + example: 'John' + + last_name: + description: | + The last name of the account holder + type: string + example: 'Smith' + + billing_address: + description: The billing address of the account holder + allOf: + - $ref: '#/components/schemas/Address' + + phone: + description: The phone number of the account holder + allOf: + - $ref: '#/components/schemas/PhoneNumber' diff --git a/nas_spec/components/schemas/Instruments/properties/UpdateCardAccountHolder.yaml b/nas_spec/components/schemas/Instruments/properties/UpdateCardAccountHolder.yaml new file mode 100644 index 000000000..537fb7dc4 --- /dev/null +++ b/nas_spec/components/schemas/Instruments/properties/UpdateCardAccountHolder.yaml @@ -0,0 +1,24 @@ +type: object +description: The account holder details +properties: + first_name: + description: | + The first name of the account holder + type: string + example: 'John' + + last_name: + description: | + The last name of the account holder + type: string + example: 'Smith' + + billing_address: + description: The billing address of the account holder + allOf: + - $ref: '#/components/schemas/Address' + + phone: + description: The phone number of the account holder + allOf: + - $ref: '#/components/schemas/PhoneNumber' diff --git a/nas_spec/components/schemas/InvalidError.yaml b/nas_spec/components/schemas/InvalidError.yaml new file mode 100644 index 000000000..14550a104 --- /dev/null +++ b/nas_spec/components/schemas/InvalidError.yaml @@ -0,0 +1,8 @@ +allOf: + - $ref: '#/components/schemas/Error' + - type: object + properties: + details: + type: array + items: + type: string diff --git a/nas_spec/components/schemas/Links/Link.yaml b/nas_spec/components/schemas/Links/Link.yaml new file mode 100644 index 000000000..74c4421b9 --- /dev/null +++ b/nas_spec/components/schemas/Links/Link.yaml @@ -0,0 +1,7 @@ +type: object +properties: + href: + description: The link URL + type: string +required: + - href diff --git a/nas_spec/components/schemas/Links/SelfLink.yaml b/nas_spec/components/schemas/Links/SelfLink.yaml new file mode 100644 index 000000000..8a7f0211c --- /dev/null +++ b/nas_spec/components/schemas/Links/SelfLink.yaml @@ -0,0 +1,11 @@ +type: object +allOf: + - $ref: '#/components/schemas/Link' +properties: + rel: + description: The link type + type: string + enum: + - self +required: + - rel diff --git a/nas_spec/components/schemas/Metadata/CardMetadataRequest.yaml b/nas_spec/components/schemas/Metadata/CardMetadataRequest.yaml new file mode 100644 index 000000000..ee4e61892 --- /dev/null +++ b/nas_spec/components/schemas/Metadata/CardMetadataRequest.yaml @@ -0,0 +1,13 @@ +type: object +properties: + source: + $ref: '#/components/schemas/CardMetadataRequestSource' + format: + description: | + The format to provide the output in. + + A `basic` response will only include standard metadata, while a `card_payouts` formatted response will also include fields specific to card payouts. + type: string + default: basic + enum: [basic, card_payouts] + example: basic diff --git a/nas_spec/components/schemas/Metadata/CardMetadataRequestSource.yaml b/nas_spec/components/schemas/Metadata/CardMetadataRequestSource.yaml new file mode 100644 index 000000000..d25de1a12 --- /dev/null +++ b/nas_spec/components/schemas/Metadata/CardMetadataRequestSource.yaml @@ -0,0 +1,16 @@ +type: object +description: The source object +discriminator: + propertyName: type + mapping: + card: '#/components/schemas/CardMetadataRequestSourceCard' + bin: '#/components/schemas/CardMetadataRequestSourceBin' + token: '#/components/schemas/CardMetadataRequestSourceToken' + id: '#/components/schemas/CardMetadataRequestSourceInstrument' +required: + - type +properties: + type: + type: string + description: The source type + example: 'card' diff --git a/nas_spec/components/schemas/Metadata/CardMetadataRequestSourceBin.yaml b/nas_spec/components/schemas/Metadata/CardMetadataRequestSourceBin.yaml new file mode 100644 index 000000000..37226ea43 --- /dev/null +++ b/nas_spec/components/schemas/Metadata/CardMetadataRequestSourceBin.yaml @@ -0,0 +1,15 @@ +type: object +description: An existing payment source +required: + - bin +allOf: + - $ref: '#/components/schemas/CardMetadataRequestSource' + - type: object + properties: + bin: + description: The issuer's Bank Identification Number (BIN) + type: string + minLength: 6 + maxLength: 8 + pattern: '^[0-9]+$' + example: '454347' diff --git a/nas_spec/components/schemas/Metadata/CardMetadataRequestSourceCard.yaml b/nas_spec/components/schemas/Metadata/CardMetadataRequestSourceCard.yaml new file mode 100644 index 000000000..a5162011a --- /dev/null +++ b/nas_spec/components/schemas/Metadata/CardMetadataRequestSourceCard.yaml @@ -0,0 +1,15 @@ +type: object +description: An existing payment source +required: + - number +allOf: + - $ref: '#/components/schemas/CardMetadataRequestSource' + - type: object + properties: + number: + description: The Primary Account Number (PAN) + type: string + minLength: 12 + maxLength: 19 + pattern: '^[0-9]+$' + example: '4543474002249996' diff --git a/nas_spec/components/schemas/Metadata/CardMetadataRequestSourceInstrument.yaml b/nas_spec/components/schemas/Metadata/CardMetadataRequestSourceInstrument.yaml new file mode 100644 index 000000000..ed632b7ca --- /dev/null +++ b/nas_spec/components/schemas/Metadata/CardMetadataRequestSourceInstrument.yaml @@ -0,0 +1,13 @@ +type: object +description: An existing payment source +required: + - id +allOf: + - $ref: '#/components/schemas/CardMetadataRequestSource' + - type: object + properties: + id: + type: string + pattern: "^(src)_(\\w{26})$" + description: The unique ID for the payment instrument that was created using the card's details + example: src_wmlfc3zyhqzehihu7giusaaawu diff --git a/nas_spec/components/schemas/Metadata/CardMetadataRequestSourceToken.yaml b/nas_spec/components/schemas/Metadata/CardMetadataRequestSourceToken.yaml new file mode 100644 index 000000000..3b3998595 --- /dev/null +++ b/nas_spec/components/schemas/Metadata/CardMetadataRequestSourceToken.yaml @@ -0,0 +1,13 @@ +type: object +description: An existing payment source +required: + - token +allOf: + - $ref: '#/components/schemas/CardMetadataRequestSource' + - type: object + properties: + token: + description: The Checkout.com unique token that was generated when the card's details were tokenized + type: string + pattern: '^(tok)_(\w{26})$' + example: 'tok_ubfj2q76miwundwlk72vxt2i7q' diff --git a/nas_spec/components/schemas/Metadata/CardMetadataResponse.yaml b/nas_spec/components/schemas/Metadata/CardMetadataResponse.yaml new file mode 100644 index 000000000..4141cf8ab --- /dev/null +++ b/nas_spec/components/schemas/Metadata/CardMetadataResponse.yaml @@ -0,0 +1,86 @@ +type: object +description: Card Metadata +properties: + bin: + description: The issuer's Bank Identification Number (BIN) + type: string + minLength: 6 + maxLength: 8 + pattern: '^[0-9]+$' + example: '45434720' + scheme: + description: The global card scheme + type: string + example: 'visa' + scheme_local: + description: The local card scheme, if the card is co-branded + type: string + enum: [cartes_bancaires, mada, omannet] + example: 'cartes_bancaires' + card_type: + description: The card type + type: string + enum: [credit, debit, prepaid, charge, deferred_debit] + example: credit + card_category: + description: The card category + type: string + enum: [consumer, commercial, all, other] + example: consumer + issuer: + description: The card issuer + type: string + example: 'STATE BANK OF MAURITIUS' + issuer_country: + description: The card issuer's country, as an ISO-2 code + type: string + example: 'MU' + issuer_country_name: + description: The card issuer's country + type: string + example: 'Mauritius' + product_id: + description: The card issuer or scheme's product identifier + type: string + example: 'CLASSIC' + product_type: + description: The card issuer or scheme's product type + type: string + example: 'F' + card_payouts: + description: A card payouts block exists in the response if the format in the request is "card_payouts". + type: object + properties: + domestic_non_money_transfer: + description: Describes whether the card is eligible for domestic non-money transfer transactions + type: string + enum: [not_supported,standard,fast_funds,unknown] + example: 'not_supported' + cross_border_non_money_transfer: + description: Describes whether the card is eligible for cross-border non-money transfer transactions + type: string + enum: [not_supported,standard,fast_funds,unknown] + example: 'standard' + domestic_gambling: + description: Describes whether the card is eligible for domestic gambling transactions + type: string + enum: [not_supported,standard,fast_funds,unknown] + example: 'fast_funds' + cross_border_gambling: + description: Describes whether the card is eligible for cross-border gambling transactions + type: string + enum: [not_supported,standard,fast_funds,unknown] + example: 'unknown' + domestic_money_transfer: + description: Describes whether the card is eligible for domestic money transfer transactions + type: string + enum: [not_supported,standard,fast_funds,unknown] + example: 'not_supported' + cross_border_money_transfer: + description: Describes whether the card is eligible for cross-border money transfer transactions + type: string + enum: [not_supported,standard,fast_funds,unknown] + example: 'not_supported' +required: + - bin + - scheme diff --git a/nas_spec/components/schemas/PagingError.yaml b/nas_spec/components/schemas/PagingError.yaml new file mode 100644 index 000000000..5f4242fef --- /dev/null +++ b/nas_spec/components/schemas/PagingError.yaml @@ -0,0 +1,13 @@ +type: object +properties: + request_id: + type: string + example: 0HL80RJLS76I7 + error_type: + type: string + example: request_invalid + error_codes: + type: array + items: + type: string + example: paging_limit_invalid diff --git a/nas_spec/components/schemas/PaymentLinks/GetPaymentLinkResponse.yaml b/nas_spec/components/schemas/PaymentLinks/GetPaymentLinkResponse.yaml new file mode 100644 index 000000000..feeb3d572 --- /dev/null +++ b/nas_spec/components/schemas/PaymentLinks/GetPaymentLinkResponse.yaml @@ -0,0 +1,181 @@ +type: object +discriminator: + propertyName: status + mapping: + Active: '#/components/schemas/PaymentLinkResponseStatusActive' + Payment Received: '#/components/schemas/PaymentLinkResponseStatusPaymentReceived' + Expired: '#/components/schemas/PaymentLinkResponseStatusExpired' + +required: + - id + - status + - amount + - currency + - expires_on + - created_on + - billing + - _links + +properties: + id: + example: pl_ELqQJXdXzabU + allOf: + - $ref: '#/components/schemas/PaymentLinkId' + status: + type: string + enum: + - Active + - Payment Received + - Expired + description: | + The status of the Payment Link: + - `Active`: The Payment Link can accept a payment from the customer. A payment may have been attempted by the customer but not completed successfully. + - `Payment Received`: A payment has been received successfully using this Payment Link. + - `Expired`: The Payment Link has expired and can no longer be accessed. + example: Active + payment_id: + type: string + description: Unique identifier for an in progress or completed payment for this Payment Link. + example: + amount: + type: integer + description: The original payment amount. + example: 100 + currency: + type: string + description: The three-letter ISO currency code of the payment.
+ example: GBP + reference: + type: string + description: Your reference for the payment. + example: ORD-123A + description: + type: string + description: A description of the payment. + example: Payment for Gold Necklace + created_on: + type: string + description: The date and time when the Payment Link was created. + format: date-time + example: '2021-08-19T20:25:28.725Z' + expires_on: + type: string + description: The date and time when the Payment Link expires. + format: date-time + example: '2021-08-20T20:25:28+08:00' + processing_channel_id: + type: string + pattern: "^(pc)_(\\w{26})$" + description: The processing channel to be used for the payment + example: 'pc_q4dbxom5jbgudnjzjpz7j2z6uq' + amount_allocations: + allOf: + - $ref: '#/components/schemas/AmountAllocations' + customer: + type: object + description: The customer's details. + properties: + email: + type: string + format: email + description: The email address for the customer. + example: brucewayne@email.com + name: + type: string + description: The customer's name. + example: Bruce Wayne + shipping: + type: object + description: The address any products are being sent to. + required: + - address + properties: + address: + type: object + description: The customer's address to ship to. + required: + - country + allOf: + - $ref: '#/components/schemas/Address' + billing: + type: object + additionalProperties: false + description: The billing details. + required: + - address + properties: + address: + type: object + description: The billing address. + required: + - country + allOf: + - $ref: '#/components/schemas/Address' + phone: + type: object + description: The customer's phone number. + required: + - number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + products: + type: array + description: Details about the provided products. + items: + type: object + additionalProperties: false + required: + - name + - quantity + - price + properties: + name: + type: string + description: Descriptive item name. + example: Gold Necklace + quantity: + type: integer + description: The item quantity + example: 1 + price: + type: integer + description: Minor units. Includes tax, excludes discounts. + example: 200 + metadata: + type: object + title: The Metadata Schema + description: Any additional information stored at the point of creation. + additionalProperties: true + locale: + type: string + description: The language that the Payment Link page is displayed in. + enum: + - ar + - da-DK + - de-DE + - el + - en-GB + - es-ES + - fi-FI + - fil-PH + - fr-FR + - hi-IN + - id-ID + - it-IT + - ja-JP + - ms-MY + - nb-NO + - nl-NL + - pt-PT + - sv-SE + - th-TH + - vi-VN + - zh-CN + - zh-HK + - zh-TW + return_url: + type: string + format: uri + description: If provided, the success page will include a button that redirects your customer to the provided URL. + example: https://example.com/success + maxLength: 255 diff --git a/nas_spec/components/schemas/PaymentLinks/MarketplaceNonSplitPayInt.yaml b/nas_spec/components/schemas/PaymentLinks/MarketplaceNonSplitPayInt.yaml new file mode 100644 index 000000000..bc92bbf50 --- /dev/null +++ b/nas_spec/components/schemas/PaymentLinks/MarketplaceNonSplitPayInt.yaml @@ -0,0 +1,3 @@ +type: string +description: The sub-entity that the payment is being processed on behalf of +example: 'ent_rgyzti4x74xubmu72m6r3pvksa' \ No newline at end of file diff --git a/nas_spec/components/schemas/PaymentLinks/MarketplaceSplitPayInt.yaml b/nas_spec/components/schemas/PaymentLinks/MarketplaceSplitPayInt.yaml new file mode 100644 index 000000000..b6a0b81ad --- /dev/null +++ b/nas_spec/components/schemas/PaymentLinks/MarketplaceSplitPayInt.yaml @@ -0,0 +1,53 @@ +type: array +description: The sub-entities that the payment is being processed on behalf of - use for split payments. +minItems: 1 +maxItems: 10 +items: + type: object + required: + - id + - amount + title: SubEntities + properties: + id: + type: string + description: "The id of the sub-entity." + example: "ent_w4jelhppmfiufdnatam37wrfc4" + amount: + type: integer + description: | + The split amount - this will be credited to your sub-entity's currency account. The sum of all split amounts must be equal to the payment amount. + + The amount must be provided in the minor currency unit. + minimum: 0 + example: 1000 + reference: + type: string + description: A reference you can later use to identify this split, such as an order number. + maxLength: 50 + example: "ORD-5023-4E89" + commission: + type: object + title: Commission + description: | + Commission you'd like to collect from this split - this will be credited to your currency account. The commission cannot exceed the split amount. + + Commission = (`amount` * `commission.percentage`) + `commission.amount` + properties: + amount: + type: integer + description: | + Optional fixed amount of commission to collect. + + The amount must be provided in the minor currency unit. + minimum: 0 + example: 1000 + percentage: + type: number + description: | + Optional percentage of commission to collect. + + Supports up to 8 decimal places. + minimum: 0 + maximum: 100 + example: 1.125 diff --git a/nas_spec/components/schemas/PaymentLinks/PaymentLinkId.yaml b/nas_spec/components/schemas/PaymentLinks/PaymentLinkId.yaml new file mode 100644 index 000000000..35cea4e91 --- /dev/null +++ b/nas_spec/components/schemas/PaymentLinks/PaymentLinkId.yaml @@ -0,0 +1,5 @@ +type: string +pattern: '^pl_[A-Za-z0-9_-]{12}$' +description: The unique identifier for a Payment Link. +maxLength: 15 +minLength: 15 diff --git a/nas_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseLinks.yaml b/nas_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseLinks.yaml new file mode 100644 index 000000000..b596541b7 --- /dev/null +++ b/nas_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseLinks.yaml @@ -0,0 +1,32 @@ +type: object +description: The links related to the Payment Link. +minItems: 2 +required: + - self + - redirect +properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the Payment Link details. + redirect: + type: object + description: The link to visit the Payment Link page. + allOf: + - $ref: '#/components/schemas/Link' + payment: + type: object + description: The URI of the in progress or completed payment for this Payment Link. + allOf: + - $ref: '#/components/schemas/Link' + payment_actions: + type: object + description: The URI of the actions associated with the in progress or completed payment for this Payment Link. + allOf: + - $ref: '#/components/schemas/Link' +example: + self: + href: 'https://api.sandbox.checkout.com/payment-links/pl_ELqQJXdXzabU' + redirect: + href: 'https://pay.sandbox.checkout.com/link/pl_ELqQJXdXzabU' diff --git a/nas_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseStatusActive.yaml b/nas_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseStatusActive.yaml new file mode 100644 index 000000000..7cf2b3afb --- /dev/null +++ b/nas_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseStatusActive.yaml @@ -0,0 +1,9 @@ +type: object +description: A Payment Link that is active and can accept a payment from a customer. +allOf: + - $ref: '#/components/schemas/GetPaymentLinkResponse' + - type: object + properties: + _links: + allOf: + - $ref: '#/components/schemas/PaymentLinkResponseLinks' diff --git a/nas_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseStatusExpired.yaml b/nas_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseStatusExpired.yaml new file mode 100644 index 000000000..af162f193 --- /dev/null +++ b/nas_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseStatusExpired.yaml @@ -0,0 +1,9 @@ +type: object +description: An expired Payment Link +allOf: + - $ref: '#/components/schemas/GetPaymentLinkResponse' + - type: object + properties: + _links: + allOf: + - $ref: '#/components/schemas/PaymentLinkResponseLinks' diff --git a/nas_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseStatusPaymentReceived.yaml b/nas_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseStatusPaymentReceived.yaml new file mode 100644 index 000000000..1303b6f81 --- /dev/null +++ b/nas_spec/components/schemas/PaymentLinks/PaymentLinkResponse/PaymentLinkResponseStatusPaymentReceived.yaml @@ -0,0 +1,25 @@ +type: object +description: A Payment Link that has received a payment +required: + - payment_id +allOf: + - $ref: '#/components/schemas/GetPaymentLinkResponse' + - type: object + properties: + payment_id: + example: pay_mbabizu24mvu3mela5njyhpit4 + _links: + required: + - payment + - payment_actions + allOf: + - $ref: '#/components/schemas/PaymentLinkResponseLinks' + example: + self: + href: 'https://api.sandbox.checkout.com/payment-links/pl_ELqQJXdXzabU' + redirect: + href: 'https://pay.sandbox.checkout.com/link/pl_ELqQJXdXzabU' + payment: + href: https://api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4 + payment_actions: + href: https://api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/actions diff --git a/nas_spec/components/schemas/PaymentLinks/PaymentLinksRequest.yaml b/nas_spec/components/schemas/PaymentLinks/PaymentLinksRequest.yaml new file mode 100644 index 000000000..378c73d02 --- /dev/null +++ b/nas_spec/components/schemas/PaymentLinks/PaymentLinksRequest.yaml @@ -0,0 +1,271 @@ +type: object +required: + - amount + - currency + - billing +properties: + amount: + type: integer + description: The payment amount. The exact format depends on the currency. + minimum: 1 + example: 1000 + currency: + type: string + description: The three-letter ISO currency code of the payment.
The `currency` and `billing.address.country` fields determine which payment methods are shown on the payment page. + example: GBP + minLength: 3 + maxLength: 3 + payment_type: + type: string + description: This must be specified for card payments where the cardholder is not present (i.e., recurring or mail order / telephone order) + enum: + - Regular + - Recurring + default: Regular + payment_ip: + type: string + format: ipv4 + maxLength: 45 + description: The IP address used to make the payment. Used by our risk engine to check the customer's IP address – only accepts IPv4 addresses + billing_descriptor: + type: object + description: An optional description that is displayed on the customer's statement identifying a purchase + required: + - name + - city + properties: + name: + type: string + maxLength: 25 + description: A dynamic description of the change + city: + type: string + minLength: 1 + maxLength: 13 + description: The city from which the charge originated + reference: + type: string + maxLength: 50 + description: The reference shown on the statement. Required for payouts to bank accounts. + reference: + type: string + description: A reference you can later use to identify this payment, such as an order number.
Required for PayPal payments.
For Amex, the string limit is 30 characters. + example: ORD-123A + maxLength: 50 + description: + type: string + description: A description of the payment. + example: Payment for Gold Necklace + maxLength: 100 + processing_channel_id: + type: string + pattern: "^(pc)_(\\w{26})$" + description: The processing channel to be used for the payment + example: 'pc_q4dbxom5jbgudnjzjpz7j2z6uq' + amount_allocations: + allOf: + - $ref: '#/components/schemas/AmountAllocations' + expires_in: + type: integer + description: The time for which the link remains valid, in seconds. + minimum: 1 + maximum: 1209600 + default: 86400 + example: 604800 + customer: + type: object + description: The customer's details. + properties: + email: + type: string + format: email + description: An email address to associate with the customer. + example: brucewayne@email.com + maxLength: 255 + name: + type: string + description: The customer's name. This will only set the name for new customers. + example: Bruce Wayne + maxLength: 255 + shipping: + type: object + description: The address any products are being sent to. + required: + - address + properties: + address: + type: object + description: The customer's address to ship to. + required: + - country + allOf: + - $ref: '#/components/schemas/Address' + phone: + type: object + description: The customer's phone number + required: + - number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + billing: + type: object + additionalProperties: false + description: The billing details. + required: + - address + properties: + address: + type: object + description: The billing address. + required: + - country + allOf: + - $ref: '#/components/schemas/Address' + phone: + type: object + description: The customer's phone number + required: + - number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + recipient: + $ref: '#/components/schemas/PaymentRecipient' + processing: + type: object + description: Use the processing object to influence or override the data sent during card processing + properties: + aft: + type: boolean + description: Indicates whether the payment is an [Account Funding Transaction](https://www.checkout.com/docs/payments/manage-payments/account-funding-transactions). + allow_payment_methods: + type: array + description: > + Use to specify which payment methods should render on the page. Check the requirements for each payment method + enum: + - card + - sofort + - ideal + - knet + - bancontact + - p24 + - eps + - multibanco + example: + - card + products: + type: array + description: Details about the products in the order. + minItems: 1 + maxItems: 1000 + items: + type: object + additionalProperties: false + required: + - name + - quantity + - price + properties: + name: + type: string + description: Descriptive item name. + example: Gold Necklace + quantity: + type: integer + description: The item quantity. + minimum: 1 + example: 1 + price: + type: integer + description: Minor units. Includes tax, excludes discounts. + minimum: 0 + example: 200 + metadata: + type: object + title: The Metadata Schema + description: Allows you to store additional information about the transaction. This object only allows one level of depth, so cannot accept non-primitive data types such as objects or arrays. + additionalProperties: true + 3ds: + type: object + description: Information required for 3D Secure payments. + properties: + enabled: + type: boolean + description: Whether to process this payment as a 3D Secure payment. + default: false + attempt_n3d: + type: boolean + description: Determines whether to attempt a 3D Secure payment as non-3D Secure should the card issuer not be enrolled. + default: false + challenge_indicator: + type: string + description: Indicates the preference for whether or not a 3DS challenge should be performed. The customer’s bank has the final say on whether or not the customer receives the challenge. + enum: + - no_preference + - no_challenge_requested + - challenge_requested + - challenge_requested_mandate + default: no_preference + allow_upgrade: + type: boolean + default: true + description: Whether to process this payment as 3D Secure if the authorization was soft declined because 3DS authentication is required. + exemption: + type: string + enum: + - low_value + - secure_corporate_payment + - trusted_listing + - transaction_risk_assessment + - 3ds_outage + - sca_delegation + - out_of_sca_scope + - other + - low_risk_program + - recurring_operation + description: Specifies an exemption reason so that the payment is not processed using 3D Secure authentication. Learn more about exemptions in our SCA compliance guide. + risk: + $ref: '#/components/schemas/RiskRequest' + return_url: + type: string + format: uri + description: If provided, the success page will include a button that redirects your customer to the provided URL. + example: https://example.com/success + maxLength: 255 + locale: + type: string + description: Creates a translated version of the page in the specified language + enum: + - ar + - da-DK + - de-DE + - el + - en-GB + - es-ES + - fi-FI + - fil-PH + - fr-FR + - hi-IN + - id-ID + - it-IT + - ja-JP + - ms-MY + - nb-NO + - nl-NL + - pt-PT + - sv-SE + - th-TH + - vi-VN + - zh-CN + - zh-HK + - zh-TW + default: en-GB + capture: + type: boolean + description: Whether to capture the payment (if applicable). + example: true + capture_on: + description: | + A timestamp (ISO 8601 code) that determines when the payment should be captured. + Providing this field will automatically set `capture` to true. + allOf: + - $ref: '#/components/schemas/Timestamp' diff --git a/nas_spec/components/schemas/PaymentLinks/PaymentLinksResponse.yaml b/nas_spec/components/schemas/PaymentLinks/PaymentLinksResponse.yaml new file mode 100644 index 000000000..71170d59a --- /dev/null +++ b/nas_spec/components/schemas/PaymentLinks/PaymentLinksResponse.yaml @@ -0,0 +1,39 @@ +type: object +required: + - id + - _links +properties: + id: + example: pl_ELqQJXdXzabU + allOf: + - $ref: '#/components/schemas/PaymentLinkId' + expires_on: + type: string + description: The date and time when the Payment Link expires. + format: date-time + example: '2020-08-20T20:25:28+08:00' + reference: + type: string + description: A reference you can later use to identify this payment, such as an order number. + example: ORD-123A + warnings: + type: array + description: Related to the `allow_payment_methods` object in the request. Included in the response if an alternative payment method is passed through, but no card schemes are configured against the account. + _links: + type: object + description: The links related to the Payment Link session. + readOnly: true + minItems: 1 + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + example: + href: 'https://api.sandbox.checkout.com/payment-links/pl_ELqQJXdXzabU' + redirect: + type: object + allOf: + - $ref: '#/components/schemas/Link' + example: + href: 'https://pay.sandbox.checkout.com/link/pl_ELqQJXdXzabU' diff --git a/nas_spec/components/schemas/Payments/3dsData.yaml b/nas_spec/components/schemas/Payments/3dsData.yaml new file mode 100644 index 000000000..e15c56496 --- /dev/null +++ b/nas_spec/components/schemas/Payments/3dsData.yaml @@ -0,0 +1,71 @@ +type: object +properties: + downgraded: + type: boolean + description: Indicates whether this was a 3D Secure payment downgraded to non-3D Secure (when `attempt_n3d` is specified) + example: false + enrolled: + type: string + description: > + Indicates the 3D Secure enrollment status of the issuer + * `Y` - Issuer enrolled + * `N` - Customer not enrolled + * `U` - Unknown + example: Y + signature_valid: + type: string + description: Verification to ensure the integrity of the response + example: Y + authentication_response: + type: string + description: > + Indicates whether or not the cardholder was authenticated + * `Y` - Customer authenticated + * `N` - Customer not authenticated + * `A` - Authentication was processed by a stand-in service, and is classed as successful + * `U` - Unable to perform authentication + example: Y + authentication_status_reason: + type: string + description: | + The response from the Directory Server (DS) or Access Control Server (ACS), which provides information on why you received the given `authentication_response` value. + + This field is only returned as a result of a 3DS2 authentication, and only if the returned `authentication_response` value was not `Y`. + Refer to our authentication failures documentation for more information. + cryptogram: + type: string + description: Base64 encoded cryptographic identifier (CAVV) used by the card schemes to validate the integrity of the 3D secure payment data + example: hv8mUFzPzRZoCAAAAAEQBDMAAAA= + xid: + type: string + description: Unique identifier for the transaction assigned by the MPI + example: MDAwMDAwMDAwMDAwMDAwMzIyNzY= + version: + type: string + description: Indicates the version of 3D Secure that was used for authentication + example: '2.1.0' + exemption: + type: string + enum: + - low_value + - secure_corporate_payment + - trusted_listing + - transaction_risk_assessment + - 3ds_outage + - sca_delegation + - out_of_sca_scope + - other + - low_risk_program + description: Specifies an exemption reason so that the payment is not processed using 3D Secure authentication. Learn more about exemptions in our SCA compliance guide + example: 'low_value' + exemption_applied: + type: string + description: Specifies the applied exemption during 3DS authentication + challenged: + type: boolean + description: Indicates whether this session involved a challenge. This will only be set after communication with the scheme is finished. + example: true + upgrade_reason: + type: string + description: Indicates the reason why the payment was upgraded to 3D Secure. + example: sca_retry diff --git a/nas_spec/components/schemas/Payments/3dsEnrollmentData.yaml b/nas_spec/components/schemas/Payments/3dsEnrollmentData.yaml new file mode 100644 index 000000000..413cd4165 --- /dev/null +++ b/nas_spec/components/schemas/Payments/3dsEnrollmentData.yaml @@ -0,0 +1,18 @@ +type: object +properties: + downgraded: + type: boolean + description: Indicates whether this was a 3D Secure payment downgraded to non-3D-Secure (when `attempt_n3d` is specified) + example: false + enrolled: + type: string + description: > + Indicates the 3D Secure enrollment status of the issuer + * `Y` - Issuer enrolled + * `N` - Customer not enrolled + * `U` - Unknown + example: Y + upgrade_reason: + type: string + description: Indicates the reason why the payment was upgraded to 3D Secure. + example: sca_retry \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/3dsRequest.yaml b/nas_spec/components/schemas/Payments/3dsRequest.yaml new file mode 100644 index 000000000..d83e19ace --- /dev/null +++ b/nas_spec/components/schemas/Payments/3dsRequest.yaml @@ -0,0 +1,47 @@ +type: object +title: Integrated authentication +description: Required information to process a 3DS authentication with the payment request +required: + - enabled + - +properties: + enabled: + type: boolean + description: Whether to process this payment as a 3D Secure payment + default: false + example: true + attempt_n3d: + type: boolean + description: | + Specifies whether to attempt a 3D Secure payment as non-3D Secure if the card issuer is not enrolled, or there is a technical issue during authentication + default: false + example: true + exemption: + type: string + enum: + - low_value + - secure_corporate_payment + - trusted_listing + - transaction_risk_assessment + - 3ds_outage + - sca_delegation + - out_of_sca_scope + - other + - low_risk_program + - recurring_operation + description: Specifies an exemption reason so that the payment is not processed using 3D Secure authentication. Learn more about exemptions in our SCA compliance guide + example: 'low_value' + challenge_indicator: + type: string + description: Indicates the preference for whether or not a 3DS challenge should be performed. The customer’s bank has the final say on whether or not the customer receives the challenge. + enum: + - no_preference + - no_challenge_requested + - challenge_requested + - challenge_requested_mandate + default: no_preference + allow_upgrade: + type: boolean + description: Indicates whether to process this payment as 3D Secure if the authorization was soft declined due to 3DS authentication required. For processing channels created before October 12, 2022, the value will default to `false`. + default: true + example: true \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/3dsRequestStandalone.yaml b/nas_spec/components/schemas/Payments/3dsRequestStandalone.yaml new file mode 100644 index 000000000..c3c68f2d7 --- /dev/null +++ b/nas_spec/components/schemas/Payments/3dsRequestStandalone.yaml @@ -0,0 +1,20 @@ +type: object +title: Standalone authentication +description: Required information to process a payment that has been 3DS authenticated using our Standalone authentication +required: + - enabled + - authentication_id + +properties: + enabled: + type: boolean + description: Whether to process this payment as a 3D Secure payment + enum: [true] + example: true + authentication_id: + type: string + pattern: "^(sid)_(\\w{26})$" + minLength: 30 + maxLength: 30 + example: sid_y3oqhf46pyzuxjbcn2giaqnb441 + description: The unique identifier for your 3D Secure session. \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/3dsRequestThirdParty.yaml b/nas_spec/components/schemas/Payments/3dsRequestThirdParty.yaml new file mode 100644 index 000000000..bac052698 --- /dev/null +++ b/nas_spec/components/schemas/Payments/3dsRequestThirdParty.yaml @@ -0,0 +1,104 @@ +type: object +title: Third party authentication +description: Required information to process a payment that has been 3DS authenticated using a Third Party provider + +required: + - enabled + - eci + - cryptogram + - xid + - version + +properties: + enabled: + type: boolean + description: Whether to process this payment as a 3D Secure payment + enum: [true] + example: true + eci: + type: string + description: The Electronic Commerce Indicator security level associated with the 3D Secure enrollment result. Required if using a third-party merchant plug-in (MPI) + maxLength: 2 + example: '05' + cryptogram: + type: string + description: A Base64 encoded cryptographic identifier (CAVV) used by the card schemes to validate the cardholder authentication result (3D Secure). Required if using an external MPI + maxLength: 50 + example: AgAAAAAAAIR8CQrXcIhbQAAAAAA= + xid: + type: string + description: The 3D Secure transaction identifier. Required if using an external MPI with 3D Secure 2.X.X and a Mastercard card, or with 3D Secure 1.X.X for any supported card scheme + maxLength: 100 + example: MDAwMDAwMDAwMDAwMDAwMzIyNzY= + version: + type: string + description: Indicates the version of 3D Secure that was used for authentication. Defaults to 1.0.0 if not provided + maxLength: 10 + example: '2.0.1' + exemption: + type: string + enum: + - low_value + - secure_corporate_payment + - trusted_listing + - transaction_risk_assessment + - 3ds_outage + - sca_delegation + - out_of_sca_scope + - other + - low_risk_program + - recurring_operation + description: Specifies an exemption reason so that the payment is not processed using 3D Secure authentication. Learn more about exemptions in our SCA compliance guide + example: 'low_value' + status: + type: string + example: "Y" + maxLength: 1 + minLength: 1 + description: The transaction status returned from the card Issuer’s Access Control Server (ACS) or Scheme Directory Server (DS). For 3DS Secure 1, this is the PaRes Status. for 3D Secure 2, this is the transaction status of ARes(frictionless flow) or RReq (Challenge flow) + authentication_date: + type: datetime + example: "2020-09-03T10:11:12Z" + description: "Authentication date and time. Format ISO-8601" + nullable: true + authentication_amount: + type: long + example: 200 + minimum: 0 + description: "Authentication amount" + nullable: true + flow_type: + type: string + enum: + - challenged + - frictionless + - frictionless_delegated + description: Indicates whether the 3D Secure 2 authentication was challenged or frictionless. + challenge_indicator: + type: string + description: Indicates the preference for whether or not a 3DS challenge should be performed. The customer’s bank has the final say on whether or not the customer receives the challenge. + enum: + - no_preference + - no_challenge_requested + - challenge_requested + - challenge_requested_mandate + default: no_preference + status_reason_code: + type: string + example: "01" + maxLength: 2 + minLength: 2 + description: "A code indicating the reason for the transaction status" + challenge_cancel_reason: + type: string + example: "01" + description: 'Indicates a cancel reason for a challenge in the case of authentication. Can be any number from 00 to 99, with 00 being specific ONLY to Cartes Bancaires.' + score: + type: string + description: Risk score calculated by Directory Server (DS). Cartes Bancaires 3D Secure 2 only. + cryptogram_algorithm: + type: string + example: "1" + maxLength: 1 + minLength: 1 + description: The algorithm used by the Issuer ACS to calculate the Authentication cryptogram. This is the AVALGO data returned in Cartes bancaires Authentication. \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/ActionId.yaml b/nas_spec/components/schemas/Payments/ActionId.yaml new file mode 100644 index 000000000..50591ad75 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ActionId.yaml @@ -0,0 +1,6 @@ +type: string +pattern: "^(act)_(\\w{26})$" +description: The action identifier +maxLength: 30 +minLength: 30 +example: 'act_y3oqhf46pyzuxjbcn2giaqnb44' diff --git a/nas_spec/components/schemas/Payments/AmountAllocations.yaml b/nas_spec/components/schemas/Payments/AmountAllocations.yaml new file mode 100644 index 000000000..eb0e47130 --- /dev/null +++ b/nas_spec/components/schemas/Payments/AmountAllocations.yaml @@ -0,0 +1,53 @@ +type: array +description: The sub-entities that the payment is being processed on behalf of +minItems: 1 +maxItems: 10 +items: + type: object + required: + - id + - amount + title: Amount Allocations + properties: + id: + type: string + description: "The id of the sub-entity." + example: "ent_w4jelhppmfiufdnatam37wrfc4" + amount: + type: integer + description: | + The split amount - this will be credited to your sub-entity's currency account. The sum of all split amounts must be equal to the payment amount. + + The amount must be provided in the minor currency unit. + minimum: 0 + example: 1000 + reference: + type: string + description: A reference you can later use to identify this split, such as an order number. + maxLength: 50 + example: "ORD-5023-4E89" + commission: + type: object + title: Commission + description: | + Commission you'd like to collect from this split - this will be credited to your currency account. The commission cannot exceed the split amount. + + Commission = (`amount` * `commission.percentage`) + `commission.amount` + properties: + amount: + type: integer + description: | + Optional fixed amount of commission to collect. + + The amount must be provided in the minor currency unit. + minimum: 0 + example: 1000 + percentage: + type: number + description: | + Optional percentage of commission to collect. + + Supports up to 8 decimal places. + minimum: 0 + maximum: 100 + example: 1.125 diff --git a/nas_spec/components/schemas/Payments/AuthorizationRequest.yaml b/nas_spec/components/schemas/Payments/AuthorizationRequest.yaml new file mode 100644 index 000000000..485aaca18 --- /dev/null +++ b/nas_spec/components/schemas/Payments/AuthorizationRequest.yaml @@ -0,0 +1,18 @@ +type: object +properties: + amount: + type: integer + description: | + The amount to increase the authorization by. Omit the amount or provide a value of `0` to extend the authorization validity period + minimum: 0 + example: 6540 + reference: + type: string + description: A reference you can later use to identify this authorization request + example: 'ORD-5023-4E89' + metadata: + type: object + description: A set of key-value pairs that you can attach to the authorization request. This can be useful for storing additional information in a structured format. **Note** that this object only allows one level of depth, so cannot accept non-primitive data types such as objects or arrays. + example: + coupon_code: 'NY2018' + partner_id: 123989 diff --git a/nas_spec/components/schemas/Payments/AuthorizationResponse.yaml b/nas_spec/components/schemas/Payments/AuthorizationResponse.yaml new file mode 100644 index 000000000..2d15488df --- /dev/null +++ b/nas_spec/components/schemas/Payments/AuthorizationResponse.yaml @@ -0,0 +1,139 @@ +type: object +description: Authorization Response +required: + - action_id + - amount + - currency + - approved + - status + - response_code + - processed_on + - _links +properties: + action_id: + description: The unique identifier for the action performed against this payment + allOf: + - $ref: '#/components/schemas/ActionId' + amount: + type: integer + description: The payment amount + example: 6540 + currency: + type: string + description: The three-letter ISO currency code of the payment + example: USD + maxLength: 3 + minLength: 3 + approved: + type: boolean + description: Whether or not the authorization was successful + example: true + status: + type: string + description: The status of the payment + enum: + - Authorized + - Declined + example: Authorized + auth_code: + type: string + description: The acquirer authorization code if the payment was authorized + example: '643381' + response_code: + type: string + description: The Gateway response code + example: '10000' + response_summary: + type: string + description: The Gateway response summary + example: 'Approved' + expires_on: + type: string + description: The timestamp (ISO 8601 code) for when the authorization's validity period ends + balances: + type: object + description: The payment balances + allOf: + - $ref: '#/components/schemas/PaymentResponseBalances' + processed_on: + description: The date/time the payment was processed + allOf: + - $ref: '#/components/schemas/ServerTimestamp' + reference: + type: string + description: Your reference for the payment + example: ORD-5023-4E89 + processing: + type: object + description: Returns information related to the processing of the payment + properties: + retrieval_reference_number: + type: string + description: 'A unique identifier for the authorization that is submitted to the card scheme during processing' + example: '909913440644' + acquirer_transaction_id: + type: string + description: 'A unique identifier for the transaction generated by the acquirer' + example: '440644309099499894406' + recommendation_code: + type: string + description: 'A code that represents the next recommended action for the payment' + example: "02" + eci: + type: string + description: The final Electronic Commerce Indicator (ECI) security level used to authorize the payment. + Applicable for 3D Secure and network token payments + example: '06' + scheme_id: + type: string + description: The scheme transaction identifier + example: '489341065491658' + _links: + type: object + description: The links related to the payment + minItems: 2 + required: + - self + - actions + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the payment + actions: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to the payment's associated actions + authorize: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to increment the authorization, where applicable + void: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to void the payment, where applicable + capture: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to capture the payment, where applicable + refund: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to refund the payment, where applicable + example: + self: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44' + actions: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/actions' + authorize: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/authorizations' + void: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/voids' + capture: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/capture' diff --git a/nas_spec/components/schemas/Payments/BankAccountFields.yaml b/nas_spec/components/schemas/Payments/BankAccountFields.yaml new file mode 100644 index 000000000..a523b3a00 --- /dev/null +++ b/nas_spec/components/schemas/Payments/BankAccountFields.yaml @@ -0,0 +1,111 @@ +type: object +properties: + sections: + type: array + items: + type: object + required: + - name + properties: + name: + type: string + description: The name of the section + example: Account Details + fields: + type: array + items: + type: object + required: + - id + - display + - type + - required + properties: + id: + type: string + description: The field identifier + example: account_holder.first_name + section: + type: string + description: The section to display the field in + example: account + display: + type: string + description: The field's display name + example: First name + help_text: + type: string + description: The help text that explains the purpose of the field + example: The account holder's first name. Required if type is individual. + type: + type: string + description: The type of field + example: string + required: + type: boolean + description: Whether the field is required + example: true + validation_regex: + type: string + description: A regular expression that can be used to validate the input of the field + example: ^[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,18}$ + min_length: + type: integer + description: The minimum length of the field + example: 22 + max_length: + type: integer + description: The maximum length of the field + example: 22 + allowed_options: + type: array + description: The allowed options for the field + items: + type: object + properties: + id: + type: string + description: The option identifier + example: '1' + display: + type: string + description: The option display value + example: Beneficiary + dependencies: + type: array + description: The field's dependencies + items: + type: object + properties: + field_id: + type: string + description: The field identifier + example: entity_type + value: + type: string + description: The value of the dependent field that match in order for this field to be displayed +example: + sections: + - name: Account Details + fields: + - id: iban + type: string + display: IBAN + description: Number (which can contain letters) that identifies the account + section: account + required: true + validation_regex: ^[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,18}$ + min_length: 22 + max_length: 22 + - id: account_holder.first_name + type: string + display: First name + description: The account holder's first name + section: account + required: true + - id: account_holder.last_name + type: string + display: First name + description: The account holder's last name + section: account + required: true diff --git a/nas_spec/components/schemas/Payments/BankPayoutRequest.yaml b/nas_spec/components/schemas/Payments/BankPayoutRequest.yaml new file mode 100644 index 000000000..999614952 --- /dev/null +++ b/nas_spec/components/schemas/Payments/BankPayoutRequest.yaml @@ -0,0 +1,39 @@ +type: object +required: + - source + - destination + - amount + - currency + - billing_descriptor + - processing_channel_id +properties: + source: + $ref: '#/components/schemas/PayoutRequestSource' + destination: + $ref: '#/components/schemas/PaymentRequestDestination' + amount: + type: integer + description: The amount you want to pay out to the destination account. The exact format depends on the currency.
You must specify either `amount` or `source.amount`. + minimum: 0 + example: 6540 + currency: + type: string + description: | + The three-letter ISO code of the destination currency
The currency should match that of the destination account. + example: USD + maxLength: 3 + minLength: 3 + reference: + type: string + description: An internal reference you can later use to identify this payout + example: 'Withdrawal' + billing_descriptor: + $ref: '#/components/schemas/PayoutBillingDescriptor' + sender: + $ref: '#/components/schemas/PayoutSender' + instruction: + $ref: '#/components/schemas/PaymentInstruction' + processing_channel_id: + type: string + pattern: "^(pc)_(\\w{26})$" + description: The processing channel identifier diff --git a/nas_spec/components/schemas/Payments/BillingDescriptor.yaml b/nas_spec/components/schemas/Payments/BillingDescriptor.yaml new file mode 100644 index 000000000..e01d343c2 --- /dev/null +++ b/nas_spec/components/schemas/Payments/BillingDescriptor.yaml @@ -0,0 +1,33 @@ +type: object +description: | + An optional description that is displayed on the customer's statement identifying a purchase. +properties: + name: + type: string + description: | + A dynamic description of the payment. + Applies to card payments only. + example: 'SUPERHEROES.COM' + maxLength: 25 + city: + type: string + description: | + The city from which the payment originated. + Applies to card payments only. + minimum: 1 + example: 'GOTHAM' + maxLength: 13 + reference: + type: string + description: | + The reference that should be shown on the statement. + Required for payouts to bank accounts. + maxLength: 50 + local_descriptors: + type: array + nullable: true + items: + $ref: '#/components/schemas/LocalBillingDescriptor' +required: + - name + - city diff --git a/nas_spec/components/schemas/Payments/CaptureAcceptedResponse.yaml b/nas_spec/components/schemas/Payments/CaptureAcceptedResponse.yaml new file mode 100644 index 000000000..a917b5e3c --- /dev/null +++ b/nas_spec/components/schemas/Payments/CaptureAcceptedResponse.yaml @@ -0,0 +1,35 @@ +type: object +description: Capture response +required: + - action_id +properties: + action_id: + description: The unique identifier for the capture action + allOf: + - $ref: '#/components/schemas/ActionId' + reference: + type: string + description: Your reference for the capture request + example: 'ORD-5023-4E89' + _links: + type: object + description: The links related to the capture + readOnly: true + minItems: 2 + properties: + payment: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the payment to be captured. Use this to check the status of the payment + example: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44' + redirect: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: For some alternative payments, the URI that the customer should be redirected to to complete the capture + example: + href: 'https://api.checkout.com/redirect/act_y3oqhf46pyzuxjbcn2giaqnb44' + required: + - payment diff --git a/nas_spec/components/schemas/Payments/CaptureRequest.yaml b/nas_spec/components/schemas/Payments/CaptureRequest.yaml new file mode 100644 index 000000000..f4b762f2e --- /dev/null +++ b/nas_spec/components/schemas/Payments/CaptureRequest.yaml @@ -0,0 +1,59 @@ +type: object +properties: + amount: + type: integer + description: The amount to capture. If not specified, the full payment amount will be captured. + minimum: 0 + example: 6540 + capture_type: + type: string + description: The type of capture. If set to `Final`, the remaining available-to-capture balance will be voided. + default: Final + enum: + - NonFinal + - Final + example: Final + reference: + type: string + description: A reference you can later use to identify this capture request.
For Amex, the string limit is 30 characters. + maxLength: 50 + example: 'ORD-5023-4E89' + customer: + $ref: '#/components/schemas/CustomerRequest' + description: + type: string + description: A description of the payment. + maxLength: 100 + example: 'Set of 3 masks' + billing_descriptor: + $ref: '#/components/schemas/BillingDescriptor' + shipping: + type: object + description: The shipping details. + properties: + address: + description: The shipping address. + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The phone number associated with the shipping address. + allOf: + - $ref: '#/components/schemas/PhoneNumber' + from_address_zip: + type: string + description: The postal code or zip code of the location being shipped from. + example: '10014' + items: + $ref: '#/components/schemas/Items' + marketplace: + $ref: '#/components/schemas/MarketplaceCapture' + amount_allocations: + $ref: '#/components/schemas/AmountAllocations' + processing: + $ref: '#/components/schemas/CaptureRequestProcessingSettings' + metadata: + type: object + description: A set of key-value pairs that you can attach to the capture request. This can be useful for storing additional information in a structured format. **Note** that this object only allows one level of depth, so cannot accept non-primitive data types such as objects or arrays. + example: + coupon_code: 'NY2018' + partner_id: 123989 diff --git a/nas_spec/components/schemas/Payments/CaptureRequestProcessingSettings.yaml b/nas_spec/components/schemas/Payments/CaptureRequestProcessingSettings.yaml new file mode 100644 index 000000000..abb28602e --- /dev/null +++ b/nas_spec/components/schemas/Payments/CaptureRequestProcessingSettings.yaml @@ -0,0 +1,52 @@ +type: object +description: Use the processing object to influence or override the data sent during card processing +properties: + order_id: + type: string + description: The number provided by the cardholder. Purchase order or invoice number may be used. + maxLength: 17 + example: '123456789' + otp_value: + type: string + description: One time password sent to customer by SMS. + maxLength: 50 + example: '966557877988' + tax_amount: + type: number + description: Contains the customer’s value-added tax registration number. + minimum: 0 + example: 3000 + discount_amount: + type: number + description: The discount amount applied to the transaction by the merchant. + minimum: 0 + example: 000 + duty_amount: + type: number + description: The total charges for any import/export duty included in the transaction. + minimum: 0 + example: 000 + shipping_amount: + type: number + description: The total freight or shipping and handling charges for the transaction. + minimum: 0 + example: 300 + shipping_tax_amount: + type: number + description: The tax amount of the freight or shipping and handling charges for the transaction. + minimum: 0 + example: 100 + shipping_delay: + type: integer + description: 'The delay before the order will be shipped.' + shipping_info: + x-klarna-docs: https://developers.klarna.com/api/#order-management-api__create-capture__shipping_info + x-cko-passthrough: true + type: array + description: The shipping information for the payment capture. Maximum 500 items. + items: + $ref: '#/components/schemas/ShippingInfo' + purchase_country: + type: string + description: The country where the goods are purchased or the seller is based. ISO 3166 alpha-2 purchase country code. + example: GB \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/Item.yaml b/nas_spec/components/schemas/Payments/Item.yaml new file mode 100644 index 000000000..cf1c49eaf --- /dev/null +++ b/nas_spec/components/schemas/Payments/Item.yaml @@ -0,0 +1,37 @@ +type: object +description: The order line item or product that is being purchased +properties: + sku: + type: string + description: The stock-keeping unit (SKU) identifier of the item + example: 858818ac + name: + type: string + description: The name of the item or product + example: Kevlar batterang + description: + type: string + description: A description of the item or product + example: The fastest, hardest batterang known to man + image_url: + type: string + format: uri + description: The URL of an image of the item or product + example: http://example.com/batterang.jpg + price: + type: number + description: The unit price of the item or product in the minor currency unit + example: 34.50 + quantity: + type: number + description: The number of the items purchased + example: 2 + shipping_cost: + type: number + description: The shipping cost of the item + example: 2.99 + shipping_tracking_url: + type: string + format: uri + description: A URL to track the shipping status of the item + example: http://www.dhl.co.uk/en/express/tracking.html?AWB=41f280bbe12cd787b47c&brand=DHL diff --git a/nas_spec/components/schemas/Payments/Items.yaml b/nas_spec/components/schemas/Payments/Items.yaml new file mode 100644 index 000000000..6a6b527f2 --- /dev/null +++ b/nas_spec/components/schemas/Payments/Items.yaml @@ -0,0 +1,61 @@ +type: array +description: The order line items +items: + type: object + description: The order line item or product that is being purchased + properties: + name: + type: string + description: The descriptive name of the line item + example: Kevlar batterang + maxLength: 255 + quantity: + type: integer + description: The number of line items + minimum: 1 + example: 2 + unit_price: + type: integer + description: The unit price of the item the minor currency unit + minimum: 0 + example: 50 + reference: + type: string + description: The item reference or product SKU (stock-keeping unit). + example: 858818ac + maxLength: 255 + commodity_code: + type: string + description: A code identifying a Commodity for value-added tax (VAT) purposes. + maxLength: 12 + example: 'DEF123' + unit_of_measure: + type: string + description: Unit of Measure code used for an item in transaction. + maxLength: 12 + example: 'metres' + total_amount: + type: number + description: The total amount for the line item. + example: 29000 + tax_amount: + type: number + description: Contains the total amount of sales tax or value-added tax (VAT) on the total purchase amount. Tax should be included in the total purchase. + example: 1000 + discount_amount: + type: number + description: The discount applied to each invoice line item. + example: 1000 + wxpay_goods_id: + type: string + description: Unified product No. defined by WeChat Pay + maxLength: 32 + example: 1001 + url: + type: string + maxLength: 1024 + description: Link to the line item's product page + image_url: + type: string + maxLength: 1024 + description: Link to the line item's prodcut page diff --git a/nas_spec/components/schemas/Payments/LocalBillingDescriptor.yaml b/nas_spec/components/schemas/Payments/LocalBillingDescriptor.yaml new file mode 100644 index 000000000..36a8f6fd3 --- /dev/null +++ b/nas_spec/components/schemas/Payments/LocalBillingDescriptor.yaml @@ -0,0 +1,20 @@ +type: object +description: | + An optional description that is displayed on the customer's statement identifying a purchase, in the specified local character set. + + This does not override the value supplied in `BillingDescriptor`. +properties: + name: + type: string + description: | + A dynamic description of the card payment. Other payment methods will not display this description. + + The character set specified will determine the maximum length of the field. For `katakana`, the maximum length is 23 characters, equivalent to 23 katakana characters. For `kanji`, the maximum length is 40 characters, equivalent to 20 kanji characters. + example: '漢字' + character_set: + allOf: + - $ref: '#/components/schemas/LocalCharacterSets' + - description: The character set of the descriptor +required: + - name + - character_set diff --git a/nas_spec/components/schemas/Payments/LocalCharacterSets.yaml b/nas_spec/components/schemas/Payments/LocalCharacterSets.yaml new file mode 100644 index 000000000..1fe4bb44f --- /dev/null +++ b/nas_spec/components/schemas/Payments/LocalCharacterSets.yaml @@ -0,0 +1,4 @@ +type: string +enum: + - kanji + - katakana diff --git a/nas_spec/components/schemas/Payments/MarketplaceAuth.yaml b/nas_spec/components/schemas/Payments/MarketplaceAuth.yaml new file mode 100644 index 000000000..709782fad --- /dev/null +++ b/nas_spec/components/schemas/Payments/MarketplaceAuth.yaml @@ -0,0 +1,11 @@ +type: object +description: | + Replaced by `amount_allocations` + + Information related to marketplace payments +deprecated: true +properties: + sub_entity_id: + $ref: '#/components/schemas/MarketplaceNonSplit' + sub_entities: + $ref: '#/components/schemas/MarketplaceSplit' diff --git a/nas_spec/components/schemas/Payments/MarketplaceCapture.yaml b/nas_spec/components/schemas/Payments/MarketplaceCapture.yaml new file mode 100644 index 000000000..475172121 --- /dev/null +++ b/nas_spec/components/schemas/Payments/MarketplaceCapture.yaml @@ -0,0 +1,9 @@ +type: object +description: | + Replaced by `amount_allocations` + + Information related to marketplace payments +deprecated: true +properties: + sub_entities: + $ref: '#/components/schemas/MarketplaceSplit' diff --git a/nas_spec/components/schemas/Payments/MarketplaceNonSplit.yaml b/nas_spec/components/schemas/Payments/MarketplaceNonSplit.yaml new file mode 100644 index 000000000..bc92bbf50 --- /dev/null +++ b/nas_spec/components/schemas/Payments/MarketplaceNonSplit.yaml @@ -0,0 +1,3 @@ +type: string +description: The sub-entity that the payment is being processed on behalf of +example: 'ent_rgyzti4x74xubmu72m6r3pvksa' \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/MarketplaceSplit.yaml b/nas_spec/components/schemas/Payments/MarketplaceSplit.yaml new file mode 100644 index 000000000..b6a0b81ad --- /dev/null +++ b/nas_spec/components/schemas/Payments/MarketplaceSplit.yaml @@ -0,0 +1,53 @@ +type: array +description: The sub-entities that the payment is being processed on behalf of - use for split payments. +minItems: 1 +maxItems: 10 +items: + type: object + required: + - id + - amount + title: SubEntities + properties: + id: + type: string + description: "The id of the sub-entity." + example: "ent_w4jelhppmfiufdnatam37wrfc4" + amount: + type: integer + description: | + The split amount - this will be credited to your sub-entity's currency account. The sum of all split amounts must be equal to the payment amount. + + The amount must be provided in the minor currency unit. + minimum: 0 + example: 1000 + reference: + type: string + description: A reference you can later use to identify this split, such as an order number. + maxLength: 50 + example: "ORD-5023-4E89" + commission: + type: object + title: Commission + description: | + Commission you'd like to collect from this split - this will be credited to your currency account. The commission cannot exceed the split amount. + + Commission = (`amount` * `commission.percentage`) + `commission.amount` + properties: + amount: + type: integer + description: | + Optional fixed amount of commission to collect. + + The amount must be provided in the minor currency unit. + minimum: 0 + example: 1000 + percentage: + type: number + description: | + Optional percentage of commission to collect. + + Supports up to 8 decimal places. + minimum: 0 + maximum: 100 + example: 1.125 diff --git a/nas_spec/components/schemas/Payments/Payment.yaml b/nas_spec/components/schemas/Payments/Payment.yaml new file mode 100644 index 000000000..f344800d5 --- /dev/null +++ b/nas_spec/components/schemas/Payments/Payment.yaml @@ -0,0 +1,218 @@ +type: object +description: Payment response +required: + - id + - requested_on + - amount + - currency + - status + - approved + - _links +properties: + id: + description: Payment unique identifier + allOf: + - $ref: '#/components/schemas/PaymentId' + requested_on: + description: The date/time the payment was requested + allOf: + - $ref: '#/components/schemas/ServerTimestamp' + source: + description: The source of the payment + type: object + allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + destination: + description: The destination of the payment + type: object + allOf: + - $ref: '#/components/schemas/PaymentResponseDestination' + amount: + type: integer + description: The original payment amount + example: 6540 + currency: + type: string + description: The three-letter ISO currency code of the payment + example: USD + maxLength: 3 + minLength: 3 + payment_type: + type: string + description: This must be specified for card payments where the cardholder is not present (i.e., recurring or mail order / telephone order) + enum: + - Regular + - Recurring + - MOTO + - Installment + - Unscheduled + default: Regular + example: Recurring + reference: + type: string + description: Your reference for the payment + example: ORD-5023-4E89 + description: + type: string + description: A description of the payment + example: Set of 3 masks + approved: + type: boolean + description: Whether the payment was successful + example: true + expires_on: + type: string + description: The timestamp (ISO 8601 code) for when the authorization's validity period expires + status: + type: string + description: The status of the payment + enum: + - Pending + - Authorized + - Card Verified + - Voided + - Partially Captured + - Captured + - Partially Refunded + - Refunded + - Declined + - Canceled + - Paid + example: Authorized + balances: + type: object + description: The payment balances + allOf: + - $ref: '#/components/schemas/PaymentResponseBalances' + 3ds: + type: object + description: Provides information relating to the processing of 3D Secure payments + allOf: + - $ref: '#/components/schemas/3dsData' + risk: + type: object + description: Returns the payments risk assessment results + properties: + flagged: + type: boolean + description: Whether the payment was flagged by a risk check + default: false + example: true + score: + type: integer + description: The risk score calculated by our Fraud Detection engine. Absent if not enough data provided. + example: 22 + minimum: 0 + maximum: 100 + customer: + type: object + description: The customer to which this payment is linked + properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + description: The unique identifier of the customer. This can be passed as a source when making a payment + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' + email: + type: string + description: The customer's email address + example: 'brucewayne@gmail.com' + name: + type: string + description: The customer's name + example: 'Bruce Wayne' + required: + - id + billing_descriptor: + $ref: '#/components/schemas/BillingDescriptor' + shipping: + type: object + description: The payment shipping details + properties: + address: + description: The shipping address + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The phone number associated with the shipping address + allOf: + - $ref: '#/components/schemas/PhoneNumber' + payment_ip: + description: The IP address used to make the payment. Used by Checkout.com's risk engine to check the customer's IP address – only accepts IPv4 and IPv6 addresses. + allOf: + - $ref: '#/components/schemas/IPAddress' + marketplace: + $ref: '#/components/schemas/MarketplaceAuth' + recipient: + $ref: '#/components/schemas/PaymentRecipient' + metadata: + type: object + description: A set of key-value pairs that you can attach to a payment. It can be useful for storing additional information in a structured format + example: + coupon_code: 'NY2018' + partner_id: 123989 + eci: + type: string + description: | + The final Electronic Commerce Indicator (ECI) security level used to authorize the payment. + Applicable for 3D Secure and network token payments + example: '06' + scheme_id: + type: string + description: | + The scheme transaction identifier + example: '488341541494658' + actions: + type: array + items: + $ref: '#/components/schemas/PaymentActionSummary' + description: | + A summary of the payment's actions, + returned when a session ID is used to get the payment details + _links: + type: object + description: The links related to the payment + minItems: 2 + required: + - self + - actions + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the payment + actions: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to the payment's associated actions + authorize: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to increment the authorization, where applicable + void: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to void the payment, where applicable + capture: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to capture the payment, where applicable + refund: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to refund the payment, where applicable + example: + self: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44' + actions: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/actions' + authorize: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/authorizations' + refund: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/refund' diff --git a/nas_spec/components/schemas/Payments/PaymentAcceptedResponse.yaml b/nas_spec/components/schemas/Payments/PaymentAcceptedResponse.yaml new file mode 100644 index 000000000..5afd75380 --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentAcceptedResponse.yaml @@ -0,0 +1,65 @@ +type: object +description: Payment response +required: + - id + - status +properties: + id: + description: The payment's unique identifier + readOnly: true + allOf: + - $ref: '#/components/schemas/PaymentId' + status: + type: string + description: The status of the payment + enum: + - Pending + reference: + type: string + description: Your reference for the payment request + example: ORD-5023-4E89 + customer: + type: object + description: The customer associated with the payment, if provided in the request + allOf: + - $ref: '#/components/schemas/CustomerResponse' + 3ds: + type: object + description: Provides 3D Secure enrollment status + allOf: + - $ref: '#/components/schemas/3dsEnrollmentData' + processing: + type: object + description: Returns information related to the processing of the payment + readOnly: true + properties: + continuation_payload: + type: string + description: The payload for an in-app payment the merchant can use to continue a payments. + example: '{\"prepay_id\":\"wx02161421698644ab471821297252eb0000\",\"partner_id\":\"1900012731\",\"timestamp\":1651479262,\"app_id\":\"sub_application_id\",\"nonce\":\"476d17edadf44915ad533107bd3c71c2\",\"sign\":\"QM1CCVAkexZLq00Uz/IxgbqC2ke7Xl9xUayutALc1EebLT1cI85H0biNNjhzQrzFdJ0YCq8KR2Hc9bD01vxRsn18fHzE5bhvn2qlUSOeY7hATfaLYS7+f+gKVj+0iIuUp3qamquErrKYl1g1Vhvlwn1U8TrcjhU0w666YYJuwIP9qPNy6F8wj3ORWM1uYmB9D4v09sTnmZfBPFwuGJzj2PTBGyvoKLu+V1T1HzlC2rwhpDmrSCq0rcFL2smztWGVktpZ2NoggEAVWLjHWsvS8OmzgeosM3ltoCeWjlp1SusmXtlMtUJWyjiVQYHnjb/a42NYk/qynZ/w+BAqLTlDKA==\",\"pkg\":\"Sign=WXPay\"}' + partner_payment_id: + type: string + description: 'The partner-originated unique payment identifier' + example: '440644309099499894406' + _links: + type: object + description: The links related to the payment + readOnly: true + minItems: 2 + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the payment + example: + href: 'https://api.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4' + redirect: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI that the customer should be redirected to in order to complete the payment + example: + href: 'https://api.checkout.com/3ds/pay_mbabizu24mvu3mela5njyhpit4' + required: + - self diff --git a/nas_spec/components/schemas/Payments/PaymentAction.yaml b/nas_spec/components/schemas/Payments/PaymentAction.yaml new file mode 100644 index 000000000..48e60bb8d --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentAction.yaml @@ -0,0 +1,83 @@ +type: object +required: + - id + - type + - amount + - response_code + - processed_on +properties: + id: + description: The unique identifier of the payment action + allOf: + - $ref: '#/components/schemas/ActionId' + type: + type: string + description: The type of action + enum: + - Authorization + - Card Verification + - Void + - Capture + - Refund + - Payout + - Return + processed_on: + description: The date/time the action was processed + allOf: + - $ref: '#/components/schemas/ServerTimestamp' + amount: + type: integer + description: The action amount + example: 6540 + approved: + type: boolean + description: Whether the action was successful + example: true + auth_code: + type: string + description: The acquirer authorization code for cards + example: '643381' + response_code: + type: string + description: The Gateway response code + example: '10000' + response_summary: + type: string + description: The Gateway response summary + example: 'Approved' + authorization_type: + type: string + description: The authorization type + enum: + - Final + - Estimated + - Incremental + default: Final + example: Estimated + reference: + type: string + description: Your reference for the action + example: 'ORD-5023-4E89' + marketplace: + $ref: '#/components/schemas/MarketplaceAuth' + amount_allocations: + $ref: '#/components/schemas/AmountAllocations' + processing: + type: object + description: Returns information related to the processing of the payment + properties: + retrieval_reference_number: + type: string + description: 'A unique identifier for the authorization that is submitted to the card scheme during processing' + example: '909913440644' + acquirer_reference_number: + type: string + description: 'A unique identifier for the capture that is submitted to the card scheme during processing' + example: '24021219099007452440793' + acquirer_transaction_id: + type: string + description: 'A unique identifier for the transaction generated by the acquirer' + example: '440644309099499894406' + metadata: + type: object + description: A set of key-value pairs that you can attach to an action diff --git a/nas_spec/components/schemas/Payments/PaymentActionSummary.yaml b/nas_spec/components/schemas/Payments/PaymentActionSummary.yaml new file mode 100644 index 000000000..351a784c2 --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentActionSummary.yaml @@ -0,0 +1,27 @@ +type: object +required: + - id + - type + - response_code +properties: + id: + description: The unique identifier of the payment action + allOf: + - $ref: '#/components/schemas/ActionId' + type: + type: string + description: The type of action + enum: + - Authorization + - Card Verification + - Void + - Capture + - Refund + response_code: + type: string + description: The Gateway response code + example: '10000' + response_summary: + type: string + description: The Gateway response summary + example: 'Approved' diff --git a/nas_spec/components/schemas/Payments/PaymentActionsResponse.yaml b/nas_spec/components/schemas/Payments/PaymentActionsResponse.yaml new file mode 100644 index 000000000..390b06ed7 --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentActionsResponse.yaml @@ -0,0 +1,38 @@ +type: array +items: + $ref: '#/components/schemas/PaymentAction' +minItems: 1 +description: | + The payment actions +example: + - 'id': 'act_fd3h6evhpn3uxdoqbuu3lqnqbm' + 'type': 'Refund' + 'processed_on': '2018-01-20T10:30:48Z' + 'amount': 1000 + 'approved': true + 'response_code': '10000' + 'response_summary': 'Approved' + - 'id': 'act_gefycn3jcvuupboxfmqrhk2aym' + 'type': 'Capture' + 'processed_on': '2018-01-17T10:30:48Z' + 'amount': 6540 + 'approved': true + 'response_code': '10000' + 'response_summary': 'Approved' + 'processing': + 'acquirer_reference_number': '24021219099007452440793' + 'acquirer_transaction_id': '00745244079' + 'metadata': + 'shipping_ref': 'MQIBN2' + - 'id': 'act_y3oqhf46pyzuxjbcn2giaqnb44' + 'type': 'Authorization' + 'processed_on': '2018-01-17T09:30:48Z' + 'amount': 6540 + 'approved': true + 'auth_code': '643381' + 'response_code': '10000' + 'response_summary': 'Approved' + 'reference': 'ORD-5023-4E89' + 'processing': + 'retrieval_reference_number': '909913440644' + 'acquirer_transaction_id': '440644309099499894406' diff --git a/nas_spec/components/schemas/Payments/PaymentDestination.yaml b/nas_spec/components/schemas/Payments/PaymentDestination.yaml new file mode 100644 index 000000000..0cf455361 --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentDestination.yaml @@ -0,0 +1,15 @@ +type: object +description: | + A destination for OpenPay payments +properties: + id: + type: string + description: The OpenPay account identifier + example: 'vendor-123456' + amount: + type: integer + description: The amount to be credited to the destination in the major currency unit + example: 10.50 +required: + - id + - amount diff --git a/nas_spec/components/schemas/Payments/PaymentDetails.yaml b/nas_spec/components/schemas/Payments/PaymentDetails.yaml new file mode 100644 index 000000000..e25f147b5 --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentDetails.yaml @@ -0,0 +1,230 @@ +type: object +description: Payment response +required: + - id + - requested_on + - amount + - currency + - status + - approved + - _links +properties: + id: + description: Payment unique identifier + allOf: + - $ref: '#/components/schemas/PaymentId' + requested_on: + description: The date/time the payment was requested + allOf: + - $ref: '#/components/schemas/ServerTimestamp' + source: + description: The source of the payment + type: object + allOf: + - $ref: '#/components/schemas/PaymentDetailsResponseSource' + destination: + description: The destination of the payment + type: object + allOf: + - $ref: '#/components/schemas/PaymentResponseDestination' + amount: + type: integer + description: The original payment amount + example: 6540 + currency: + type: string + description: The three-letter ISO currency code of the payment + example: USD + maxLength: 3 + minLength: 3 + payment_type: + type: string + description: This must be specified for card payments where the cardholder is not present (i.e., recurring or mail order / telephone order) + enum: + - Regular + - Recurring + - MOTO + - Installment + - Unscheduled + default: Regular + example: Recurring + reference: + type: string + description: Your reference for the payment + example: ORD-5023-4E89 + description: + type: string + description: A description of the payment + example: Set of 3 masks + approved: + type: boolean + description: Whether the payment was successful + example: true + expires_on: + type: string + description: The timestamp (ISO 8601 code) for when the authorization's validity period expires + status: + type: string + description: The status of the payment + enum: + - Pending + - Authorized + - Card Verified + - Voided + - Partially Captured + - Captured + - Partially Refunded + - Refunded + - Declined + - Canceled + - Expired + - Paid + example: Authorized + balances: + type: object + description: The payment balances + allOf: + - $ref: '#/components/schemas/PaymentResponseBalances' + 3ds: + type: object + description: Provides information relating to the processing of 3D Secure payments + allOf: + - $ref: '#/components/schemas/3dsData' + risk: + type: object + description: Returns the payments risk assessment results + properties: + flagged: + type: boolean + description: Whether the payment was flagged by a risk check + default: false + example: true + score: + type: integer + description: The risk score calculated by our Fraud Detection engine. Absent if not enough data provided. + example: 22 + minimum: 0 + maximum: 100 + customer: + type: object + description: The customer to which this payment is linked + properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + description: The unique identifier of the customer. This can be passed as a source when making a payment + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' + email: + type: string + description: The customer's email address + example: 'brucewayne@gmail.com' + name: + type: string + description: The customer's name + example: 'Bruce Wayne' + required: + - id + billing_descriptor: + $ref: '#/components/schemas/BillingDescriptor' + shipping: + type: object + description: The payment shipping details + properties: + address: + description: The shipping address + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The phone number associated with the shipping address + allOf: + - $ref: '#/components/schemas/PhoneNumber' + payment_ip: + description: The IP address used to make the payment. Used by Checkout.com's risk engine to check the customer's IP address – only accepts IPv4 and IPv6 addresses. + allOf: + - $ref: '#/components/schemas/IPAddress' + sender: + description: Information about the sender of the payment's funds + type: object + allOf: + - $ref: '#/components/schemas/PaymentDetailsResponseSender' + marketplace: + $ref: '#/components/schemas/MarketplaceAuth' + amount_allocations: + $ref: '#/components/schemas/AmountAllocations' + recipient: + $ref: '#/components/schemas/PaymentRecipient' + processing: + $ref: '#/components/schemas/ProcessingData' + items: + $ref: '#/components/schemas/Items' + metadata: + type: object + description: A set of key-value pairs that you can attach to a payment. It can be useful for storing additional information in a structured format + example: + coupon_code: 'NY2018' + partner_id: 123989 + eci: + type: string + description: | + The final Electronic Commerce Indicator (ECI) security level used to authorize the payment. + Applicable for 3D Secure and network token payments + example: '06' + scheme_id: + type: string + description: | + The scheme transaction identifier + example: '488341541494658' + actions: + type: array + items: + $ref: '#/components/schemas/PaymentActionSummary' + description: | + A summary of the payment's actions, + returned when a session ID is used to get the payment details + _links: + type: object + description: The links related to the payment + minItems: 2 + required: + - self + - actions + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the payment + actions: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to the payment's associated actions + authorize: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to increment the authorization, where applicable + void: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to void the payment, where applicable + capture: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to capture the payment, where applicable + refund: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to refund the payment, where applicable + example: + self: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44' + actions: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/actions' + authorize: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/authorizations' + refund: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/refund' diff --git a/nas_spec/components/schemas/Payments/PaymentDetailsResponseSender.yaml b/nas_spec/components/schemas/Payments/PaymentDetailsResponseSender.yaml new file mode 100644 index 000000000..c994f75b7 --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentDetailsResponseSender.yaml @@ -0,0 +1,23 @@ +type: object +description: Information about the sender of the payment's funds +discriminator: + propertyName: type + mapping: + individual: '#/components/schemas/01_PaymentResponseIndividualSender' + corporate: '#/components/schemas/02_PaymentResponseCorporateSender' + instrument: '#/components/schemas/03_PaymentResponseInstrumentSender' +required: + - type +properties: + type: + type: string + enum: + - individual + - corporate + - instrument + description: The type of sender + example: instrument + reference: + type: string + description: The sender's reference for the payout + example: '8285282045818' diff --git a/nas_spec/components/schemas/Payments/PaymentDetailsResponseSource.yaml b/nas_spec/components/schemas/Payments/PaymentDetailsResponseSource.yaml new file mode 100644 index 000000000..e90b698f3 --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentDetailsResponseSource.yaml @@ -0,0 +1,32 @@ +type: object +description: Payment source + +discriminator: + propertyName: type + mapping: + card: '#/components/schemas/01_PaymentResponseCardSource' + currency_account: '#/components/schemas/02_PaymentResponseCurrencyAccountSource' + qpay: '#/components/schemas/PaymentGetResponseQPaySource' + giropay: '#/components/schemas/PaymentGetResponseGiropaySource' + eps: '#/components/schemas/PaymentGetResponseEPSSource' + klarna: '#/components/schemas/PaymentGetResponseKlarnaSource' + p24: '#/components/schemas/PaymentResponseP24Source' + knet: '#/components/schemas/PaymentResponseKnetSource' + multibance: '#/components/schemas/PaymentResponseMultibancoSource' + postfinance: '#/components/schemas/PaymentResponsePostfinanceSource' + bancontact: '#/components/schemas/PaymentResponseBancontactSource' + alma: '#/components/schemas/PaymentResponseAlmaSource' + illicado: '#/components/schemas/PaymentResponseIllicadoSource' + cvconnect: '#/components/schemas/PaymentResponseCvConnectSource' + tamara: '#/components/schemas/PaymentResponseTamaraSource' + trustly: '#/components/schemas/PaymentResponseTrustlySource' + sepa: '#/components/schemas/PaymentGetResponseSEPAV4Source' +required: + - type +properties: + type: + type: string + description: | + The payment source type. For any payment request sources that result in a card token (token, source ID, etc.), + this will be `card` + example: 'card' diff --git a/nas_spec/components/schemas/Payments/PaymentId.yaml b/nas_spec/components/schemas/Payments/PaymentId.yaml new file mode 100644 index 000000000..47505ccc8 --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentId.yaml @@ -0,0 +1,6 @@ +type: string +pattern: "^(pay)_(\\w{26})$" +description: The payment identifier +maxLength: 30 +minLength: 30 +example: 'pay_mbabizu24mvu3mela5njyhpit4' diff --git a/nas_spec/components/schemas/Payments/PaymentInstruction.yaml b/nas_spec/components/schemas/Payments/PaymentInstruction.yaml new file mode 100644 index 000000000..6d7694e2e --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentInstruction.yaml @@ -0,0 +1,31 @@ +type: object +description: Details about the instruction for payouts to bank accounts +properties: + purpose: + type: string + description: An optional description of the payout purpose, for example `Insurance claim` or `Remittance` + example: 'Remittance' + charge_bearer: + type: string + description: Who should be charged the payout fee
Only required if making a payout using an international scheme. + enum: + - OUR + - SHA + repair: + type: boolean + description: Determines whether the payout details can be modified to attempt to prevent a payout from being returned + scheme: + type: string + description: The preferred payment scheme or network the bank transfer will be sent through + enum: + - swift + - local + - instant + quote_id: + type: string + allOf: + - $ref: '#/components/schemas/QuoteId' + description: The FX quote identifier. If omitted, and the source and destination currencies differ, the current market exchange rate will be used + minLength: 30 + maxLength: 30 + pattern: ^(qte)_[a-z2-7]{26}$ diff --git a/nas_spec/components/schemas/Payments/PaymentInstructionResponse.yaml b/nas_spec/components/schemas/Payments/PaymentInstructionResponse.yaml new file mode 100644 index 000000000..1fd2245fe --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentInstructionResponse.yaml @@ -0,0 +1,8 @@ +type: object +description: Instruction details for payouts to bank accounts. +properties: + value_date: + description: The date (in ISO 8601 format) and time at which the recipient's account will be credited. + type: string + format: date-time + example: 2020-06-12T22:27:42.512594Z diff --git a/nas_spec/components/schemas/Payments/PaymentPaged.yaml b/nas_spec/components/schemas/Payments/PaymentPaged.yaml new file mode 100644 index 000000000..4f10b61bc --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentPaged.yaml @@ -0,0 +1,19 @@ +type: object +properties: + limit: + type: integer + description: The numbers of results to retrieve + example: 10 + skip: + type: integer + description: The number of results to skip + example: 10 + total_count: + type: integer + description: The total number of results matching the payment reference. This number is unaffected by the values of the `skip` and `limit` parameters + example: 1 + data: + type: array + description: The list of payments + items: + $ref: '#/components/schemas/PaymentDetails' diff --git a/nas_spec/components/schemas/Payments/PaymentRecipient.yaml b/nas_spec/components/schemas/Payments/PaymentRecipient.yaml new file mode 100644 index 000000000..6f089477b --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentRecipient.yaml @@ -0,0 +1,37 @@ +type: object +description: Information about the recipient of the payment's funds. Relevant for [Account Funding Transactions](https://www.checkout.com/docs/payments/manage-payments/account-funding-transactions) and VISA or Mastercard [domestic UK transactions processed by financial institutions](https://www.checkout.com/docs/payments/regulation-support/requirements-for-financial-institutions). +properties: + dob: + type: string + format: date + description: The recipient's date of birth (yyyy-mm-dd) + maxLength: 10 + example: '1985-05-15' + account_number: + type: string + description: Any identifier like part of the PAN (first six digits and last four digits), an IBAN, an internal account number, or a phone number related to the primary recipient's account + maxLength: 34 + example: '5555554444' + address: + description: The recipient's address + allOf: + - $ref: '#/components/schemas/Address' + zip: + type: string + deprecated: true + description: | + Replaced by `address.zip` + + The first part of the UK postcode (e.g., W1T 4TJ would be W1T). + maxLength: 10 + example: 'W1T' + first_name: + type: string + description: The recipient's first name + maxLength: 50 + example: 'John' + last_name: + type: string + description: The recipient's last name + maxLength: 50 + example: 'Jones' diff --git a/nas_spec/components/schemas/Payments/PaymentRequest.yaml b/nas_spec/components/schemas/Payments/PaymentRequest.yaml new file mode 100644 index 000000000..7316ad831 --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentRequest.yaml @@ -0,0 +1,145 @@ +type: object +required: + - currency +properties: + source: + $ref: '#/components/schemas/PaymentRequestSource' + amount: + type: integer + description: | + The payment amount. Omit the amount or provide a value of `0` to perform a card verification. + + The amount must be provided in the minor currency unit. + minimum: 0 + example: 6540 + currency: + type: string + description: | + The three-letter ISO currency code + example: USD + maxLength: 3 + minLength: 3 + payment_type: + type: string + description: This must be specified for card payments where the cardholder is not present (i.e., recurring or mail order / telephone order) + enum: + - Regular + - Recurring + - MOTO + - Installment + - Unscheduled + default: Regular + example: Recurring + merchant_initiated: + type: boolean + description: Flags the payment as a merchant-initiated transaction (MIT). Must be set to `true` for all MITs. + reference: + type: string + description: | + A reference you can later use to identify this payment, such as an order number.
Can only be alphanumeric and must be unique for Benefit.
For Amex, the string limit is 30 characters. + maxLength: 50 + example: 'ORD-5023-4E89' + description: + type: string + description: A description of the payment.
For Giropay, it is a Purpose field. Required, limit is 27 characters. + maxLength: 100 + example: 'Set of 3 masks' + authorization_type: + type: string + description: The authorization type + enum: + - Final + - Estimated + default: Final + example: Estimated + capture: + type: boolean + description: Whether to capture the payment (if applicable) + default: true + example: true + capture_on: + description: | + A timestamp (ISO 8601 code) that determines when the payment should be captured. + Providing this field will automatically set `capture` to true + allOf: + - $ref: '#/components/schemas/Timestamp' + customer: + $ref: '#/components/schemas/CustomerRequest' + billing_descriptor: + $ref: '#/components/schemas/BillingDescriptor' + shipping: + type: object + description: The shipping details + properties: + address: + description: The shipping address + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The phone number associated with the shipping address + allOf: + - $ref: '#/components/schemas/PhoneNumber' + from_address_zip: + type: string + description: The postal code or zip code of the location being shipped from. + example: '10014' + 3ds: + description: Information required for 3D Secure authentication payments + oneOf: + - $ref: '#/components/schemas/3dsRequest' + - $ref: '#/components/schemas/3dsRequestStandalone' + - $ref: '#/components/schemas/3dsRequestThirdParty' + type: object + processing_channel_id: + type: string + pattern: "^(pc)_(\\w{26})$" + description: The processing channel to be used for the payment + example: 'pc_q4dbxom5jbgudnjzjpz7j2z6uq' + previous_payment_id: + type: string + description: | + An identifier that can link the payment to an existing series of payments. Only for use with merchant-initiated transactions (MITs) that use stored card details. + + To link the payment, pass one of the following as its value: + - a payment identifier (for example, `pay_cr4hxwizzp6k7biycuk2ibltnm`) from the recurring series, or + - the scheme transaction ID + maxLength: 100 + example: 'pay_fun26akvvjjerahhctaq2uzhu4' + risk: + $ref: '#/components/schemas/RiskRequest' + success_url: + type: string + format: uri + description: For redirect payment methods, this overrides the default success redirect URL configured on your account + maxLength: 1024 + example: 'http://example.com/payments/success' + failure_url: + type: string + format: uri + description: For redirect payment methods, this overrides the default failure redirect URL configured on your account + maxLength: 1024 + example: 'http://example.com/payments/fail' + payment_ip: + description: The IP address used to make the payment. Used by Checkout.com's risk engine to check the customer's IP address – only accepts IPv4 and IPv6 addresses. + allOf: + - $ref: '#/components/schemas/IPAddress' + sender: + $ref: '#/components/schemas/PaymentRequestSender' + recipient: + $ref: '#/components/schemas/PaymentRecipient' + marketplace: + $ref: '#/components/schemas/MarketplaceAuth' + amount_allocations: + $ref: '#/components/schemas/AmountAllocations' + processing: + $ref: '#/components/schemas/PaymentRequestProcessingSettings' + items: + $ref: '#/components/schemas/Items' + metadata: + type: object + description: | + Allows you to store additional information about a transaction with custom fields and up to five user-defined fields (`udf1` to `udf5`), which can be used for reporting purposes. `udf1` is also used for some of our risk rules. + + You can only supply primitive data types within the `metadata` object. Arrays and objects are not supported. You can provide up to 20 metadata fields per API call. The value of each field must not exceed 255 characters in length. + example: + coupon_code: 'NY2018' diff --git a/nas_spec/components/schemas/Payments/PaymentRequestDestination.yaml b/nas_spec/components/schemas/Payments/PaymentRequestDestination.yaml new file mode 100644 index 000000000..b9a9848d3 --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentRequestDestination.yaml @@ -0,0 +1,14 @@ +type: object +description: The destination of the payout +discriminator: + propertyName: type + mapping: + id: '#/components/schemas/01_PaymentRequestIdDestination' + bank_account: '#/components/schemas/02_PaymentBankAccountDestination' +required: + - type +properties: + type: + type: string + description: The payout destination type
The parameters for `bank_account` depend on the destination country and currency. See our docs for details. + example: 'id' diff --git a/nas_spec/components/schemas/Payments/PaymentRequestProcessingSettings.yaml b/nas_spec/components/schemas/Payments/PaymentRequestProcessingSettings.yaml new file mode 100644 index 000000000..a802cc393 --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentRequestProcessingSettings.yaml @@ -0,0 +1,263 @@ +type: object +description: Use the processing object to influence or override the data sent during card processing +properties: + order_id: + type: string + description: The number provided by the cardholder. Purchase order or invoice number may be used. + maxLength: 17 + example: '123456789' + tax_amount: + type: number + description: Contains the customer’s value-added tax registration number. + minimum: 0 + example: 3000 + discount_amount: + type: number + description: The discount amount applied to the transaction by the merchant. + minimum: 0 + example: 000 + duty_amount: + type: number + description: The total charges for any import/export duty included in the transaction. + minimum: 0 + example: 000 + shipping_amount: + type: number + description: The total freight or shipping and handling charges for the transaction. + minimum: 0 + example: 300 + shipping_tax_amount: + type: number + description: The tax amount of the freight or shipping and handling charges for the transaction. + minimum: 0 + example: 100 + aft: + type: boolean + description: Indicates whether the payment is an [Account Funding Transaction](https://www.checkout.com/docs/payments/manage-payments/account-funding-transactions) + preferred_scheme: + type: Enum + enum: + - 'mastercard' + - 'visa' + - 'cartes_bancaires' + description: The preferred scheme for co-badged card payment processing. If using 3rd party Authentication before requesting the payment, set the value to the scheme that authenticated the transaction. + merchant_initiated_reason: + type: string + enum: + - 'Delayed_charge' + - 'Resubmission' + - 'No_show' + - 'Reauthorization' + description: Indicates the reason for a merchant initiated payment request. + campaign_id: + type: integer + description: "Unique number of the campaign this payment will be running in. Only required for Afterpay campaign invoices." + product_type: + type: string + required: true + description: |- + Product type of the payment. Used when `source.type` is
+
  • `wechatpay` - required. Enum: +
      +
    • `QR Code`
    • +
    • `In-App`
    • +
    • `Official Account`
    • +
    • `Mini Program`
    • +
    +
  • +
  • `tamara` - optional. You can omit this if you've chosen the default pay installment option or want the payment provider to show all the available Tamara options to the customer during redirection. Enum: +
      +
    • `pay_in_full`
    • +
    • `pay_by_instalment_2`
    • +
    • `pay_by_instalment_3`
    • +
    • `pay_by_instalment_4`
    • +
    • `pay_by_instalment_6`
    • +
    +
+ example: QR Code + open_id: + type: string + description: Value obtained from WeChat Web Authorization API before initiating Official Account or Mini Program payments. Required if `source.type` is `wechatpay` and `processing.product_type` is `Official Account` or `Mini Program` + example: oUpF8uMuAJO_M2pxb1Q9zNjWeS6o + original_order_amount: + type: number + minimum: 0 + description: The payment for a merchant's order may be split, and the original order price indicates the transaction amount of the entire order + example: 10 + receipt_id: + type: string + maxLength: 32 + description: Merchant receipt ID + example: 10 + terminal_type: + enum: + - APP + - WAP + - WEB + type: string + description: The client-side terminal type, if it is a website that is opened via a PC browser or a mobile browser or mobile application. + default: WEB + example: WAP + os_type: + enum: + - ANDROID + - IOS + type: string + description: This field is required when terminalType is not WEB. + example: ANDROID + invoice_id: + type: string + description: Invoice ID number + maxLength: 127 + brand_name: + type: string + description: | + The label that overrides the business name in the PayPal account + on the PayPal pages + maxLength: 127 + example: Super Brand + locale: + type: string + pattern: '^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}))?$' + description: ISO 639-2 language code + example: en-US + maxLength: 10 + minLength: 2 + shipping_preference: + type: string + description: Shipping preference + enum: + - NO_SHIPPING + - SET_PROVIDED_ADDRESS + - GET_FROM_FILE + example: SET_PROVIDED_ADDRESS + user_action: + type: string + description: Property required by PayPal to have an appropriate payment flow + enum: + - PAY_NOW + - CONTINUE + example: PAY_NOW + set_transaction_context: + type: object + properties: + key: + type: string + description: The key for the pair. + value: + type: string + description: The value for the pair. + description: An array of key-and-value pairs with merchant-specific data for the transaction. + airline_data: + type: array + items: + type: object + required: + - ticket + - passenger + - flight_leg_details + properties: + ticket: + type: object + properties: + number: + type: string + description: Ticket number/ID as issued by the airline. + maxLength: 16 + minLength: 1 + issue_date: + type: string + pattern: '^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$' + description: Date the airline ticket was issued. + maxLength: 10 + minLength: 10 + issuing_carrier_code: + type: string + pattern: '^[A-Z0-9]{2}$' + description: Carrier code of the ticket issuer. + maxLength: 2 + minLength: 2 + travel_agency_name: + type: string + description: Name of the travel agency that issued the ticket. + maxLength: 25 + minLength: 1 + travel_agency_code: + type: string + description: The IATA two-letter accounting code that identifies the carrier. + maxLength: 16 + minLength: 1 + passenger: + type: object + required: + - name + properties: + name: + type: object + required: + - full_name + properties: + full_name: + type: string + description: When the party is a person, the party's full name. + maxLength: 300 + minLength: 1 + date_of_birth: + type: string + pattern: '^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$' + description: The date of birth of the passenger. + maxLength: 10 + minLength: 10 + country_code: + type: string + pattern: '^([A-Z]{2}|C2)$' + description: The passenger's country of residence. + maxLength: 2 + minLength: 2 + flight_leg_details: + type: array + items: + type: object + required: + - departure_airport + - arrival_airport + properties: + flight_number: + type: number + carrier_code: + type: string + service_class: + type: string + departure_date: + type: string + departure_time: + type: string + departure_airport: + type: string + arrival_airport: + type: string + stopover_code: + type: string + fare_basis_code: + type: string + purchase_country: + type: string + description: The country where the goods are purchased or the seller is based. ISO 3166 alpha-2 purchase country code. + example: GB + custom_payment_method_ids: + x-klarna-name: custom_payment_method_ids + x-cko-passthrough: true + x-klarna-docs: https://developers.klarna.com/api/#payments-api__create-a-new-credit-session__custom_payment_method_ids + description: An array defining which of the configured payment options within a payment category (for example, `pay_later` or `pay_over_time`) should be displayed for this purchase. + type: array + items: + type: string + merchant_callback_url: + type: string + description: A URL which you can use to notify the customer that the order has been created. + line_of_business: + type: string + description: | + Beta

+ The line of business that the payment is associated with. + example: Flights \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/PaymentRequestSender.yaml b/nas_spec/components/schemas/Payments/PaymentRequestSender.yaml new file mode 100644 index 000000000..3f74d8dc2 --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentRequestSender.yaml @@ -0,0 +1,22 @@ +type: object +description: Information about the sender of the payment's funds +discriminator: + propertyName: type + mapping: + individual: '#/components/schemas/01_PaymentRequestIndividualSender' + corporate: '#/components/schemas/02_PaymentRequestCorporateSender' + instrument: '#/components/schemas/03_PaymentRequestInstrumentSender' +required: + - type +properties: + type: + type: string + enum: + - individual + - corporate + - instrument + description: TEST The type of sender + + reference: + type: string + description: The unique reference for the sender of the payout diff --git a/nas_spec/components/schemas/Payments/PaymentRequestSource.yaml b/nas_spec/components/schemas/Payments/PaymentRequestSource.yaml new file mode 100644 index 000000000..2edc8fe09 --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentRequestSource.yaml @@ -0,0 +1,52 @@ +type: object +description: The source of the payment +discriminator: + propertyName: type + mapping: + token: '#/components/schemas/01_PaymentRequestTokenSource' + id: '#/components/schemas/02_PaymentRequestIdSource' + card: '#/components/schemas/03_PaymentRequestCardSource' + customer: '#/components/schemas/PaymentRequestCustomerSource' + network_token: '#/components/schemas/04_PaymentRequestNetworkTokenSource' + provider_token: '#/components/schemas/07_PaymentRequestProviderTokenSource' + bank_account: '#/components/schemas/PaymentRequestBankAccountSource' + wechatpay: '#/components/schemas/08_PaymentRequestWeChatPaySource' + eps: '#/components/schemas/PaymentRequestEpsSource' + giropay: '#/components/schemas/PaymentRequestGiropaySource' + paypal: '#/components/schemas/PaymentRequestPayPalSource' + alipay_hk: '#/components/schemas/PaymentRequestAlipayPlusSource' + alipay_cn: '#/components/schemas/PaymentRequestAlipayPlusSource' + alipay_plus: '#/components/schemas/PaymentRequestAlipayPlusSource' + gcash: '#/components/schemas/PaymentRequestAlipayPlusSource' + benefit: '#/components/schemas/PaymentRequestBenefitSource' + fawry: '#/components/schemas/PaymentRequestFawrySource' + ideal: '#/components/schemas/PaymentRequestIdealSource' + sofort: '#/components/schemas/PaymentRequestSofortSource' + dana: '#/components/schemas/PaymentRequestAlipayPlusSource' + kakaopay: '#/components/schemas/PaymentRequestAlipayPlusSource' + truemoney: '#/components/schemas/PaymentRequestAlipayPlusSource' + tng: '#/components/schemas/PaymentRequestAlipayPlusSource' + qpay: '#/components/schemas/PaymentRequestQPaySource' + afterpay: '#/components/schemas/PaymentRequestAfterPaySource' + mbway: '#/components/schemas/PaymentRequestMbwaySource' + stcpay: '#/components/schemas/PaymentRequestStcPaySource' + klarna: '#/components/schemas/PaymentRequestKlarnaSource' + p24: '#/components/schemas/PaymentRequestP24Source' + knet: '#/components/schemas/PaymentRequestKnetSource' + multibanco: '#/components/schemas/PaymentRequestMultibancoSource' + postfinance: '#/components/schemas/PaymentRequestPostfinanceSource' + bancontact: '#/components/schemas/PaymentRequestBancontactSource' + alma: '#/components/schemas/PaymentRequestAlmaSource' + illicado: '#/components/schemas/PaymentRequestIllicadoSource' + cvconnect: '#/components/schemas/PaymentRequestCvConnectSource' + tamara: '#/components/schemas/PaymentRequestTamaraSource' + trustly: '#/components/schemas/PaymentRequestTrustlySource' + sepa: '#/components/schemas/PaymentRequestSEPAV4Source' +required: + - type +properties: + type: + type: string + description: The payment source type.
*Note:* *To make a payment with full card details, you must be SAQ D PCI compliant* + + example: 'card' diff --git a/nas_spec/components/schemas/Payments/PaymentResponse.yaml b/nas_spec/components/schemas/Payments/PaymentResponse.yaml new file mode 100644 index 000000000..44bf1da4d --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentResponse.yaml @@ -0,0 +1,215 @@ +type: object +description: Payment Response +required: + - id + - action_id + - amount + - currency + - approved + - status + - response_code + - processed_on + - _links +properties: + id: + description: The payment's unique identifier + allOf: + - $ref: '#/components/schemas/PaymentId' + action_id: + description: The unique identifier for the action performed against this payment + allOf: + - $ref: '#/components/schemas/ActionId' + amount: + type: integer + description: The payment amount + example: 6540 + currency: + type: string + description: The three-letter ISO currency code of the payment + example: USD + maxLength: 3 + minLength: 3 + approved: + type: boolean + description: Whether or not the authorization or capture was successful + example: true + status: + type: string + description: The status of the payment + enum: + - Authorized + - Pending + - Card Verified + - Declined + example: Authorized + auth_code: + type: string + description: The acquirer authorization code if the payment was authorized + example: '643381' + response_code: + type: string + description: The Gateway response code + example: '10000' + response_summary: + type: string + description: The Gateway response summary + example: 'Approved' + expires_on: + type: string + description: The timestamp (ISO 8601 code) for when the authorization's validity period expires + 3ds: + type: object + description: Provides 3D Secure enrollment status if the payment was downgraded to non-3D Secure + allOf: + - $ref: '#/components/schemas/3dsEnrollmentData' + example: + downgraded: true + enrolled: N + risk: + type: object + description: Returns the payment's risk assessment results + properties: + flagged: + type: boolean + description: Whether or not the payment was flagged by a risk check + default: false + example: true + score: + type: integer + description: The risk score calculated by our Fraud Detection engine. Absent if not enough data provided. + example: 22 + minimum: 0 + maximum: 100 + source: + description: The source of the payment + type: object + allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + #destination: + #description: The destination of the payment + #type: object + #allOf: + # - $ref: '#/components/schemas/PaymentResponseDestination' + customer: + type: object + description: The customer associated with the payment, if provided in the request + allOf: + - $ref: '#/components/schemas/CustomerResponse' + balances: + type: object + description: The payment balances + allOf: + - $ref: '#/components/schemas/PaymentResponseBalances' + processed_on: + description: The date/time the payment was processed + allOf: + - $ref: '#/components/schemas/ServerTimestamp' + reference: + type: string + description: Your reference for the payment + example: ORD-5023-4E89 + processing: + type: object + description: Returns information related to the processing of the payment + properties: + retrieval_reference_number: + type: string + description: 'A unique identifier for the authorization that is submitted to the card scheme during processing' + example: '909913440644' + acquirer_transaction_id: + type: string + description: 'A unique identifier for the transaction generated by the acquirer' + example: '440644309099499894406' + recommendation_code: + type: string + description: 'A code that represents the next recommended action for the payment' + example: "02" + partner_order_id: + type: string + description: "Unique order identification of an Afterpay payment" + partner_session_id: + type: string + description: Klarna's credit session id. + example: feb0096d-8486-400d-89fa-2fa716b4521f + partner_client_token: + type: string + description: Token to be passed to Klarna JS client. + partner_payment_id: + type: string + description: "Unique identification of a payment provided by partner" + partner_status: + type: string + description: "Status of a payment provided by partner" + partner_transaction_id: + type: string + description: "Unique transaction identification provided by partner" + partner_error_codes: + type: array + description: "Error codes provided by artner" + partner_error_message: + type: string + description: "Error description provided by partner" + partner_authorization_code: + type: string + description: "Authorization code provided by partner" + partner_authorization_response_code: + type: string + description: "Authorization response code provided by partner" + eci: + type: string + description: The final Electronic Commerce Indicator (ECI) security level used to authorize the payment. + Applicable for 3D Secure and network token payments + example: '06' + scheme_id: + type: string + description: The scheme transaction identifier + example: '489341065491658' + _links: + type: object + description: The links related to the payment + minItems: 2 + required: + - self + - actions + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the payment + actions: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to the payment's associated actions + authorize: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to increment the authorization, where applicable + void: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to void the payment, where applicable + capture: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to capture the payment, where applicable + refund: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to refund the payment, where applicable + example: + self: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44' + actions: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/actions' + authorize: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/authorizations' + void: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/voids' + capture: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/capture' diff --git a/nas_spec/components/schemas/Payments/PaymentResponseBalances.yaml b/nas_spec/components/schemas/Payments/PaymentResponseBalances.yaml new file mode 100644 index 000000000..9083e6c7c --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentResponseBalances.yaml @@ -0,0 +1,33 @@ +type: object +description: The balances of the payment +required: + - id +properties: + total_authorized: + type: integer + description: The total amount that has been authorized + example: 6540 + total_voided: + type: integer + description: The total amount that has been voided + example: 0 + available_to_void: + type: integer + description: The total amount that is still available for voiding + example: 6540 + total_captured: + type: integer + description: The total amount that has been captured + example: 0 + available_to_capture: + type: integer + description: The total amount that is still available for capture + example: 6540 + total_refunded: + type: integer + description: The total amount that has been refunded + example: 0 + available_to_refund: + type: integer + description: The total amount that is still available for refund + example: 0 diff --git a/nas_spec/components/schemas/Payments/PaymentResponseDestination.yaml b/nas_spec/components/schemas/Payments/PaymentResponseDestination.yaml new file mode 100644 index 000000000..10b48112b --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentResponseDestination.yaml @@ -0,0 +1,15 @@ +type: object +description: Payment destination +discriminator: + propertyName: type + mapping: + #card: '#/components/schemas/01_PaymentResponseCardDestination' + bank_account: '#/components/schemas/02_PaymentResponseBankAccountDestination' +required: + - type +properties: + type: + type: string + description: | + The payment destination type. + example: 'card' diff --git a/nas_spec/components/schemas/Payments/PaymentResponseSource.yaml b/nas_spec/components/schemas/Payments/PaymentResponseSource.yaml new file mode 100644 index 000000000..fcb1a9a50 --- /dev/null +++ b/nas_spec/components/schemas/Payments/PaymentResponseSource.yaml @@ -0,0 +1,50 @@ +type: object +description: Payment source + +discriminator: + propertyName: type + mapping: + card: '#/components/schemas/01_PaymentResponseCardSource' + wechatpay: '#/components/schemas/03_PaymentResponseWeChatPaySource' + paypal: '#/components/schemas/PaymentResponsePayPalSource' + alipay_hk: '#/components/schemas/PaymentResponseAlipayPlusSource' + alipay_cn: '#/components/schemas/PaymentResponseAlipayPlusSource' + alipay_plus: '#/components/schemas/PaymentResponseAlipayPlusSource' + gcash: '#/components/schemas/PaymentResponseAlipayPlusSource' + benefit: '#/components/schemas/PaymentResponseBenefitSource' + fawry: '#/components/schemas/PaymentResponseFawrySource' + ideal: '#/components/schemas/PaymentResponseIdealSource' + sofort: '#/components/schemas/PaymentResponseSofortSource' + dana: '#/components/schemas/PaymentResponseAlipayPlusSource' + kakaopay: '#/components/schemas/PaymentResponseAlipayPlusSource' + truemoney: '#/components/schemas/PaymentResponseAlipayPlusSource' + tng: '#/components/schemas/PaymentResponseAlipayPlusSource' + afterpay: '#/components/schemas/PaymentResponseAfterPaySource' + mbway: '#/components/schemas/PaymentResponseMbwaySource' + stcpay: '#/components/schemas/PaymentResponseStcPaySource' + klarna: '#/components/schemas/PaymentResponseKlarnaSource' + p24: '#/components/schemas/PaymentResponseP24Source' + knet: '#/components/schemas/PaymentResponseKnetSource' + multibanco: '#/components/schemas/PaymentResponseMultibancoSource' + postfinance: '#/components/schemas/PaymentResponsePostfinanceSource' + bancontact: '#/components/schemas/PaymentResponseBancontactSource' + alma: '#/components/schemas/PaymentResponseAlmaSource' + currency_account: '#/components/schemas/02_PaymentResponseCurrencyAccountSource' + qpay: '#/components/schemas/PaymentGetResponseQPaySource' + giropay: '#/components/schemas/PaymentGetResponseGiropaySource' + eps: '#/components/schemas/PaymentGetResponseEPSSource' + illicado: '#/components/schemas/PaymentResponseIllicadoSource' + cvconnect: '#/components/schemas/PaymentResponseCvConnectSource' + tamara: '#/components/schemas/PaymentResponseTamaraSource' + trustly: '#/components/schemas/PaymentResponseTrustlySource' + sepa: '#/components/schemas/PaymentResponseSEPAV4Source' +required: + - type + +properties: + type: + type: string + description: | + The payment source type. For any payment request sources that result in a card token (token, source ID, etc.), + this will be `card` + example: 'card' diff --git a/nas_spec/components/schemas/Payments/PayoutAcceptedResponse.yaml b/nas_spec/components/schemas/Payments/PayoutAcceptedResponse.yaml new file mode 100644 index 000000000..1f60db428 --- /dev/null +++ b/nas_spec/components/schemas/Payments/PayoutAcceptedResponse.yaml @@ -0,0 +1,43 @@ +type: object +description: Payout accepted response +properties: + id: + type: string + description: The payout's unique identifier. + pattern: "^(pay)_(\\w{26})$" + maxLength: 30 + minLength: 30 + example: pay_dvxl6j6stpqufkzfgbaahmfrzm + status: + type: string + description: The status of the payout. + enum: + - Pending + example: Pending + reference: + type: string + description: The payout reference. + example: PO-215-5721 + instruction: + allOf: + - $ref: '#/components/schemas/PaymentInstructionResponse' + _links: + type: object + description: The links related to the payout. + properties: + self: + type: object + description: The URI of the payout. + properties: + href: + type: string + description: The link URL. + example: https://api.sandbox.checkout.com/payments/pay_dvxl6j6stpqufkzfgbaahmfrzm + actions: + type: object + description: The actions URI of the payout. + properties: + href: + type: string + description: The link URL. + example: https://api.sandbox.checkout.com/payments/pay_dvxl6j6stpqufkzfgbaahmfrzm/actions \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/PayoutBillingDescriptor.yaml b/nas_spec/components/schemas/Payments/PayoutBillingDescriptor.yaml new file mode 100644 index 000000000..4dc04003d --- /dev/null +++ b/nas_spec/components/schemas/Payments/PayoutBillingDescriptor.yaml @@ -0,0 +1,9 @@ +type: object +required: [reference] +description: | + The dynamic billing descriptor displayed on the recipient's bank account statement +properties: + reference: + type: string + description: | + The reference that should be shown on the statement diff --git a/nas_spec/components/schemas/Payments/PayoutDetails.yaml b/nas_spec/components/schemas/Payments/PayoutDetails.yaml new file mode 100644 index 000000000..e841d2596 --- /dev/null +++ b/nas_spec/components/schemas/Payments/PayoutDetails.yaml @@ -0,0 +1,128 @@ +type: object +description: Payment response +properties: + id: + description: Payment unique identifier + allOf: + - $ref: '#/components/schemas/PaymentId' + requested_on: + description: The date/time the payment was requested + allOf: + - $ref: '#/components/schemas/ServerTimestamp' + source: + description: The source of the payout + type: object + properties: + id: + type: string + description: The payment source identifier, which can be used for subsequent payments + example: ca_y3oqhf46pyzuxjbcn2giaqnb44 + type: + type: string + description: The payment source type. This is always `currency_account` for payouts. + example: currency_account + destination: + description: The destination of the payout + type: object + properties: + type: + type: string + description: The payout destination type + example: bank_account + id: + type: string + description: The payment instrument identifier + example: src_4pakgjwmv5re5m5ivqohsqpxnm + amount: + type: integer + description: The original payout amount + example: 1000 + currency: + type: string + description: The three-letter ISO currency code of the payment + example: GBP + maxLength: 3 + minLength: 3 + reference: + type: string + description: Your reference for the payout + example: PO-215-5721 + billing_descriptor: + type: object + description: Details about the billing descriptor + properties: + reference: + type: string + description: The reference that is displayed on the account holder's statement + example: Withdrawal + status: + type: string + description: The status of the payout + enum: + - Pending + - Paid + - Declined + - Returned + example: Pending + approved: + type: boolean + description: Whether the authorization was successful + example: true + sender: + description: Information about the sender of the payment's funds + type: object + allOf: + - $ref: '#/components/schemas/PaymentDetailsResponseSender' + instruction: + description: Details about the instruction for payouts to bank accounts
The fields will depend on which ones were included in the request. + type: object + properties: + value_date: + type: string + description: The date (in ISO 8601 format) on which the recipient's account will be credited + purpose: + type: string + description: An optional description of the payout purpose, like `Insurance_claim` or `Remittance` + charge_bearer: + type: string + description: Who should be charged the payout fee + enum: + - OUR + - SHA + repair: + type: boolean + description: Determines whether the payout details cna be modified to attempt to prevent a payout from being returned + scheme: + type: string + description: The preferred payment scheme or network the bank transfer will be sent through + enum: + - swift + - local + - instant + quote_id: + type: string + description: The FX quote identifier + example: + value_date: '2020-06-13T01:49:19.1864428Z' + purpose: Wallet Withdrawal + quote_id: qte_xrhaw53z5m6ehbbxz2n6n5lk74 + _links: + type: object + description: Links related to the payouts + properties: + self: + type: object + description: The direct link to the payout + properties: + href: + type: string + description: The link URL + example: https://api.sandbox.checkout.com/payments/pay_gwlowf7eap7uzm4cyaaqoq62au + actions: + type: object + description: The link to the list of actions related to the payout + properties: + href: + type: string + description: The link URL + example: https://api.sandbox.checkout.com/payments/pay_gwlowf7eap7uzm4cyaaqoq62au/actions diff --git a/nas_spec/components/schemas/Payments/PayoutRequestSource.yaml b/nas_spec/components/schemas/Payments/PayoutRequestSource.yaml new file mode 100644 index 000000000..711ef188e --- /dev/null +++ b/nas_spec/components/schemas/Payments/PayoutRequestSource.yaml @@ -0,0 +1,18 @@ +type: object +description: The source of the payout +discriminator: + propertyName: type + mapping: + currency_account: '#/components/schemas/05_PaymentRequestCurrencyAccountSource' + entity: '#/components/schemas/PaymentRequestEntitySource' +required: + - type + - amount +properties: + amount: + type: integer + description: The amount you want to pay out from your currency account. The exact format depends on the currency.
You must specify either `source.amount` or `amount`. + type: + type: string + description: The payout source type + example: 'currency_account' diff --git a/nas_spec/components/schemas/Payments/PayoutSender.yaml b/nas_spec/components/schemas/Payments/PayoutSender.yaml new file mode 100644 index 000000000..85d94c253 --- /dev/null +++ b/nas_spec/components/schemas/Payments/PayoutSender.yaml @@ -0,0 +1,19 @@ +type: object +description: Details about the sender of the payout's funds. **This object is only required if the sender is different from the client entity.** +discriminator: + propertyName: type + mapping: + individual: '#/components/schemas/01_PaymentRequestIndividualSender' + corporate: '#/components/schemas/02_PaymentRequestCorporateSender' + instrument: '#/components/schemas/03_PaymentRequestInstrumentSender' +properties: + type: + type: string + enum: + - individual + - corporate + - instrument + description: The type of sender. If set to `instrument`, the sender information (name and address) will be retrieved from the payment instrument. This is for the cases where the sender and recipient are the same entity. The only field that needs to be provided is the sender reference to uniquely identify the sender. + reference: + type: string + description: The unique reference for the sender. diff --git a/nas_spec/components/schemas/Payments/ProcessingData.yaml b/nas_spec/components/schemas/Payments/ProcessingData.yaml new file mode 100644 index 000000000..b9951e9d4 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ProcessingData.yaml @@ -0,0 +1,102 @@ +type: object +description: Returns information related to the processing of the payment +properties: + preferred_scheme: + type: Enum + enum: + - "mastercard" + - "visa" + - "cartes_bancaires" + description: The preferred scheme for co-badged card payment processing. If using 3rd party Authentication before requesting the payment, set the value to the scheme that authenticated the transaction. + example: 'cartes_bancaires' + app_id: + type: string + description: The customer's application identifier. + example: 'com.iap.linker_portal' + partner_customer_id: + type: string + description: The customer's ID on the partner platform. + example: '2102209000001106125F8' + partner_payment_id: + type: string + description: 'The partner-originated unique payment identifier' + example: '440644309099499894406' + tax_amount: + type: number + description: Total tax amount of the order. + example: 1000 + purchase_country: + type: string + description: The country where the goods are purchased or the seller is based. ISO 3166 alpha-2 purchase country code. + example: GB + locale: + type: string + pattern: '^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}))?$' + description: The language, as an ISO 639-2 code. + example: en-US + maxLength: 10 + minLength: 2 + retrieval_reference_number: + type: string + description: 'A unique identifier for the authorization provided by partner' + example: '909913440644' + partner_order_id: + type: string + description: The Klarna order ID associated with the payment. + partner_status: + type: string + description: "Status of a payment provided by partner" + partner_transaction_id: + type: string + description: "Unique transaction identification provided by partner" + partner_error_codes: + type: array + description: The list of error codes that led the payment to fail or be declined, as given by the payment provider + items: + type: string + partner_error_message: + type: string + description: "Error description provided by partner" + partner_authorization_code: + type: string + description: "Authorization code provided by partner" + partner_authorization_response_code: + type: string + description: "Authorization response code provided by partner" + fraud_status: + type: string + description: The Klarna fraud status associated with the payment. + provider_authorized_payment_method: + x-klarna-name: initial_payment_method + type: object + description: The initial or authorized payment method. + required: + - type + properties: + type: + type: string + description: The payment option's type name. + description: + type: string + description: The payment option's description. + number_of_installments: + type: integer + description: The payment option's number of installments. + number_of_days: + type: integer + description: The payment option's frequency of the intervals of the payment. + custom_payment_method_ids: + type: array + description: An array defining which of the configured payment options within a payment category (for example, `pay_later` or `pay_over_time`) should be displayed for this purchase. + items: + type: string + aft: + type: boolean + description: Indicates whether the payment is an [Account Funding Transaction](https://www.checkout.com/docs/payments/manage-payments/account-funding-transactions) + merchant_category_code: + type: string + description: Four-digit code for retail financial services expressed in ISO 18245 format, classifying the types of goods or services you provide. + example: 5311 + scheme_merchant_id: + type: string + description: The merchant identifier that was configured with the scheme and used for the payment. diff --git a/nas_spec/components/schemas/Payments/RefundAcceptedResponse.yaml b/nas_spec/components/schemas/Payments/RefundAcceptedResponse.yaml new file mode 100644 index 000000000..55a28110a --- /dev/null +++ b/nas_spec/components/schemas/Payments/RefundAcceptedResponse.yaml @@ -0,0 +1,28 @@ +type: object +description: Refund response +required: + - action_id +properties: + action_id: + description: The unique identifier for the refund action + allOf: + - $ref: '#/components/schemas/ActionId' + reference: + type: string + description: Your reference for the refund request + example: ORD-5023-4E89 + _links: + type: object + description: The links related to the refund + readOnly: true + minItems: 2 + properties: + payment: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the payment to be refunded. Use this to check the status of the payment + example: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44' + required: + - payment diff --git a/nas_spec/components/schemas/Payments/RefundRequest.yaml b/nas_spec/components/schemas/Payments/RefundRequest.yaml new file mode 100644 index 000000000..4fbc89d49 --- /dev/null +++ b/nas_spec/components/schemas/Payments/RefundRequest.yaml @@ -0,0 +1,21 @@ +type: object +properties: + amount: + type: integer + description: | + The amount to refund. If not specified, the full payment amount will be refunded. + minimum: 0 + example: 6540 + amount_allocations: + $ref: '#/components/schemas/AmountAllocations' + reference: + type: string + description: A reference you can later use to identify this refund request.
For Amex, the string limit is 30 characters. + maxLength: 50 + example: 'ORD-5023-4E89' + metadata: + type: object + description: A set of key-value pairs that you can attach to the refund request. It can be useful for storing additional information in a structured format. **Note** that this object only allows one level of depth, so cannot accept non-primitive data types such as objects or arrays. + example: + coupon_code: 'NY2018' + partner_id: 123989 diff --git a/nas_spec/components/schemas/Payments/RequestDestinations/01_PaymentRequestIdDestination.yaml b/nas_spec/components/schemas/Payments/RequestDestinations/01_PaymentRequestIdDestination.yaml new file mode 100644 index 000000000..7c8b46baa --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestDestinations/01_PaymentRequestIdDestination.yaml @@ -0,0 +1,12 @@ +type: object +description: An existing payment instrument +required: + - id +allOf: + - $ref: '#/components/schemas/PaymentRequestDestination' + - type: object + properties: + id: + type: string + description: The payment instrument identifier + example: src_wmlfc3zyhqzehihu7giusaaawu diff --git a/nas_spec/components/schemas/Payments/RequestDestinations/02_PaymentBankAccountDestination.yaml b/nas_spec/components/schemas/Payments/RequestDestinations/02_PaymentBankAccountDestination.yaml new file mode 100644 index 000000000..efaa10168 --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestDestinations/02_PaymentBankAccountDestination.yaml @@ -0,0 +1,57 @@ +type: object +description: An existing payment instrument +required: + - country +allOf: + - $ref: '#/components/schemas/PaymentRequestDestination' + - type: object + properties: + account_type: + description: The type of account + type: string + enum: + - savings + - current + - cash + example: savings + + account_number: + description: Number (which can contain letters) that identifies the account + type: string + example: '13654567455' + + bank_code: + description: Code that identifies the bank + type: string + example: 123-456 + + branch_code: + description: Code that identifies the bank branch + type: string + example: '6443' + + iban: + description: Internationally agreed standard for identifying bank account + type: string + example: HU93116000060000000012345676 + + bban: + description: The combination of bank code and/or branch code and account number + type: string + example: 3704 0044 0532 0130 00 + + swift_bic: + description: 8 or 11 character code which identifies the bank or bank branch + type: string + example: '37040044' + + country: + description: The two-letter ISO country code of where the account is based + type: string + example: GB + + account_holder: + $ref: '#/components/schemas/AccountHolder' + + bank: + $ref: '#/components/schemas/BankDetails' diff --git a/nas_spec/components/schemas/Payments/RequestSenders/01_PaymentRequestIndividualSender.yaml b/nas_spec/components/schemas/Payments/RequestSenders/01_PaymentRequestIndividualSender.yaml new file mode 100644 index 000000000..f35e518aa --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSenders/01_PaymentRequestIndividualSender.yaml @@ -0,0 +1,50 @@ +type: object +description: Store a previously tokenized instrument +allOf: + - $ref: '#/components/schemas/PaymentRequestSender' +required: + - type + - first_name + - last_name + - address +properties: + type: + type: string + description: The sender type. If set to `instrument`, the sender information (name and address) will be retrieved from the payment instrument. + first_name: + type: string + description: The sender's first name + example: 'John' + last_name: + type: string + description: The sender's last name + example: 'Jones' + dob: + type: string + format: date + description: The sender's date of birth (yyyy-mm-dd) + maxLength: 10 + example: '1985-05-15' + address: + description: The sender's address + allOf: + - $ref: '#/components/schemas/Address' + identification: + type: object + properties: + type: + type: string + description: The type of identification used to identify the sender + enum: + - passport + - driving_licence + - national_id + example: driving_licence + number: + type: string + description: The identification number + example: 1234 + issuing_country: + type: string + description: The two-letter ISO country code of the country that issued the identification + example: GT diff --git a/nas_spec/components/schemas/Payments/RequestSenders/02_PaymentRequestCorporateSender.yaml b/nas_spec/components/schemas/Payments/RequestSenders/02_PaymentRequestCorporateSender.yaml new file mode 100644 index 000000000..8ddaa8ddc --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSenders/02_PaymentRequestCorporateSender.yaml @@ -0,0 +1,19 @@ +type: object +description: Store a previously tokenized instrument +allOf: + - $ref: '#/components/schemas/PaymentRequestSender' +required: + - type + - company_name + - address +properties: + type: + type: string + description: The sender type. If set to `instrument`, the sender information (name and address) will be retrieved from the payment instrument. + company_name: + type: string + description: The sender's company name + address: + description: The sender's address + allOf: + - $ref: '#/components/schemas/Address' diff --git a/nas_spec/components/schemas/Payments/RequestSenders/03_PaymentRequestInstrumentSender.yaml b/nas_spec/components/schemas/Payments/RequestSenders/03_PaymentRequestInstrumentSender.yaml new file mode 100644 index 000000000..b67b44ecd --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSenders/03_PaymentRequestInstrumentSender.yaml @@ -0,0 +1,10 @@ +type: object +description: Store a previously tokenized instrument +allOf: + - $ref: '#/components/schemas/PaymentRequestSender' +required: + - type +properties: + type: + type: string + description: The sender type. If set to `instrument`, the sender information (name and address) will be retrieved from the payment instrument. diff --git a/nas_spec/components/schemas/Payments/RequestSources/01_PaymentRequestTokenSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/01_PaymentRequestTokenSource.yaml new file mode 100644 index 000000000..cb4057b78 --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/01_PaymentRequestTokenSource.yaml @@ -0,0 +1,26 @@ +type: object +description: A token payment source +required: + - token +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + properties: + token: + type: string + pattern: "^(tok)_(\\w{26})$" + description: The Checkout.com token (e.g., a card token) + example: tok_ubfj2q76miwundwlk72vxt2i7q + billing_address: + description: The customer's billing address. This will override the billing address specified during tokenization + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The customer's phone number. This will override the phone number specified during tokenization + allOf: + - $ref: '#/components/schemas/PhoneNumber' + store_for_future_use: + type: boolean + description: This must be set to true if you intend to reuse the payment credentials in subsequent payments. Setting the field as false will mean that a payment instrument will not be included in the payment response. + default: true + example: false diff --git a/nas_spec/components/schemas/Payments/RequestSources/02_PaymentRequestIdSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/02_PaymentRequestIdSource.yaml new file mode 100644 index 000000000..524af850f --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/02_PaymentRequestIdSource.yaml @@ -0,0 +1,23 @@ +type: object +description: An existing payment source. Payment Method required for ACH payment +required: + - id +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + properties: + id: + type: string + pattern: "^(src)_(\\w{26})$" + description: The payment source identifer (e.g., a card source identifier) + example: src_wmlfc3zyhqzehihu7giusaaawu + cvv: + type: string + description: The card verification value/code (for card sources). 3 digits, except for American Express (4 digits) + example: '956' + minLength: 3 + maxLength: 4 + payment_method: + type: string + description: The payment method. Payment Method required for ACH payment + example: 'ach' diff --git a/nas_spec/components/schemas/Payments/RequestSources/03_PaymentRequestCardSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/03_PaymentRequestCardSource.yaml new file mode 100644 index 000000000..7c8fe539a --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/03_PaymentRequestCardSource.yaml @@ -0,0 +1,56 @@ +type: object +description: A card payment source +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - type + - number + - expiry_month + - expiry_year + properties: + number: + type: string + description: The card number (without separators) + example: '4543474002249996' + expiry_month: + type: integer + description: The expiry month of the card + minimum: 1 + minLength: 1 + maxLength: 2 + example: 6 + expiry_year: + type: integer + description: The expiry year of the card + minLength: 4 + maxLength: 4 + example: 2025 + name: + type: string + description: The name of the cardholder + example: 'Bruce Wayne' + cvv: + type: string + description: The card verification value/code. 3 digits, except for American Express (4 digits) + example: '956' + minLength: 3 + maxLength: 4 + stored: + type: boolean + description: This must be set to `true` for payments that use stored card details + default: false + example: true + store_for_future_use: + type: boolean + description: This must be set to true if you intend to reuse the payment credentials in subsequent payments. Setting the field as false will mean that a payment instrument will not be included in the payment response. + default: true + example: false + billing_address: + description: The billing address of the cardholder + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The phone number of the cardholder + allOf: + - $ref: '#/components/schemas/PhoneNumber' diff --git a/nas_spec/components/schemas/Payments/RequestSources/04_PaymentRequestNetworkTokenSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/04_PaymentRequestNetworkTokenSource.yaml new file mode 100644 index 000000000..c45c9f17e --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/04_PaymentRequestNetworkTokenSource.yaml @@ -0,0 +1,73 @@ +type: object +description: A network token payment source +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - type + - token + - expiry_month + - expiry_year + - token_type + - cryptogram + - eci + properties: + token: + type: string + description: The network token PAN + example: '4543474002249996' + expiry_month: + type: integer + description: The expiry month of the token + minimum: 1 + example: 6 + minLength: 1 + maxLength: 2 + expiry_year: + type: integer + description: The expiry year of the token + example: 2025 + minLength: 4 + maxLength: 4 + token_type: + type: string + description: The type of token + enum: + - vts + - mdes + - applepay + - googlepay + cryptogram: + type: string + description: The Base64 encoded cryptographic identifier (TAVV) used by card schemes to validate the token verification result. Optional if `previous_payment_id` is specified and `3ds.enabled` is false + maxLength: 50 + example: hv8mUFzPzRZoCAAAAAEQBDMAAAA= + eci: + type: string + description: | + The Electronic Commerce Indicator (ECI) security level associated with the token. Optional if `previous_payment_id` is specified and `3ds.enabled` is false + maxLength: 2 + example: '05' + stored: + type: boolean + description: This must be set to `true` for payments that use stored card details + default: false + example: true + name: + type: string + description: The customer's name + example: 'Bruce Wayne' + cvv: + type: string + description: The card verification value/code. 3 digits, except for American Express (4 digits) + example: '956' + minLength: 3 + maxLength: 4 + billing_address: + description: The customer's billing address + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The customer's phone number + allOf: + - $ref: '#/components/schemas/PhoneNumber' diff --git a/nas_spec/components/schemas/Payments/RequestSources/05_PaymentRequestCurrencyAccountSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/05_PaymentRequestCurrencyAccountSource.yaml new file mode 100644 index 000000000..7f2fae5ad --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/05_PaymentRequestCurrencyAccountSource.yaml @@ -0,0 +1,13 @@ +type: object +description: A currency account source +required: + - id +allOf: + - $ref: '#/components/schemas/PayoutRequestSource' + - type: object + properties: + id: + type: string + pattern: "^(ca)_(\\w{26})$" + description: The ID of the currency account to be debited
The source currency is inferred from the currency account. + example: ca_y3oqhf46pyzuxjbcn2giaqnb44 diff --git a/nas_spec/components/schemas/Payments/RequestSources/07_PaymentRequestProviderTokenSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/07_PaymentRequestProviderTokenSource.yaml new file mode 100644 index 000000000..fb0806488 --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/07_PaymentRequestProviderTokenSource.yaml @@ -0,0 +1,20 @@ +type: object +description: A Provider Token source +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - payment_method + - token + - account_holder + properties: + payment_method: + type: string + description: The payment transfer method to use with the token data in this transaction + token: + type: string + description: Provider token for Checkout partner integration + account_holder: + description: The holder of the account + allOf: + - $ref: '#/components/schemas/AccountHolder' \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/RequestSources/08_PaymentRequestWeChatPaySource.yaml b/nas_spec/components/schemas/Payments/RequestSources/08_PaymentRequestWeChatPaySource.yaml new file mode 100644 index 000000000..a1a4360da --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/08_PaymentRequestWeChatPaySource.yaml @@ -0,0 +1,34 @@ +type: object +required: + - type +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + properties: + billing_address: + type: object + properties: + address_line1: + type: string + description: The first line of the address + example: 150 Kennedy Road + address_line2: + type: string + description: The second line of the address + example: Acacia Building + city: + type: string + description: The address city + example: Wan Chai + state: + type: string + description: The address state + example: Hong Kong + zip: + type: number + description: The address zip/postal code + example: 42345 + country: + type: string + description: The two-letter ISO country code of the address + example: HK diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestAfterPaySource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestAfterPaySource.yaml new file mode 100644 index 000000000..b7ce117df --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestAfterPaySource.yaml @@ -0,0 +1,89 @@ +type: object +description: 'Afterpay payment request source' +required: + - type + - account_holder +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + properties: + account_holder: + type: object + description: The account holder's details + required: + - first_name + - last_name + - billing_address + - email + - date_of_birth + properties: + first_name: + type: string + description: The account holder's first name + last_name: + type: string + description: The account holder's last name + billing_address: + type: object + description: The account holder's billing address + required: + - address_line1 + - address_line2 + - city + - zip + - country + properties: + address_line1: + type: string + maxLength: 200 + description: The first line of the address + address_line2: + type: string + maxLength: 200 + description: The second line of the address + city: + type: string + maxLength: 50 + description: The address city + zip: + type: string + maxLength: 50 + description: The address ZIP or Postal code (e.g. 12087) + country: + type: string + description: The two-letter ISO country code of the address (e.g. DE) + format: ISO 3166-1 alpha-2 + email: + type: string + description: The account holder's email address + date_of_birth: + type: string + description: The account holder's date of birth + identification: + type: object + description: The account holder's government document identification e.g SSN + properties: + type: + type: string + description: The document type + example: SSN + issuing_country: + type: string + description: Country where the document was issued + number: + type: string + description: The document number + phone: + type: object + description: The account holder's phone number + properties: + country_code: + type: string + minLength: 1 + maxLength: 7 + description: The phone number's international country calling code + number: + type: string + minLength: 6 + maxLength: 25 + description: The phone number without the international country calling code diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestAlipayPlusSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestAlipayPlusSource.yaml new file mode 100644 index 000000000..7e439603a --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestAlipayPlusSource.yaml @@ -0,0 +1,6 @@ +type: object +required: + - type +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestAlmaSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestAlmaSource.yaml new file mode 100644 index 000000000..4b5b8c349 --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestAlmaSource.yaml @@ -0,0 +1,14 @@ +type: object +description: Alma payment source +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + properties: + billing_address: + description: The billing address of the cardholder + required: + - address_line1 + - city + - country + allOf: + - $ref: '#/components/schemas/Address' \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestBancontactSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestBancontactSource.yaml new file mode 100644 index 000000000..7f92be28e --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestBancontactSource.yaml @@ -0,0 +1,40 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Bancontact Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - payment_country + - account_holder_name + properties: + payment_country: + maxLength: 2 + minLength: 2 + enum: + - BE + type: string + description: 'The 2-letter ISO country code of the country in which the payment instrument is issued/operated.' + account_holder_name: + maxLength: 100 + minLength: 3 + type: string + description: 'The account holder.' + billing_descriptor: + maxLength: 65534 + type: string + description: 'Payment billing descriptor.' + language: + maxLength: 2 + minLength: 2 + enum: + - fr + - nl + - de + - en + type: string + description: 'The 2-letter ISO language code that should be preferred when presenting payment pages to the consumer.' + default: fr + example: nl diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestBankAccountSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestBankAccountSource.yaml new file mode 100644 index 000000000..749fc4416 --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestBankAccountSource.yaml @@ -0,0 +1,45 @@ +type: object +description: A bank account payment source +required: + - payment_method + - account_type + - account_holder + - account_number + - bank_code + - country +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + properties: + payment_method: + type: string + description: The payment method + example: ach + account_type: + type: string + description: The type of Direct Debit account + example: savings + enum: + - savings + - current + - cash + country: + type: string + description: The source country + minLength: 2 + maxLength: 2 + example: US + account_number: + type: string + description: The account number of the Direct Debit account + minLength: 4 + maxLength: 17 + example: '136549956' + bank_code: + type: string + description: The bank code of the Direct Debit account + minLength: 8 + maxLength: 9 + example: '021000021' + account_holder: + $ref: '#/components/schemas/AccountHolderAch' \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestBenefitSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestBenefitSource.yaml new file mode 100644 index 000000000..0cca661bb --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestBenefitSource.yaml @@ -0,0 +1,9 @@ +### +# Warning: this file was auto generated from OpenAPI specs. Do not manually edit. +### +type: object +description: 'Benefit Source' +allOf: + - + $ref: '#/components/schemas/PaymentRequestSource' + - {} diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestCustomerSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestCustomerSource.yaml new file mode 100644 index 000000000..e86a956e4 --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestCustomerSource.yaml @@ -0,0 +1,13 @@ +type: object +description: A customer source +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - id + properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + description: The customer's identifier. + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestCvConnectSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestCvConnectSource.yaml new file mode 100644 index 000000000..6adce14d0 --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestCvConnectSource.yaml @@ -0,0 +1,14 @@ +type: object +description: Cv Connect payment source +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + properties: + billing_address: + description: The cardholder's billing address + required: + - address_line1 + - city + - country + allOf: + - $ref: '#/components/schemas/Address' \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestEntitySource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestEntitySource.yaml new file mode 100644 index 000000000..6886fe0e4 --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestEntitySource.yaml @@ -0,0 +1,12 @@ +type: object +description: A currency account source +required: + - id +allOf: + - $ref: '#/components/schemas/PayoutRequestSource' + - type: object + properties: + id: + type: string + description: The ID of the entity or sub-entity. + example: ent_w4jelhppmfiufdnatam37wrfc4 diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestEpsSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestEpsSource.yaml new file mode 100644 index 000000000..c8ac6ae5b --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestEpsSource.yaml @@ -0,0 +1,17 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'EPS Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - purpose + properties: + purpose: + maxLength: 27 + type: string + description: "Purpose of the payment as appearing on customer's bank statement." + account_holder: + $ref: '#/components/schemas/AccountHolderGiropay' \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestFawrySource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestFawrySource.yaml new file mode 100644 index 000000000..ad8b81b1b --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestFawrySource.yaml @@ -0,0 +1,56 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Fawry Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - description + - products + - customer_email + - customer_mobile + properties: + description: + maxLength: 265 + type: string + description: 'The payment description.' + customer_profile_id: + type: string + description: "The customer's id within merchant's system." + customer_email: + type: string + description: "The customer's email address." + customer_mobile: + type: string + description: "The customer's mobile phone number." + expires_on: + type: string + description: 'The date on which the payment expires.' + format: 'date-time' + products: + type: array + items: + required: + - product_id + - quantity + - price + - description + type: object + properties: + product_id: + maxLength: 265 + type: string + description: 'The id of the product.' + quantity: + type: integer + description: 'The quantity of the product.' + price: + type: integer + description: "The price of the item. Expressed using Checkout.com's standard rules for calculating payment values." + description: + maxLength: 265 + type: string + description: 'The description of the product.' + description: 'List of Products' diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestGiropaySource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestGiropaySource.yaml new file mode 100644 index 000000000..89907e6ea --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestGiropaySource.yaml @@ -0,0 +1,9 @@ +type: object +required: + - type +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + properties: + account_holder: + $ref: '#/components/schemas/AccountHolderGiropay' \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestIdealSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestIdealSource.yaml new file mode 100644 index 000000000..0cb53d6e8 --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestIdealSource.yaml @@ -0,0 +1,24 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'iDEAL Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - description + - bic + properties: + description: + maxLength: 35 + type: string + description: "Description of the product(s) or services being paid for. This field must not contain characters that can lead to problems (for example those occurring in HTML editing codes). To prevent any possible errors most iDEAL systems will reject any description that contains HTML-tags and such other code.\n" + bic: + maxLength: 11 + type: string + description: 'BIC (8 or 11-digits). In iDEAL terminology, this is also called issuerID' + language: + maxLength: 2 + type: string + description: "This field enables the Issuer's site to select the Consumer's preferred language (e.g. the language selected on the Merchant's site), if the Issuer's site supports this. Code list in accordance with ISO 639-1. (Dutch = 'nl', English = 'en'). If a non-supported or non-existing language is entered the standard language of the Issuer is used. It is recommended to use 'nl' by default since not all Issuers support other languages.\n" \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestIllicadoSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestIllicadoSource.yaml new file mode 100644 index 000000000..4653ae3b4 --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestIllicadoSource.yaml @@ -0,0 +1,14 @@ +type: object +description: Illicado payment source +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + properties: + billing_address: + description: The cardholder's billing address + required: + - address_line1 + - city + - country + allOf: + - $ref: '#/components/schemas/Address' \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestKlarnaSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestKlarnaSource.yaml new file mode 100644 index 000000000..3b51048a5 --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestKlarnaSource.yaml @@ -0,0 +1,73 @@ +### +# Warning: this file was auto generated from OpenAPI specs. Do not manually edit. +### +type: object +description: 'Klarna Source' +allOf: + - + $ref: '#/components/schemas/PaymentRequestSource' + - + type: object + required: + - account_holder + properties: + account_holder: + required: + - first_name + - last_name + - email + - phone + - address + type: object + properties: + title: + type: string + description: 'Title of the account holder.' + example: Mr + first_name: + type: string + description: 'First name of the account holder.' + last_name: + type: string + description: 'Last name of the account holder.' + billing_address: + required: + - zip + - city + - country + type: object + properties: + address_line1: + type: string + description: 'Street address of the account holder.' + address_line2: + type: string + description: 'Street address of the account holder.' + city: + type: string + description: 'City of the account holder.' + zip: + type: string + description: 'Postal code of the account holder.' + country: + type: string + description: 'ISO 3166 alpha-2 account holder country code.' + description: 'Address of the account holder.' + email: + type: string + description: 'Email address of the account holder.' + date_of_birth: + type: string + description: 'Date of birth of the account holder.' + gender: + type: string + description: 'Gender of the account holder.' + phone: + type: object + properties: + country_code: + type: string + number: + type: string + description: 'Phone number of the account holder.' + description: 'Account holder information.' diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestKnetSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestKnetSource.yaml new file mode 100644 index 000000000..37c393f67 --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestKnetSource.yaml @@ -0,0 +1,77 @@ +type: object +description: 'KNet Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - language + properties: + language: + maxLength: 2 + enum: + - ar + - en + type: string + description: This field enables the issuer's site to select the consumer's preferred language + (e.g. the language selected on the merchant's site), if the issuer's site supports this. + Code list in accordance with ISO 639-1. (Arabic = 'ar', English = 'en'). + Note that 'ar' corresponds to 'ARA' and 'en' to 'USA' values accepted by KNet Gateway. + user_defined_field1: + maxLength: 255 + type: string + description: >- + User-defined field that can be used to pass and store any additional transaction data + required to be archived with the transaction and available as a searching criterion. + Only alphanumeric characters and spaces are allowed. + user_defined_field2: + maxLength: 255 + type: string + description: >- + User-defined field that can be used to pass and store any additional transaction data + required to be archived with the transaction and available as a searching criterion. + Only alphanumeric characters and spaces are allowed. + user_defined_field3: + maxLength: 255 + type: string + description: >- + User-defined field that can be used to pass and store any additional transaction data + required to be archived with the transaction and available as a searching criterion. + Only alphanumeric characters and spaces are allowed. + Note that this field must be omitted when the `card_token` field is not empty. This restriction + exists because a card token is passed to KNet Gateway as `user_defined_field3`. + user_defined_field4: + maxLength: 255 + type: string + description: >- + User-defined field that can be used to pass and store any additional transaction data + required to be archived with the transaction and available as a searching criterion. + Only alphanumeric characters and spaces are allowed. + user_defined_field5: + maxLength: 255 + type: string + description: >- + User-defined field that can be used to pass and store any additional transaction data + required to be archived with the transaction and available as a searching criterion. + Only alphanumeric characters and spaces are allowed. + Note that this field must be omitted when the `ptlf` field is not empty. This restriction + exists because a PTLF value is passed to KNet Gateway as `user_defined_field5`. + card_token: + type: string + pattern: '^[0-9]{8}$' + description: >- + This token allows re-use of card details for multiple payments. + This 8-digit token should be generated by a merchant. When a subsequent payment + is initialized with the same card token, a customer is presented with two options. + The customer can choose to pay with KFast (doesn't need to enter card details again), + or with KNet as usual. The payment flow stays the same i.e. a merchant should redirect + a customer to the redirect URL which is provided in the payment creation response. + Note that `user_defined_field3` must be omitted when the `card_token` field is not empty. This restriction + exists because a card token is passed to KNet Gateway as `user_defined_field3`. + ptlf: + maxLength: 45 + type: string + description: >- + This is an ID for merchant PTLF functionality tracking. + Only alphanumeric characters are allowed. + Note that `user_defined_field5` must be omitted when the `ptlf` field is not empty. This restriction + exists because a PTLF value is passed to KNet Gateway as `user_defined_field5`. diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestMbwaySource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestMbwaySource.yaml new file mode 100644 index 000000000..84a1dc02e --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestMbwaySource.yaml @@ -0,0 +1,7 @@ +type: object +description: 'MBWay payment request source' +required: + - type +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestMultibancoSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestMultibancoSource.yaml new file mode 100644 index 000000000..994fe36e7 --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestMultibancoSource.yaml @@ -0,0 +1,28 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Multibanco Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - payment_country + - account_holder_name + properties: + payment_country: + maxLength: 2 + minLength: 2 + enum: + - PT + type: string + description: 'The 2-letter ISO country code of the country in which the payment instrument is issued/operated.' + account_holder_name: + maxLength: 100 + minLength: 3 + type: string + description: 'The account holder.' + billing_descriptor: + maxLength: 65534 + type: string + description: 'Payment billing descriptor.' diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestP24Source.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestP24Source.yaml new file mode 100644 index 000000000..85f0e3c29 --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestP24Source.yaml @@ -0,0 +1,33 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'P24 Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - payment_country + - account_holder_name + - account_holder_email + properties: + payment_country: + maxLength: 2 + minLength: 2 + enum: + - PL + type: string + description: 'The 2-letter ISO country code of the country in which the payment instrument is issued/operated.' + account_holder_name: + maxLength: 100 + minLength: 3 + type: string + description: 'The account holder.' + account_holder_email: + maxLength: 254 + type: string + description: 'RFC-compliant email address of the account holder.' + billing_descriptor: + maxLength: 65534 + type: string + description: 'Payment billing descriptor.' diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestPayPalSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestPayPalSource.yaml new file mode 100644 index 000000000..8801f317a --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestPayPalSource.yaml @@ -0,0 +1,32 @@ +type: object +required: + - type +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + properties: + plan: + required: + - type + properties: + type: + enum: + - MERCHANT_INITIATED_BILLING, + - MERCHANT_INITIATED_BILLING_SINGLE_AGREEMENT, + - CHANNEL_INITIATED_BILLING, + - CHANNEL_INITIATED_BILLING_SINGLE_AGREEMENT, + - RECURRING_PAYMENTS, + - PRE_APPROVED_PAYMENTS + type: string + description: The billing plan type. + default: MERCHANT_INITIATED_BILLING + example: MERCHANT_INITIATED_BILLING + skip_shipping_address: + type: boolean + description: Indicates whether to skip the collection of the shipping address from the customer. + example: true + immutable_shipping_address: + type: boolean + description: Indicates whether to show the shipping address but prevent the customer from editing it. + example: false + description: The plan details for the recurring payments agreement. \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestPostfinanceSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestPostfinanceSource.yaml new file mode 100644 index 000000000..d60df4481 --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestPostfinanceSource.yaml @@ -0,0 +1,30 @@ +### +# Warning: this file was auto generated from OpenAPI specs. Do not manually edit. +### +type: object +description: 'Postfinance Source' +allOf: + - + $ref: '#/components/schemas/PaymentRequestSource' + - + type: object + required: + - payment_country + - account_holder_name + properties: + payment_country: + maxLength: 2 + minLength: 2 + enum: + - CH + type: string + description: 'The 2-letter ISO country code of the country in which the payment instrument is issued/operated.' + account_holder_name: + maxLength: 100 + minLength: 3 + type: string + description: 'The account holder.' + billing_descriptor: + maxLength: 65534 + type: string + description: 'Payment billing descriptor.' diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestQPaySource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestQPaySource.yaml new file mode 100644 index 000000000..003195fef --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestQPaySource.yaml @@ -0,0 +1,27 @@ +### +# Warning: this file was auto generated from OpenAPI specs. Do not manually edit. +### +type: object +description: 'QPay Source' +allOf: + - + $ref: '#/components/schemas/PaymentRequestSource' + - + type: object + required: + - description + properties: + quantity: + minimum: 1 + type: integer + description: 'A numeric value greater than zero that represents the quantity of a purchased item. The value is used for display purposes only and does not affect the total amount of the payment. The minimum allowed value is 1.' + description: + type: string + description: 'Alphanumeric string containing a description of the payment order. Note: The maximum allowed length of this property is 255 characters after UTF-8 URL encoding.' + language: + type: string + description: 'Alphabetic value representing the language of the interface displayed to customer at merchant site, and used as language for the payment description parameter. PG will use this value to display the interface supporting selected language to the customer during the payment process. Supported values are: `En`, `Ar`. The default value is `En`.' + national_id: + maxLength: 32 + type: string + description: 'Alphanumeric value representing the national ID of the customer performing the transaction. The maximum allowed length of this property is 32.' diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestSEPAV4Source.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestSEPAV4Source.yaml new file mode 100644 index 000000000..64b99bb5e --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestSEPAV4Source.yaml @@ -0,0 +1,88 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'SEPA DD Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - country + - account_number + - bank_code + - currency + - mandate_id + - date_of_signature + - account_holder + properties: + country: + type: string + description: 'The account''s country, as an ISO 3166-1 alpha-2 code.' + example: FR + account_number: + type: string + description: 'The account holder''s IBAN.' + example: FR7630006000011234567890189 + bank_code: + type: string + description: 'The account holder''s bank BIC orSwift code.' + example: AGRIFRPP + currency: + type: string + description: 'The account holder''s account currency.' + example: EUR + mandate_id: + type: string + description: 'The ID of the mandate.' + example: '123456' + date_of_signature: + type: string + description: 'The date the mandate was signed, in the format yyyy-MM-dd' + example: 2022-08-02 + account_holder: + type: object + description: 'The account holder''s personal information.' + required: + - first_name + - last_name + - billing_address + properties: + first_name: + type: string + description: 'The account holder''s first name.' + example: John + last_name: + type: string + description: 'The account holder''s last name.' + example: Wick + billing_address: + type: object + description: 'The account holder''s billing address.' + required: + - address_line1 + - address_line2 + - city + - zip + - country + properties: + address_line1: + type: string + description: 'The account holder''s street name.' + example: Evergreen Terrace + address_line2: + type: string + description: 'The account holder''s street number.' + example: '742' + city: + type: string + description: 'The account holder''s city.' + example: Paris + zip: + type: string + description: 'The account holder''s zip code.' + example: '75000' + country: + type: string + description: 'The account holder''s country, as an ISO 3166-1 alpha-2 code.' + example: FR + diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestSofortSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestSofortSource.yaml new file mode 100644 index 000000000..8d735e7da --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestSofortSource.yaml @@ -0,0 +1,16 @@ +type: object +description: 'Sofort Source' +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + properties: + countryCode: + maxLength: 2 + type: string + description: The ISO 3166-1 alpha-2 country code + example: DE + languageCode: + maxLength: 2 + type: string + description: The ISO 639-1 language code + example: en \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestStcPaySource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestStcPaySource.yaml new file mode 100644 index 000000000..fe5cd0b75 --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestStcPaySource.yaml @@ -0,0 +1,7 @@ +type: object +description: 'STC Pay request source' +required: + - type +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestTamaraSource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestTamaraSource.yaml new file mode 100644 index 000000000..cf46d9214 --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestTamaraSource.yaml @@ -0,0 +1,17 @@ +type: object +description: A Tamara payment source +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + required: + - type + - billing_address + properties: + billing_address: + description: The billing address of the cardholder + required: + - address_line1 + - city + - country + allOf: + - $ref: '#/components/schemas/Address' \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestTrustlySource.yaml b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestTrustlySource.yaml new file mode 100644 index 000000000..7b3aa6f70 --- /dev/null +++ b/nas_spec/components/schemas/Payments/RequestSources/PaymentRequestTrustlySource.yaml @@ -0,0 +1,14 @@ +type: object +description: Trustly payment source +allOf: + - $ref: '#/components/schemas/PaymentRequestSource' + - type: object + properties: + billing_address: + description: The cardholder's billing address + required: + - address_line1 + - city + - country + allOf: + - $ref: '#/components/schemas/Address' \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/ResponseDestinations/02_PaymentResponseBankAccountDestination.yaml b/nas_spec/components/schemas/Payments/ResponseDestinations/02_PaymentResponseBankAccountDestination.yaml new file mode 100644 index 000000000..c23c6f5fc --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseDestinations/02_PaymentResponseBankAccountDestination.yaml @@ -0,0 +1,12 @@ +type: object +description: A bank account payment destination +allOf: + - $ref: '#/components/schemas/PaymentResponseDestination' + - type: object + required: + - id + properties: + id: + type: string + description: The payment instrument identifier + pattern: ^(src)_(\w{26})$ diff --git a/nas_spec/components/schemas/Payments/ResponseSenders/01_PaymentResponseIndividualSender.yaml b/nas_spec/components/schemas/Payments/ResponseSenders/01_PaymentResponseIndividualSender.yaml new file mode 100644 index 000000000..428aa52ba --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSenders/01_PaymentResponseIndividualSender.yaml @@ -0,0 +1,25 @@ +type: object +description: Store a previously tokenized instrument +allOf: + - $ref: '#/components/schemas/PaymentDetailsResponseSender' +required: + - type + - first_name + - last_name + - address +properties: + type: + type: string + description: The sender type + first_name: + type: string + description: The sender's first name + example: 'John' + last_name: + type: string + description: The sender's last name + example: 'Jones' + address: + description: The sender's address + allOf: + - $ref: '#/components/schemas/Address' diff --git a/nas_spec/components/schemas/Payments/ResponseSenders/02_PaymentResponseCorporateSender.yaml b/nas_spec/components/schemas/Payments/ResponseSenders/02_PaymentResponseCorporateSender.yaml new file mode 100644 index 000000000..45264538e --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSenders/02_PaymentResponseCorporateSender.yaml @@ -0,0 +1,18 @@ +type: object +description: Store a previously tokenized instrument +allOf: + - $ref: '#/components/schemas/PaymentDetailsResponseSender' +required: + - type + - company_name +properties: + type: + type: string + description: The sender type + company_name: + type: string + description: The sender's company name + address: + description: The sender's address + allOf: + - $ref: '#/components/schemas/Address' diff --git a/nas_spec/components/schemas/Payments/ResponseSenders/03_PaymentResponseInstrumentSender.yaml b/nas_spec/components/schemas/Payments/ResponseSenders/03_PaymentResponseInstrumentSender.yaml new file mode 100644 index 000000000..9f0b8c260 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSenders/03_PaymentResponseInstrumentSender.yaml @@ -0,0 +1,10 @@ +type: object +description: Store a previously tokenized instrument +allOf: + - $ref: '#/components/schemas/PaymentDetailsResponseSender' +required: + - type +properties: + type: + type: string + description: The sender type diff --git a/nas_spec/components/schemas/Payments/ResponseSources/01_PaymentResponseCardSource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/01_PaymentResponseCardSource.yaml new file mode 100644 index 000000000..9a2f08dc1 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/01_PaymentResponseCardSource.yaml @@ -0,0 +1,118 @@ +type: object +description: A card payment source +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + required: + - expiry_month + - expiry_year + - last4 + - fingerprint + - bin + properties: + id: + type: string + description: The payment source identifier that can be used for subsequent payments. For new sources, this will only be returned if the payment was approved + example: 'src_nwd3m4in3hkuddfpjsaevunhdy' + billing_address: + description: The payment source owner's billing address + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The payment source owner's phone number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + expiry_month: + type: integer + description: The expiry month + minimum: 1 + minLength: 1 + maxLength: 2 + example: 6 + expiry_year: + type: integer + description: The expiry year + minLength: 4 + maxLength: 4 + example: 2025 + name: + type: string + description: The cardholder's name + example: 'Bruce Wayne' + scheme: + type: string + description: The card scheme + example: 'VISA' + scheme_local: + type: string + deprecated: true + description: | + Replaced by `local_schemes` + The local co-branded card scheme. + example: 'Cartes_Bancaires' + local_schemes: + type: array + items: + type: string + description: The local co-branded card schemes. + example: ['cartes_bancaires', 'visa'] + last4: + type: string + description: The last four digits of the card number + example: '9996' + fingerprint: + type: string + description: Uniquely identifies this particular card number. You can use this to compare cards across customers. + example: 'F639CAB2745BEE4140BF86DF6B6D6' + bin: + type: string + description: The card issuer's Bank Identification Number (BIN) + maxLength: 6 + example: '454347' + card_type: + type: string + description: The card type + enum: + - Credit + - Debit + - Prepaid + - Charge + - Deferred Debit + example: Credit + card_category: + type: string + description: The card category + enum: + - Consumer + - Commercial + example: Consumer + issuer: + type: string + description: The name of the card issuer + example: 'GOTHAM STATE BANK' + issuer_country: + type: string + maxLength: 2 + minLength: 2 + description: The card issuer's country (two-letter ISO code) + example: 'US' + product_id: + type: string + description: The issuer/card scheme product identifier + example: 'F' + product_type: + type: string + description: The issuer/card scheme product type + example: CLASSIC + avs_check: + type: string + description: The Address Verification System check result + example: S + cvv_check: + type: string + description: The card verification value (CVV) check result + example: Y + payment_account_reference: + type: string + description: A unique reference to the underlying card for network tokens (e.g., Apple Pay, Google Pay) + example: 'EUNIX9AX7THOOJIEJ2AP6OOFAHGH4' diff --git a/nas_spec/components/schemas/Payments/ResponseSources/02_PaymentResponseCurrencyAccountSource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/02_PaymentResponseCurrencyAccountSource.yaml new file mode 100644 index 000000000..c2356fa0a --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/02_PaymentResponseCurrencyAccountSource.yaml @@ -0,0 +1,15 @@ +type: object +description: 'A currency account source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + required: + - id + properties: + id: + type: string + description: 'The ID of the currency account' + pattern: ^(ca)_(\w{26})$ + amount: + type: integer + description: "If specified, indicates the amount in the source currency to be paid out. If omitted, the root amount in the destination currency will be used.
The amount must be provided in the minor currency unit." \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/ResponseSources/03_PaymentResponseWeChatPaySource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/03_PaymentResponseWeChatPaySource.yaml new file mode 100644 index 000000000..2a1dc94b4 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/03_PaymentResponseWeChatPaySource.yaml @@ -0,0 +1,4 @@ +type: object +description: 'WeChat Pay payment source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentGetResponseEPSSource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentGetResponseEPSSource.yaml new file mode 100644 index 000000000..1b5d5b549 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentGetResponseEPSSource.yaml @@ -0,0 +1,28 @@ +### +# Warning: this file was auto generated from OpenAPI specs. Do not manually edit. +### +type: object +description: 'EPS Source' +allOf: + - + $ref: '#/components/schemas/PaymentResponseSource' + - + type: object + properties: + purpose: + maxLength: 27 + type: string + description: "Purpose of the payment as appearing on customer's bank statement." + bic: + maxLength: 11 + type: string + description: 'Bank Identifier Code (BIC). It can be exactly 8 characters or 11 characters long.' + iban: + maxLength: 34 + type: string + description: 'International Bank Account Number (IBAN) without whitespaces.' + account_holder_name: + type: string + description: 'Account holder information.' + account_holder: + $ref: '#/components/schemas/AccountHolderGiropay' diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentGetResponseGiropaySource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentGetResponseGiropaySource.yaml new file mode 100644 index 000000000..860d35d6d --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentGetResponseGiropaySource.yaml @@ -0,0 +1,28 @@ +### +# Warning: this file was auto generated from OpenAPI specs. Do not manually edit. +### +type: object +description: 'Giropay Source' +allOf: + - + $ref: '#/components/schemas/PaymentResponseSource' + - + type: object + properties: + purpose: + maxLength: 27 + type: string + description: 'Purpose of the payment as appearing on customer''s bank statement.' + bic: + maxLength: 11 + type: string + description: 'Bank Identifier Code (BIC). It can be exactly 8 characters or 11 characters long.' + iban: + maxLength: 34 + type: string + description: 'International Bank Account Number (IBAN) without whitespaces.' + account_holder_name: + type: string + description: 'Account holder information.' + account_holder: + $ref: '#/components/schemas/AccountHolderGiropay' diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentGetResponseKlarnaSource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentGetResponseKlarnaSource.yaml new file mode 100644 index 000000000..c9c714c74 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentGetResponseKlarnaSource.yaml @@ -0,0 +1,65 @@ +### +# Warning: this file was auto generated from OpenAPI specs. Do not manually edit. +### +type: object +description: 'Klarna Source' +allOf: + - + $ref: '#/components/schemas/PaymentResponseSource' + - + type: object + properties: + account_holder: + type: object + properties: + title: + type: string + description: 'Title of the account holder.' + example: Mr + first_name: + type: string + description: 'First name of the account holder.' + last_name: + type: string + description: 'Last name of the account holder.' + billing_address: + required: + - zip + - city + - country + type: object + properties: + address_line1: + type: string + description: 'Street address of the account holder.' + address_line2: + type: string + description: 'Street address of the account holder.' + city: + type: string + description: 'City of the account holder.' + zip: + type: string + description: 'Postal code of the account holder.' + country: + type: string + description: 'ISO 3166 alpha-2 account holder country code.' + description: 'Address of the account holder.' + email: + type: string + description: 'Email address of the account holder.' + date_of_birth: + type: string + description: 'Date of birth of the account holder.' + gender: + type: string + description: 'Gender of the account holder.' + phone: + type: object + properties: + country_code: + type: string + number: + type: string + description: 'Phone number of the account holder.' + description: 'object describes payee details' diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentGetResponseQPaySource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentGetResponseQPaySource.yaml new file mode 100644 index 000000000..cd5dc6bba --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentGetResponseQPaySource.yaml @@ -0,0 +1,29 @@ +### +# Warning: this file was auto generated from OpenAPI specs. Do not manually edit. +### +type: object +description: 'QPay Source' +allOf: + - + $ref: '#/components/schemas/PaymentResponseSource' + - + type: object + required: + - description + - pun + properties: + description: + type: string + description: 'Alphanumeric string containing a description of the payment order.' + qpay_status: + type: string + description: 'The status code returned from the QPay gateway on payment, if available.' + status_message: + type: string + description: 'A message giving further detail on the payment status, for failure/cancelled/success status payments.' + confirmation_id: + type: string + description: 'An identifier from the QPay gateway for a successful payment.' + pun: + type: string + description: 'QPay Payment Unique Number' diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentGetResponseSEPAV4Source.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentGetResponseSEPAV4Source.yaml new file mode 100644 index 000000000..0d511b8b8 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentGetResponseSEPAV4Source.yaml @@ -0,0 +1,17 @@ +### +# Warning: this file was auto generated from OpenAPI specs. Do not manually edit. +### +type: object +description: 'SEPA DD Source' +allOf: + - + $ref: '#/components/schemas/PaymentDetailsResponseSource' + - + type: object + required: + - id + properties: + id: + type: string + description: 'The instrument ID' + example: src_q2euotsbrciupfgmwxkyzuoevq diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseAfterPaySource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseAfterPaySource.yaml new file mode 100644 index 000000000..d1bf6dc12 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseAfterPaySource.yaml @@ -0,0 +1,5 @@ +type: object +description: 'Afterpay payment response source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseAlipayPlusSource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseAlipayPlusSource.yaml new file mode 100644 index 000000000..ac650373b --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseAlipayPlusSource.yaml @@ -0,0 +1,4 @@ +type: object +description: 'Alipay payment source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseAlmaSource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseAlmaSource.yaml new file mode 100644 index 000000000..fe0b50d4a --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseAlmaSource.yaml @@ -0,0 +1,5 @@ +type: object +description: 'Alma Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseBancontactSource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseBancontactSource.yaml new file mode 100644 index 000000000..7d5e991f9 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseBancontactSource.yaml @@ -0,0 +1,13 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Bancontact Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + properties: + iban: + maxLength: 34 + type: string + description: "The IBAN of the Consumer Bank account used for payment (if applicable).\n" diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseBenefitSource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseBenefitSource.yaml new file mode 100644 index 000000000..4ed5d645b --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseBenefitSource.yaml @@ -0,0 +1,10 @@ +### +# Warning: this file was auto generated from OpenAPI specs. Do not manually edit. +### +type: object +description: 'Benefit Source' +allOf: + - + $ref: '#/components/schemas/PaymentResponseSource' + - + type: object diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseCvConnectSource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseCvConnectSource.yaml new file mode 100644 index 000000000..ca05089a8 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseCvConnectSource.yaml @@ -0,0 +1,5 @@ +type: object +description: 'Cv Connect Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseFawrySource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseFawrySource.yaml new file mode 100644 index 000000000..ae2b4a2f1 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseFawrySource.yaml @@ -0,0 +1,18 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Fawry Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + required: + - description + properties: + description: + maxLength: 65534 + type: string + description: 'Payment description' + reference_number: + type: string + description: "The customer pays using this number at Fawry's outlets" diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseIdealSource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseIdealSource.yaml new file mode 100644 index 000000000..7db7fc558 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseIdealSource.yaml @@ -0,0 +1,27 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'iDEAL Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + required: + - description + - bic + properties: + description: + maxLength: 27 + type: string + description: description + bic: + maxLength: 11 + type: string + description: "BIC (8 or 11-digits) BIC of the bank where the Consumer account is held. If governing law prevents Issuers outside the Netherlands from disclosing this information, field may be omitted.\n" + iban: + maxLength: 34 + type: string + description: "The IBAN of the Consumer Bank account used for payment. If governing law prevents Issuers outside the Netherlands from disclosing this information, field may be omitted.\n" + account_holder: + type: string + description: "Name of the Consumer according to the name of the account used for payment. In the exceptional case that the consumerName cannot be retrieved by the Issuer, this is filled with 'N/A'. If governing law prevents Issuers outside the Netherlands from disclosing this information, field may be omitted.\n" \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseIllicadoSource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseIllicadoSource.yaml new file mode 100644 index 000000000..f0dcf50e7 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseIllicadoSource.yaml @@ -0,0 +1,5 @@ +type: object +description: 'Illicado Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseKlarnaSource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseKlarnaSource.yaml new file mode 100644 index 000000000..c4432dcd5 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseKlarnaSource.yaml @@ -0,0 +1,4 @@ +type: object +description: 'Klarna Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseKnetSource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseKnetSource.yaml new file mode 100644 index 000000000..846cf5ddd --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseKnetSource.yaml @@ -0,0 +1,123 @@ +type: object +description: 'KNet Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + properties: + language: + enum: + - ar + - en + type: string + description: >- + This field enables the issuer's site to select the consumer's preferred language + (e.g. the language selected on the merchant's site), if the issuer's site supports this. + Code list in accordance with ISO 639-1. (Arabic = 'ar', English = 'en'). + NOTE: 'ar' corresponds to 'ARA' and 'en' - to 'USA' values accepted by KNet Gateway. + user_defined_field1: + type: string + description: >- + User-defined field that can be used to pass and store any additional transaction data + required to be archived with the transaction and available as a searching criterion. + Only alphanumeric characters and spaces are allowed. + user_defined_field2: + type: string + description: >- + User-defined field can be used to pass and store any additional transaction data + required to be archived with the transaction and available as a searching criterion. + Only alphanumeric characters and spaces are allowed. + user_defined_field3: + type: string + description: >- + User-defined field can be used to pass and store any additional transaction data + required to be archived with the transaction and available as a searching criterion. + Only alphanumeric characters and spaces are allowed. + Note that this field must be omitted when the `card_token` field is not empty. This restriction + exists because a card token is passed to KNet Gateway as `user_defined_field3`. + user_defined_field4: + type: string + description: >- + User-defined field can be used to pass and store any additional transaction data + required to be archived with the transaction and available as a searching criterion. + Only alphanumeric characters and spaces are allowed. + user_defined_field5: + type: string + description: >- + User-defined field can be used to pass and store any additional transaction data + required to be archived with the transaction and available as a searching criterion. + Only alphanumeric characters and spaces are allowed. + Note that this field must be omitted when the `ptlf` field is not empty. This restriction + exists because a PTLF value is passed to KNet Gateway as `user_defined_field5`. + card_token: + type: string + pattern: '^[0-9]{8}$' + description: >- + This token allows re-usage of card details for multiple payments. + This 8-digit token should be generated by a merchant. When a subsequent payment + is initialized with the same card token, a customer is presented with two options. + The customer can choose to pay with KFast (doesn't need to enter card details again), + or with KNet as usual. The payment flow stays the same i.e. a merchant should redirect + a customer to the redirect URL which is provided in the payment creation response. + Note that `user_defined_field3` must be omitted when the `card_token` field is not empty. This restriction + exists because a card token is passed to KNet Gateway as `user_defined_field3`. + ptlf: + type: string + maxLength: 45 + description: >- + This is an ID for merchant PTLF functionality tracking. + Only alphanumeric characters are allowed. + Note that `user_defined_field5` must be omitted when the `ptlf` field is not empty. This restriction + exists because a PTLF value is passed to KNet Gateway as `user_defined_field5`. + knet_payment_id: + type: string + description: The payment identifier assigned by KNet Gateway. + knet_result: + type: string + description: >- + The state of the payment, returned by KNet Gateway after the customer is redirected from + the payment page. + inquiry_result: + type: string + description: >- + The state of the payment, returned by KNet Gateway in the response from the payment inquiry. + This field is populated in rare cases when the redirection from the payment page did not occur + properly. + bank_reference: + type: string + example: 123456789012 + description: 'The result transaction reference, given by some banks/institutions.' + knet_transaction_id: + type: string + example: 1234567890123456 + description: The transaction identifier assigned by KNet Gateway. + auth_code: + type: string + example: 999554 + description: The resulting authorization code from the issuing bank. + auth_response_code: + type: string + example: 5 + description: >- + The auth response code / reason code relating to the issuing bank + authorization code. + post_date: + type: string + example: 1127 + description: >- + The transaction date in the authorization system format, with the + value defined by the issuing bank, so may not match the actual + transaction date. The format is `MMDD`. + avr: + type: string + example: A + description: >- + The Address Verification Response returned from the address + verification service. + error: + type: string + example: IPAY0100044 + description: The KNET error code for transaction processing. + error_text: + type: string + example: IPAY0100044-Problem occured while loading payment page. + description: 'The KNET text detail for the error, including an error code.' diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseMbwaySource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseMbwaySource.yaml new file mode 100644 index 000000000..fec572850 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseMbwaySource.yaml @@ -0,0 +1,4 @@ +type: object +description: 'MBWay payment response source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseMultibancoSource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseMultibancoSource.yaml new file mode 100644 index 000000000..1206e8e72 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseMultibancoSource.yaml @@ -0,0 +1,15 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'Multibanco Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + properties: + payment_reference: + type: string + description: 'Multibanco payment reference' + service_supplier_id: + type: string + description: 'The identifier of a supplier charging for its service or product' diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseP24Source.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseP24Source.yaml new file mode 100644 index 000000000..1d0102f20 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseP24Source.yaml @@ -0,0 +1,12 @@ +### +# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. +### +type: object +description: 'P24 Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object + properties: + p24_descriptor: + type: string + description: "P24-generated payment descriptor, which contains the requested billing descriptor or the merchant's default descriptor (subject to truncation)." diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponsePayPalSource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponsePayPalSource.yaml new file mode 100644 index 000000000..1a25a23f6 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponsePayPalSource.yaml @@ -0,0 +1,4 @@ +type: object +description: 'PayPal payment source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponsePostfinanceSource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponsePostfinanceSource.yaml new file mode 100644 index 000000000..76385b8e9 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponsePostfinanceSource.yaml @@ -0,0 +1,9 @@ +### +# Warning: this file was auto generated from OpenAPI specs. Do not manually edit. +### +type: object +description: 'Postfinance Source' +allOf: + - + $ref: '#/components/schemas/PaymentResponseSource' + - {} diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseSEPAV4Source.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseSEPAV4Source.yaml new file mode 100644 index 000000000..d80753e5a --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseSEPAV4Source.yaml @@ -0,0 +1,18 @@ +### +# Warning: this file was auto generated from OpenAPI specs. Do not manually edit. +### +type: object +description: 'SEPA DD Source' +allOf: + - + $ref: '#/components/schemas/PaymentResponseSource' + - + type: object + required: + - id + properties: + id: + type: string + description: 'The instrument ID' + example: src_q2euotsbrciupfgmwxkyzuoevq + diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseSofortSource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseSofortSource.yaml new file mode 100644 index 000000000..c9ff49b7e --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseSofortSource.yaml @@ -0,0 +1,4 @@ +type: object +description: 'Sofort payment source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseStcPaySource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseStcPaySource.yaml new file mode 100644 index 000000000..d04c3dc19 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseStcPaySource.yaml @@ -0,0 +1,4 @@ +type: object +description: 'STC Pay response source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseTamaraSource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseTamaraSource.yaml new file mode 100644 index 000000000..620b0cd41 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseTamaraSource.yaml @@ -0,0 +1,5 @@ +type: object +description: 'Tamara Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseTrustlySource.yaml b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseTrustlySource.yaml new file mode 100644 index 000000000..1b1c6014a --- /dev/null +++ b/nas_spec/components/schemas/Payments/ResponseSources/PaymentResponseTrustlySource.yaml @@ -0,0 +1,5 @@ +type: object +description: 'Trustly Source' +allOf: + - $ref: '#/components/schemas/PaymentResponseSource' + - type: object \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/RiskRequest.yaml b/nas_spec/components/schemas/Payments/RiskRequest.yaml new file mode 100644 index 000000000..56b243f3c --- /dev/null +++ b/nas_spec/components/schemas/Payments/RiskRequest.yaml @@ -0,0 +1,15 @@ +type: object +description: Configures the risk assessment performed during the processing of the payment +required: + - enabled +properties: + enabled: + type: boolean + description: Whether a risk assessment should be performed + default: true + example: false + device_session_id: + type: string + description: Device session ID collected from our standalone Risk.js package. If you integrate using our [Frames](https://www.checkout.com/docs/integrate/frames) solution, this ID is not required. + example: "dsid_ipsmclhxwq72phhr32iwfvrflm" + pattern: "^(dsid)_(\\w{26})$" diff --git a/nas_spec/components/schemas/Payments/ShippingInfo.yaml b/nas_spec/components/schemas/Payments/ShippingInfo.yaml new file mode 100644 index 000000000..e3cbfddc6 --- /dev/null +++ b/nas_spec/components/schemas/Payments/ShippingInfo.yaml @@ -0,0 +1,49 @@ +type: object +properties: + return_shipping_company: + description: Name of the shipping company for the return shipment (as specific as possible). + maxLength: 100 + type: string + example: DHL US + return_tracking_number: + description: Tracking number for the return shipment. + maxLength: 100 + type: string + example: GM275322484009027685 + return_tracking_uri: + description: URL where the customer can track the return shipment. + maxLength: 1024 + type: string + example: http://example.com/tracking/GM275322484009027685 + shipping_company: + description: Name of the shipping company (as specific as possible) + maxLength: 100 + type: string + example: DHL US + shipping_method: + description: Shipping method + type: string + enum: + - PickUpStore + - Home + - BoxReg + - BoxUnreg + - PickUpPoint + - Own + - Postal + - DHLPackstation + - Digital + - Undefined + - PickUpWarehouse + - ClickCollect + - PalletDelivery + tracking_number: + description: Tracking number for the shipment. + maxLength: 100 + type: string + example: GM275322484009027685 + tracking_uri: + description: URI where the customer can track their shipment. + maxLength: 1024 + type: string + example: http://example.com/tracking/GM275322484009027685 \ No newline at end of file diff --git a/nas_spec/components/schemas/Payments/VoidAcceptedResponse.yaml b/nas_spec/components/schemas/Payments/VoidAcceptedResponse.yaml new file mode 100644 index 000000000..34f9067fa --- /dev/null +++ b/nas_spec/components/schemas/Payments/VoidAcceptedResponse.yaml @@ -0,0 +1,27 @@ +type: object +description: Void response +required: + - action_id +properties: + action_id: + description: The unique identifier for the void action + allOf: + - $ref: '#/components/schemas/ActionId' + reference: + type: string + description: Your reference for the void request + example: 'ORD-5023-4E89' + _links: + type: object + description: The links related to the void + readOnly: true + minItems: 2 + properties: + payment: + type: object + allOf: + - $ref: '#/components/schemas/Link' + example: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44' + required: + - payment diff --git a/nas_spec/components/schemas/Payments/VoidRequest.yaml b/nas_spec/components/schemas/Payments/VoidRequest.yaml new file mode 100644 index 000000000..fe75f8567 --- /dev/null +++ b/nas_spec/components/schemas/Payments/VoidRequest.yaml @@ -0,0 +1,13 @@ +type: object +properties: + reference: + type: string + description: A reference you can later use to identify this void request.
For Amex, the string limit is 30 characters. + maxLength: 50 + example: 'ORD-5023-4E89' + metadata: + type: object + description: A set of key-value pairs that you can attach to the void request. It can be useful for storing additional information in a structured format. **Note** that this object only allows one level of depth, so cannot accept non-primitive data types such as objects or arrays. + example: + coupon_code: 'NY2018' + partner_id: 123989 diff --git a/nas_spec/components/schemas/Payments/VoidResponse.yaml b/nas_spec/components/schemas/Payments/VoidResponse.yaml new file mode 100644 index 000000000..ba2b2943b --- /dev/null +++ b/nas_spec/components/schemas/Payments/VoidResponse.yaml @@ -0,0 +1,64 @@ +type: object +description: Payment response +required: + - id + - action_id + - amount + - currency + - status + - response_code + - processed_on + - _links +properties: + id: + description: The unique payment identifier + allOf: + - $ref: '#/components/schemas/PaymentId' + action_id: + description: The unique identifier for the void action + allOf: + - $ref: '#/components/schemas/ActionId' + amount: + type: integer + description: The void amount + example: 6540 + currency: + type: string + description: The three-letter ISO currency code of the payment + example: USD + maxLength: 3 + minLength: 3 + status: + type: string + description: The status of the payment + example: 'Voided' + response_code: + type: string + description: The Gateway response code + example: '10000' + response_summary: + type: string + description: The Gateway response summary + example: 'Approved' + processed_on: + description: The date/time the void was processed + allOf: + - $ref: '#/components/schemas/ServerTimestamp' + reference: + type: string + description: Your reference for the void request + example: ORD-5023-4E89 + _links: + type: object + description: The links related to the payment + minItems: 1 + properties: + payment: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the payment + example: + href: 'https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44' + required: + - payment diff --git a/nas_spec/components/schemas/PhoneNumber.yaml b/nas_spec/components/schemas/PhoneNumber.yaml new file mode 100644 index 000000000..cf9452ffe --- /dev/null +++ b/nas_spec/components/schemas/PhoneNumber.yaml @@ -0,0 +1,15 @@ +type: object +description: A phone number +properties: + country_code: + type: string + description: The international country calling code. Required if `source.type` is `tamara` or `trustly` + minLength: 1 + maxLength: 7 + example: '+1' + number: + type: string + description: The phone number. Required if `source.type` is `tamara` or `trustly` + minLength: 6 + maxLength: 25 + example: 415 555 2671 diff --git a/nas_spec/components/schemas/Platforms/DateOfBirth.yaml b/nas_spec/components/schemas/Platforms/DateOfBirth.yaml new file mode 100644 index 000000000..a6d8238cd --- /dev/null +++ b/nas_spec/components/schemas/Platforms/DateOfBirth.yaml @@ -0,0 +1,25 @@ +type: object +title: Date of birth +description: The date of birth of the person according to the Gregorian calendar. +properties: + day: + type: number + description: The calendar day of the month they were born. + minimum: 1 + maximum: 31 + example: 16 + month: + type: number + description: The month of the year they were born. + minimum: 1 + maximum: 12 + example: 03 + year: + type: number + description: The year they were born. + minimum: 1900 + example: 1985 +required: + - day + - month + - year diff --git a/nas_spec/components/schemas/Platforms/EntityAddress.yaml b/nas_spec/components/schemas/Platforms/EntityAddress.yaml new file mode 100644 index 000000000..6adb67810 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityAddress.yaml @@ -0,0 +1,44 @@ +type: object +title: Address +properties: + address_line1: + type: string + description: 'The first line of the address. Note that the length of line 1 and line 2 combined must be at least 5 characters long.' + minLength: 1 + maxLength: 300 + example: '90 Tottenham Court Road' + address_line2: + type: string + description: 'The second line of the address.' + minLength: 0 + maxLength: 300 + example: null + city: + type: string + description: 'The address city.' + minLength: 2 + maxLength: 300 + example: 'London' + state: + type: string + description: | + The address state. + This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in. + minLength: 0 + maxLength: 300 + example: null + zip: + type: string + pattern: ^\d{5}(?:[-\s]\d{4})?$ + description: 'The address zip/postal code.' + minLength: 1 + maxLength: 16 + example: 'W1T4TJ' + country: + type: string + description: The two-letter ISO country code of the address. + minLength: 2 + maxLength: 2 + pattern: '[a-zA-Z]{2}' + format: ISO 3166-1 + example: 'GB' diff --git a/nas_spec/components/schemas/Platforms/EntityBasicResponse.yaml b/nas_spec/components/schemas/Platforms/EntityBasicResponse.yaml new file mode 100644 index 000000000..2d48b7843 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityBasicResponse.yaml @@ -0,0 +1,34 @@ +type: object +title: Basic response +readOnly: true +properties: + id: + type: string + description: The unique identifier of the sub-entity. + example: ent_wxglze3wwywujg4nna5fb7ldli + reference: + type: string + description: A unique reference you can later use to identify this sub-entity. + minLength: 1 + maxLength: 50 + example: superhero1234 + status: + type: string + title: Status + description: The state of your sub-entity, which indicates what stage of onboarding its at and whether it's able to use its available capabilities + example: requirements_due + enum: + - active + - pending + - restricted + - requirements_due + - inactive + - rejected + capabilities: + $ref: '#/components/schemas/EntityCapabilities' + requirements_due: + type: array + title: Requirements Due + description: The requirements due for this sub-entity before we will perform due diligence checks + items: + $ref: '#/components/schemas/EntityRequirement' diff --git a/nas_spec/components/schemas/Platforms/EntityBasicResponseWithLinks.yaml b/nas_spec/components/schemas/Platforms/EntityBasicResponseWithLinks.yaml new file mode 100644 index 000000000..b84833797 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityBasicResponseWithLinks.yaml @@ -0,0 +1,5 @@ +type: object +title: Basic response with links +allOf: + - $ref: '#/components/schemas/EntityBasicResponse' + - $ref: '#/components/schemas/EntityLinks' diff --git a/nas_spec/components/schemas/Platforms/EntityCapabilities.yaml b/nas_spec/components/schemas/Platforms/EntityCapabilities.yaml new file mode 100644 index 000000000..9b600631e --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityCapabilities.yaml @@ -0,0 +1,29 @@ +type: object +title: Capabilities +properties: + payments: + type: object + description: 'Payment related capabilities of a sub-entity.' + properties: + available: + type: boolean + description: True if payments are available to the sub-entity. + enabled: + type: boolean + description: True if payments are enabled. + example: + available: true + enabled: false + payouts: + type: object + description: 'Payout related capabilities of a sub-entity.' + properties: + available: + type: boolean + description: 'True if payouts are available to the sub-entity.' + enabled: + type: boolean + description: 'True if payouts are enabled.' + example: + available: true + enabled: false diff --git a/nas_spec/components/schemas/Platforms/EntityCompany.yaml b/nas_spec/components/schemas/Platforms/EntityCompany.yaml new file mode 100644 index 000000000..1a9804900 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityCompany.yaml @@ -0,0 +1,59 @@ +type: object +title: Company +description: 'Information about the company represented by the sub-entity. Include this object if you are onboarding a company or business. This is required if the individual object is omitted.' +properties: + business_registration_number: + type: string + description: | + The sub-entity's Business Registration Number. + This can be a Commercial Registration or Ministry of Commerce certificate number, or any other equivalent registration number. + For sub-entities based in France, this must be a SIRET number. + minLength: 2 + maxLength: 20 + example: '452349600005' + business_type: + type: string + description: "The legal type of the company" + enum: + - general_partnership + - limited_partnership + - public_limited_company + - limited_company + - professional_association + - unincorporated_association + - auto_entrepreneur + legal_name: + type: string + description: 'The legal name of the sub-entity.' + minLength: 2 + maxLength: 300 + example: Super Hero Masks Inc. + trading_name: + type: string + description: "The trading name of the sub-entity, also referred to as 'doing business as'." + minLength: 2 + maxLength: 300 + example: Super Hero Masks + principal_address: + description: 'The primary location of the company where business is performed.' + allOf: + - $ref: '#/components/schemas/EntityAddress' + registered_address: + description: 'The registered address of the company.' + allOf: + - $ref: '#/components/schemas/EntityAddress' + document: + allOf: + - $ref: '#/components/schemas/EntityDocumentCompany' + representatives: + type: array + title: Representatives + description: 'Information about representatives of this company.' + minItems: 1 + maxItems: 5 + items: + $ref: '#/components/schemas/EntityRepresentative' + financial_details: + description: 'Seller financial questions and supporting documents.' + allOf: + - $ref : '#/components/schemas/EntityFinancialDetails' diff --git a/nas_spec/components/schemas/Platforms/EntityContactDetails.yaml b/nas_spec/components/schemas/Platforms/EntityContactDetails.yaml new file mode 100644 index 000000000..40e317e04 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityContactDetails.yaml @@ -0,0 +1,8 @@ +type: object +title: Contact details +description: 'Contact details of this sub-entity.' +properties: + phone: + $ref: '#/components/schemas/EntityPhone' + email_addresses: + $ref: '#/components/schemas/EntityEmailAddresses' diff --git a/nas_spec/components/schemas/Platforms/EntityCreateRequest.yaml b/nas_spec/components/schemas/Platforms/EntityCreateRequest.yaml new file mode 100644 index 000000000..f5094a24c --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityCreateRequest.yaml @@ -0,0 +1,180 @@ +type: object +title: CreateRequest +properties: + reference: + type: string + description: A unique reference you can later use to identify this sub-entity. + minLength: 1 + maxLength: 50 + example: superhero1234 + contact_details: + title: Contact details + allOf: + - $ref: '#/components/schemas/EntityContactDetails' + - type: object + properties: + phone: + description: 'The phone number of the sub-entity.' + allOf: + - $ref: '#/components/schemas/EntityPhone' + required: + - number + email_addresses: + description: 'Email addresses for this sub-entity.' + allOf: + - $ref: '#/components/schemas/EntityEmailAddresses' + required: + - primary + required: + - phone + - email_addresses + profile: + title: Profile + allOf: + - $ref: '#/components/schemas/EntityProfile' + required: + - urls + - mccs + company: + type: object + title: Company + description: 'Information about the company represented by the sub-entity. Include this object if you are onboarding a company or business. This is required if the individual object is omitted.' + required: + - legal_name + - trading_name + - principal_address + properties: + business_registration_number: + type: string + description: | + The sub-entity's Business Registration Number. + This can be a Commercial Registration or Ministry of Commerce certificate number, or any other equivalent registration number. + For sub-entities based in France, this must be a SIRET number. + minLength: 2 + maxLength: 20 + example: '452349600005' + business_type: + type: string + description: "The legal type of the company" + enum: + - general_partnership + - limited_partnership + - public_limited_company + - limited_company + - professional_association + - unincorporated_association + - auto_entrepreneur + legal_name: + type: string + description: 'The legal name of the sub-entity.' + minLength: 2 + maxLength: 300 + example: Super Hero Masks Inc. + trading_name: + type: string + description: "The trading name of the sub-entity, also referred to as 'doing business as'." + minLength: 2 + maxLength: 300 + example: Super Hero Masks + principal_address: + title: Address + description: 'The primary location of the company where business is performed.' + allOf: + - $ref: '#/components/schemas/EntityAddress' + required: + - address_line1 + - city + - zip + - country + registered_address: + title: Address + description: 'The registered address of the company.' + allOf: + - $ref: '#/components/schemas/EntityAddress' + required: + - address_line1 + - city + - zip + - country + document: + $ref: '#/components/schemas/EntityDocumentCompany' + representatives: + type: array + title: Representatives + description: 'Information about representatives of this company.' + minItems: 1 + maxItems: 5 + items: + allOf: + - $ref: '#/components/schemas/EntityRepresentative' + - type: object + required: + - first_name + - last_name + properties: + address: + required: + - country + financial_details: + description: 'Seller financial questions and supporting documents.' + allOf: + - $ref : '#/components/schemas/EntityFinancialDetails' + individual: + type: object + title: Individual + description: 'Information about the individual represented by the sub-entity. Include this object if you are onboarding a sole proprietor. This is required if the company object is omitted.' + required: + - first_name + - last_name + - trading_name + - registered_address + properties: + first_name: + type: string + description: "The person's first name." + minLength: 2 + maxLength: 50 + example: 'John' + middle_name: + type: string + description: "The person's middle name." + maxLength: 50 + example: 'Paul' + last_name: + type: string + description: "The person's last name." + minLength: 2 + maxLength: 50 + example: 'Doe' + trading_name: + type: string + description: "If applicable, the person's trading name." + minLength: 2 + maxLength: 300 + example: Super Hero Masks + national_tax_id: + type: string + description: "The sub-entity's tax identification code. For example, a value added tax (VAT) number in the UK." + minLength: 2 + maxLength: 16 + example: '1234567' + registered_address: + title: Address + description: 'The registered address of the person.' + allOf: + - $ref: '#/components/schemas/EntityAddress' + required: + - address_line1 + - city + - zip + - country + date_of_birth: + $ref: '#/components/schemas/DateOfBirth' + place_of_birth: + $ref: '#/components/schemas/PlaceOfBirth' + identification: + $ref: '#/components/schemas/EntityIdentification' +required: + - reference + - contact_details + - profile diff --git a/nas_spec/components/schemas/Platforms/EntityDocumentBank.yaml b/nas_spec/components/schemas/Platforms/EntityDocumentBank.yaml new file mode 100644 index 000000000..96b1c705f --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityDocumentBank.yaml @@ -0,0 +1,14 @@ +type: object +title: BankDocument +description: 'A bank statement that can be used for verification.' +properties: + file_id: + type: 'string' + description: 'The ID of the file. This is returned when uploading a document using the files API.' + example: 'file_wmlfc3zyhqzehihu7giusaaawu' + type: + type: 'string' + description: 'The type of the file.' + enum: + - 'bank_statement' + example: 'bank_statement' diff --git a/nas_spec/components/schemas/Platforms/EntityDocumentCompany.yaml b/nas_spec/components/schemas/Platforms/EntityDocumentCompany.yaml new file mode 100644 index 000000000..368fe4573 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityDocumentCompany.yaml @@ -0,0 +1,14 @@ +type: object +title: CompanyDocument +description: 'A document that can be used for a know your business (KYB) check on a company.' +properties: + file_id: + type: 'string' + description: 'The ID of the file. This is returned when uploading a document using the files API.' + example: 'file_wmlfc3zyhqzehihu7giusaaawu' + type: + type: 'string' + description: 'The type of the file.' + enum: + - 'incorporation_document' + example: 'incorporation_document' diff --git a/nas_spec/components/schemas/Platforms/EntityDocumentFinancial.yaml b/nas_spec/components/schemas/Platforms/EntityDocumentFinancial.yaml new file mode 100644 index 000000000..47472eda5 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityDocumentFinancial.yaml @@ -0,0 +1,14 @@ +type: object +title: FinancialDocument +description: 'A financial statement that can be used for verification.' +properties: + file_id: + type: 'string' + description: 'The ID of the file. This is returned when uploading a document using the files API.' + example: 'file_wmlfc3zyhqzehihu7giusaaawu' + type: + type: 'string' + description: 'The type of the file.' + enum: + - 'financial_statement' + example: 'financial_statement' diff --git a/nas_spec/components/schemas/Platforms/EntityDocumentIdentity.yaml b/nas_spec/components/schemas/Platforms/EntityDocumentIdentity.yaml new file mode 100644 index 000000000..4e7ccd3f5 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityDocumentIdentity.yaml @@ -0,0 +1,26 @@ +type: object +title: IdentityDocument +description: "A legal document used to verify identity." +properties: + type: + type: string + description: The type of document. + enum: + - passport + - national_identity_card + - driving_license + - citizen_card + - residence_permit + - electoral_id + example: passport + front: + type: string + description: The ID of the front side of the document as represented within Checkout.com systems. + example: file_wxglze3wwywujg4nna5fb7ldli + back: + type: string + description: The ID of the back side of the document as represented within Checkout.com systems. The back of the document is required for all document types apart from passports. + example: file_adglze3wwywujg4nna5fb7l1sg +required: + - type + - front diff --git a/nas_spec/components/schemas/Platforms/EntityEmailAddresses.yaml b/nas_spec/components/schemas/Platforms/EntityEmailAddresses.yaml new file mode 100644 index 000000000..9129502b0 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityEmailAddresses.yaml @@ -0,0 +1,9 @@ +type: object +title: EmailAddresses +description: Email addresses for this sub-entity. +properties: + primary: + type: string + description: The main email address for this sub-entity. + format: email + example: admin@superhero1234.com diff --git a/nas_spec/components/schemas/Platforms/EntityExtendedResponse.yaml b/nas_spec/components/schemas/Platforms/EntityExtendedResponse.yaml new file mode 100644 index 000000000..325eb329c --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityExtendedResponse.yaml @@ -0,0 +1,15 @@ +type: object +title: ExtendedResponse +allOf: + - $ref: '#/components/schemas/EntityBasicResponse' + - type: object + properties: + contact_details: + $ref: '#/components/schemas/EntityContactDetails' + profile: + $ref: '#/components/schemas/EntityProfile' + company: + $ref: '#/components/schemas/EntityCompany' + individual: + $ref: '#/components/schemas/EntityIndividual' + - $ref: '#/components/schemas/EntityLinks' diff --git a/nas_spec/components/schemas/Platforms/EntityFinancialDetails.yaml b/nas_spec/components/schemas/Platforms/EntityFinancialDetails.yaml new file mode 100644 index 000000000..50a333db1 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityFinancialDetails.yaml @@ -0,0 +1,19 @@ +type: object +title: FinancialDetails +properties: + annual_processing_volume: + description: The estimated annual processing volume. In Euros without decimals in minor units. + type: number + example: 120000 + average_transaction_value: + description: The expected average transaction value. In Euros without decimals in minor units. + type: number + example: 2500 + highest_transaction_value: + description: The expected highest transaction value. In Euros without decimals in minor units. + type: number + example: 10000 + documents: + description: Documents needed to support the financial details that exceed thresholds. + allOf: + - $ref: '#/components/schemas/EntityFinancialDocuments' \ No newline at end of file diff --git a/nas_spec/components/schemas/Platforms/EntityFinancialDocuments.yaml b/nas_spec/components/schemas/Platforms/EntityFinancialDocuments.yaml new file mode 100644 index 000000000..fad4b0c27 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityFinancialDocuments.yaml @@ -0,0 +1,11 @@ +type: object +title: FinancialDocuments +properties: + bank_statement: + description: 'Bank statement document becomes mandatory depending on the answer provided for `average_transaction_value` and `highest_transaction_value`. The status of your sub-entity will change to `requirements_due` stating when this is necessary.' + allOf: + - $ref: '#/components/schemas/EntityDocumentBank' + financial_statement: + description: 'Financial statement document becomes mandatory depending on the answer provided for `annual_processing_volume`. The status of your sub-entity will change to `requirements_due` stating when this is necessary.' + allOf: + - $ref: '#/components/schemas/EntityDocumentFinancial' diff --git a/nas_spec/components/schemas/Platforms/EntityIdentification.yaml b/nas_spec/components/schemas/Platforms/EntityIdentification.yaml new file mode 100644 index 000000000..f79a98b2f --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityIdentification.yaml @@ -0,0 +1,12 @@ +type: object +title: Identification +description: Identification details of an individual, used for verification. +properties: + national_id_number: + type: string + description: "The official ID number, as applicable in the representative's country. (For US, this must be numeric; otherwise, alpha-numeric.)" + minLength: 1 + maxLength: 25 + example: AB123456C + document: + $ref: "#/components/schemas/EntityDocumentIdentity" diff --git a/nas_spec/components/schemas/Platforms/EntityIndividual.yaml b/nas_spec/components/schemas/Platforms/EntityIndividual.yaml new file mode 100644 index 000000000..fbcc461c1 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityIndividual.yaml @@ -0,0 +1,49 @@ +type: object +title: Individual +description: 'Information about the individual represented by the sub-entity. Include this object if you are onboarding a sole proprietor. This is required if the company object is omitted.' +properties: + first_name: + type: string + description: "The person's first name." + minLength: 2 + maxLength: 50 + example: 'John' + middle_name: + type: string + description: "The person's middle name." + maxLength: 50 + example: 'Paul' + last_name: + type: string + description: "The person's last name." + minLength: 2 + maxLength: 50 + example: 'Doe' + legal_name: + type: string + description: 'The legal name of the person.' + example: John Paul Doe + readOnly: true + trading_name: + type: string + description: "If applicable, the person's trading name." + minLength: 2 + maxLength: 300 + example: Super Hero Masks + national_tax_id: + type: string + description: "The sub-entity's Tax Identification Code. For example, a Value Added Tax (VAT) number in the UK." + minLength: 2 + maxLength: 16 + example: '1234567' + registered_address: + title: Address + description: 'The registered address of the person.' + allOf: + - $ref: '#/components/schemas/EntityAddress' + date_of_birth: + $ref: '#/components/schemas/DateOfBirth' + place_of_birth: + $ref: '#/components/schemas/PlaceOfBirth' + identification: + $ref: '#/components/schemas/EntityIdentification' diff --git a/nas_spec/components/schemas/Platforms/EntityLinks.yaml b/nas_spec/components/schemas/Platforms/EntityLinks.yaml new file mode 100644 index 000000000..d5273e309 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityLinks.yaml @@ -0,0 +1,9 @@ +type: object +title: Links +properties: + _links: + additionalProperties: + $ref: '#/components/schemas/Link' + example: + self: + href: 'https://api.checkout.com/accounts/entities/ent_wxglze3wwywujg4nna5fb7ldli' diff --git a/nas_spec/components/schemas/Platforms/EntityPhone.yaml b/nas_spec/components/schemas/Platforms/EntityPhone.yaml new file mode 100644 index 000000000..5fb7abe68 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityPhone.yaml @@ -0,0 +1,9 @@ +type: object +title: Phone +properties: + number: + type: string + description: "The phone number. This must only contain numeric characters and can't contain only zeros. (For US numbers: It cannot start with 0 or 1 and must be at least 10 characters in length.)" + minLength: 8 + maxLength: 16 + example: '2345678910' diff --git a/nas_spec/components/schemas/Platforms/EntityProfile.yaml b/nas_spec/components/schemas/Platforms/EntityProfile.yaml new file mode 100644 index 000000000..9eee79129 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityProfile.yaml @@ -0,0 +1,43 @@ +type: object +title: Profile +description: 'Information about the profile of the sub-entity, primarily regarding the products/services offered.' +properties: + urls: + type: array + description: 'A collection of website URLs the sub-entity accepts payments on. The array of items, when joined together with a space, should be no longer than 4,000 characters.' + minItems: 1 + maxItems: 100 + items: + type: string + description: 'A URL of a website the sub-entity accepts payments on. Max length does not include the https or http protocol.' + minLength: 4 + maxLength: 256 + example: 'https://www.superheroexample.com' + mccs: + type: array + description: "A collection of 4-digit ISO 18245 merchant category codes classifying the sub-entity's industry." + minItems: 1 + maxItems: 5 + items: + type: string + description: "A 4-digit ISO 18245 merchant category code classifying the sub-entity's industry." + minLength: 4 + maxLength: 4 + example: '5311' + default_holding_currency: + type: string + description: | + The ISO 4217 currency code for the currency that payments will be routed to and held in, if processed on behalf of this sub-entity. For example, the currency code 'AUD' represents the Australian Dollar in Australia. Only applies if you have the Full account type.

For more information, see our currency codes documentation. + format: ISO 4217 + minLength: 3 + maxLength: 3 + example: 'GBP' + holding_currencies: + type: array + description: | + The ISO 4217 currency codes for the currencies this sub-entity wants to hold funds in. For example, the currency code 'AUD' represents the Australian Dollar in Australia. Only applies if you have the Full account type.

For more information, see our currency codes documentation. + items: + format: ISO 4217 + minLength: 3 + maxLength: 3 + example: [ 'GBP', 'EUR' ] diff --git a/nas_spec/components/schemas/Platforms/EntityRepresentative.yaml b/nas_spec/components/schemas/Platforms/EntityRepresentative.yaml new file mode 100644 index 000000000..a0bb44949 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityRepresentative.yaml @@ -0,0 +1,50 @@ +type: object +title: Representative +properties: + id: + type: string + description: "The id of the company's sub-entity representative." + example: 'rep_a6omkepkkfiutynatam37wrfc4' + readOnly: true + first_name: + type: string + description: "The person's first name." + minLength: 2 + maxLength: 300 + example: 'John' + middle_name: + type: string + description: "The person's middle name." + maxLength: 300 + example: null + last_name: + type: string + description: "The person's last name." + minLength: 2 + maxLength: 300 + example: 'Doe' + address: + title: Address + description: "The person's address." + allOf: + - $ref: '#/components/schemas/EntityAddress' + - type: object + properties: + address_line1: + type: string + description: 'The first line of the address. If provided, the length of line 1 and line 2 combined must be at least 5 characters long.' + minLength: 0 + maxLength: 300 + example: '90 Tottenham Court Road' + identification: + $ref: '#/components/schemas/EntityIdentification' + phone: + description: 'The phone number of the person.' + allOf: + - $ref: '#/components/schemas/EntityPhone' + date_of_birth: + $ref: '#/components/schemas/DateOfBirth' + place_of_birth: + $ref: '#/components/schemas/PlaceOfBirth' + roles: + $ref: '#/components/schemas/EntityRoles' diff --git a/nas_spec/components/schemas/Platforms/EntityRepresentativeForUpdate.yaml b/nas_spec/components/schemas/Platforms/EntityRepresentativeForUpdate.yaml new file mode 100644 index 000000000..b3492ccea --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityRepresentativeForUpdate.yaml @@ -0,0 +1,8 @@ +type: object +title: RepresentativeForUpdate +allOf: + - type: object + properties: + id: + readOnly: false + - $ref: '#/components/schemas/EntityRepresentative' diff --git a/nas_spec/components/schemas/Platforms/EntityRequirement.yaml b/nas_spec/components/schemas/Platforms/EntityRequirement.yaml new file mode 100644 index 000000000..e4ea8f240 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityRequirement.yaml @@ -0,0 +1,12 @@ +type: object +title: Requirement +readOnly: true +properties: + field: + type: string + description: The path to the field with a requirement due + example: individual.identification.document + reason: + type: string + description: The reason the field is required + example: required diff --git a/nas_spec/components/schemas/Platforms/EntityRoles.yaml b/nas_spec/components/schemas/Platforms/EntityRoles.yaml new file mode 100644 index 000000000..bed2f9697 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityRoles.yaml @@ -0,0 +1,10 @@ +type: array +title: Roles +description: The representative's roles within the company +items: + type: string + description: The representative's role within the company + example: ubo + enum: + - ubo + - legal_representative diff --git a/nas_spec/components/schemas/Platforms/EntityUpdateRequest.yaml b/nas_spec/components/schemas/Platforms/EntityUpdateRequest.yaml new file mode 100644 index 000000000..6b0945eaf --- /dev/null +++ b/nas_spec/components/schemas/Platforms/EntityUpdateRequest.yaml @@ -0,0 +1,173 @@ +type: object +title: UpdateRequest +properties: + contact_details: + title: Contact details + allOf: + - $ref: '#/components/schemas/EntityContactDetails' + - type: object + properties: + phone: + description: 'The phone number of the sub-entity.' + allOf: + - $ref: '#/components/schemas/EntityPhone' + required: + - number + email_addresses: + description: 'Email addresses for this sub-entity.' + allOf: + - $ref: '#/components/schemas/EntityEmailAddresses' + required: + - primary + required: + - phone + - email_addresses + profile: + title: Profile + allOf: + - $ref: '#/components/schemas/EntityProfile' + required: + - urls + - mccs + company: + type: object + title: Company + description: 'Information about the company represented by the sub-entity. Include this object if you are onboarding a company or business. This is required if the individual object is omitted.' + required: + - legal_name + - trading_name + - principal_address + properties: + business_registration_number: + type: string + description: | + The sub-entity's Business Registration Number. + This can be a Commercial Registration or Ministry of Commerce certificate number, or any other equivalent registration number. + For sub-entities based in France, this must be a SIRET number. + minLength: 2 + maxLength: 20 + example: '452349600005' + business_type: + type: string + description: "The legal type of the company" + enum: + - general_partnership + - limited_partnership + - public_limited_company + - limited_company + - professional_association + - unincorporated_association + - auto_entrepreneur + legal_name: + type: string + description: 'The legal name of the sub-entity.' + minLength: 2 + maxLength: 300 + example: Super Hero Masks Inc. + trading_name: + type: string + description: "The trading name of the sub-entity, also referred to as 'doing business as'." + minLength: 2 + maxLength: 300 + example: Super Hero Masks + principal_address: + title: Address + description: 'The primary location of the company where business is performed.' + allOf: + - $ref: '#/components/schemas/EntityAddress' + required: + - address_line1 + - city + - zip + - country + registered_address: + title: Address + description: 'The registered address of the company.' + allOf: + - $ref: '#/components/schemas/EntityAddress' + required: + - address_line1 + - city + - zip + - country + document: + $ref: '#/components/schemas/EntityDocumentCompany' + representatives: + type: array + title: Representatives + description: 'Information about representatives of this company' + minItems: 1 + maxItems: 5 + items: + allOf: + - $ref: '#/components/schemas/EntityRepresentativeForUpdate' + - type: object + required: + - first_name + - last_name + properties: + address: + required: + - country + financial_details: + description: 'Seller financial questions and supporting documents.' + allOf: + - $ref : "#/components/schemas/EntityFinancialDetails" + individual: + type: object + title: Individual + description: 'Information about the individual represented by the sub-entity. Include this object if you are onboarding a sole proprietor. This is required if the company object is omitted.' + required: + - first_name + - last_name + - trading_name + - registered_address + properties: + first_name: + type: string + description: "The individual's first name." + minLength: 2 + maxLength: 50 + example: 'John' + middle_name: + type: string + description: "The individual's middle name." + maxLength: 50 + example: 'Paul' + last_name: + type: string + description: "The individual's last name." + minLength: 2 + maxLength: 50 + example: 'Doe' + trading_name: + type: string + description: "If applicable, the individual's trading name." + minLength: 2 + maxLength: 300 + example: Super Hero Masks + national_tax_id: + type: string + description: "The sub-entity's tax identification code. For example, a value added tax (VAT) number in the UK." + minLength: 2 + maxLength: 16 + example: '1234567' + registered_address: + title: Address + description: 'The registered address of the individual.' + allOf: + - $ref: '#/components/schemas/EntityAddress' + required: + - address_line1 + - city + - zip + - country + date_of_birth: + $ref: '#/components/schemas/DateOfBirth' + place_of_birth: + $ref: '#/components/schemas/PlaceOfBirth' + identification: + $ref: '#/components/schemas/EntityIdentification' +required: + - contact_details + - profile diff --git a/nas_spec/components/schemas/Platforms/GetScheduleResponse.yaml b/nas_spec/components/schemas/Platforms/GetScheduleResponse.yaml new file mode 100644 index 000000000..70d19ccb4 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/GetScheduleResponse.yaml @@ -0,0 +1,49 @@ +type: object +properties: + GBP: + description: The three-letter ISO currency code of the account's currency. + type: object + format: ISO 4217 + minLength: 3 + maxLength: 3 + properties: + recurrence: + type: object + description: Information about how often the schedule takes place. + properties: + enabled: + type: boolean + default: false + description: Indicates the status of the payout schedule. + example: true + threshold: + type: number + description: Minimum available balance on the account to do a payout. If the balance is less than the threshold, then the payout instruction will not send. + example: 100 + schedule: + type: object + discriminator: + propertyName: frequency + mapping: + weekly: '#/components/schemas/ScheduleFrequencyWeekly' + daily: '#/components/schemas/ScheduleFrequencyDaily' + monthly: '#/components/schemas/ScheduleFrequencyMonthly' + description: Details about the payout schedule. Required if `enabled` is set to `true`. + properties: + frequency: + type: string + enum: + - weekly + - daily + - monthly + description: Used to indicate how often funds should be paid out to a sub-entity. + example: 'weekly' + example: + frequency: 'weekly' + by_day: ['monday'] + _links: + additionalProperties: + $ref: '#/components/schemas/Link' + example: + self: + href: 'https://api.checkout.com/accounts/entities/ent_wxglze3wwywujg4nna5fb7ldli' diff --git a/nas_spec/components/schemas/Platforms/PaymentInstruments/BankAccount/PlatformsInstrumentDetailsFasterPayments.yaml b/nas_spec/components/schemas/Platforms/PaymentInstruments/BankAccount/PlatformsInstrumentDetailsFasterPayments.yaml new file mode 100644 index 000000000..f122d63b6 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/PaymentInstruments/BankAccount/PlatformsInstrumentDetailsFasterPayments.yaml @@ -0,0 +1,13 @@ +type: object +title: InstrumentDetailsFasterPayments +properties: + account_number: + title: Account number + description: The alphanumeric value that identifies the account + type: string + example: '13654567455' + bank_code: + title: Bank code + description: The code that identifies the bank + type: string + example: '123-456' diff --git a/nas_spec/components/schemas/Platforms/PaymentInstruments/BankAccount/PlatformsInstrumentDetailsSepa.yaml b/nas_spec/components/schemas/Platforms/PaymentInstruments/BankAccount/PlatformsInstrumentDetailsSepa.yaml new file mode 100644 index 000000000..8337ec77d --- /dev/null +++ b/nas_spec/components/schemas/Platforms/PaymentInstruments/BankAccount/PlatformsInstrumentDetailsSepa.yaml @@ -0,0 +1,16 @@ +type: object +title: InstrumentDetailsSepa +properties: + iban: + title: IBAN + description: The account's International Bank Account Number (IBAN) + type: string + minLength: 5 + maxLength: 34 + example: 'HU93116000060000000012345676' + swift_bic: + title: SwiftBic + description: An 8 or 11 character code that identifies the bank or bank branch + type: string + format: ISO 9362:2009 + example: '37040044' diff --git a/nas_spec/components/schemas/Platforms/PaymentInstruments/BankAccount/PlatformsPaymentInstrumentBankAccount.yaml b/nas_spec/components/schemas/Platforms/PaymentInstruments/BankAccount/PlatformsPaymentInstrumentBankAccount.yaml new file mode 100644 index 000000000..8dd4bfbc4 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/PaymentInstruments/BankAccount/PlatformsPaymentInstrumentBankAccount.yaml @@ -0,0 +1,41 @@ +type: object +title: PaymentInstrumentBankAccount +allOf: + - $ref: '#/components/schemas/PlatformsPaymentInstrument' + - type: object + required: + - country + - document + - instrument_details + properties: + country: + title: Country + description: The account's country, as a two-letter ISO country code + type: string + format: ISO 3166-1 + example: 'GB' + default: + title: Default + type: boolean + description: Specifies whether the payment instrument should be set as the default payout destination + document: + type: object + title: Document + description: A legal document used to verify the bank account + properties: + type: + type: string + description: The document type + enum: + - bank_statement + default: bank_statement + example: bank_statement + file_id: + type: string + description: The file ID of the uploaded document. The document must have been uploaded for the purpose of `"bank_verification"`. + example: file_wxglze3wwywujg4nna5fb7ldli + instrument_details: + description: Details of the payment instrument being created. + oneOf: + - $ref: '#/components/schemas/PlatformsInstrumentDetailsFasterPayments' + - $ref: '#/components/schemas/PlatformsInstrumentDetailsSepa' \ No newline at end of file diff --git a/nas_spec/components/schemas/Platforms/PaymentInstruments/CardToken/PlatformsInstrumentDetailsCardToken.yaml b/nas_spec/components/schemas/Platforms/PaymentInstruments/CardToken/PlatformsInstrumentDetailsCardToken.yaml new file mode 100644 index 000000000..326b2c314 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/PaymentInstruments/CardToken/PlatformsInstrumentDetailsCardToken.yaml @@ -0,0 +1,18 @@ +description: Card Token Request +allOf: + - $ref: '#/components/schemas/PlatformsPaymentInstrument' + - type: object + required: + - token + - instrument_details + properties: + instrument_details: + description: Details of the payment instrument being created + type: object + properties: + token: + title: Token + description: The token that identifies the card + type: string + example: 'tok_4gzeau5o2uqubbk6fufs3m7p54' + \ No newline at end of file diff --git a/nas_spec/components/schemas/Platforms/PaymentInstruments/PlatformsPaymentInstrument.yaml b/nas_spec/components/schemas/Platforms/PaymentInstruments/PlatformsPaymentInstrument.yaml new file mode 100644 index 000000000..d8b7c6be8 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/PaymentInstruments/PlatformsPaymentInstrument.yaml @@ -0,0 +1,29 @@ +type: object +title: PaymentInstrumentBase +required: + - label + - type + - currency +properties: + label: + title: Label + description: A reference that you can use to identify the payment instrument + type: string + minLength: 1 + maxLength: 50 + example: Peter's Personal Account + type: + title: Type + description: The instrument type + type: string + enum: + - bank_account + - card_token + currency: + title: Currency + description: The account's currency, as a 3-letter ISO currency code + type: string + format: ISO 4217 + minLength: 3 + maxLength: 3 + example: 'GBP' diff --git a/nas_spec/components/schemas/Platforms/PaymentInstruments/PlatformsPaymentInstrumentCreate.yaml b/nas_spec/components/schemas/Platforms/PaymentInstruments/PlatformsPaymentInstrumentCreate.yaml new file mode 100644 index 000000000..5dd9e7f85 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/PaymentInstruments/PlatformsPaymentInstrumentCreate.yaml @@ -0,0 +1,17 @@ +type: object +title: PaymentInstrumentCreateRequest +discriminator: + propertyName: type + mapping: + card_token: '#/components/schemas/PlatformsInstrumentDetailsCardToken' + bank_account: '#/components/schemas/PlatformsPaymentInstrumentBankAccount' +required: + - label + - type + - currency + - instrument_details +properties: + type: + type: string + description: The type of instrument + example: 'bank_account' \ No newline at end of file diff --git a/nas_spec/components/schemas/Platforms/PaymentInstruments/PlatformsPaymentInstrumentQuery.yaml b/nas_spec/components/schemas/Platforms/PaymentInstruments/PlatformsPaymentInstrumentQuery.yaml new file mode 100644 index 000000000..e3a68e6ea --- /dev/null +++ b/nas_spec/components/schemas/Platforms/PaymentInstruments/PlatformsPaymentInstrumentQuery.yaml @@ -0,0 +1,11 @@ +type: object +title: PaymentInstrumentQueryResponse +properties: + data: + type: array + items: + $ref: '#/components/schemas/PlatformsPaymentInstrumentRead' + _links: + type: object + additionalProperties: + $ref: '#/components/schemas/Link' diff --git a/nas_spec/components/schemas/Platforms/PaymentInstruments/PlatformsPaymentInstrumentRead.yaml b/nas_spec/components/schemas/Platforms/PaymentInstruments/PlatformsPaymentInstrumentRead.yaml new file mode 100644 index 000000000..7e8df1c4a --- /dev/null +++ b/nas_spec/components/schemas/Platforms/PaymentInstruments/PlatformsPaymentInstrumentRead.yaml @@ -0,0 +1,24 @@ +type: object +title: PaymentInstrumentReadResponse +allOf: + - type: object + properties: + id: + type: string + description: The ID of the sub-entity's payment instrument. + example: ppi_qn4nis4k3ykpzzu7cvtuvhqqga + status: + $ref: '#/components/schemas/PlatformsPaymentInstrumentStatus' + instrument_id: + type: string + title: Status + description: The payment instrument's ID. Only available once the instrument status is `verified`. + example: src_wmlfc3zyhqzehihu7giusaaawu + - $ref: '#/components/schemas/PlatformsPaymentInstrument' + - type: object + properties: + _links: + type: object + additionalProperties: + $ref: '#/components/schemas/Link' + \ No newline at end of file diff --git a/nas_spec/components/schemas/Platforms/PaymentInstruments/PlatformsPaymentInstrumentStatus.yaml b/nas_spec/components/schemas/Platforms/PaymentInstruments/PlatformsPaymentInstrumentStatus.yaml new file mode 100644 index 000000000..d182b3fb7 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/PaymentInstruments/PlatformsPaymentInstrumentStatus.yaml @@ -0,0 +1,8 @@ +type: string +title: Status +description: The status of your sub-entity's payment instrument. The status indicates the instrument's stage of verification, and whether it can be used for payouts. +example: verified +enum: + - pending + - verified + - unverified \ No newline at end of file diff --git a/nas_spec/components/schemas/Platforms/PaymentInstruments/PlatformsPaymentInstrumentUpdate.yaml b/nas_spec/components/schemas/Platforms/PaymentInstruments/PlatformsPaymentInstrumentUpdate.yaml new file mode 100644 index 000000000..42c4bddff --- /dev/null +++ b/nas_spec/components/schemas/Platforms/PaymentInstruments/PlatformsPaymentInstrumentUpdate.yaml @@ -0,0 +1,23 @@ +type: object +title: PaymentInstrumentUpdateRequest +properties: + label: + title: Label + description: A reference that you can use to identify the payment instrument. + type: string + minLength: 1 + maxLength: 50 + example: Peter's Personal Account + default: + title: Default + type: boolean + description: Specifies whether the payment instrument should be set as the default payout destination. + headers: + required: + - if-match + type: object + properties: + if-match: + type: string + description: The payment instrument ETag value + example: 'Y3Y9MCZydj0w' \ No newline at end of file diff --git a/nas_spec/components/schemas/Platforms/PlaceOfBirth.yaml b/nas_spec/components/schemas/Platforms/PlaceOfBirth.yaml new file mode 100644 index 000000000..ca9c7a438 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/PlaceOfBirth.yaml @@ -0,0 +1,10 @@ +type: object +title: Place of birth +description: The place of birth of the person. +properties: + country: + type: string + description: The two-letter ISO country code of the country where the person was born at. (ISO 3166-1) + example: 'ES' +required: + - country \ No newline at end of file diff --git a/nas_spec/components/schemas/Platforms/PlatformsFileRetrieveResponse.yaml b/nas_spec/components/schemas/Platforms/PlatformsFileRetrieveResponse.yaml new file mode 100644 index 000000000..dd8f48011 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/PlatformsFileRetrieveResponse.yaml @@ -0,0 +1,46 @@ +type: object +properties: + id: + type: string + description: The ID of the file. + example: file_6lbss42ezvoufcb2beo76rvwly + status: + type: string + description: The current status of the file. + example: invalid + status_reasons: + type: array + description: If `status` is `Invalid`, returns the reasons why the file was invalid. If `status` is any other value, returns `Null`. + example: ["InvalidMimeType"] + size: + type: number + description: The size of the file in KB. + example: 1024 + mime_type: + type: string + description: The MIME type of the file. + example: application/pdf + uploaded_on: + type: string + format: date-time + description: The date and time the file was uploaded, in ISO 8601 UTC format. + example: "2020-12-01T15:01:01Z" + purpose: + type: string + description: The purpose of the file, as provided in the initial request. + example: identity_verification + enum: + - identity_verification + - dispute_evidence + - bank_verification + - company_verification + - financial_verification + _links: + additionalProperties: + $ref: '#/components/schemas/Link' + example: + download: + href: "https://s3.eu-west-1.amazonaws.com/mp-files-api-clean-prod/ent_ociwguf5a5fe3ndmpnvpnwsi3e/file_6lbss42ezvoufcb2beo76rvwly?X-Amz-Expires=3600&x-amz-security-token=some_token" + self: + href: "https://files.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly" + diff --git a/nas_spec/components/schemas/Platforms/PlatformsFileUpload.yaml b/nas_spec/components/schemas/Platforms/PlatformsFileUpload.yaml new file mode 100644 index 000000000..24a0e290e --- /dev/null +++ b/nas_spec/components/schemas/Platforms/PlatformsFileUpload.yaml @@ -0,0 +1,19 @@ +type: object +required: + - entity_id + - purpose +properties: + purpose: + type: string + description: The purpose of the file upload. + enum: + - bank_verification + - identity_verification + - company_verification + - financial_verification + example: 'identity_verification' + + entity_id: + type: string + description: The ID of the entity that the request relates to. + example: ent_5plxo2y4dlqehanhm7i2swsuda diff --git a/nas_spec/components/schemas/Platforms/PlatformsFileUploadResponse.yaml b/nas_spec/components/schemas/Platforms/PlatformsFileUploadResponse.yaml new file mode 100644 index 000000000..086948f0c --- /dev/null +++ b/nas_spec/components/schemas/Platforms/PlatformsFileUploadResponse.yaml @@ -0,0 +1,33 @@ +type: object +description: File uploaded successfully. +properties: + id: + type: string + description: The file identifier. + example: 'file_6lbss42ezvoufcb2beo76rvwly' + maximum_size_in_bytes: + type: number + description: The maximum file size allowed, in bytes. + example: 4194304 + document_types_for_purpose: + type: array + description: The MIME file types allowed for the document purpose, provided on the initial file upload request. + example: ["image/jpeg", "image/png", "image/jpg"] + _links: + type: object + properties: + upload: + description: | + Send a data-binary type request to this URL with your file attached. For example: + + ``` + curl --location --request PUT 'https://s3.eu-west-1.amazonaws.com/mp-files-api-staging-prod/ent_ociwguf5a5fe3ndmpnvpnwsi3e/file_6lbss42ezvoufcb2beo76rvwly?AWSAccessKeyId=ASIX4BFJOBCQFLAMPKU3&Expires=1661355993&x-amz-security-token=some_token' + --data-binary '@/C:/Users/Test/test.pdf' + ``` + properties: + href: 'https://s3.eu-west-1.amazonaws.com/mp-files-api-staging-prod/ent_ociwguf5a5fe3ndmpnvpnwsi3e/file_6lbss42ezvoufcb2beo76rvwly?AWSAccessKeyId=ASIX4BFJOBCQFLAMPKU3&Expires=1661355993&x-amz-security-token=some_token' + self: + description: The file information retrieval URL. + properties: + href: + example: 'https://files.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly' diff --git a/nas_spec/components/schemas/Platforms/ScheduleFrequencyDaily.yaml b/nas_spec/components/schemas/Platforms/ScheduleFrequencyDaily.yaml new file mode 100644 index 000000000..ee6189fc6 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/ScheduleFrequencyDaily.yaml @@ -0,0 +1,5 @@ +type: object +properties: + frequency: + type: string + description: Used to indicate how often funds should be paid out to a sub-entity. diff --git a/nas_spec/components/schemas/Platforms/ScheduleFrequencyMonthly.yaml b/nas_spec/components/schemas/Platforms/ScheduleFrequencyMonthly.yaml new file mode 100644 index 000000000..f1461c610 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/ScheduleFrequencyMonthly.yaml @@ -0,0 +1,15 @@ +type: object +properties: + frequency: + type: string + description: Used to indicate how often funds should be paid out to a sub-entity. + by_month_day: + type: array + description: The day or days of the month the payout should take place. + items: + type: integer + minimum: 1 + maximum: 28 + example: 2 +required: + - by_month_day diff --git a/nas_spec/components/schemas/Platforms/ScheduleFrequencyWeekly.yaml b/nas_spec/components/schemas/Platforms/ScheduleFrequencyWeekly.yaml new file mode 100644 index 000000000..beb328313 --- /dev/null +++ b/nas_spec/components/schemas/Platforms/ScheduleFrequencyWeekly.yaml @@ -0,0 +1,20 @@ +type: object +properties: + frequency: + type: string + description: Used to indicate how often funds should be paid out to a sub-entity. + by_day: + description: The day or days of the week the payout should take place. + type: array + items: + type: string + enum: + - monday + - tuesday + - wednesday + - thursday + - friday + - saturday + - sunday +required: + - by_day diff --git a/nas_spec/components/schemas/Platforms/UpdateScheduleRequest.yaml b/nas_spec/components/schemas/Platforms/UpdateScheduleRequest.yaml new file mode 100644 index 000000000..1e38118ed --- /dev/null +++ b/nas_spec/components/schemas/Platforms/UpdateScheduleRequest.yaml @@ -0,0 +1,34 @@ +type: object +properties: + ISO: + description: The three-letter ISO currency code of the account's currency. + type: object + format: ISO 4217 + minLength: 3 + maxLength: 3 + properties: + enabled: + type: boolean + default: false + description: Indicates the status of the payout schedule. + example: true + threshold: + type: number + description: Minimum available balance on the account to do a payout. If the balance is less than the threshold, then the payout instruction will not send. + example: 100 + recurrence: + type: object + description: Information about how often the schedule takes place. + discriminator: + propertyName: frequency + mapping: + weekly: '#/components/schemas/ScheduleFrequencyWeekly' + daily: '#/components/schemas/ScheduleFrequencyDaily' + monthly: '#/components/schemas/ScheduleFrequencyMonthly' + properties: + frequency: + type: string + example: 'weekly' + example: + frequency: weekly + by_day: [ monday ] diff --git a/nas_spec/components/schemas/PreconditionRequiredError.yaml b/nas_spec/components/schemas/PreconditionRequiredError.yaml new file mode 100644 index 000000000..3a6203462 --- /dev/null +++ b/nas_spec/components/schemas/PreconditionRequiredError.yaml @@ -0,0 +1,5 @@ +type: object +properties: + status: + type: string + example: 428 \ No newline at end of file diff --git a/nas_spec/components/schemas/README.md b/nas_spec/components/schemas/README.md new file mode 100644 index 000000000..c78344fad --- /dev/null +++ b/nas_spec/components/schemas/README.md @@ -0,0 +1,4 @@ +# Definitions + +- Write each definition in separate file +- File name repeat the resource name, i.e. `Customer.yaml` diff --git a/nas_spec/components/schemas/Reports/AccountResponse.yaml b/nas_spec/components/schemas/Reports/AccountResponse.yaml new file mode 100644 index 000000000..ed38dc9d3 --- /dev/null +++ b/nas_spec/components/schemas/Reports/AccountResponse.yaml @@ -0,0 +1,14 @@ +type: object +properties: + client_id: + type: string + description: The client ID. + example: 'cli_bvaelhppmfiufdnatam37wrfc4' + pattern: "^(cli)_(\\w{26})$" + entity_id: + type: string + description: The entity ID. + example: 'ent_znj4ih5kn4fuxiaquoudv5mvwy' + pattern: "^(ent)_(\\w{26})$" +additionalProperties: false +description: The client and entity details. \ No newline at end of file diff --git a/nas_spec/components/schemas/Reports/FileResponse.yaml b/nas_spec/components/schemas/Reports/FileResponse.yaml new file mode 100644 index 000000000..313807be9 --- /dev/null +++ b/nas_spec/components/schemas/Reports/FileResponse.yaml @@ -0,0 +1,29 @@ +type: object +properties: + id: + type: string + description: The file ID. + example: file_7ysmgfkj4ipunduud22uf73iey + pattern: "^(file)_(\\w{26})$" + filename: + type: string + description: The file name. + example: financial-actions_ent_znj4ih5kn4fuxiaquoudv5mvwy_20220218_000000001drl_1.csv + format: + type: string + description: The file format. + example: CSV + _links: + type: object + description: The link to retrieve the file from. + properties: + self: + type: object + description: The self object. + allOf: + - $ref: '#/components/schemas/ReportSelfLink' + example: + href: https://api.checkout.com/reports/rpt_lmmldzousk7etoqijqundqexa4/files/file_lmmldzousk7etoqijqundqexa4 + additionalProperties: false +additionalProperties: false +description: Details of a file from the response. \ No newline at end of file diff --git a/nas_spec/components/schemas/Reports/Links/ReportLink.yaml b/nas_spec/components/schemas/Reports/Links/ReportLink.yaml new file mode 100644 index 000000000..5e1122cd9 --- /dev/null +++ b/nas_spec/components/schemas/Reports/Links/ReportLink.yaml @@ -0,0 +1,4 @@ +type: object +properties: + href: + type: string diff --git a/nas_spec/components/schemas/Reports/Links/ReportNextLink.yaml b/nas_spec/components/schemas/Reports/Links/ReportNextLink.yaml new file mode 100644 index 000000000..2cfe9d204 --- /dev/null +++ b/nas_spec/components/schemas/Reports/Links/ReportNextLink.yaml @@ -0,0 +1,5 @@ +allOf: + - $ref: '#/components/schemas/ReportLink' +properties: + href: + description: This link allows you to move to the next page of results (if there's any) in the response. diff --git a/nas_spec/components/schemas/Reports/Links/ReportSelfLink.yaml b/nas_spec/components/schemas/Reports/Links/ReportSelfLink.yaml new file mode 100644 index 000000000..7d4e944bf --- /dev/null +++ b/nas_spec/components/schemas/Reports/Links/ReportSelfLink.yaml @@ -0,0 +1,5 @@ +allOf: + - $ref: '#/components/schemas/ReportLink' +properties: + href: + description: This is a direct link to the response associated with the submitted request. \ No newline at end of file diff --git a/nas_spec/components/schemas/Reports/ReportErrorResponse.yaml b/nas_spec/components/schemas/Reports/ReportErrorResponse.yaml new file mode 100644 index 000000000..da7b002fd --- /dev/null +++ b/nas_spec/components/schemas/Reports/ReportErrorResponse.yaml @@ -0,0 +1,22 @@ +type: object +properties: + request_id: + type: string + description: Request Id + example: '0HMJGFVAQ35TL:00000117' + error_type: + type: string + description: > + The type of error.
+ • invalid_request = Usually with an http status code 422. The request payload failed validation.
+ • not_found = Usually with an http status code 404. The requested resource was not found.
+ error_codes: + type: array + items: + type: string + description: > + Error response code. Full list of error codes below:
+ • invalid_some_field = Usually with an error type `invalid_request` and http status code 422 Unprocessable entity. The field `some_field` failed validation. Please consult the API spec.
+ • some_resource_not_found = Usually with an error type `not_found`. The resource you are trying to get does not exist.
+additionalProperties: false +description: Error Response \ No newline at end of file diff --git a/nas_spec/components/schemas/Reports/ReportListResponse.yaml b/nas_spec/components/schemas/Reports/ReportListResponse.yaml new file mode 100644 index 000000000..1eb559f25 --- /dev/null +++ b/nas_spec/components/schemas/Reports/ReportListResponse.yaml @@ -0,0 +1,42 @@ +type: object +properties: + count: + type: integer + description: The total number of reports on the current page. + format: int32 + example: 1 + limit: + type: integer + description: The maximum number of results included per page. + format: int32 + example: 5 + minimum: 1 + maximum: 100 + default: 100 + data: + type: array + items: + $ref: '#/components/schemas/ReportResponse' + description: The list of reports from the current page. + _links: + type: object + description: The links object. + properties: + self: + type: object + description: The self object. + allOf: + - $ref: '#/components/schemas/ReportSelfLink' + example: + href: https://api.checkout.com/reports?entity_id=ent_znj4ih5kn4fuxiaquoudv5mvwy&created_after=2022-02-17T00:00:00.000Z&limit=5 + additionalProperties: false + next: + type: object + description: The next object. + allOf: + - $ref: '#/components/schemas/ReportNextLink' + example: + href: 'https://api.checkout.com/reports?pagination_token=NaZMwq3KbreYcXg0dg752Dg8ps4orkwVK9pj9WFzkXk8rPoR32Wf74QWX0EkZ&entity_id=ent_znj4ih5kn4fuxiaquoudv5mvwy&created_after=2022-02-17T00:00:00.000Z&limit=5' + additionalProperties: false +additionalProperties: false +description: The list of reports in the response. \ No newline at end of file diff --git a/nas_spec/components/schemas/Reports/ReportResponse.yaml b/nas_spec/components/schemas/Reports/ReportResponse.yaml new file mode 100644 index 000000000..b61613ba3 --- /dev/null +++ b/nas_spec/components/schemas/Reports/ReportResponse.yaml @@ -0,0 +1,63 @@ +type: object +properties: + id: + type: string + description: The report ID. + example: rpt_lmmldzousk7etoqijqundqexa4 + pattern: "^(rpt)_(\\w{26})$" + created_on: + type: string + description: The date and time the report was created. + format: date-time + example: '2022-02-18T13:00:12.357Z' + last_modified_on: + type: string + description: The date the report was last modified. + format: date-time + example: '2022-02-18T13:16:12.357Z' + type: + type: string + description: The report type. + example: FinancialActionsByPayoutId + description: + type: string + description: The report description. + example: Reconciliation Report for X. + account: + $ref: '#/components/schemas/AccountResponse' + tags: + type: array + items: + type: string + description: The list of tags for filtering. + example: + - payout_id:pay_123456789 + from: + type: string + description: The reporting period's start date and time. + format: date-time + example: '2022-02-17T12:00:00Z' + to: + type: string + description: The reporting period's end date and time. + format: date-time + example: '2022-02-18T12:00:00Z' + files: + type: array + items: + $ref: '#/components/schemas/FileResponse' + description: The list of files included in the report. + _links: + type: object + description: The links object. + properties: + self: + type: object + description: The self object. + allOf: + - $ref: '#/components/schemas/ReportSelfLink' + example: + href: https://api.checkout.com/reports/rpt_lmmldzousk7etoqijqundqexa4 + additionalProperties: false +additionalProperties: false +description: Report response details. \ No newline at end of file diff --git a/nas_spec/components/schemas/ResourceId.yaml b/nas_spec/components/schemas/ResourceId.yaml new file mode 100644 index 000000000..17290b059 --- /dev/null +++ b/nas_spec/components/schemas/ResourceId.yaml @@ -0,0 +1,4 @@ +type: string +description: The resource ID. Defaults to UUID v4 +maxLength: 50 +example: '4f6cf35x-2c4y-483z-a0a9-158621f77a21' diff --git a/nas_spec/components/schemas/Risk/AuthenticationResult.yaml b/nas_spec/components/schemas/Risk/AuthenticationResult.yaml new file mode 100644 index 000000000..30f0afba6 --- /dev/null +++ b/nas_spec/components/schemas/Risk/AuthenticationResult.yaml @@ -0,0 +1,26 @@ +type: object +properties: + attempted: + type: boolean + description: Authentication was initiated between the issuer and cardholder + example: true + challenged: + type: boolean + description: The customer was asked to enter a password or biometric authentication + example: true + succeeded: + type: boolean + description: Did the customer succeed authentication + example: true + liability_shifted: + type: boolean + description: Was liability shifted + example: true + method: + type: string + description: Authentication method + example: 3ds + version: + type: string + description: The authentication method version + example: "2.0" \ No newline at end of file diff --git a/nas_spec/components/schemas/Risk/AuthorizationResult.yaml b/nas_spec/components/schemas/Risk/AuthorizationResult.yaml new file mode 100644 index 000000000..fec848572 --- /dev/null +++ b/nas_spec/components/schemas/Risk/AuthorizationResult.yaml @@ -0,0 +1,8 @@ +type: object +properties: + avs_code: + type: string + example: V + cvv_result: + type: string + example: N diff --git a/nas_spec/components/schemas/Risk/Customer.yaml b/nas_spec/components/schemas/Risk/Customer.yaml new file mode 100644 index 000000000..734d3a474 --- /dev/null +++ b/nas_spec/components/schemas/Risk/Customer.yaml @@ -0,0 +1,11 @@ +type: object +description: The customer making the payment +properties: + name: + type: string + description: "The full name of the customer" + example: "John Doe" + email: + type: string + description: "The customer's email address" + example: "john.doe@checkout.com" \ No newline at end of file diff --git a/nas_spec/components/schemas/Risk/Device.yaml b/nas_spec/components/schemas/Risk/Device.yaml new file mode 100644 index 000000000..a2ed963fd --- /dev/null +++ b/nas_spec/components/schemas/Risk/Device.yaml @@ -0,0 +1,34 @@ +type: object +properties: + ip: + description: The IP V4 address used to make the payment + allOf: + - $ref: '#/components/schemas/IPAddress' + location: + description: The physical location of the request source + allOf: + - $ref: '#/components/schemas/Location' + os: + description: The device's operating system + type: string + example: ISO + type: + description: The type of device + type: string + example: Phone + model: + description: The device model + type: string + example: iPhone X + date: + description: The device's date in UTC as an ISO 8601 timestamp. + allOf: + - $ref: '#/components/schemas/Timestamp' + user_agent: + description: The device's user-agent + type: string + example: Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1 + fingerprint: + description: The device fingerprint + type: string + example: 34304a9e3fg09302 diff --git a/nas_spec/components/schemas/Risk/GetRiskAssessmentsResponse.yaml b/nas_spec/components/schemas/Risk/GetRiskAssessmentsResponse.yaml new file mode 100644 index 000000000..315e7a443 --- /dev/null +++ b/nas_spec/components/schemas/Risk/GetRiskAssessmentsResponse.yaml @@ -0,0 +1,12 @@ +type: object +properties: + assessment_id: + type: string + description: The correlation id across scans for a given transaction + example: "ras_c4oqhf46pyzuxjbcn2giaqnb44" + pre_authentication: + type: object + $ref: '#/components/schemas/PreAuthenticationDetails' + pre_capture: + type: object + $ref: '#/components/schemas/PreCaptureDetails' diff --git a/nas_spec/components/schemas/Risk/Location.yaml b/nas_spec/components/schemas/Risk/Location.yaml new file mode 100644 index 000000000..e12fa65dd --- /dev/null +++ b/nas_spec/components/schemas/Risk/Location.yaml @@ -0,0 +1,10 @@ +type: object +properties: + latitude: + description: The latitude of the device location + type: number + example: 51.5107 + longitude: + description: The longitude of the device location + type: number + example: 0.1313 \ No newline at end of file diff --git a/nas_spec/components/schemas/Risk/Metadata.yaml b/nas_spec/components/schemas/Risk/Metadata.yaml new file mode 100644 index 000000000..fcddfec65 --- /dev/null +++ b/nas_spec/components/schemas/Risk/Metadata.yaml @@ -0,0 +1,8 @@ +type: object +description: Allows you to attach additional information to the assessment in key-value pairs. You can reference these properties in your custom risk rules. +additionalProperties: + type: string +example: + VoucherCode: "loyalty_10" + discountApplied: "10" + customer_id: "2190EF321" \ No newline at end of file diff --git a/nas_spec/components/schemas/Risk/PreAuthenticationAssessmentRequest.yaml b/nas_spec/components/schemas/Risk/PreAuthenticationAssessmentRequest.yaml new file mode 100644 index 000000000..a918488b9 --- /dev/null +++ b/nas_spec/components/schemas/Risk/PreAuthenticationAssessmentRequest.yaml @@ -0,0 +1,46 @@ +type: object +properties: + date: + description: An ISO 8601 timestamp of the date of the original payment attempt + allOf: + - $ref: '#/components/schemas/Timestamp' + source: + $ref: '#/components/schemas/RiskPaymentRequestSource' + customer: + $ref: '#/components/schemas/Customer' + payment: + $ref: '#/components/schemas/RiskPayment' + shipping: + description: The shipping details + allOf: + - $ref: '#/components/schemas/RiskShippingDetails' + reference: + type: string + description: A reference you can later use to identify this assessment, such as an order number. + maxLength: 50 + example: "ORD-1011-87AH" + description: + type: string + description: A description of the order + maxLength: 100 + example: "Set of 3 masks" + amount: + type: integer + description: | + The payment amount. + The exact format depends on the currency. + minimum: 0 + example: 6540 + currency: + type: string + description: | + The three-letter ISO currency code + example: GBP + maxLength: 3 + minLength: 3 + device: + description: Device data + allOf: + - $ref: '#/components/schemas/Device' + metadata: + $ref: '#/components/schemas/Metadata' \ No newline at end of file diff --git a/nas_spec/components/schemas/Risk/PreAuthenticationAssessmentResponse.yaml b/nas_spec/components/schemas/Risk/PreAuthenticationAssessmentResponse.yaml new file mode 100644 index 000000000..ae797a155 --- /dev/null +++ b/nas_spec/components/schemas/Risk/PreAuthenticationAssessmentResponse.yaml @@ -0,0 +1,41 @@ +type: object +description: Pre-Authentication Response +required: + - assessment_id + - result +properties: + assessment_id: + type: string + description: The correlation ID across scans for a given transaction + example: "ras_c4oqhf46pyzuxjbcn2giaqnb44" + score: + type: integer + description: The risk score calculated by Checkout. Absent if not enough data provided. + example: 22 + minimum: 0 + maximum: 100 + result: + description: The scan result based on your defined pre-authentication risk settings + allOf: + - $ref: '#/components/schemas/PreAuthenticationResult' + warning: + description: Present when our risk settings are more restrictive + allOf: + - $ref: '#/components/schemas/PreAuthenticationWarning' + _links: + type: object + properties: + self: + description: The URL of the assessment + properties: + href: + type: string + description: The link URL + example: "https://api.checkout.com/risk/assessments/{assessment_id}" + pre-capture: + description: A link to perform a pre-capture assessment using the same context. Absent if no pre-capture risk settings configured. + properties: + href: + type: string + description: The link URL + example: "https://api.checkout.com/risk/assessments/{assessment_id}/pre-capture" diff --git a/nas_spec/components/schemas/Risk/PreAuthenticationDetails.yaml b/nas_spec/components/schemas/Risk/PreAuthenticationDetails.yaml new file mode 100644 index 000000000..9001f4e7b --- /dev/null +++ b/nas_spec/components/schemas/Risk/PreAuthenticationDetails.yaml @@ -0,0 +1,19 @@ +type: object +description: Details of the pre-authentication response +required: + - result +properties: + score: + type: integer + description: The risk score calculated by Checkout. Absent if not enough data provided. + example: 22 + minimum: 0 + maximum: 100 + result: + description: The scan result based on your defined pre-authentication risk settings + allOf: + - $ref: '#/components/schemas/PreAuthenticationResult' + warning: + description: Present when our risk settings are more restrictive + allOf: + - $ref: '#/components/schemas/PreAuthenticationWarning' \ No newline at end of file diff --git a/nas_spec/components/schemas/Risk/PreAuthenticationResult.yaml b/nas_spec/components/schemas/Risk/PreAuthenticationResult.yaml new file mode 100644 index 000000000..eddd5930f --- /dev/null +++ b/nas_spec/components/schemas/Risk/PreAuthenticationResult.yaml @@ -0,0 +1,19 @@ +type: object +required: + - decision +description: The assessment result +properties: + decision: + type: string + description: The recommended action based on the assessment + enum: + - try_exemptions + - try_frictionless + - no_preference + - force_challenge + - decline + example: try_frictionless + details: + description: The reasons for the decision + type: string + example: "low_value_item_rule" diff --git a/nas_spec/components/schemas/Risk/PreAuthenticationWarning.yaml b/nas_spec/components/schemas/Risk/PreAuthenticationWarning.yaml new file mode 100644 index 000000000..1f5ad934a --- /dev/null +++ b/nas_spec/components/schemas/Risk/PreAuthenticationWarning.yaml @@ -0,0 +1,21 @@ +type: object +required: + - decision + - reasons +properties: + decision: + type: string + description: The recommended action based on our more restrictive risk settings + enum: + - try_exemptions + - try_frictionless + - no_preference + - force_challenge + - decline + example: decline + reasons: + description: The reasons for the decision + type: array + items: + type: string + example: [decline_list_email, decline_list_shipping] diff --git a/nas_spec/components/schemas/Risk/PreCaptureAssessmentRequest.yaml b/nas_spec/components/schemas/Risk/PreCaptureAssessmentRequest.yaml new file mode 100644 index 000000000..eb9cf1846 --- /dev/null +++ b/nas_spec/components/schemas/Risk/PreCaptureAssessmentRequest.yaml @@ -0,0 +1,44 @@ +type: object +properties: + assessment_id: + type: string + pattern: "^(ras)_(\\w{26})$" + description: The risk assessment identifier returned in the /pre-authentication response + date: + description: An ISO 8601 timestamp of the date of the original payment attempt + allOf: + - $ref: '#/components/schemas/Timestamp' + source: + $ref: '#/components/schemas/RiskPaymentRequestSource' + customer: + $ref: '#/components/schemas/Customer' + amount: + type: integer + description: | + The payment amount. + The exact format depends on the currency. + minimum: 0 + example: 6540 + currency: + type: string + description: | + The three-letter ISO currency code + example: GBP + maxLength: 3 + minLength: 3 + payment: + $ref: '#/components/schemas/RiskPayment' + shipping: + description: The shipping details + allOf: + - $ref: '#/components/schemas/RiskShippingDetails' + device: + description: Device data + allOf: + - $ref: '#/components/schemas/Device' + metadata: + $ref: '#/components/schemas/Metadata' + authentication_result: + $ref: '#/components/schemas/AuthenticationResult' + authorization_result: + $ref: '#/components/schemas/AuthorizationResult' diff --git a/nas_spec/components/schemas/Risk/PreCaptureAssessmentResponse.yaml b/nas_spec/components/schemas/Risk/PreCaptureAssessmentResponse.yaml new file mode 100644 index 000000000..9a3bd2c23 --- /dev/null +++ b/nas_spec/components/schemas/Risk/PreCaptureAssessmentResponse.yaml @@ -0,0 +1,28 @@ +type: object +description: Pre-Capture Response +required: + - assessment_id + - result +properties: + assessment_id: + type: string + description: The correlation ID across scans for a given transaction + example: "ras_c4oqhf46pyzuxjbcn2giaqnb44" + result: + description: The scan result based on your pre-capture risk settings + allOf: + - $ref: '#/components/schemas/PreCaptureResult' + warning: + description: Present when our risk settings are more restrictive + allOf: + - $ref: '#/components/schemas/PreCaptureWarning' + _links: + type: object + properties: + self: + description: The URL of the assessment + properties: + href: + type: string + description: The link URL + example: "https://api.checkout.com/risk/assessments/{assessment_id}" diff --git a/nas_spec/components/schemas/Risk/PreCaptureDetails.yaml b/nas_spec/components/schemas/Risk/PreCaptureDetails.yaml new file mode 100644 index 000000000..b9aa38f92 --- /dev/null +++ b/nas_spec/components/schemas/Risk/PreCaptureDetails.yaml @@ -0,0 +1,19 @@ +type: object +description: Details of the pre-capture response +required: + - result +properties: + score: + type: integer + description: The risk score calculated by Checkout. Absent if not enough data provided. + example: 22 + minimum: 0 + maximum: 100 + result: + description: The scan result based on your defined pre-capture risk settings + allOf: + - $ref: '#/components/schemas/PreCaptureResult' + warning: + description: Present when Checkout scan is more restrictive + allOf: + - $ref: '#/components/schemas/PreCaptureWarning' \ No newline at end of file diff --git a/nas_spec/components/schemas/Risk/PreCaptureResult.yaml b/nas_spec/components/schemas/Risk/PreCaptureResult.yaml new file mode 100644 index 000000000..216a680f3 --- /dev/null +++ b/nas_spec/components/schemas/Risk/PreCaptureResult.yaml @@ -0,0 +1,17 @@ +type: object +required: + - decision +description: The assessment result +properties: + decision: + type: string + description: The recommended action based on the assessment + enum: + - capture + - flag + - void + example: capture + details: + description: The reasons for the decision + type: string + example: "risk_profile_1" \ No newline at end of file diff --git a/nas_spec/components/schemas/Risk/PreCaptureWarning.yaml b/nas_spec/components/schemas/Risk/PreCaptureWarning.yaml new file mode 100644 index 000000000..9949e1110 --- /dev/null +++ b/nas_spec/components/schemas/Risk/PreCaptureWarning.yaml @@ -0,0 +1,19 @@ +type: object +required: + - decision + - reasons +properties: + decision: + type: string + description: The recommended action based on our more restrictive risk settings + enum: + - capture + - void + - flag + example: capture + reasons: + description: The reasons for the decision + type: array + items: + type: string + example: [rule_low_risk_postal_address] diff --git a/nas_spec/components/schemas/Risk/RequestSources/CardSourcePrism.yaml b/nas_spec/components/schemas/Risk/RequestSources/CardSourcePrism.yaml new file mode 100644 index 000000000..6d0fcd94d --- /dev/null +++ b/nas_spec/components/schemas/Risk/RequestSources/CardSourcePrism.yaml @@ -0,0 +1,42 @@ +type: object +description: A card payment source +allOf: + - $ref: "#/components/schemas/RiskPaymentRequestSource" + - type: object + required: + - type + - number + - expiry_month + - expiry_year + properties: + number: + type: string + description: The card number (without separators) + maxLength: 19 + example: "4543474002249996" + expiry_month: + type: integer + description: The expiry month of the card + minimum: 1 + minLength: 1 + maxLength: 2 + example: 6 + expiry_year: + type: integer + description: The expiry year of the card + minLength: 4 + maxLength: 4 + example: 2025 + name: + type: string + description: The name of the cardholder + maxLength: 255 + example: "Bruce Wayne" + billing_address: + description: The billing address of the cardholder + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The phone number of the cardholder + allOf: + - $ref: '#/components/schemas/PhoneNumber' diff --git a/nas_spec/components/schemas/Risk/RequestSources/CustomerSourcePrism.yaml b/nas_spec/components/schemas/Risk/RequestSources/CustomerSourcePrism.yaml new file mode 100644 index 000000000..c59799f9c --- /dev/null +++ b/nas_spec/components/schemas/Risk/RequestSources/CustomerSourcePrism.yaml @@ -0,0 +1,20 @@ +type: object +description: A customer source +required: + - id +allOf: + - $ref: "#/components/schemas/RiskPaymentRequestSource" + - type: object + properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + description: The customer's identifier. + example: "cus_y3oqhf46pyzuxjbcn2giaqnb44" + # email: + # type: string + # format: email + # description: The customer's email address. Required if `id` is not provided + # maxLength: 255 + # example: "brucewayne@gmail.com" + diff --git a/nas_spec/components/schemas/Risk/RequestSources/IdSourcePrism.yaml b/nas_spec/components/schemas/Risk/RequestSources/IdSourcePrism.yaml new file mode 100644 index 000000000..946abf551 --- /dev/null +++ b/nas_spec/components/schemas/Risk/RequestSources/IdSourcePrism.yaml @@ -0,0 +1,19 @@ +type: object +description: An existing payment source +required: + - id +allOf: + - $ref: "#/components/schemas/RiskPaymentRequestSource" + - type: object + properties: + id: + type: string + pattern: "^(src)_(\\w{26})$" + description: The payment source identifer (e.g., a card source identifier) + example: src_wmlfc3zyhqzehihu7giusaaawu + cvv: + type: string + description: The card verification value/code (for card sources). 3 digits, except for American Express (4 digits) + example: "956" + minLength: 3 + maxLength: 4 \ No newline at end of file diff --git a/nas_spec/components/schemas/Risk/RiskCardInfo.yaml b/nas_spec/components/schemas/Risk/RiskCardInfo.yaml new file mode 100644 index 000000000..a78c64c21 --- /dev/null +++ b/nas_spec/components/schemas/Risk/RiskCardInfo.yaml @@ -0,0 +1,52 @@ +type: object +required: + - type +description: The details of the card being used +properties: + cardholder_name: + type: string + description: The cardholder name provided + example: Mrs Jane Doe + bin: + type: string + description: The card issuer's Bank Identification Number (BIN) + maxLength: 6 + example: "454540" + expiry_month: + type: integer + description: The expiry month + minimum: 1 + example: 6 + maxLength: 2 + expiry_year: + type: integer + description: The expiry year + example: 2025 + minLength: 4 + maxLength: 4 + last4: + type: string + description: The last four digits of the card number + example: "9996" + minLength: 4 + maxLength: 4 + scheme: + type: string + enum: + - Mastercard + - Visa + description: The card scheme + example: VISA + card_type: + type: string + description: The card type + enum: + - Credit + - Debit + - Prepaid + - Charge + example: Credit + type: + type: string + description: The payment method type + example: card \ No newline at end of file diff --git a/nas_spec/components/schemas/Risk/RiskPayment.yaml b/nas_spec/components/schemas/Risk/RiskPayment.yaml new file mode 100644 index 000000000..b950e47c3 --- /dev/null +++ b/nas_spec/components/schemas/Risk/RiskPayment.yaml @@ -0,0 +1,12 @@ +type: object +description: The details of the payment being processed +properties: + psp: + type: string + description: "The payment service provider processing this transaction" + example: "Checkout.com" + id: + type: string + description: "The PSP's transaction identifier. Can be back-filled at a later step, e.g /pre-capture" + example: "78453878" + maxLength: 32 \ No newline at end of file diff --git a/nas_spec/components/schemas/Risk/RiskPaymentRequestSource.yaml b/nas_spec/components/schemas/Risk/RiskPaymentRequestSource.yaml new file mode 100644 index 000000000..a708d3cfe --- /dev/null +++ b/nas_spec/components/schemas/Risk/RiskPaymentRequestSource.yaml @@ -0,0 +1,38 @@ +type: object +description: The source of the payment.
+discriminator: + propertyName: type + mapping: + token: '#/components/schemas/01_PaymentRequestTokenSource' + id: '#/components/schemas/IdSourcePrism' + card: '#/components/schemas/CardSourcePrism' + customer: '#/components/schemas/CustomerSourcePrism' + # network_token: '#/components/schemas/05_PaymentRequestNetworkTokenSource' + # alipay: '#/components/schemas/PaymentRequestAlipaySource' + # benefitpay: '#/components/schemas/PaymentRequestBenefitPaySource' + # boleto: '#/components/schemas/PaymentRequestBoletoSource' + # eps: '#/components/schemas/PaymentRequestEpsSource' + # giropay: '#/components/schemas/PaymentRequestGiropaySource' + # ideal: '#/components/schemas/PaymentRequestIdealSource' + # klarna: '#/components/schemas/PaymentRequestKlarnaSource' + # knet: '#/components/schemas/PaymentRequestKnetSource' + # oxxo: '#/components/schemas/PaymentRequestOXXOSource' + # p24: '#/components/schemas/PaymentRequestP24Source' + # pagofacil: '#/components/schemas/PaymentRequestPagoFacilSource' + # paypal: '#/components/schemas/PaymentRequestPayPalSource' + # poli: '#/components/schemas/PaymentRequestPoliSource' + # rapipago: '#/components/schemas/PaymentRequestRapiPagoSource' + # bancontact: '#/components/schemas/PaymentRequestBancontactSource' + # fawry: '#/components/schemas/PaymentRequestFawrySource' + # qpay: '#/components/schemas/PaymentRequestQPaySource' + # multibanco: '#/components/schemas/PaymentRequestMultibancoSource' + # dLocal: '#/components/schemas/06_PaymentRequestdLocalSource' + # sofort: '#/components/schemas/PaymentRequestSofortSource' + # alma: '#/components/schemas/PaymentRequestAlmaSource' +required: + - type +properties: + type: + type: string + description: The payment source type + example: "card" diff --git a/nas_spec/components/schemas/Risk/RiskShippingDetails.yaml b/nas_spec/components/schemas/Risk/RiskShippingDetails.yaml new file mode 100644 index 000000000..881f2a54f --- /dev/null +++ b/nas_spec/components/schemas/Risk/RiskShippingDetails.yaml @@ -0,0 +1,7 @@ +type: object +description: The shipping details +properties: + address: + description: The shipping address + allOf: + - $ref: '#/components/schemas/Address' \ No newline at end of file diff --git a/nas_spec/components/schemas/ServerTimestamp.yaml b/nas_spec/components/schemas/ServerTimestamp.yaml new file mode 100644 index 000000000..0ab01a7d6 --- /dev/null +++ b/nas_spec/components/schemas/ServerTimestamp.yaml @@ -0,0 +1,4 @@ +type: string +description: Read-only UTC timestamp, automatically assigned by us +format: date-time +readOnly: true diff --git a/nas_spec/components/schemas/SessionsBillingDescriptor.yaml b/nas_spec/components/schemas/SessionsBillingDescriptor.yaml new file mode 100644 index 000000000..05c6e42fe --- /dev/null +++ b/nas_spec/components/schemas/SessionsBillingDescriptor.yaml @@ -0,0 +1,8 @@ +type: object +description: An optional dynamic billing descriptor. +properties: + name: + type: string + description: "A dynamic description of the payment that replaces the Merchant Name that is displayed in 3DS Challenge window. Applies to card payments only. Special characters allowed: `.` `!` `*` `-` `=` `_`" + example: "SUPERHEROES.COM" + maxLength: 25 \ No newline at end of file diff --git a/nas_spec/components/schemas/Sources/01_SepaSource.yaml b/nas_spec/components/schemas/Sources/01_SepaSource.yaml new file mode 100644 index 000000000..2e61f2785 --- /dev/null +++ b/nas_spec/components/schemas/Sources/01_SepaSource.yaml @@ -0,0 +1,47 @@ +type: object +description: A SEPA payment source +required: + - billing_address + - source_data +allOf: + - $ref: '#/components/schemas/SourceRequest' + - type: object + properties: + source_data: + type: object + description: Additional data required to create SEPA payment sources + required: + - first_name + - last_name + - account_iban + - bic + - billing_descriptor + - mandate_type + properties: + first_name: + type: string + description: The account holder's first name + example: 'Marcus' + last_name: + type: string + description: The account holder's last name + example: 'Barrilius Maximus' + account_iban: + type: string + description: The account IBAN + example: 'DE25100100101234567893' + bic: + type: string + description: The account BIC + example: 'PBNKDEFFXXX' + billing_descriptor: + type: string + description: The billing descriptor + example: 'ExampleCompany.com' + mandate_type: + type: string + description: The type of mandate + enum: + - 'single' + - 'recurring' + example: 'recurring' diff --git a/nas_spec/components/schemas/Sources/01_SepaSourceResponse.yaml b/nas_spec/components/schemas/Sources/01_SepaSourceResponse.yaml new file mode 100644 index 000000000..e4120d641 --- /dev/null +++ b/nas_spec/components/schemas/Sources/01_SepaSourceResponse.yaml @@ -0,0 +1,30 @@ +type: object +description: The SEPA mandate details +allOf: + - $ref: '#/components/schemas/AddSourceResponse' + - type: object + properties: + response_data: + type: object + description: SEPA Direct Debit details + properties: + mandate_reference: + type: string + description: The Direct Debit mandate reference + example: 'MANDXI9809809' + _links: + type: object + description: The links related to the SEPA payment source + readOnly: true + minItems: 1 + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the payment source + cancel: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: A link to cancel the SEPA Direct Debit mandate diff --git a/nas_spec/components/schemas/Sources/02_AchSource.yaml b/nas_spec/components/schemas/Sources/02_AchSource.yaml new file mode 100644 index 000000000..51f2c1058 --- /dev/null +++ b/nas_spec/components/schemas/Sources/02_AchSource.yaml @@ -0,0 +1,57 @@ +type: object +description: An ACH payment source +required: + - billing_address + - source_data +allOf: + - $ref: '#/components/schemas/SourceRequest' + - type: object + properties: + source_data: + type: object + description: Additional data required to create ACH payment sources + required: + - account_type + - account_number + - routing_number + - account_holder_name + - billing_descriptor + properties: + account_type: + type: string + description: The type of Direct Debit account + enum: + - 'savings' + - 'current' + - 'cash' + example: 'savings' + account_number: + type: integer + description: The account number of the Direct Debit account + minLength: 4 + maxLength: 17 + example: 4099999992 + routing_number: + type: integer + description: The routing number of the Direct Debit account + minLength: 8 + maxLength: 9 + example: 211370545 + account_holder_name: + type: string + description: The account holder's full name + minLength: 1 + maxLength: 100 + example: 'John Doe' + billing_descriptor: + type: string + description: The billing descriptor + minLength: 1 + maxLength: 15 + example: 'ExampleCompany.com' + company_name: + type: string + description: The name of the company (required for corporate accounts) + minLength: 1 + maxLength: 40 + example: 'Checkout.com' diff --git a/nas_spec/components/schemas/Sources/AddSourceResponse.yaml b/nas_spec/components/schemas/Sources/AddSourceResponse.yaml new file mode 100644 index 000000000..deaf6b6ef --- /dev/null +++ b/nas_spec/components/schemas/Sources/AddSourceResponse.yaml @@ -0,0 +1,27 @@ +type: object +discriminator: + propertyName: type + mapping: + sepa: '#/components/schemas/01_SepaSourceResponse' + ach: '#/components/schemas/AddSourceResponse' +required: + - type + - response_code +properties: + id: + type: string + description: The unique identifier of the payment source that can be used later for payments + example: src_y3oqhf46pyzuxjbcn2giaqnb44 + type: + type: string + description: The payment source type + example: 'sepa' + response_code: + type: string + description: The Gateway response code + example: '10000' + customer: + type: object + description: The customer associated with the payment source if provided in the request + allOf: + - $ref: '#/components/schemas/SourceResponseCustomer' diff --git a/nas_spec/components/schemas/Sources/Source.yaml b/nas_spec/components/schemas/Sources/Source.yaml new file mode 100644 index 000000000..d05970c5e --- /dev/null +++ b/nas_spec/components/schemas/Sources/Source.yaml @@ -0,0 +1,32 @@ +type: object +required: + - type +properties: + id: + type: string + description: The unique identifier of the payment source that can be later used for payments + example: src_y3oqhf46pyzuxjbcn2giaqnb44 + type: + type: string + description: The payment source type + example: 'sepa' + _links: + type: object + description: The links related to the payment source + readOnly: true + minItems: 1 + required: + - self + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the payment source + example: + href: https://api.checkout.com/sources/src_y3oqhf46pyzuxjbcn2giaqnb44 + example: + self: + href: https://api.checkout.com/sources/src_y3oqhf46pyzuxjbcn2giaqnb44 + 'sepa:mandate': + href: https://api.checkout.com/sepa/mandates/src_y3oqhf46pyzuxjbcn2giaqnb44 diff --git a/nas_spec/components/schemas/Sources/SourceRequest.yaml b/nas_spec/components/schemas/Sources/SourceRequest.yaml new file mode 100644 index 000000000..caf94a35a --- /dev/null +++ b/nas_spec/components/schemas/Sources/SourceRequest.yaml @@ -0,0 +1,45 @@ +type: object +required: + - type +discriminator: + propertyName: type + mapping: + sepa: '#/components/schemas/01_SepaSource' + ach: '#/components/schemas/02_AchSource' +properties: + type: + type: string + description: The payment source type + example: sepa + reference: + type: string + description: A reference you can later use to identify the source + example: 'X-080957-N34' + billing_address: + description: The payment source owner's billing address + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The payment source owner's phone number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + customer: + type: object + description: Details of the customer to associate with the source + properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + description: | + The identifier of an existing customer. If neither customer `id` or `email` is provided, then + a new customer will be registered + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' + email: + type: string + format: email + description: An optional email address to associate with the customer + example: 'brucewayne@gmail.com' + name: + type: string + description: The customer's name. This will only set the name for *new* customers + example: 'Bruce Wayne' diff --git a/nas_spec/components/schemas/Sources/SourceResponseCustomer.yaml b/nas_spec/components/schemas/Sources/SourceResponseCustomer.yaml new file mode 100644 index 000000000..b6c92424f --- /dev/null +++ b/nas_spec/components/schemas/Sources/SourceResponseCustomer.yaml @@ -0,0 +1,18 @@ +type: object +description: The customer to which the payment source is linked +required: + - id +properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + description: The unique identifier of the customer + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' + email: + type: string + description: The customer's email address + example: 'brucewayne@gmail.com' + name: + type: string + description: The customer's name + example: 'Bruce Wayne' diff --git a/nas_spec/components/schemas/Standalone/3dsId.yaml b/nas_spec/components/schemas/Standalone/3dsId.yaml new file mode 100644 index 000000000..4e8e83bce --- /dev/null +++ b/nas_spec/components/schemas/Standalone/3dsId.yaml @@ -0,0 +1,5 @@ +description: Universally unique transaction identifier assigned by the 3DS Server to identify a single transaction. +type: string +minLength: 36 +maxLength: 36 +example: sid_y3oqhf46pyzuxjbcn2giaqnb441 diff --git a/nas_spec/components/schemas/Standalone/Acs.yaml b/nas_spec/components/schemas/Standalone/Acs.yaml new file mode 100644 index 000000000..75e2aa473 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/Acs.yaml @@ -0,0 +1,77 @@ +type: object +required: + - reference_number + - transaction_id + - operator_id + - challenge_mandated +description: 'The access control server (ACS) information. Can be empty if the session is still pending or if communication with the ACS failed. This will be available when the channel data and issuer fingerprint result have been provided.' +properties: + reference_number: + description: EMVCo-assigned unique identifier to track approved ACS + type: string + maxLength: 32 + example: ACSRefNum1234 + transaction_id: + description: Universally unique transaction identifier assigned by the ACS + type: string + minLength: 36 + maxLength: 36 + example: be481bd1-1f1d-4ef8-9fa8-0fb2a38e3c87 + operator_id: + description: DS assigned ACS identifier + type: string + maxLength: 32 + example: ACSRefNum1234 + url: + description: Fully qualified URL of the ACS to be used for the challenge + type: string + maxLength: 2048 + example: https://server.acsdomainname.com + signed_content: + description: > + Contains the JSON web signature (JWS) compact serialization created by the ACS for a challenged app authentication. + (Example has been truncated for readability.) + type: string + maxLength: 512 + example: eyJ4NWMiOlsiTUlJQjdEQ0NBWktnQXdJQkFnSVZBSzIxWEc5SVBCL083QzZjUTBvRlJJUkIwWDI0TUFvR0NDcUdTTTQ5QkFNQ01INHhDekFKQm + challenge_mandated: + type: boolean + description: Indicates whether a challenge is required for the transaction to be authorized + authentication_type: + type: string + pattern: "^\\d{2}$" + description: > + The type of authentication as returned from the ACS provider.
+ • 01 = Static
+ • 02 = Dynamic
+ • 03 = OOB
+ • 04-79 = Reserved for EMVCo future use
+ • 80-99 = Reserved for DS use + challenge_cancel_reason: + type: string + description: Indicator informing the ACS and the DS that the authentication has been cancelled + enum: + - cardholder_cancel + - transaction_timed_out + - challenge_timed_out + - transaction_error + - unknown + - sdk_timed_out + interface: + type: string + enum: + - native_ui + - html + ui_template: + type: string + enum: + - text + - single_select + - multi_select + - oob + - html_other + challenge_cancel_reason_code: + type: string + description: Indicator in the 3D Secure 2 RReq when the challenge is cancelled + minimum: 0 + maximum: 99 diff --git a/nas_spec/components/schemas/Standalone/Amount.yaml b/nas_spec/components/schemas/Standalone/Amount.yaml new file mode 100644 index 000000000..f9985a7b1 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/Amount.yaml @@ -0,0 +1,5 @@ +type: integer +description: 'The amount in the major currency.' +example: 120 +minimum: 0 +maximum: 18446744073709551615 diff --git a/nas_spec/components/schemas/Standalone/App.yaml b/nas_spec/components/schemas/Standalone/App.yaml new file mode 100644 index 000000000..87a4b1c65 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/App.yaml @@ -0,0 +1,71 @@ +allOf: + - $ref: '#/components/schemas/ChannelData' + - type: object + required: + - sdk_app_id + - sdk_max_timeout + - sdk_ephem_pub_key + - sdk_encrypted_data + - sdk_reference_number + - sdk_transaction_id + - sdk_interface_type + - sdk_ui_elements + properties: + channel: + type: string + enum: + - app + sdk_app_id: + description: > + Universally unique ID created upon all installations and updates of the 3DS Requestor App on a consumer device. This will be newly generated and stored by the 3DS SDK for each installation or update. + type: string + minLength: 36 + maxLength: 36 + example: dbd64fcb-c19a-4728-8849-e3d50bfdde39 + sdk_max_timeout: + description: > + Indicates maximum amount of time (in minutes) for all exchanges + type: integer + minimum: 5 + example: 5 + sdk_ephem_pub_key: + $ref: '#/components/schemas/SdkEphemeralPublicKey' + sdk_reference_number: + description: > + Identifies the vendor and version for the 3DS SDK that is integrated in a 3DS Requestor App, assigned by EMVCo when the 3DS SDK is approved. + type: string + maxLength: 32 + example: '3DS_LOA_SDK_PPFU_020100_00007' + sdk_encrypted_data: + description: > + A JSON web encryption (JWE) object in compact serialization, containing data encrypted by the SDK for the Directory Server to decrypt. + type: string + maxLength: 64000 + example: '' + sdk_transaction_id: + description: > + Universally unique transaction identifier assigned by the 3DS SDK to identify a single transaction + type: string + minLength: 36 + maxLength: 36 + example: 'b2385523-a66c-4907-ac3c-91848e8c0067' + sdk_interface_type: + description: > + Lists all of the SDK interface types that the device supports for displaying specific challenge user interfaces within the SDK + type: string + enum: + - native + - html + - both + sdk_ui_elements: + description: > + Lists all the user interface elements that the cardholder's device supports for displaying specific challenge user interfaces within the SDK + type: array + items: + type: string + enum: + - text + - single_select + - multi_select + - oob + - html_other diff --git a/nas_spec/components/schemas/Standalone/Approved.yaml b/nas_spec/components/schemas/Standalone/Approved.yaml new file mode 100644 index 000000000..66848830a --- /dev/null +++ b/nas_spec/components/schemas/Standalone/Approved.yaml @@ -0,0 +1,3 @@ +type: boolean +description: 'Whether the authentication was successful. This will only be set if the Session is in a final state' +example: false diff --git a/nas_spec/components/schemas/Standalone/AuthenticationType.yaml b/nas_spec/components/schemas/Standalone/AuthenticationType.yaml new file mode 100644 index 000000000..e0b14204f --- /dev/null +++ b/nas_spec/components/schemas/Standalone/AuthenticationType.yaml @@ -0,0 +1,10 @@ +type: string +enum: + - regular + - recurring + - installment + - maintain_card + - add_card +description: Indicates the type of payment this session is for. Please note the spelling of `installment` consists of two `l`s. +example: regular +default: regular diff --git a/nas_spec/components/schemas/Standalone/Browser.yaml b/nas_spec/components/schemas/Standalone/Browser.yaml new file mode 100644 index 000000000..97806a023 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/Browser.yaml @@ -0,0 +1,99 @@ +allOf: + - $ref: '#/components/schemas/ChannelData' + - type: object + required: + - accept_header + - java_enabled + - javascript_enabled + - language + - color_depth + - screen_height + - screen_width + - timezone + - user_agent + - ip_address + properties: + channel: + type: string + enum: + - browser + three_ds_method_completion: + type: string + description: > + Indicates whether the 3DS Method successfully completed
+ • Y = Successfully completed
+ • N = Did not successfully complete
+ • U = Unavailable (3DS Method URL was not present in the preperation response (PRes) message data for the card range associated with the cardholder's account number) + enum: + - Y + - N + - U + minLength: 1 + maxLength: 1 + default: U + example: U + accept_header: + type: string + maxLength: 2048 + description: > + Exact content of the HTTP accept headers as sent to the 3DS Requestor from the cardholder’s browser + example: 'Accept: *.*, q=0.1' + java_enabled: + type: boolean + description: > + Boolean that represents the ability of the cardholder's browser to execute Java. Value is returned from the `navigator.javaEnabled` property. + example: true + javascript_enabled: + type: boolean + description: > + Boolean that represents the ability of the cardholder's browser to execute Javascript. Value is returned from the `navigator.javascriptEnabled` property. + *only applicable/required for authentication performed using 3DS 2.2. If authentications results in processing on 2.1 or lower, this field will be disregarded. + default: true + example: true + language: + type: string + minLength: 1 + maxLength: 12 + description: > + Value representing the browser language as defined in IETF BCP47. Returned from the `navigator.language` property. + example: 'FR-fr' + color_depth: + type: string + minLength: 1 + maxLength: 2 + description: > + Value representing the bit depth of the color palette for displaying images, in bits per pixel. Obtained from the cardholder's browser from the `screen.colorDepth` property. + example: '16' + screen_height: + type: string + minLength: 1 + maxLength: 6 + description: > + Total height of the cardholder’s screen in pixels. Value is returned from the `screen.height` property. + example: '1080' + screen_width: + type: string + minLength: 1 + maxLength: 6 + description: > + Total width of the cardholder’s screen in pixels. Value is returned from the `screen.width` property. + example: '1920' + timezone: + type: string + minLength: 1 + maxLength: 5 + description: > + Time difference between UTC time and the local time of the cardholder's browser, in minutes. + example: '60' + user_agent: + type: string + maxLength: 2048 + description: > + Exact content of the HTTP user-agent header + example: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36' + ip_address: + description: > + IP address of the browser as returned by the HTTP headers to the 3DS Requestor + type: string + maxLength: 45 + example: '1.12.123.255' diff --git a/nas_spec/components/schemas/Standalone/CardInfo.yaml b/nas_spec/components/schemas/Standalone/CardInfo.yaml new file mode 100644 index 000000000..de14ce753 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/CardInfo.yaml @@ -0,0 +1,45 @@ +type: object +description: Details related to the Session source. This property should always be in the response, unless a `card` source was used and communication with Checkout.com's Vault was not possible. +required: + - instrument_id + - fingerprint +properties: + instrument_id: + type: string + description: The identifier of the card instrument. + example: src_ubfj2q76miwundwlk72vxt2i7q + fingerprint: + type: string + description: A token that can uniquely identify this card across all customers. + example: vnsdrvikkvre3dtrjjvlm5du4q + metadata: + type: object + description: Additional details for this card + properties: + card_type: + type: string + description: The card type. + enum: ['DEBIT', 'CREDIT', 'PREPAID', 'CHARGE', 'DEFERRED DEBIT'] + example: CREDIT + card_category: + type: string + description: The card category. + enum: ['COMMERCIAL', 'CONSUMER'] + example: CONSUMER + issuer_name: + type: string + description: The card issuer's name. + example: Checkout + issuer_country: + type: string + pattern: ^[A-Z]{2} + description: The two letter alpha country code of the card issuer. + example: GB + product_id: + type: string + description: The issuer/card scheme product identifier. + example: MDS + product_type: + type: string + description: The issuer/card scheme product type. + example: 'Debit MasterCard® Card' diff --git a/nas_spec/components/schemas/Standalone/CardSource.yaml b/nas_spec/components/schemas/Standalone/CardSource.yaml new file mode 100644 index 000000000..457d5cf71 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/CardSource.yaml @@ -0,0 +1,40 @@ +type: object +allOf: + - $ref: '#/components/schemas/SessionSource' + - type: object + required: + - type + - number + - expiry_month + - expiry_year + properties: + number: + type: string + description: The card number (without separators) + example: '4543474002249996' + minLength: 13 + maxLength: 19 + expiry_month: + type: integer + description: The expiry month of the card + minimum: 1 + minLength: 1 + maxLength: 2 + example: 6 + expiry_year: + type: integer + description: The expiry year of the card + minLength: 4 + maxLength: 4 + example: 2025 + name: + type: string + description: The name of the cardholder. Any special characters will be replaced. + minLength: 2 + maxLength: 45 + example: 'Bruce Wayne' + stored: + type: boolean + description: This must be set to `true` for authentications that use stored card details + default: false + example: true diff --git a/nas_spec/components/schemas/Standalone/Cardholder.yaml b/nas_spec/components/schemas/Standalone/Cardholder.yaml new file mode 100644 index 000000000..cf78171b2 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/Cardholder.yaml @@ -0,0 +1,16 @@ +type: object +description: 'The cardholder information' +properties: + name: + description: Name of the Cardholder. + type: string + minLength: 2 + maxLength: 45 + example: Cardholder Name + email: + type: string + description: The email address associated with the account that is either entered by the Cardholder, or is on file with the 3DS Requestor. + maxLength: 254 + example: 'example@example.com' + billing_address: + $ref: '#/components/schemas/Address' diff --git a/nas_spec/components/schemas/Standalone/CardholderAccountInfo.yaml b/nas_spec/components/schemas/Standalone/CardholderAccountInfo.yaml new file mode 100644 index 000000000..a7feef08a --- /dev/null +++ b/nas_spec/components/schemas/Standalone/CardholderAccountInfo.yaml @@ -0,0 +1,141 @@ +type: object +description: > + Additional information about the Cardholder's account. +properties: + purchase_count: + type: number + description: > + The number of purchases with this cardholder's account during the last six months. + example: 10 + minimum: 0 + maximum: 9999 + account_age: + type: string + description: > + The length of time that the payment account was enrolled in the cardholder's account. + enum: + - no_account + - created_during_transaction + - less_than_thirty_days + - thirty_to_sixty_days + - more_than_sixty_days + add_card_attempts: + type: number + description: > + The number of Add Card attempts in the last 24 hours. + example: 10 + minimum: 0 + maximum: 999 + shipping_address_age: + type: string + description: > + Indicates when the shipping address used for this transaction was first used. + enum: + - this_transaction + - less_than_thirty_days + - thirty_to_sixty_days + - more_than_sixty_days + account_name_matches_shipping_name: + type: boolean + description: > + Indicates if the Cardholder Name on the account is identical to the shipping Name used for this transaction. + example: true + suspicious_account_activity: + type: boolean + description: > + Indicates whether suspicious activity on the cardholder account has been observed. + example: true + transactions_today: + type: number + description: > + The number of transactions (successful and abandoned) for the cardholder account across all payment accounts in the previous year. + minimum: 0 + maximum: 999 + example: 10 + authentication_method: + type: string + description: > + Information about how the cardholder was authenticated before or during the transaction. + enum: + - no_authentication + - own_credentials + - federated_id + - issuer_credentials + - third_party_authentication + - fido + cardholder_account_age_indicator: + type: string + description: The length of time the cardholder has held the account with the 3DS Requestor. + enum: + - no_account, + - this_transaction + - less_than_thirty_days + - thirty_to_sixty_days + - more_than_sixty_days + account_change: + type: string + format: date-time + description: | + The UTC date and time the cardholder’s account with the 3DS Requestor was last changed, in ISO 8601 format. + + Changes that affect this value include: + - updating the billing or shipping address + - adding a new payment account + - adding a new user + account_change_indicator: + type: string + description: | + The amount of time since the cardholder’s account information with the 3DS Requestor was last changed. + + Changes that affect this value include: + - updating the billing or shipping address + - adding a new payment account + - adding a new user + enum: + - this_transaction + - less_than_thirty_days + - thirty_to_sixty_days + - more_than_sixty_days + account_date: + type: string + format: date-time + description: The UTC date and time the cardholder opened the account with the 3DS Requestor, in ISO 8601 format. + account_password_change: + type: string + format: date-time + description: The UTC date and time the cardholder’s account with the 3DS Requestor was last reset or had a password change, in ISO 8601 format. + account_password_change_indicator: + type: string + description: The amount of time since the cardholder’s account with the 3DS Requestor was last reset or had a password change. + enum: + - no_change + - this_transaction + - less_than_thirty_days + - thirty_to_sixty_days + - more_than_sixty_days + transactions_per_year: + type: integer + description: The number of transactions associated with the cardholder's account with the 3DS Requestor in the previous year. This value includes both successful and abandoned transactions, across all payment accounts. + example: 002 + maxLength: 3 + payment_account_age: + type: string + format: date-time + description: The UTC date and time the payment account was enrolled in the cardholder’s account with the 3DS Requestor, in ISO 8601 format. + shipping_address_usage: + type: string + format: date-time + description: The UTC date and time the shipping address used for the transaction was first used with the 3DS Requestor, in ISO 8601 format. + account_type: + type: string + description: The type of account, in the case of a card product with multiple accounts. + enum: + - not_applicable + - credit + - debit + account_id: + type: string + description: Additional information about the account optionally provided by the 3DS Requestor. + maxLength: 64 + three_ds_requestor_authentication_info: + $ref: '#/components/schemas/ThreeDsRequestorAuthenticationInfo' \ No newline at end of file diff --git a/nas_spec/components/schemas/Standalone/Category.yaml b/nas_spec/components/schemas/Standalone/Category.yaml new file mode 100644 index 000000000..50a2e01ec --- /dev/null +++ b/nas_spec/components/schemas/Standalone/Category.yaml @@ -0,0 +1,6 @@ +type: string +enum: + - payment + - non_payment +description: Indicates the category of the authentication request +default: payment diff --git a/nas_spec/components/schemas/Standalone/ChallengeIndicator.yaml b/nas_spec/components/schemas/Standalone/ChallengeIndicator.yaml new file mode 100644 index 000000000..9d02ac046 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/ChallengeIndicator.yaml @@ -0,0 +1,23 @@ +type: string +enum: + - no_preference + - no_challenge_requested + - challenge_requested + - challenge_requested_mandate + - low_value + - trusted_listing + - trusted_listing_prompt + - transaction_risk_assessment + - data_share +description: > + Indicates whether a challenge is requested for this session.

+ The following are requests for exemption:
+ • `low_value`
+ • `trusted_listing`
+ • `trusted_listing_prompt`
+ • `transaction_risk_assessment`

+ + If an exemption cannot be applied, then the value `no_challenge_requested` will be used instead. +maxLength: 50 +example: no_preference +default: no_preference diff --git a/nas_spec/components/schemas/Standalone/ChannelData.yaml b/nas_spec/components/schemas/Standalone/ChannelData.yaml new file mode 100644 index 000000000..49a6f1371 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/ChannelData.yaml @@ -0,0 +1,27 @@ +required: + - channel +description: The information gathered from the environment used to initiate the session +discriminator: + propertyName: channel + mapping: + browser: '#/components/schemas/Browser' + app: '#/components/schemas/App' + merchant_initiated: '#/components/schemas/MerchantInitiated' +properties: + channel: + type: string + description: Indicates the type of channel interface being used to initiate the transaction. + default: 'browser' +example: + channel: browser + accept_header: 'Accept: *.*, q=0.1' + java_enabled: true + javascript_enabled: true + language: 'FR-fr' + color_depth: '16' + screen_height: '1080' + screen_width: '1920' + timezone: '60' + user_agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36' + three_ds_method_completion: 'Y' + ip_address: '1.12.123.255' diff --git a/nas_spec/components/schemas/Standalone/CompletionInfo.yaml b/nas_spec/components/schemas/Standalone/CompletionInfo.yaml new file mode 100644 index 000000000..c6d4a17f2 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/CompletionInfo.yaml @@ -0,0 +1,21 @@ +required: + - type +description: The redirect information needed for callbacks or redirects after the payment is completed +discriminator: + propertyName: type + mapping: + hosted: '#/components/schemas/HostedCompletionInfo' + non_hosted: '#/components/schemas/NonHostedCompletionInfo' +properties: + type: + type: string + enum: + - hosted + - non_hosted + description: > + Whether the session should be hosted by Checkout.com. + maxLength: 10 + example: non_hosted +example: + type: non_hosted + callback_url: https://merchant.com/callback diff --git a/nas_spec/components/schemas/Standalone/CreateSessionAcceptedResponse.yaml b/nas_spec/components/schemas/Standalone/CreateSessionAcceptedResponse.yaml new file mode 100644 index 000000000..5f8cd2d93 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/CreateSessionAcceptedResponse.yaml @@ -0,0 +1,103 @@ +required: + - session_secret + - id + - transaction_id + - scheme + - amount + - currency + - authentication_type + - authentication_category + - status + - protocol_version + - _links + - exemption + - recurring + - installment +properties: + session_secret: + $ref: '#/components/schemas/SessionSecret' + id: + $ref: '#/components/schemas/SessionId' + transaction_id: + description: The transaction identifier that needs to be provided when communicating directly with the Access Control Server (ACS) + type: string + minLength: 36 + maxLength: 36 + example: 9aea641d-0549-4222-9ca9-d90b43a4f38c + scheme: + type: string + description: Indicates the scheme this authentication is carried out against + enum: + - visa + - mastercard + - jcb + - amex + - diners + - cartes_bancaires + amount: + $ref: '#/components/schemas/Amount' + currency: + $ref: '#/components/schemas/Currency' + authentication_type: + $ref: '#/components/schemas/AuthenticationType' + authentication_category: + $ref: '#/components/schemas/Category' + status: + $ref: '#/components/schemas/Status' + status_reason: + $ref: '#/components/schemas/StatusReason' + next_actions: + $ref: '#/components/schemas/NextActions' + protocol_version: + $ref: '#/components/schemas/ProtocolVersion' + account_info: + $ref: '#/components/schemas/CardholderAccountInfo' + merchant_risk_info: + $ref: '#/components/schemas/MerchantRiskInfo' + reference: + $ref: '#/components/schemas/Reference' + card: + $ref: '#/components/schemas/CardInfo' + recurring: + $ref: '#/components/schemas/Recurring' + installment: + $ref: '#/components/schemas/Installment' + initial_transaction: + $ref: '#/components/schemas/InitialTransaction' + _links: + $ref: '#/components/schemas/CreateSessionLinks' + authentication_date: + type: string + format: date-time + description: Authentication date and time + challenge_indicator: + type: string + default: no_preference + description: Indicates the preference for whether or not a 3DS challenge should be performed. The customer’s bank has the final say on whether or not the customer receives the challenge + enum: + - no_preference + - no_challenge_requested + - challenge_requested + - challenge_requested_mandate + optimization: + type: object + description: > + The information about the optimization options selected + properties: + optimized: + type: boolean + description: > + Indicates if any optimization has been applied + example: true + framework: + type: string + description: > + The optimization framework applied + enum: + - acceptance_rates + optimized_properties: + type: array + title: OptimizedProperty + description: The collection of optimized fields + items: + $ref: '#/components/schemas/OptimizedProperty' diff --git a/nas_spec/components/schemas/Standalone/CreateSessionLinks.yaml b/nas_spec/components/schemas/Standalone/CreateSessionLinks.yaml new file mode 100644 index 000000000..97d046e7d --- /dev/null +++ b/nas_spec/components/schemas/Standalone/CreateSessionLinks.yaml @@ -0,0 +1,25 @@ +allOf: + - $ref: '#/components/schemas/GetSessionLinks' +properties: + redirect_url: + type: object + description: > + The link to which the cardholder should be redirected.
+ Only available when the `hosted` value is `true`. + properties: + href: + type: string + maxLength: 100 + example: http://3ds2.checkout.com/interceptor/sid_y3oqhf46pyzuxjbcn2giaqnb44 + required: + - href + collect_channel_data: + type: object + description: The URI to send device information to. Only available if `next_actions` contains `collect_data` + properties: + href: + type: string + maxLength: 100 + example: https://api.checkout.com/sessions/sid_y3oqhf46pyzuxjbcn2giaqnb441/collect-data + required: + - href diff --git a/nas_spec/components/schemas/Standalone/CreateSessionOkResponse.yaml b/nas_spec/components/schemas/Standalone/CreateSessionOkResponse.yaml new file mode 100644 index 000000000..1ff678047 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/CreateSessionOkResponse.yaml @@ -0,0 +1,7 @@ +allOf: + - $ref: '#/components/schemas/GetSessionResponse' +required: + - session_secret +properties: + session_secret: + $ref: '#/components/schemas/SessionSecret' diff --git a/nas_spec/components/schemas/Standalone/Cryptogram.yaml b/nas_spec/components/schemas/Standalone/Cryptogram.yaml new file mode 100644 index 000000000..ce0e63371 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/Cryptogram.yaml @@ -0,0 +1,8 @@ +description: > + Payment system-specific value provided as part of the ACS registration for each supported DS. + Please be advised that this field will only be included in responses when authenticating with a valid OAuth token and not when authenticating + with `session_secret`. +type: string +minLength: 28 +maxLength: 28 +example: 'MTIzNDU2Nzg5MDA5ODc2NTQzMjE=' diff --git a/nas_spec/components/schemas/Standalone/Currency.yaml b/nas_spec/components/schemas/Standalone/Currency.yaml new file mode 100644 index 000000000..42c9b0e45 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/Currency.yaml @@ -0,0 +1,3 @@ +type: string +description: The three-letter ISO currency code +example: USD diff --git a/nas_spec/components/schemas/Standalone/Ds.yaml b/nas_spec/components/schemas/Standalone/Ds.yaml new file mode 100644 index 000000000..882b396c4 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/Ds.yaml @@ -0,0 +1,22 @@ +type: object +description: 'The directory server (DS) information. Can be empty if the session is pending or communication with the DS failed' +required: + - reference_number + - transaction_id +properties: + ds_id: + description: Required if the session is deemed app-based. Registered application provider identifier (RID) that is unique to the payment system. RIDs are defined by the ISO 7816-5 standard. Used as part of the device data encryption process. + type: string + maxLength: 32 + example: A000000003 + reference_number: + description: EMVCo-assigned unique identifier to track approved DS + type: string + maxLength: 32 + example: VISA.V 17 0003 + transaction_id: + description: Universally unique transaction identifier assigned by the DS + type: string + minLength: 36 + maxLength: 36 + example: 9aea641d-0549-4222-9ca9-d90b43a4f38c diff --git a/nas_spec/components/schemas/Standalone/DsPublicKeys.yaml b/nas_spec/components/schemas/Standalone/DsPublicKeys.yaml new file mode 100644 index 000000000..5067e12d8 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/DsPublicKeys.yaml @@ -0,0 +1,15 @@ +type: object +description: Public certificates specific to a Directory Server (DS) for encrypting device data and verifying ACS signed content. Required when channel is `app`. +required: + - ds_public +properties: + ds_public: + type: string + maxLength: 1024 + description: A public certificate provided by the DS for encrytion of device data. It is a base64 URL encoded JSON web key. + example: eyJrdHkiOiJFQyIsImNydiI6IlAtMjU2IiwieCI6Ik1LQkNUTkljS1VTRGlpMTF5U3MzNTI2aURaOEFpVG83VHU2S1BBcXY3RDQiLCJ5IjoiNEV0bDZTUlcyWWlMVXJONXZmdlZIdWhwN3g4UHhsdG1XV2xiYk00SUZ5TSIsInVzZSI6ImVuYyIsImtpZCI6IjEifQ + ca_public: + type: string + maxLength: 1024 + description: Certificate authority (CA) public certificate (root) of the DS-CA. This certificate is used to validate the ACS signed content JSON web signature (JWS) object. It is a base64 URL encoded DER encoded X.509. + example: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxWEvDZRhKEefZ5sQS7RJZXWbSOPxus-ZyLQjtmrrAQawnKI-AG8BKpVdZVGlpcdxCnGbCIy8CKk2Oi7Mgdqfv5R_4_jI7yl4j7Svmh1Sw934eeF9RyB59Ihl36Y0pNfVW9hBqJuq2o8ulrA1TOtpTpje23CY8sjFE5QnJm1evZRB_ZZQ1txl4nrAiHkno4cVJPouBesryVGVQ0zi1bM0P-05Ydgksvph-1nyjnDldD68mejVF69Tijxa22b6BUCXEuPfbXZcW2NpM_W3msnvKiTWFaMlnIzGYIoFnAnCIVU7Min6CPn565tv0iyIt8BrcezsGzefUw17NEq0J4tCvWwIDAQAB diff --git a/nas_spec/components/schemas/Standalone/Eci.yaml b/nas_spec/components/schemas/Standalone/Eci.yaml new file mode 100644 index 000000000..0f1d55684 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/Eci.yaml @@ -0,0 +1,8 @@ +description: > + Electronic Commerce Indicator. + Please be advised that this field will only be included in responses when authenticating with a valid OAuth token and not when authenticating + with `session_secret`. +type: string +minLength: 2 +maxLength: 2 +example: '05' diff --git a/nas_spec/components/schemas/Standalone/ErrorResponse.yaml b/nas_spec/components/schemas/Standalone/ErrorResponse.yaml new file mode 100644 index 000000000..85ea0de1a --- /dev/null +++ b/nas_spec/components/schemas/Standalone/ErrorResponse.yaml @@ -0,0 +1,78 @@ +type: object +required: + - request_id + - error_type + - error_codes +properties: + request_id: + type: string + example: 5342217f-7fa2-4626-a6c9-c979a04671a6 + error_type: + type: string + description: > + The type of error.
+ • operation_not_allowed = Usually with an http status code 403. The request is not allowed by business rules.
+ • not_implemented = Usually with an http status code 501. This particular feature is not implemented yet.
+ • not_found = Usually with an http status code 404. The resource requested was not found.
+ • forbidden = Usually with an http status code 401. You do not have permissions for the requested operation.
+ • callback_failed = (Non Hosted Only) Only during the complete request. The callback_url responded with a non-success status code.
+ • internal_server_error = Usually with an http status code 500. Unexpected error during the request or an upstream service failure.
+ • unprocessable_entity = Usually with an http status code 422. The request payload failed validation.
+ • conflict = Usually with an http status code 409 during the creation of a resource. The resource already exists.
+ • duplicate_requests_detected = Usually with an http status code 409. This is returned when a Session is currently being processed.
+ • service_not_available = Usually with an http status code 503. Triggered given an upstream service failure.
+ enum: + - operation_not_allowed + - not_implemented + - not_found + - forbidden + - callback_failed + - internal_server_error + - unprocessable_entity + - conflict + - duplicate_requests_detected + - service_not_available + error_codes: + description: > + Error response code. Full list of error codes below:
+ • unknown_error = Usually with an error type `internal_server_error`. An unexpected/unhandled error occured.
+ • operation_not_allowed = Usually with an error type `operation_not_allowed`. The request is not allowed by business rules.
+ • scheme_not_supported = The processor was setup with a scheme not supported by the server.
+ • card_not_enrolled = The card number was not enrolled for 3DS2 and 3DS1 was either not enabled or not supported for Session (eg amount is 0).
+ • card_not_eligible = The card number was not eligible for 3DS1.
+ • card_eligibility_unavailable = A technical issue prevented the 3DS1 transaction from completing.
+ • issuer_not_enrolled = The card issuer was not enrolled for 3DS2 and 3DS1 was either not enabled or not supported for Session (eg amount is 0).
+ • card_protocol_version_not_supported = The protocol version provided is not enabled for the processor being used.
+ • update_not_allowed_due_to_state = The Session was in a state that did not allow for the operation attempted.
+ • source_not_supported = Support for the Session Source used is not implemented yet.
+ • session_callback_failed = (Non Hosted Only) Only during the complete request. The callback_url responded with a non-success status code.
+ • session_persistence_failed = Usually with an error type `internal_server_error`. The API failed to persist the Session. Can be retried.
+ • hosted_not_supported_for_app = You tried to create a Hosted Session with app channel data which is not allowed.
+ • three_ds_method_not_supported_for_app = You tried to perform issuer fingerprint on a Session with app channel data which is not allowed.
+ • three_ds_method_not_supported_without_url = You tried to perform issuer fingerprint on a Session without a 3DS method URL which is not allowed.
+ • operation_not_allowed_for_scope = You are using an OAuth2.0 token that does not contain the right scope.
+ • protocol_version_not_supported_by_sdk = You created an App channel Session with a protocol version not supported by the relevant mobile SDK.
+ • ds_error = The Directory Server (schemes) responded with an unexpected error or timed out.
+ • processing_channel_disabled = The Processing Channel or processor used for this Session is not active.
+ • vault_not_configured_for_processing_channel = Using a Processing Channel not configured for use with Checkout.com Vault offering but trying to use a relevant source (`id` or `token`).
+ • error_getting_instrument = Getting an instrument responded with an unexpected error or timed out. Only relevant for sources `id` or `token`.
+ • invalid_token = The token used in the source object was invalid.
+ • instrument_used_is_not_card = Using an `id` type source that is not a card (only card type instruments are supported in 3DS) .
+ • no_processor_configured_for_card_scheme = Using a card that belongs to a scheme that is not configured in the Processing Channel being used.
+ • currency_not_supported = An American Express SE number is not associated with the currency in the request.
+ • scheme_outage = With error type `operation_not_allowed`. This is returned when there is a technical issue on the scheme's platform.
+ • session_already_in_use = With error type `duplicate_requests_detected`. More than one action requests have been sent in parallel for the same session.

+ • merchant_initiated_request_not_supported_by_3ds_protocol = With error type `unprocessable_entity`. The merchant-initiated request is not supported by the selected 3DS protocol version.
+ • initial_session_not_found = With error type `unprocessable_entity`. A previous session could not be found with the provided initial session ID.
+ • initial_session_invalid = With error type `unprocessable_entity`. The previous session was not valid to be used as an initial transaction.
+ + Also, there is a number of generic error codes as described below:
+ • some_field_required = Usually with an error type `unprocessable_entity`. The field `some_field` is required but not provided in the payload.
+ • some_field_invalid = Usually with an error type `unprocessable_entity`. The field `some_field` failed validation. Please consult the API spec.
+ • unable_to_verify_some_field = Usually with an error type `service_not_available`. The field `some_field` could not be validated due to an upstream service failure.
+ • some_resource_already_exists = Usually with an error type `conflict`. The resource you are trying to create already exists (not relevant for Sessions with an auto-generated id).
+ • some_resource_not_found = Usually with an error type `not_found`. The resource you are trying to get does not exist.
+ + type: array + items: + type: string diff --git a/nas_spec/components/schemas/Standalone/GetBaseSessionLinks.yaml b/nas_spec/components/schemas/Standalone/GetBaseSessionLinks.yaml new file mode 100644 index 000000000..71c4892ce --- /dev/null +++ b/nas_spec/components/schemas/Standalone/GetBaseSessionLinks.yaml @@ -0,0 +1,15 @@ +type: object +description: The links related to the session +required: + - self +properties: + self: + type: object + description: The URI of the session + required: + - href + properties: + href: + type: string + maxLength: 100 + example: https://api.checkout.com/sessions/sid_y3oqhf46pyzuxjbcn2giaqnb441 diff --git a/nas_spec/components/schemas/Standalone/GetCompleteSessionLinks.yaml b/nas_spec/components/schemas/Standalone/GetCompleteSessionLinks.yaml new file mode 100644 index 000000000..2572774fd --- /dev/null +++ b/nas_spec/components/schemas/Standalone/GetCompleteSessionLinks.yaml @@ -0,0 +1,15 @@ +type: object +description: The links related to the session +allOf: + - $ref: '#/components/schemas/GetBaseSessionLinks' +properties: + complete: + type: object + description: The URI to signal the session as complete. Only available if `next_actions` contains `complete` + properties: + href: + type: string + maxLength: 100 + example: https://api.checkout.com/sessions/sid_y3oqhf46pyzuxjbcn2giaqnb441/complete + required: + - href diff --git a/nas_spec/components/schemas/Standalone/GetFingerprintSessionLinks.yaml b/nas_spec/components/schemas/Standalone/GetFingerprintSessionLinks.yaml new file mode 100644 index 000000000..bd44d1b85 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/GetFingerprintSessionLinks.yaml @@ -0,0 +1,47 @@ +type: object +description: The links related to the session +allOf: + - $ref: '#/components/schemas/GetBaseSessionLinks' +properties: + complete: + type: object + description: The URI to signal the session as complete. Only available if `next_actions` contains `complete` + properties: + href: + type: string + maxLength: 100 + example: https://api.checkout.com/sessions/sid_y3oqhf46pyzuxjbcn2giaqnb441/complete + required: + - href + issuer_fingerprint: + type: object + description: > + The URI to send the 3ds method completion indicator to. Use this if device information was sent when requesting a session. + Only available if `next_actions` contains `issuer_fingerprint` + properties: + href: + type: string + maxLength: 100 + example: https://api.checkout.com/sessions/sid_y3oqhf46pyzuxjbcn2giaqnb441/issuer-fingerprint + required: + - href + collect_channel_data: + type: object + description: The URI to send device information to. Only available if `next_actions` contains `collect_data` + properties: + href: + type: string + maxLength: 100 + example: https://api.checkout.com/sessions/sid_y3oqhf46pyzuxjbcn2giaqnb441/collect-data + required: + - href + three_ds_method_url: + type: object + description: The URI of the issuer fingerprint (3DS method). Only available if `next_actions` contains `issuer_fingerprint` + properties: + href: + type: string + maxLength: 100 + example: https://api.hbsc.com/3dsmethod?tx=123456 + required: + - href diff --git a/nas_spec/components/schemas/Standalone/GetSessionLinks.yaml b/nas_spec/components/schemas/Standalone/GetSessionLinks.yaml new file mode 100644 index 000000000..8d0622c87 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/GetSessionLinks.yaml @@ -0,0 +1,94 @@ +type: object +description: The links related to the session +allOf: + - $ref: '#/components/schemas/GetBaseSessionLinks' +properties: + issuer_fingerprint: + type: object + description: > + The URI to send the 3ds method completion indicator to. Use this if device information was sent when requesting a session. + Only available if `next_actions` contains `issuer_fingerprint` + properties: + href: + type: string + maxLength: 100 + example: https://api.checkout.com/sessions/sid_y3oqhf46pyzuxjbcn2giaqnb441/issuer-fingerprint + required: + - href + collect_channel_data: + type: object + description: The URI to send device information to. Only available if `next_actions` contains `collect_data` + properties: + href: + type: string + maxLength: 100 + example: https://api.checkout.com/sessions/sid_y3oqhf46pyzuxjbcn2giaqnb441/collect-data + required: + - href + three_ds_method_url: + type: object + description: The URI of the issuer fingerprint (3DS method). Only available if `next_actions` contains `issuer_fingerprint` + properties: + href: + type: string + maxLength: 100 + example: https://api.hbsc.com/3dsmethod?tx=123456 + required: + - href + acs_url: + type: object + description: Fully qualified URL of the ACS to be used for the challenge. Only available if `next_actions` contains `authenticate` + properties: + href: + type: string + maxLength: 100 + example: https://api.hbsc.com/challenge + required: + - href + term_url: + type: object + description: Fully qualified URL that will receive and process the PaReq (payer authentication response). Only available if `next_actions` contains `authenticate` + properties: + href: + type: string + maxLength: 100 + example: https://api.hbsc.com/challenge + required: + - href + complete: + type: object + description: The URI to signal the session as complete. Only available if `next_actions` contains `complete` + properties: + href: + type: string + maxLength: 100 + example: https://api.checkout.com/sessions/sid_y3oqhf46pyzuxjbcn2giaqnb441/complete + required: + - href + success_url: + type: object + description: The cardholder will be redirected to this URI given an authentication was approved or attempted. Only available if the completion type is `hosted`. + properties: + href: + type: string + maxLength: 300 + required: + - href + failure_url: + type: object + description: The cardholder will be redirected to this URI given an authentication was not approved or attempted. Only available if the completion type is `hosted`. + properties: + href: + type: string + maxLength: 300 + required: + - href + callback_url: + type: object + description: An endpoint which will receive a POST request highlighting the result of an authentication. See the "Complete a Session" request for more details. Only available if the completion type is `non_hosted`. + properties: + href: + type: string + maxLength: 300 + required: + - href diff --git a/nas_spec/components/schemas/Standalone/GetSessionResponse.yaml b/nas_spec/components/schemas/Standalone/GetSessionResponse.yaml new file mode 100644 index 000000000..edcebdea7 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/GetSessionResponse.yaml @@ -0,0 +1,193 @@ +required: + - id + - transaction_id + - scheme + - amount + - currency + - authentication_type + - authentication_category + - status + - protocol_version + - _links +properties: + id: + $ref: '#/components/schemas/SessionId' + session_secret: + $ref: '#/components/schemas/SessionSecret' + transaction_id: + description: The transaction identifier that needs to be provided when communicating directly with the Access Control Server (ACS) + type: string + minLength: 36 + maxLength: 36 + example: 9aea641d-0549-4222-9ca9-d90b43a4f38c + scheme: + type: string + description: Indicates the scheme this authentication is carried out against + enum: + - visa + - mastercard + - jcb + - amex + - diners + - cartes_bancaires + amount: + $ref: '#/components/schemas/Amount' + currency: + $ref: '#/components/schemas/Currency' + completed: + type: boolean + description: Indicates whether this session has been completed + example: false + challenged: + type: boolean + description: Indicates whether this session involved a challenge. This will only be set after communication with the scheme is finished. + example: true + authentication_type: + $ref: '#/components/schemas/AuthenticationType' + authentication_category: + $ref: '#/components/schemas/Category' + certificates: + $ref: '#/components/schemas/DsPublicKeys' + status: + $ref: '#/components/schemas/Status' + status_reason: + $ref: '#/components/schemas/StatusReason' + approved: + $ref: '#/components/schemas/Approved' + protocol_version: + $ref: '#/components/schemas/ProtocolVersion' + account_info: + $ref: '#/components/schemas/CardholderAccountInfo' + merchant_risk_info: + $ref: '#/components/schemas/MerchantRiskInfo' + reference: + $ref: '#/components/schemas/Reference' + transaction_type: + $ref: '#/components/schemas/TransactionType' + next_actions: + $ref: '#/components/schemas/NextActions' + ds: + $ref: '#/components/schemas/Ds' + acs: + $ref: '#/components/schemas/Acs' + response_code: + $ref: '#/components/schemas/ResponseCode' + response_status_reason: + $ref: '#/components/schemas/ResponseStatusReason' + pareq: + $ref: '#/components/schemas/Pareq' + cryptogram: + $ref: '#/components/schemas/Cryptogram' + eci: + $ref: '#/components/schemas/Eci' + xid: + type: string + description: The xid value to use for authorization + example: XSUErNftqkiTdlkpSk8p32GWOFA + cardholder_info: + type: string + description: May provide cardholder information from the DS to be presented to the cardholder + example: Card declined. Please contact your issuing bank. + card: + $ref: '#/components/schemas/CardInfo' + recurring: + $ref: '#/components/schemas/Recurring' + installment: + $ref: '#/components/schemas/Installment' + initial_transaction: + $ref: '#/components/schemas/InitialTransaction' + customer_ip: + type: string + description: > + Indicates the card holder's IP address. + Only available when the scheme selected is Cartes Bancaires. + example: 192.168.1.1 + _links: + $ref: '#/components/schemas/GetSessionLinks' + authentication_date: + type: string + format: date-time + description: Authentication date and time + exemption: + type: object + description: Details related to exemption present in 3DS flow + properties: + requested: + type: string + description: Indicates merchant requested exemption + enum: + - none + applied: + type: string + description: Indicates Issuer accepted or applied exemption + enum: + - none + - low_value + - transaction_risk_assessment + - secure_corporate_payment + - trusted_listing + - 3ds_outage + - sca_delegation + - out_of_sca_scope + - other + - low_risk_program + code: + type: string + description: Indicates Cartes Bancaire specific exemption value + trusted_beneficiary: + $ref: '#/components/schemas/TrustedBeneficiary' + flow_type: + type: string + description: Indicates whether the 3D Secure 2 authentication was challenged or frictionless + enum: + - challenged + - frictionless + - frictionless_delegated + challenge_indicator: + type: string + default: no_preference + description: Indicates the preference for whether or not a 3DS challenge should be performed. The customer’s bank has the final say on whether or not the customer receives the challenge + enum: + - no_preference + - no_challenge_requested + - challenge_requested + - challenge_requested_mandate + optimization: + type: object + description: > + The information about the optimization options selected + properties: + optimized: + type: boolean + description: > + Indicates if any optimization has been applied + example: true + framework: + type: string + description: > + The optimization framework applied + enum: + - acceptance_rates + optimized_properties: + type: array + title: OptimizedProperty + description: The collection of fields optimized + items: + $ref: '#/components/schemas/OptimizedProperty' + scheme_info: + type: object + description: Indicates scheme-specific information + properties: + name: + type: string + description: Indicates which scheme was used to perform authentication + enum: + - cartes_bancaires + - visa + - mastercard + score: + type: string + description: Risk score calculated by Directory Server (DS). Cartes Bancaires 3D Secure 2 only + avalgo: + type: string + description: Identification of the algorithm used by the ACS to calculate the Authentication Value indicated diff --git a/nas_spec/components/schemas/Standalone/GetSessionResponseAfterChannelDataSupplied.yaml b/nas_spec/components/schemas/Standalone/GetSessionResponseAfterChannelDataSupplied.yaml new file mode 100644 index 000000000..f73c54c6e --- /dev/null +++ b/nas_spec/components/schemas/Standalone/GetSessionResponseAfterChannelDataSupplied.yaml @@ -0,0 +1,90 @@ +required: + - id + - transaction_id + - scheme + - amount + - currency + - authentication_type + - authentication_category + - status + - protocol_version + - _links +properties: + id: + $ref: '#/components/schemas/SessionId' + session_secret: + $ref: '#/components/schemas/SessionSecret' + transaction_id: + description: The transaction identifier that needs to be provided when communicating directly with the Access Control Server (ACS) + type: string + minLength: 36 + maxLength: 36 + example: 9aea641d-0549-4222-9ca9-d90b43a4f38c + scheme: + type: string + description: Indicates the scheme this authentication is carried out against + enum: + - visa + - mastercard + - jcb + - amex + - diners + - cartes_bancaires + amount: + $ref: '#/components/schemas/Amount' + currency: + $ref: '#/components/schemas/Currency' + completed: + type: boolean + description: Indicates whether this session has been completed + example: false + challenged: + type: boolean + description: Indicates whether this session involved a challenge. This will only be set after communication with the scheme is finished. + example: true + authentication_type: + $ref: '#/components/schemas/AuthenticationType' + authentication_category: + $ref: '#/components/schemas/Category' + status: + $ref: '#/components/schemas/Status' + status_reason: + $ref: '#/components/schemas/StatusReason' + approved: + $ref: '#/components/schemas/Approved' + protocol_version: + $ref: '#/components/schemas/ProtocolVersion' + account_info: + $ref: '#/components/schemas/CardholderAccountInfo' + merchant_risk_info: + $ref: '#/components/schemas/MerchantRiskInfo' + reference: + $ref: '#/components/schemas/Reference' + transaction_type: + $ref: '#/components/schemas/TransactionType' + initial_transaction: + $ref: '#/components/schemas/InitialTransaction' + next_actions: + $ref: '#/components/schemas/NextActions' + ds: + $ref: '#/components/schemas/Ds' + acs: + $ref: '#/components/schemas/Acs' + response_code: + $ref: '#/components/schemas/ResponseCode' + response_status_reason: + $ref: '#/components/schemas/ResponseStatusReason' + pareq: + $ref: '#/components/schemas/Pareq' + cryptogram: + $ref: '#/components/schemas/Cryptogram' + eci: + $ref: '#/components/schemas/Eci' + xid: + type: string + description: The xid value to use for authorization + example: XSUErNftqkiTdlkpSk8p32GWOFA + card: + $ref: '#/components/schemas/CardInfo' + _links: + $ref: '#/components/schemas/GetFingerprintSessionLinks' diff --git a/nas_spec/components/schemas/Standalone/GetUpdateSessionLinks.yaml b/nas_spec/components/schemas/Standalone/GetUpdateSessionLinks.yaml new file mode 100644 index 000000000..bfd8fc8c0 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/GetUpdateSessionLinks.yaml @@ -0,0 +1,47 @@ +type: object +description: The links related to the session +allOf: + - $ref: '#/components/schemas/GetBaseSessionLinks' +properties: + issuer_fingerprint: + type: object + description: > + The URI to send the 3ds method completion indicator to. Use this if device information was sent when requesting a session. + Only available if `next_actions` contains `issuer_fingerprint` + properties: + href: + type: string + maxLength: 100 + example: https://api.checkout.com/sessions/sid_y3oqhf46pyzuxjbcn2giaqnb441/issuer-fingerprint + required: + - href + collect_channel_data: + type: object + description: The URI to send device information to. Only available if `next_actions` contains `collect_data` + properties: + href: + type: string + maxLength: 100 + example: https://api.checkout.com/sessions/sid_y3oqhf46pyzuxjbcn2giaqnb441/collect-data + required: + - href + three_ds_method_url: + type: object + description: The URI of the Issuer FingerPrint (3DS Method). Only available if `next_actions` contains `issuer_fingerprint` + properties: + href: + type: string + maxLength: 100 + example: https://api.hbsc.com/3dsmethod?tx=123456 + required: + - href + complete: + type: object + description: The URI to signal the session as complete. Only available if `next_actions` contains `complete` + properties: + href: + type: string + maxLength: 100 + example: https://api.checkout.com/sessions/sid_y3oqhf46pyzuxjbcn2giaqnb441/complete + required: + - href diff --git a/nas_spec/components/schemas/Standalone/HostedCompletionInfo.yaml b/nas_spec/components/schemas/Standalone/HostedCompletionInfo.yaml new file mode 100644 index 000000000..32c49f7a3 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/HostedCompletionInfo.yaml @@ -0,0 +1,19 @@ +allOf: + - $ref: '#/components/schemas/CompletionInfo' + - type: object + required: + - success_url + - failure_url + properties: + success_url: + type: string + format: uri + description: For `hosted` sessions, this overrides the default success redirect URL configured on your account + maxLength: 256 + example: 'http://example.com/payments/success' + failure_url: + type: string + format: uri + description: For `hosted` sessions, this overrides the default failure redirect URL configured on your account + maxLength: 256 + example: 'http://example.com/payments/fail' diff --git a/nas_spec/components/schemas/Standalone/IdSource.yaml b/nas_spec/components/schemas/Standalone/IdSource.yaml new file mode 100644 index 000000000..ca2ceaf82 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/IdSource.yaml @@ -0,0 +1,12 @@ +type: object +allOf: + - $ref: '#/components/schemas/SessionSource' + - type: object + required: + - id + properties: + id: + type: string + description: The card instrument id + example: 'src_4gzeau5o2uqubbk6fufs3m7p54' + maxLength: 100 diff --git a/nas_spec/components/schemas/Standalone/InitialTransaction.yaml b/nas_spec/components/schemas/Standalone/InitialTransaction.yaml new file mode 100644 index 000000000..487b8661b --- /dev/null +++ b/nas_spec/components/schemas/Standalone/InitialTransaction.yaml @@ -0,0 +1,29 @@ +type: object +description: Details of a previous transaction +properties: + acs_transaction_id: + type: string + minLength: 36 + maxlength: 36 + description: The Access Control Server (ACS) transaction ID for a previously authenticated transaction + authentication_method: + type: string + enum: + - frictionless_authentication + - challenge_occurred + - avs_verified + - other_issuer_methods + authentication_timestamp: + type: string + description: The timestamp of the previous authentication, in ISO 8601 format. + example: "2023-02-06T15:00:00.000Z" + authentication_data: + type: string + maxLength: 2048 + description: Data that documents and supports a specific authentication process + initial_session_id: + type: string + description: The ID for a previous session, which is used for retrieve the initial transaction's properties + example: sid_p6prbhogijnuxgv4grm3ber55u + minLength: 30 + maxLength: 30 \ No newline at end of file diff --git a/nas_spec/components/schemas/Standalone/Installment.yaml b/nas_spec/components/schemas/Standalone/Installment.yaml new file mode 100644 index 000000000..68de46453 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/Installment.yaml @@ -0,0 +1,21 @@ +type: object +description: Details of an installment authentication. This property is needed only for an installment authentication type. Value will be ignored in any other cases. +required: + - number_of_payments +properties: + number_of_payments: + type: integer + minimum: 2 + maxLength: 3 + description: Indicates the agreed total number of payment installments to be made in the duration of the installment agreement. Required when the authentication type is `instalment`. + example: 2 + days_between_payments: + type: integer + description: Indicates the minimum number of days between authorisations. If no value is specified for an installment authentication type the default value will be used. + example: 28 + default: 1 + expiry: + type: string + description: Date after which no further authorisations are performed in the format yyyyMMdd. If no value is specified for an installment authentication type the default value will be used. + example: 20220901 + default: 99991231 diff --git a/nas_spec/components/schemas/Standalone/MerchantInitiated.yaml b/nas_spec/components/schemas/Standalone/MerchantInitiated.yaml new file mode 100644 index 000000000..1eab93d73 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/MerchantInitiated.yaml @@ -0,0 +1,24 @@ +allOf: + - $ref: '#/components/schemas/ChannelData' + - type: object + required: + - request_type + properties: + channel: + type: string + enum: + - merchant_initiated + request_type: + type: string + enum: + - recurring_transaction + - installment_transaction + - add_card + - maintain_card_information + - account_verification + - split_or_delayed_shipment + - top_up + - mail_order + - telephone_order + - whitelist_status_check + - other_payment \ No newline at end of file diff --git a/nas_spec/components/schemas/Standalone/MerchantRiskInfo.yaml b/nas_spec/components/schemas/Standalone/MerchantRiskInfo.yaml new file mode 100644 index 000000000..3d5e6b391 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/MerchantRiskInfo.yaml @@ -0,0 +1,74 @@ +type: object +description: > + Additional information about the cardholder's purchase. +properties: + delivery_email: + type: string + description: > + For Electronic delivery, the email address to which the merchandise was delivered. + maxLength: 254 + example: brucewayne@email.com + delivery_timeframe: + type: string + description: > + Indicates the merchandise delivery timeframe. + enum: + - electronic_delivery + - same_day + - overnight + - two_day_or_more + is_preorder: + type: boolean + description: > + Indicates whether the cardholder is placing an order for merchandise with a future availability or release date. + example: true + is_reorder: + type: boolean + description: > + Indicates whether the cardholder is reordering previously purchased merchandise. + example: false + shipping_indicator: + type: string + description: > + Indicates the shipping method chosen for the transaction. Please choose an option that accurately describes the cardholder's specific transaction. + enum: + - billing_address + - another_address_on_file + - not_on_file + - store_pick_up + - digital_goods + - travel_and_event_no_shipping + - other + reorder_items_indicator: + type: string + description: Specifies whether the cardholder is reordering merchandise they've previously purchased. + enum: + - first_time_ordered + - reordered + pre_order_purchase_indicator: + type: string + description: Specifies whether the cardholder is placing an order for merchandise with an availability date or release date in the future. + enum: + - merchandise_available + - future_availability + pre_order_date: + type: string + format: date-time + description: The UTC date the pre-ordered merchandise is expected to be available, in ISO 8601 format. + gift_card_amount: + type: string + description: The total purchase amount, in major units. For example, the major unit amount for a gift card purchase of 135.20 USD is `135`. Only applicable for prepaid or gift card purchases. + maxLength: 15 + example: 123 + gift_card_currency: + type: string + maxLength: 3 + minLength: 3 + description: The currency code of the gift card, as a three-digit ISO 4217 code. Only applicable for prepaid or gift card purchases. + example: USD + gift_card_count: + type: string + maxLength: 2 + minLength: 2 + description: The total number of individual prepaid cards, gift cards, or gift codes purchased. Only applicable for prepaid or gift card purchases. + example: 02 \ No newline at end of file diff --git a/nas_spec/components/schemas/Standalone/NetworkTokenSource.yaml b/nas_spec/components/schemas/Standalone/NetworkTokenSource.yaml new file mode 100644 index 000000000..9decf76a4 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/NetworkTokenSource.yaml @@ -0,0 +1,40 @@ +type: object +allOf: + - $ref: '#/components/schemas/SessionSource' + - type: object + required: + - type + - token + - expiry_month + - expiry_year + properties: + token: + type: string + description: The network token PAN + example: '4543474002249996' + minLength: 9 + maxLength: 19 + expiry_month: + type: integer + description: The expiry month of the token + minimum: 1 + example: 6 + minLength: 1 + maxLength: 2 + expiry_year: + type: integer + description: The expiry year of the token + example: 2025 + minLength: 4 + maxLength: 4 + name: + type: string + description: The customer's name. Any special characters will be replaced. + minLength: 2 + maxLength: 45 + example: 'Bruce Wayne' + stored: + type: boolean + description: This must be set to `true` for authentications that use stored card details + default: false + example: true diff --git a/nas_spec/components/schemas/Standalone/NextActions.yaml b/nas_spec/components/schemas/Standalone/NextActions.yaml new file mode 100644 index 000000000..546a4bfb9 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/NextActions.yaml @@ -0,0 +1,12 @@ +type: array +description: > + Identifies what actions to take in order to complete the session. `redirect_cardholder` only applies to hosted sessions. + `authenticate` only applies to sessions that have been downgraded to 3DS1 (`protocol_version 1.0.2`) +items: + enum: + - collect_channel_data + - issuer_fingerprint + - challenge_cardholder + - redirect_cardholder + - complete + - authenticate diff --git a/nas_spec/components/schemas/Standalone/NonHostedCompletionInfo.yaml b/nas_spec/components/schemas/Standalone/NonHostedCompletionInfo.yaml new file mode 100644 index 000000000..f99ae77f8 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/NonHostedCompletionInfo.yaml @@ -0,0 +1,12 @@ +allOf: + - $ref: '#/components/schemas/CompletionInfo' + - type: object + required: + - callback_url + properties: + callback_url: + type: string + format: uri + description: For `non-hosted` sessions, you can define a URL to be called once the session is complete + maxLength: 256 + example: 'http://example.com/payments/callback/pay_mbabizu24mvu3mela5njyhpit4' diff --git a/nas_spec/components/schemas/Standalone/Optimization.yaml b/nas_spec/components/schemas/Standalone/Optimization.yaml new file mode 100644 index 000000000..20bf1610b --- /dev/null +++ b/nas_spec/components/schemas/Standalone/Optimization.yaml @@ -0,0 +1,10 @@ +type: object +description: > + Optionally opt into request optimization +properties: + framework: + type: string + description: > + The theme-based option for optimization + enum: + - acceptance_rates \ No newline at end of file diff --git a/nas_spec/components/schemas/Standalone/OptimizedProperty.yaml b/nas_spec/components/schemas/Standalone/OptimizedProperty.yaml new file mode 100644 index 000000000..9c3f1fbbd --- /dev/null +++ b/nas_spec/components/schemas/Standalone/OptimizedProperty.yaml @@ -0,0 +1,19 @@ +type: object +description: > + Optionally opt into request optimization +properties: + field: + type: string + description: > + Name of the field which has been optimized. + example: challenge_indicator + original_value: + type: string + description: > + Value prior to optimization. + example: trusted_listing + optimized_value: + type: string + description: > + Value prior to optimization. + example: transaction_risk_assessment \ No newline at end of file diff --git a/nas_spec/components/schemas/Standalone/Pareq.yaml b/nas_spec/components/schemas/Standalone/Pareq.yaml new file mode 100644 index 000000000..21a8351e5 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/Pareq.yaml @@ -0,0 +1,3 @@ +type: string +description: Payer authentication request required in the form post to the `acs.url` given a 3DS1 transaction +example: eJyNVF1vmzAUfd+vQLwTOzbgJDKu0mZVk6pTvtXuzTN3CWqBxMCW/fsZN6k2rSvmBa59zuWe+8WvTvmL9wN0lZVF4vd72PegUGWaFbvE36xvg4F/JT55/z58vdcAkxWoRsO7CIt6gKqSO/CyNPElpXJIyCCIYKiCUEY0GELcDwjDISMyZt++Y/+/rqy7+XgJxw8hFnYWJIyeHuHoYnbyHkCrvSzqTqRFS3W8nn4RlDEWYY7OphM1Bz2dCHx5CA4pZRy9Hjt5KGQOIj/H622zSno0rTzSM5HYOycvqmyKWv8SAxJzdDGcmI1+Efu6PlQjhOy7lnWvqRDBJoD2sjPZyDnbfN60yMpR1ClLxf1sGpfRCTb4CE8r9Vkdv7LBXIf34SLhqEU4uUplDYKY+uAhxV6fjfrhiEYc2XO3JsnbrIq+t1lNTI+8Wk7MQyt6fKa3Wf3zwK26jdZmmk15Q0N/s5y4cDqUBZg/mfl5++6uqXOl+M2d65Sp2gwFmm2vl+rpbr2NF4+7m9nj8ieoxeZ2vHtO2tmzIFdlmelyQjGz0jKHlueoI1yj/MPV1Ha73YTvL1P01zb9DeVWJeg= diff --git a/nas_spec/components/schemas/Standalone/ProcessedOn.yaml b/nas_spec/components/schemas/Standalone/ProcessedOn.yaml new file mode 100644 index 000000000..832e2dbaf --- /dev/null +++ b/nas_spec/components/schemas/Standalone/ProcessedOn.yaml @@ -0,0 +1,3 @@ +type: string +description: The date/time the authentication was processed +example: '2019-01-15T12:44:33Z' diff --git a/nas_spec/components/schemas/Standalone/ProtocolVersion.yaml b/nas_spec/components/schemas/Standalone/ProtocolVersion.yaml new file mode 100644 index 000000000..cf636e084 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/ProtocolVersion.yaml @@ -0,0 +1,4 @@ +type: string +description: The protocol version number of the specification used by the API for authentication +maxLength: 50 +example: '2.2.0' diff --git a/nas_spec/components/schemas/Standalone/Recurring.yaml b/nas_spec/components/schemas/Standalone/Recurring.yaml new file mode 100644 index 000000000..28fca77d5 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/Recurring.yaml @@ -0,0 +1,13 @@ +type: object +description: Details of a recurring authentication. This property is needed only for a recurring authentication type. Value will be ignored in any other cases. +properties: + days_between_payments: + type: integer + description: Indicates the minimum number of days between authorisations. If no value is specified for a recurring authentication type the default value will be used. + example: 28 + default: 1 + expiry: + type: string + description: Date after which no further authorisations are performed in the format yyyyMMdd. If no value is specified for a recurring authentication type the default value will be used. + example: 20220901 + default: 99991231 diff --git a/nas_spec/components/schemas/Standalone/RedirectUrl.yaml b/nas_spec/components/schemas/Standalone/RedirectUrl.yaml new file mode 100644 index 000000000..29b1d7060 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/RedirectUrl.yaml @@ -0,0 +1,4 @@ +type: string +description: > + Fully qualified URL where the cardholder will be redirected after the authentication is complete in the Interceptor. +example: 'https://www.xml.com' diff --git a/nas_spec/components/schemas/Standalone/Reference.yaml b/nas_spec/components/schemas/Standalone/Reference.yaml new file mode 100644 index 000000000..d0ef220ff --- /dev/null +++ b/nas_spec/components/schemas/Standalone/Reference.yaml @@ -0,0 +1,4 @@ +type: string +description: A reference you can later use to identify this payment, such as an order number +maxLength: 100 +example: 'ORD-5023-4E89' diff --git a/nas_spec/components/schemas/Standalone/ResponseCode.yaml b/nas_spec/components/schemas/Standalone/ResponseCode.yaml new file mode 100644 index 000000000..fe32e8641 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/ResponseCode.yaml @@ -0,0 +1,23 @@ +description: > + Only available as a result of a 3DS2 authentication. + + The response from the DS or ACS which indicates whether a transaction qualifies as an authenticated transaction or account verification.
+ Only available if communication with the scheme was successful and the Session is in a final state.

+ • Y = Authentication Verification Successful.
+ • N = Not Authenticated /Account Not Verified; Transaction denied.
+ • U = Authentication/ Account Verification Could Not Be Performed; Technical or other problem, as indicated in ARes or RReq.
+ • A = Attempts Processing Performed; Not Authenticated/Verified, but a proof of attempted authentication/verification is provided.
+ • C = Challenge Required; Additional authentication is required using the CReq/CRes.
+ • D = Challenge Required; Decoupled Authentication confirmed.
+ • R = Authentication/ Account Verification Rejected; Issuer is rejecting authentication/verification and request that authorization not be attempted.
+ • I = Informational Only; 3DS Requestor challenge preference acknowledged. +type: string +enum: + - 'Y' + - 'N' + - 'U' + - 'A' + - 'C' + - 'D' + - 'R' + - 'I' diff --git a/nas_spec/components/schemas/Standalone/ResponseStatusReason.yaml b/nas_spec/components/schemas/Standalone/ResponseStatusReason.yaml new file mode 100644 index 000000000..86342914a --- /dev/null +++ b/nas_spec/components/schemas/Standalone/ResponseStatusReason.yaml @@ -0,0 +1,8 @@ +description: > + Only available as a result of a 3DS2 authentication. + + The response from the DS or ACS which provides information on why the `response_code` field has the specified value.
+ Only available when `response_code` is not `Y`.
+ Learn more about the reasons for authentication failures.

+example: '01' +type: string diff --git a/nas_spec/components/schemas/Standalone/SchemeToken.yaml b/nas_spec/components/schemas/Standalone/SchemeToken.yaml new file mode 100644 index 000000000..70c088720 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/SchemeToken.yaml @@ -0,0 +1,2 @@ +type: string +description: 'The scheme generated token (replaces the `card` object)' diff --git a/nas_spec/components/schemas/Standalone/SdkEphemeralPublicKey.yaml b/nas_spec/components/schemas/Standalone/SdkEphemeralPublicKey.yaml new file mode 100644 index 000000000..27387c989 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/SdkEphemeralPublicKey.yaml @@ -0,0 +1,23 @@ +type: object +description: 'Public key component of the ephemeral key pair generated by the 3DS SDK and used to establish session keys between the 3DS SDK and ACS. Refer to https://tools.ietf.org/html/rfc7517#appendix-A.1' +properties: + kty: + description: The key type. + type: string + enum: ['EC'] + example: EC + crv: + type: string + description: The type of elliptic curve. + maxLength: 40 + example: 'P-256' + x: + type: string + description: x coordinate of the elliptic curve that is base64url-encoded. + maxLength: 100 + example: 'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU' + y: + type: string + description: y coordinate of the elliptic curve that is base64url-encoded. + maxLength: 100 + example: 'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0' diff --git a/nas_spec/components/schemas/Standalone/Session.yaml b/nas_spec/components/schemas/Standalone/Session.yaml new file mode 100644 index 000000000..366e478b2 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/Session.yaml @@ -0,0 +1,13 @@ +type: object +description: The session information +properties: + id: + description: Session Id generated for external usage + type: string + minLength: 36 + maxLength: 36 + example: sid_y3oqhf46pyzuxjbcn2giaqnb44 + expires_on: + description: Expiration date of the session id + type: string + example: 01-09-2019 10:12:30 diff --git a/nas_spec/components/schemas/Standalone/SessionAddress.yaml b/nas_spec/components/schemas/Standalone/SessionAddress.yaml new file mode 100644 index 000000000..25bde94d4 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/SessionAddress.yaml @@ -0,0 +1,40 @@ +type: object +description: The shipping address. Any special characters will be replaced. +properties: + address_line1: + type: string + description: The first line of the address + maxLength: 50 + example: Checkout.com + address_line2: + type: string + description: The second line of the address + maxLength: 50 + example: ABC building + address_line3: + type: string + description: The third line of the address + maxLength: 50 + example: 14 Wells Mews + city: + type: string + description: The address city + maxLength: 50 + example: London + state: + type: string + description: The country subdivision code defined in ISO 3166-2 + minLength: 3 + maxLength: 3 + example: ENG + zip: + type: string + description: The address zip/postal code + maxLength: 16 + example: W1T 4TJ + country: + type: string + description: The two-letter ISO country code of the address + example: GB + maxLength: 2 + minLength: 2 diff --git a/nas_spec/components/schemas/Standalone/SessionId.yaml b/nas_spec/components/schemas/Standalone/SessionId.yaml new file mode 100644 index 000000000..4566fecb8 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/SessionId.yaml @@ -0,0 +1,6 @@ +description: Session unique identifier +type: string +pattern: "^(sid)_(\\w{26})$" +minLength: 30 +maxLength: 30 +example: sid_y3oqhf46pyzuxjbcn2giaqnb441 diff --git a/nas_spec/components/schemas/Standalone/SessionMarketplaceData.yaml b/nas_spec/components/schemas/Standalone/SessionMarketplaceData.yaml new file mode 100644 index 000000000..ab139b963 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/SessionMarketplaceData.yaml @@ -0,0 +1,7 @@ +type: object +description: Information related to authentication for payfac payments +properties: + sub_entity_id: + type: string + description: The sub-entity that the authentication is being processed on behalf of + example: 'ent_rgyzti4x74xubmu72m6r3pvksa' \ No newline at end of file diff --git a/nas_spec/components/schemas/Standalone/SessionPhone.yaml b/nas_spec/components/schemas/Standalone/SessionPhone.yaml new file mode 100644 index 000000000..37332b0c3 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/SessionPhone.yaml @@ -0,0 +1,18 @@ +type: object +required: + - country_code + - number +properties: + country_code: + description: Country code. According to ITU-E.164 + type: string + minLength: 1 + maxLength: 3 + pattern: '^\d{1,3}$' + example: 234 + number: + type: string + description: The rest of the number. According to ITU-E.164 + maxLength: 15 + pattern: '^\d{1,15}$' + example: '0204567895' diff --git a/nas_spec/components/schemas/Standalone/SessionRequest.yaml b/nas_spec/components/schemas/Standalone/SessionRequest.yaml new file mode 100644 index 000000000..0ec489339 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/SessionRequest.yaml @@ -0,0 +1,77 @@ +type: object +required: + - currency + - source + - completion +properties: + source: + $ref: '#/components/schemas/SessionSource' + amount: + type: integer + description: | + The payment amount in the major currency. + + This value is required for 3DS1 authentications. + + For `recurring` and `installment` payment types, this value is required and must be greater than zero. + + Omitting this value will set `authentication_category` to `non_payment` and renders the authentication as 3DS2 only. + minimum: 0 + maxLength: 48 + example: 6540 + currency: + type: string + description: | + The three-letter ISO currency code + example: USD + maxLength: 3 + minLength: 3 + processing_channel_id: + type: string + pattern: "^(pc)_(\\w{26})$" + description: | + The processing channel to be used for the session. Required if this was not set in the request for the OAuth token. + marketplace: + $ref: '#/components/schemas/SessionMarketplaceData' + authentication_type: + $ref: '#/components/schemas/AuthenticationType' + authentication_category: + $ref: '#/components/schemas/Category' + account_info: + $ref: '#/components/schemas/CardholderAccountInfo' + challenge_indicator: + $ref: '#/components/schemas/ChallengeIndicator' + billing_descriptor: + $ref: '#/components/schemas/SessionsBillingDescriptor' + reference: + $ref: '#/components/schemas/Reference' + merchant_risk_info: + $ref: '#/components/schemas/MerchantRiskInfo' + prior_transaction_reference: + type: string + description: > + Additional information for the ACS to determine the best approach for handling a request. This is an ACS transaction ID for a prior authenticated transaction. + maxLength: 36 + example: ce30d2f6-7140-4385-b543-cddb5dacfe11 + transaction_type: + $ref: '#/components/schemas/TransactionType' + shipping_address: + $ref: '#/components/schemas/SessionAddress' + shipping_address_matches_billing: + type: boolean + description: > + Indicates whether the cardholder shipping address and billing address are the same. + example: false + completion: + $ref: '#/components/schemas/CompletionInfo' + channel_data: + $ref: '#/components/schemas/ChannelData' + recurring: + $ref: '#/components/schemas/Recurring' + installment: + $ref: '#/components/schemas/Installment' + optimization: + $ref: '#/components/schemas/Optimization' + initial_transaction: + $ref: '#/components/schemas/InitialTransaction' + diff --git a/nas_spec/components/schemas/Standalone/SessionSecret.yaml b/nas_spec/components/schemas/Standalone/SessionSecret.yaml new file mode 100644 index 000000000..7def553c4 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/SessionSecret.yaml @@ -0,0 +1,8 @@ +description: > + A base64 encoded value prefixed with `sek_` that gives access to client-side operations for a single authentication within the Sessions API. + This value is returned as the `session_secret` when requesting a session. +type: string +pattern: '^(sek)_(.{44})$' +minLength: 48 +maxLength: 48 +example: sek_Dal7UyiH8rIFXA4PfgiIk2jUyQkVDeEWgVBEL4TsRTE= diff --git a/nas_spec/components/schemas/Standalone/SessionSource.yaml b/nas_spec/components/schemas/Standalone/SessionSource.yaml new file mode 100644 index 000000000..8d620c89a --- /dev/null +++ b/nas_spec/components/schemas/Standalone/SessionSource.yaml @@ -0,0 +1,47 @@ +type: object +description: The source of the authentication. +discriminator: + propertyName: type + mapping: + card: '#/components/schemas/CardSource' + id: '#/components/schemas/IdSource' + token: '#/components/schemas/TokenSource' + network_token: '#/components/schemas/NetworkTokenSource' +required: + - type +properties: + type: + type: string + default: 'card' + description: The payment source type + example: 'card' + scheme: + type: string + description: Indicates the cardholder scheme choice + enum: + - amex + - cartes_bancaires + - diners + - mastercard + - visa + billing_address: + description: The customer's billing address. Any special characters will be replaced. + allOf: + - $ref: '#/components/schemas/SessionAddress' + home_phone: + description: The cardholder's home phone number + allOf: + - $ref: '#/components/schemas/SessionPhone' + mobile_phone: + description: The cardholder's mobile phone number + allOf: + - $ref: '#/components/schemas/SessionPhone' + work_phone: + description: The cardholder's work phone number + allOf: + - $ref: '#/components/schemas/SessionPhone' + email: + type: string + description: The email of the cardholder + maxLength: 254 + example: 'bruce.wayne@email.com' diff --git a/nas_spec/components/schemas/Standalone/Status.yaml b/nas_spec/components/schemas/Standalone/Status.yaml new file mode 100644 index 000000000..6952dc864 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/Status.yaml @@ -0,0 +1,13 @@ +type: string +enum: + - pending + - processing + - challenged + - challenge_abandoned + - expired + - approved + - attempted + - unavailable + - declined + - rejected +description: Indicates the status of the session diff --git a/nas_spec/components/schemas/Standalone/StatusReason.yaml b/nas_spec/components/schemas/Standalone/StatusReason.yaml new file mode 100644 index 000000000..40d81ab10 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/StatusReason.yaml @@ -0,0 +1,23 @@ +type: string +description: > + When the Session is unavailable this will point to the reason it is so.

+ + • ares_error = There was an issue in the Authentication response we got back from the Directory Server (scheme server - 3DS2)
+ • ares_status = The status was set to the status in the Authentication response we got back from the Directory Server (scheme server - 3DS2)
+ • veres_error = There was an issue in the Verification response we got back from the Directory Server (scheme server - 3DS1)
+ • veres_status = The status was set to the status in the Verification response we got back from the Directory Server (scheme server - 3DS1)
+ • pares_error = There was an issue in the Payer Authentication response we got back from the Access Control Server (issuer server - 3DS1)
+ • pares_status = The status was set to the status in the Payer Authentication response we got back from the Access Control Server (issuer server - 3DS1)
+ • rreq_error = There was an issue in the Response we got back from the Access Control Server (issuer server - 3DS2)
+ • rreq_status = The status was set to the status in the Response we got back from the Access Control Server (issuer server - 3DS2)
+ • risk_declined = The status was set to declined because the Risk engine recommended we decline the authentication
+enum: + - ares_error + - ares_status + - veres_error + - veres_status + - pares_error + - pares_status + - rreq_error + - rreq_status + - risk_declined diff --git a/nas_spec/components/schemas/Standalone/ThreeDsMethodCompletion.yaml b/nas_spec/components/schemas/Standalone/ThreeDsMethodCompletion.yaml new file mode 100644 index 000000000..01776c57f --- /dev/null +++ b/nas_spec/components/schemas/Standalone/ThreeDsMethodCompletion.yaml @@ -0,0 +1,18 @@ +required: + - three_ds_method_completion +description: The result of the 3DS method url +properties: + three_ds_method_completion: + type: string + enum: + - Y + - N + - U + description: > + The result of the 3DS method URL.
+ Default to `U` if a response is not received from the 3DS Method URL within 10 seconds. + minLength: 1 + maxLength: 1 + example: Y +example: + three_ds_method_completion: Y diff --git a/nas_spec/components/schemas/Standalone/ThreeDsRequestorAuthenticationInfo.yaml b/nas_spec/components/schemas/Standalone/ThreeDsRequestorAuthenticationInfo.yaml new file mode 100644 index 000000000..d33df6ee2 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/ThreeDsRequestorAuthenticationInfo.yaml @@ -0,0 +1,23 @@ +type: object +description: Information about how the 3DS Requestor authenticated the cardholder before or during the transaction. +properties: + three_ds_req_auth_method: + type: string + description: The mechanism used by the cardholder to authenticate with the 3DS Requestor. + enum: + - no_threeds_requestor_authentication_occurred, + - three3ds_requestor_own_credentials, + - federated_id, + - issuer_credentials, + - third_party_authentication, + - fido_authenticator, + - fido_authenticator_fido_assurance_data_signed, + - src_assurance_data + three_ds_req_auth_timestamp: + type: string + format: date-time + description: The UTC date and time the cardholder authenticated with the 3DS Requestor, in ISO 8601 format. + three_ds_req_auth_data: + type: string + description: Data that documents and supports a specific authentication process. + maxLength: 20000 \ No newline at end of file diff --git a/nas_spec/components/schemas/Standalone/TokenSource.yaml b/nas_spec/components/schemas/Standalone/TokenSource.yaml new file mode 100644 index 000000000..5ca9d06d5 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/TokenSource.yaml @@ -0,0 +1,12 @@ +type: object +allOf: + - $ref: '#/components/schemas/SessionSource' + - type: object + required: + - token + properties: + token: + type: string + description: The Checkout.com card token + example: 'tok_4gzeau5o2uqubbk6fufs3m7p54' + maxLength: 100 diff --git a/nas_spec/components/schemas/Standalone/TransactionType.yaml b/nas_spec/components/schemas/Standalone/TransactionType.yaml new file mode 100644 index 000000000..109748f12 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/TransactionType.yaml @@ -0,0 +1,11 @@ +type: string +enum: + - goods_service + - check_acceptance + - account_funding + - quashi_card_transaction + - prepaid_activation_and_load +description: Identifies the type of transaction being authenticated +maxLength: 50 +example: goods_service +default: goods_service diff --git a/nas_spec/components/schemas/Standalone/TrustedBeneficiary.yaml b/nas_spec/components/schemas/Standalone/TrustedBeneficiary.yaml new file mode 100644 index 000000000..0927dcc46 --- /dev/null +++ b/nas_spec/components/schemas/Standalone/TrustedBeneficiary.yaml @@ -0,0 +1,32 @@ +type: object +description: Details of the trusted listing status of the merchant. +properties: + status: + type: string + description: > + Enables the communication of trusted beneficiary status between the Access Control Server (ACS), the Directory Server (DS), and the 3D Secure (3DS) Requestor.

+ + • Y = 3DS Requestor is allowlisted by cardholder
+ • N = 3DS Requestor is not allowlisted by cardholder
+ • E = Not eligible as determined by issuer
+ • P = Pending confirmation by cardholder
+ • R = Cardholder rejected
+ • U = Allowlist status unknown, unavailable, or does not apply + enum: + - Y + - N + - E + - P + - R + - U + example: Y + source: + type: string + description: > + The system setting trusted beneficiary status.

+ + • 01 = 3DS Server
+ • 02 = DS
+ • 03 = ACS
+ • 80-99 = DS-specific values
+ example: '01' diff --git a/nas_spec/components/schemas/Timestamp.yaml b/nas_spec/components/schemas/Timestamp.yaml new file mode 100644 index 000000000..89716d6d1 --- /dev/null +++ b/nas_spec/components/schemas/Timestamp.yaml @@ -0,0 +1,3 @@ +type: string +description: ISO 8601 timestamp +format: date-time diff --git a/nas_spec/components/schemas/Tokens/01_CardTokenRequest.yaml b/nas_spec/components/schemas/Tokens/01_CardTokenRequest.yaml new file mode 100644 index 000000000..599caeb0e --- /dev/null +++ b/nas_spec/components/schemas/Tokens/01_CardTokenRequest.yaml @@ -0,0 +1,45 @@ +type: object +description: Card Token Request +allOf: + - $ref: '#/components/schemas/TokenRequest' + - type: object + required: + - number + - expiry_month + - expiry_year + properties: + number: + type: string + description: The card number + example: '4543474002249996' + expiry_month: + type: integer + description: The expiry month of the card + minimum: 1 + example: 6 + minLength: 1 + maxLength: 2 + expiry_year: + type: integer + description: The expiry year of the card + example: 2025 + minLength: 4 + maxLength: 4 + name: + type: string + description: The cardholder's name + example: 'Bruce Wayne' + cvv: + type: string + description: The card verification value/code. 3 digits, except for American Express (4 digits) + example: '956' + minLength: 3 + maxLength: 4 + billing_address: + description: The payment source owner's billing address + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The payment source owner's phone number + allOf: + - $ref: '#/components/schemas/PhoneNumber' diff --git a/nas_spec/components/schemas/Tokens/01_CardTokenResponse.yaml b/nas_spec/components/schemas/Tokens/01_CardTokenResponse.yaml new file mode 100644 index 000000000..cee151ac3 --- /dev/null +++ b/nas_spec/components/schemas/Tokens/01_CardTokenResponse.yaml @@ -0,0 +1,86 @@ +type: object +description: Card Token Response +required: + - expiry_month + - expiry_year + - last4 + - bin +allOf: + - $ref: '#/components/schemas/TokenResponse' + - type: object + properties: + billing_address: + description: The payment source owner's billing address + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The payment source owner's phone number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + expiry_month: + type: integer + description: The expiry month + minimum: 1 + example: 6 + minLength: 1 + maxLength: 2 + expiry_year: + type: integer + description: The expiry year + example: 2025 + minLength: 4 + maxLength: 4 + name: + type: string + description: The cardholder's name + example: 'Bruce Wayne' + scheme: + type: string + description: The card scheme + example: 'VISA' + last4: + type: string + description: The last four digits of the card number + example: '9996' + minLength: 4 + maxLength: 4 + bin: + type: string + description: The card issuer's Bank Identification Number (BIN) + example: '454347' + maxLength: 6 + card_type: + type: string + description: The card type + enum: + - Credit + - Debit + - Prepaid + - Charge + - Deferred Debit + example: Credit + card_category: + type: string + description: The card category + enum: + - Consumer + - Commercial + example: Consumer + issuer: + type: string + description: The name of the card issuer + example: 'GOTHAM STATE BANK' + issuer_country: + type: string + maxLength: 2 + minLength: 2 + description: The card issuer's country (two-letter ISO code) + example: 'US' + product_id: + type: string + description: The issuer/card scheme product identifier + example: 'F' + product_type: + type: string + description: The issuer/card scheme product type + example: CLASSIC diff --git a/nas_spec/components/schemas/Tokens/02_GooglePayTokenRequest.yaml b/nas_spec/components/schemas/Tokens/02_GooglePayTokenRequest.yaml new file mode 100644 index 000000000..4cace65a9 --- /dev/null +++ b/nas_spec/components/schemas/Tokens/02_GooglePayTokenRequest.yaml @@ -0,0 +1,28 @@ +type: object +description: Google Pay Token Request +allOf: + - $ref: '#/components/schemas/TokenRequest' + - type: object + properties: + token_data: + type: object + description: The Google Pay payment token + properties: + signature: + type: string + description: Verifies the message came from Google. The signature is created using ECDSA + protocolVersion: + type: string + description: Identifies which encryption/signing scheme created this message. In this way, the protocol can evolve over time if needed. If it is not set, assume ECv0 + signedMessage: + type: string + description: A serialized JSON string containing the encryptedMessage, ephemeralPublicKey, and tag. To simplify the signature verification process, this value is serialized + example: + { + 'protocolVersion': 'ECv1', + 'signature': 'TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ', + 'signedMessage': '{"encryptedMessage": + "ZW5jcnlwdGVkTWVzc2FnZQ==", + "ephemeralPublicKey": "ZXBoZW1lcmFsUHVibGljS2V5", + "tag": "c2lnbmF0dXJl"}', + } diff --git a/nas_spec/components/schemas/Tokens/02_GooglePayTokenResponse.yaml b/nas_spec/components/schemas/Tokens/02_GooglePayTokenResponse.yaml new file mode 100644 index 000000000..5effc7c2b --- /dev/null +++ b/nas_spec/components/schemas/Tokens/02_GooglePayTokenResponse.yaml @@ -0,0 +1,14 @@ +type: object +description: Google Pay Token Response +allOf: + - $ref: '#/components/schemas/TokenResponse' + - type: object + properties: + token_format: + type: string + description: The format of the token. + enum: + - pan_only + - cryptogram_3ds + example: 'pan_only' + diff --git a/nas_spec/components/schemas/Tokens/03_ApplePayTokenRequest.yaml b/nas_spec/components/schemas/Tokens/03_ApplePayTokenRequest.yaml new file mode 100644 index 000000000..eeb8bda61 --- /dev/null +++ b/nas_spec/components/schemas/Tokens/03_ApplePayTokenRequest.yaml @@ -0,0 +1,34 @@ +type: object +description: Apple Pay Token Request +allOf: + - $ref: '#/components/schemas/TokenRequest' + - type: object + properties: + token_data: + type: object + description: The Apple Pay payment token + properties: + version: + type: string + description: Version information about the payment token. The token uses `EC_v1` for ECC-encrypted data, and `RSA_v1` for RSA-encrypted data + data: + type: string + description: Encrypted payment data. Base64 encoded as a string + signature: + type: string + description: Signature of the payment and header data. The signature includes the signing certificate, its intermediate CA certificate, and information about the signing algorithm + header: + type: object + description: Additional version-dependent information used to decrypt and verify the payment + example: + { + 'version': 'EC_v1', + 'data': 't7GeajLB9skXB6QSWfEpPA4WPhDqB7ekdd+F7588arLzvebKp3P0TekUslSQ8nkuacUgLdks2IKyCm7U3OL/PEYLXE7w60VkQ8WE6FXs/cqHkwtSW9vkzZNDxSLDg9slgLYxAH2/iztdipPpyIYKl0Kb6Rn9rboF+lwgRxM1B3n84miApwF5Pxl8ZOOXGY6F+3DsDo7sMCUTaJK74DUJJcjIXrigtINWKW6RFa/4qmPEC/Y+syg04x7B99mbLQQzWFm7z6HfRmynPM9/GA0kbsqd/Kn5Mkqssfhn/m6LuNKsqEmbKi85FF6kip+F17LRawG48bF/lT8wj/QEuDY0G7t/ryOnGLtKteXmAf0oJnwkelIyfyj2KI8GChBuTJonGlXKr5klPE89/ycmkgDl+T6Ms7PhiNZpuGEE2QE=', + 'signature': 'MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCAMIID5jCCA4ugAwIBAgIIaGD2mdnMpw8wCgYIKoZIzj0EAwIwejEuMCwGA1UEAwwlQXBwbGUgQXBwbGljYXRpb24gSW50ZWdyYXRpb24gQ0EgLSBHMzEmMCQGA1UECwwdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTMB4XDTE2MDYwMzE4MTY0MFoXDTIxMDYwMjE4MTY0MFowYjEoMCYGA1UEAwwfZWNjLXNtcC1icm9rZXItc2lnbl9VQzQtU0FOREJPWDEUMBIGA1UECwwLaU9TIFN5c3RlbXMxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEgjD9q8Oc914gLFDZm0US5jfiqQHdbLPgsc1LUmeY+M9OvegaJajCHkwz3c6OKpbC9q+hkwNFxOh6RCbOlRsSlaOCAhEwggINMEUGCCsGAQUFBwEBBDkwNzA1BggrBgEFBQcwAYYpaHR0cDovL29jc3AuYXBwbGUuY29tL29jc3AwNC1hcHBsZWFpY2EzMDIwHQYDVR0OBBYEFAIkMAua7u1GMZekplopnkJxghxFMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUI/JJxE+T5O8n5sT2KGw/orv9LkswggEdBgNVHSAEggEUMIIBEDCCAQwGCSqGSIb3Y2QFATCB/jCBwwYIKwYBBQUHAgIwgbYMgbNSZWxpYW5jZSBvbiB0aGlzIGNlcnRpZmljYXRlIGJ5IGFueSBwYXJ0eSBhc3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJsZSBzdGFuZGFyZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRlIHBvbGljeSBhbmQgY2VydGlmaWNhdGlvbiBwcmFjdGljZSBzdGF0ZW1lbnRzLjA2BggrBgEFBQcCARYqaHR0cDovL3d3dy5hcHBsZS5jb20vY2VydGlmaWNhdGVhdXRob3JpdHkvMDQGA1UdHwQtMCswKaAnoCWGI2h0dHA6Ly9jcmwuYXBwbGUuY29tL2FwcGxlYWljYTMuY3JsMA4GA1UdDwEB/wQEAwIHgDAPBgkqhkiG92NkBh0EAgUAMAoGCCqGSM49BAMCA0kAMEYCIQDaHGOui+X2T44R6GVpN7m2nEcr6T6sMjOhZ5NuSo1egwIhAL1a+/hp88DKJ0sv3eT3FxWcs71xmbLKD/QJ3mWagrJNMIIC7jCCAnWgAwIBAgIISW0vvzqY2pcwCgYIKoZIzj0EAwIwZzEbMBkGA1UEAwwSQXBwbGUgUm9vdCBDQSAtIEczMSYwJAYDVQQLDB1BcHBsZSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTETMBEGA1UECgwKQXBwbGUgSW5jLjELMAkGA1UEBhMCVVMwHhcNMTQwNTA2MjM0NjMwWhcNMjkwNTA2MjM0NjMwWjB6MS4wLAYDVQQDDCVBcHBsZSBBcHBsaWNhdGlvbiBJbnRlZ3JhdGlvbiBDQSAtIEczMSYwJAYDVQQLDB1BcHBsZSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTETMBEGA1UECgwKQXBwbGUgSW5jLjELMAkGA1UEBhMCVVMwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATwFxGEGddkhdUaXiWBB3bogKLv3nuuTeCN/EuT4TNW1WZbNa4i0Jd2DSJOe7oI/XYXzojLdrtmcL7I6CmE/1RFo4H3MIH0MEYGCCsGAQUFBwEBBDowODA2BggrBgEFBQcwAYYqaHR0cDovL29jc3AuYXBwbGUuY29tL29jc3AwNC1hcHBsZXJvb3RjYWczMB0GA1UdDgQWBBQj8knET5Pk7yfmxPYobD+iu/0uSzAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFLuw3qFYM4iapIqZ3r6966/ayySrMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly9jcmwuYXBwbGUuY29tL2FwcGxlcm9vdGNhZzMuY3JsMA4GA1UdDwEB/wQEAwIBBjAQBgoqhkiG92NkBgIOBAIFADAKBggqhkjOPQQDAgNnADBkAjA6z3KDURaZsYb7NcNWymK/9Bft2Q91TaKOvvGcgV5Ct4n4mPebWZ+Y1UENj53pwv4CMDIt1UQhsKMFd2xd8zg7kGf9F3wsIW2WT8ZyaYISb1T4en0bmcubCYkhYQaZDwmSHQAAMYIBjTCCAYkCAQEwgYYwejEuMCwGA1UEAwwlQXBwbGUgQXBwbGljYXRpb24gSW50ZWdyYXRpb24gQ0EgLSBHMzEmMCQGA1UECwwdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTAghoYPaZ2cynDzANBglghkgBZQMEAgEFAKCBlTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xNzA4MDIxNjA5NDZaMCoGCSqGSIb3DQEJNDEdMBswDQYJYIZIAWUDBAIBBQChCgYIKoZIzj0EAwIwLwYJKoZIhvcNAQkEMSIEIGEfVr+4x9RQXyfF8IYA0kraoK0pcZEaBlINo6EGrOReMAoGCCqGSM49BAMCBEgwRgIhAKunK47QEr/ZjxPlVl+etzVzbKA41xPLWtO01oUOlulmAiEAiaFH9F9LK6uqTFAUW/WIDkHWiFuSm5a3NVox7DlyIf0AAAAAAAA=', + 'header': + { + 'ephemeralPublicKey': 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEX1ievoT8DRB8T5zGkhHZHeDr0oBmYEgsDSxyT0MD0IZ2Mpfjz2LdWq6LUwSH9EmxdPEzMunsZKWMyOr3K/zlsw==', + 'publicKeyHash': 'tqYV+tmG9aMh+l/K6cicUnPqkb1gUiLjSTM9gEz6Nl0=', + 'transactionId': '3cee89679130a4b2617c76118a1c62fd400cd45b49dc0916d5b951b560cd17b4', + }, + } diff --git a/nas_spec/components/schemas/Tokens/03_ApplePayTokenResponse.yaml b/nas_spec/components/schemas/Tokens/03_ApplePayTokenResponse.yaml new file mode 100644 index 000000000..2ceb8801f --- /dev/null +++ b/nas_spec/components/schemas/Tokens/03_ApplePayTokenResponse.yaml @@ -0,0 +1,12 @@ +type: object +description: Apple Pay Token Response +allOf: + - $ref: '#/components/schemas/TokenResponse' + - type: object + properties: + token_format: + type: string + description: The format of the token. + enum: + - cryptogram_3ds + example: 'cryptogram_3ds' diff --git a/nas_spec/components/schemas/Tokens/TokenRequest.yaml b/nas_spec/components/schemas/Tokens/TokenRequest.yaml new file mode 100644 index 000000000..c86d753b3 --- /dev/null +++ b/nas_spec/components/schemas/Tokens/TokenRequest.yaml @@ -0,0 +1,15 @@ +type: object +description: The source of the payment +discriminator: + propertyName: type + mapping: + card: '#/components/schemas/01_CardTokenRequest' + googlepay: '#/components/schemas/02_GooglePayTokenRequest' + applepay: '#/components/schemas/03_ApplePayTokenRequest' +required: + - type +properties: + type: + type: string + description: The type of card details to be tokenized + example: 'card' diff --git a/nas_spec/components/schemas/Tokens/TokenResponse.yaml b/nas_spec/components/schemas/Tokens/TokenResponse.yaml new file mode 100644 index 000000000..8d2645a73 --- /dev/null +++ b/nas_spec/components/schemas/Tokens/TokenResponse.yaml @@ -0,0 +1,95 @@ +type: object +description: The source of the payment +discriminator: + propertyName: type + mapping: + card: '#/components/schemas/01_CardTokenResponse' + googlepay: '#/components/schemas/02_GooglePayTokenResponse' + applepay: '#/components/schemas/03_ApplePayTokenResponse' +required: + - type + - token + - expires_on + - expiry_month + - expiry_year + - last4 + - bin +properties: + type: + type: string + description: The type of card details to be tokenized + example: 'card' + token: + type: string + description: The reference token + example: tok_ubfj2q76miwundwlk72vxt2i7q + expires_on: + description: The date/time the token will expire + allOf: + - $ref: '#/components/schemas/ServerTimestamp' + expiry_month: + type: integer + description: The expiry month + minimum: 1 + example: 6 + minLength: 1 + maxLength: 2 + expiry_year: + type: integer + description: expiry year + example: 2025 + minLength: 4 + maxLength: 4 + scheme: + type: string + description: The card scheme + example: 'VISA' + scheme_local: + type: string + description: The local co-branded card scheme + enum: + - cartes_bancaires + example: 'cartes_bancaires' + last4: + type: string + description: The last four digits of the card number + example: '9996' + bin: + type: string + description: The card issuer BIN + example: '454347' + card_type: + type: string + description: The card type + enum: + - Credit + - Debit + - Prepaid + - Charge + - Deferred Debit + example: Credit + card_category: + type: string + description: The card category + enum: + - Consumer + - Commercial + example: Consumer + issuer: + type: string + description: The name of the card issuer + example: 'GOTHAM STATE BANK' + issuer_country: + type: string + maxLength: 2 + minLength: 2 + description: The card issuer country ISO-2 code + example: 'US' + product_id: + type: string + description: The issuer/card scheme product identifier + example: 'F' + product_type: + type: string + description: The issuer/card scheme product type + example: CLASSIC diff --git a/nas_spec/components/schemas/Transfers/CreateTransferRequest.yaml b/nas_spec/components/schemas/Transfers/CreateTransferRequest.yaml new file mode 100644 index 000000000..8983c4ee7 --- /dev/null +++ b/nas_spec/components/schemas/Transfers/CreateTransferRequest.yaml @@ -0,0 +1,25 @@ +type: object +title: Create transfer request +properties: + reference: + type: string + description: A reference you can use later to identify this transfer + maxLength: 50 + example: superhero1234 + transfer_type: + $ref: '#/components/schemas/TransferType' + source: + allOf: + - $ref: '#/components/schemas/TransferSource' + required: + - id + - amount + destination: + allOf: + - $ref: '#/components/schemas/TransferDestination' + required: + - id +required: + - transfer_type + - source + - destination diff --git a/nas_spec/components/schemas/Transfers/CreateTransferResponse.yaml b/nas_spec/components/schemas/Transfers/CreateTransferResponse.yaml new file mode 100644 index 000000000..ad61649d2 --- /dev/null +++ b/nas_spec/components/schemas/Transfers/CreateTransferResponse.yaml @@ -0,0 +1,16 @@ +type: object +title: Create transfer response +properties: + id: + type: string + description: The `id` representing the initiated transfer. + example: tra_y3oqhf46pyzuxjbcn2giaqnb4 + status: + $ref: '#/components/schemas/TransferStatus' + _links: + type: object + properties: + self: + $ref: '#/components/schemas/TransferLink' + example: + self: "https://transfers.checkout.com/transfers/tra_y3oqhf46pyzuxjbcn2giaqnb4" diff --git a/nas_spec/components/schemas/Transfers/Transfer.yaml b/nas_spec/components/schemas/Transfers/Transfer.yaml new file mode 100644 index 000000000..76e62f6c4 --- /dev/null +++ b/nas_spec/components/schemas/Transfers/Transfer.yaml @@ -0,0 +1,73 @@ +type: object +title: The transfer information +properties: + id: + type: string + description: The transfer identifier + example: tra_y3oqhf46pyzuxjbcn2giaqnb4 + reference: + type: string + description: A unique reference used to identify this transfer + example: superhero1234 + status: + $ref: '#/components/schemas/TransferStatus' + transfer_type: + $ref: '#/components/schemas/TransferType' + requested_on: + type: string + description: The date the transfer was requested on + example: '2021-12-15T09:15:02.3845763Z' + reason_codes: + type: array + description: An optional set of reason codes describing why the transfer is in its current state + items: + type: string + example: ["destination_transfers_capability_disabled", "source_and_destination_currency_accounts_must_be_different"] + source: + type: object + description: The source of the funds involved in the transfer + properties: + entity_id: + type: string + description: The ID of the entity that sent the transfer + example: ent_azsiyswl7bwe2ynjzujy7lcjca + amount: + description: The amount transferred, in the minor unit of the currency represented by the `currency` property + type: integer + example: 100 + currency: + description: The ISO currency code of the funds being transferred + type: string + example: GBP + destination: + type: object + description: The destination of the funds involved in the transfer + properties: + entity_id: + type: string + description: The ID of the entity that received the transfer + example: ent_bqik7gxoavwhmy3ot6kvmbx6py + _links: + type: object + properties: + self: + $ref: '#/components/schemas/TransferLink' + example: + self: "https://transfers.checkout.com/transfers/tra_y3oqhf46pyzuxjbcn2giaqnb4" +example: + id: tra_y3oqhf46pyzuxjbcn2giaqnb4 + reference: superhero1234 + status: rejected + transfer_type: commission + requested_on: '2021-12-15T09:15:02.3845763Z' + reason_codes: + - destination_transfers_capability_disabled + - source_and_destination_currency_accounts_must_be_different + source: + entity_id: ent_azsiyswl7bwe2ynjzujy7lcjca + amount: 100 + currency: GBP + destination: + entity_id: ent_bqik7gxoavwhmy3ot6kvmbx6py + _links: + self: "https://transfers.checkout.com/transfers/tra_y3oqhf46pyzuxjbcn2giaqnb4" diff --git a/nas_spec/components/schemas/Transfers/TransferDestination.yaml b/nas_spec/components/schemas/Transfers/TransferDestination.yaml new file mode 100644 index 000000000..fec0487aa --- /dev/null +++ b/nas_spec/components/schemas/Transfers/TransferDestination.yaml @@ -0,0 +1,8 @@ +type: object +title: Transfer destination +description: The object representing the destination of the funds involved in the transfer. +properties: + id: + type: string + description: The identifier representing the destination of the funds. Currently this should be an entity ID. + example: ent_w4jelhppmfiufdnatam37wrfc4 diff --git a/nas_spec/components/schemas/Transfers/TransferLink.yaml b/nas_spec/components/schemas/Transfers/TransferLink.yaml new file mode 100644 index 000000000..0e0e8ac88 --- /dev/null +++ b/nas_spec/components/schemas/Transfers/TransferLink.yaml @@ -0,0 +1,6 @@ +type: object +title: Transfer link +properties: + href: + description: The link URL. + type: string diff --git a/nas_spec/components/schemas/Transfers/TransferSource.yaml b/nas_spec/components/schemas/Transfers/TransferSource.yaml new file mode 100644 index 000000000..f93fd0d86 --- /dev/null +++ b/nas_spec/components/schemas/Transfers/TransferSource.yaml @@ -0,0 +1,17 @@ +type: object +title: Transfer source +description: The object representing the source of the funds involved in the transfer. +properties: + id: + type: string + description: The identifier representing the source of the funds. Currently this should be an entity ID. + example: ent_azsiyswl7bwe2ynjzujy7lcjca + amount: + description: The amount to be transferred, in the minor unit of the currency (which is represented by the `id` and, optionally, the `currency` property) + type: integer + example: 100 + currency: + description: The currency that the transfer should be made in. This should be a currency supported by both the source and destination of the transfer. + type: string + format: ISO 4217 + example: GBP diff --git a/nas_spec/components/schemas/Transfers/TransferStatus.yaml b/nas_spec/components/schemas/Transfers/TransferStatus.yaml new file mode 100644 index 000000000..e7fd70dff --- /dev/null +++ b/nas_spec/components/schemas/Transfers/TransferStatus.yaml @@ -0,0 +1,7 @@ +type: string +title: Transfer status +description: The current state of the initiated transfer. +enum: + - pending + - completed + - rejected diff --git a/nas_spec/components/schemas/Transfers/TransferType.yaml b/nas_spec/components/schemas/Transfers/TransferType.yaml new file mode 100644 index 000000000..a15871552 --- /dev/null +++ b/nas_spec/components/schemas/Transfers/TransferType.yaml @@ -0,0 +1,7 @@ +type: string +title: Transfer type +description: The type of transfer +enum: + - commission + - promotion + - refund diff --git a/nas_spec/components/schemas/UpdateCustomerRequest.yaml b/nas_spec/components/schemas/UpdateCustomerRequest.yaml new file mode 100644 index 000000000..a98e51849 --- /dev/null +++ b/nas_spec/components/schemas/UpdateCustomerRequest.yaml @@ -0,0 +1,12 @@ +type: object +description: The customer's details +properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + description: The identifier of an existing customer + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' + default: + type: boolean + description: 'If true, sets this instrument as the default for the customer' + example: true diff --git a/nas_spec/components/schemas/ValidationError.yaml b/nas_spec/components/schemas/ValidationError.yaml new file mode 100644 index 000000000..29c1a7b6a --- /dev/null +++ b/nas_spec/components/schemas/ValidationError.yaml @@ -0,0 +1,13 @@ +type: object +properties: + request_id: + type: string + example: 0HL80RJLS76I7 + error_type: + type: string + example: request_invalid + error_codes: + type: array + items: + type: string + example: payment_source_required diff --git a/nas_spec/components/schemas/customers/RetrieveCustomerBankAccountInstrumentResponse.yaml b/nas_spec/components/schemas/customers/RetrieveCustomerBankAccountInstrumentResponse.yaml new file mode 100644 index 000000000..1883f33dd --- /dev/null +++ b/nas_spec/components/schemas/customers/RetrieveCustomerBankAccountInstrumentResponse.yaml @@ -0,0 +1,79 @@ +type: object +description: Bank account details +required: + - id + - type + - fingerprint + - currency + - country +allOf: + - $ref: '#/components/schemas/RetrieveCustomerInstrumentResponse' +properties: + type: + description: The type of instrument + type: string + id: + description: The unique identifier of the payment source or destination that can be used later for payments + type: string + example: 'src_wmlfc3zyhqzehihu7giusaaawu' + + fingerprint: + type: string + description: A token that can uniquely identify this instrument across all customers + pattern: ^([a-z0-9]{26})$ + example: vnsdrvikkvre3dtrjjvlm5du4q + + account_type: + description: The type of account + type: string + enum: + - savings + - current + - cash + example: savings + + account_number: + description: Number (which can contain letters) that identifies the account + type: string + example: '13654567455' + + bank_code: + description: Code that identifies the bank + type: string + example: 123-456 + + branch_code: + description: Code that identifies the bank branch + type: string + example: '6443' + + iban: + description: Internationally agreed standard for identifying bank account + type: string + example: HU93116000060000000012345676 + + bban: + description: The combination of bank code and/or branch code and account number + type: string + example: 3704 0044 0532 0130 00 + + swift_bic: + description: 8 or 11 character code which identifies the bank or bank branch + type: string + example: '37040044' + + currency: + description: The three-letter ISO currency code of the account's currency + type: string + example: GBP + + country: + description: The two-letter ISO country code of where the account is based + type: string + example: GB + + account_holder: + $ref: '#/components/schemas/AccountHolder' + + bank: + $ref: '#/components/schemas/BankDetails' diff --git a/nas_spec/components/schemas/customers/RetrieveCustomerCardInstrumentResponse.yaml b/nas_spec/components/schemas/customers/RetrieveCustomerCardInstrumentResponse.yaml new file mode 100644 index 000000000..fe2a82085 --- /dev/null +++ b/nas_spec/components/schemas/customers/RetrieveCustomerCardInstrumentResponse.yaml @@ -0,0 +1,105 @@ +type: object +description: card instrument response +allOf: + - $ref: '#/components/schemas/RetrieveCustomerInstrumentResponse' +required: + - id + - fingerprint + - expiry_month + - expiry_year + - last4 + - bin +properties: + type: + description: The underlying instrument type (for instruments created from Checkout.com tokens, this will reflect the type of instrument that was tokenized). + type: string + example: 'card' + id: + description: The unique identifier of the payment source or destination that can be used later for payments + type: string + example: 'src_wmlfc3zyhqzehihu7giusaaawu' + fingerprint: + type: string + description: A token that can uniquely identify this instrument across all customers + pattern: ^([a-z0-9]{26})$ + example: vnsdrvikkvre3dtrjjvlm5du4q + expiry_month: + type: integer + description: The expiry month + minimum: 1 + example: 6 + maxLength: 2 + expiry_year: + type: integer + description: The expiry year + example: 2025 + minLength: 4 + maxLength: 4 + scheme: + type: string + description: The card scheme + example: 'VISA' + last4: + type: string + description: The last four digits of the card number + example: '9996' + minLength: 4 + maxLength: 4 + bin: + type: string + description: The card issuer's bank identification number (BIN) + example: '454347' + card_type: + type: string + description: The card type + enum: + - Credit + - Debit + - Prepaid + - Charge + example: Credit + card_category: + type: string + description: The card category + enum: + - Consumer + - Commercial + example: Consumer + issuer: + type: string + description: The name of the card issuer + example: 'GOTHAM STATE BANK' + issuer_country: + type: string + maxLength: 2 + minLength: 2 + description: The card issuer's country (two-letter ISO code) + example: 'US' + product_id: + type: string + description: The issuer/card scheme product identifier + example: 'F' + product_type: + type: string + description: The issuer/card scheme product type + example: CLASSIC + account_holder: + type: object + description: The account holder details + properties: + first_name: + description: The first name of the account holder + type: string + example: 'John' + last_name: + description: The last name of the account holder + type: string + example: 'Smith' + billing_address: + description: The billing address of the account holder + allOf: + - $ref: '#/components/schemas/Address' + phone: + description: The phone number of the account holder + allOf: + - $ref: '#/components/schemas/PhoneNumber' diff --git a/nas_spec/components/schemas/customers/RetrieveCustomerInstrumentResponse.yaml b/nas_spec/components/schemas/customers/RetrieveCustomerInstrumentResponse.yaml new file mode 100644 index 000000000..6e09e3ed3 --- /dev/null +++ b/nas_spec/components/schemas/customers/RetrieveCustomerInstrumentResponse.yaml @@ -0,0 +1,13 @@ +type: object +discriminator: + propertyName: type + mapping: + bank_account: '#/components/schemas/RetrieveCustomerBankAccountInstrumentResponse' + card: '#/components/schemas/RetrieveCustomerCardInstrumentResponse' +required: + - type +properties: + type: + description: The instrument type + type: string + example: 'card' diff --git a/nas_spec/components/schemas/customers/RetrieveCustomerResponse.yaml b/nas_spec/components/schemas/customers/RetrieveCustomerResponse.yaml new file mode 100644 index 000000000..bda4b054c --- /dev/null +++ b/nas_spec/components/schemas/customers/RetrieveCustomerResponse.yaml @@ -0,0 +1,39 @@ +type: object +description: Customer retrieved successfully +required: + - id + - email +properties: + id: + type: string + description: The customer's unique identifier + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' + email: + type: string + format: email + description: The customer's email address + example: 'brucewayne@gmail.com' + default: + type: string + description: The ID for this customer's default instrument + example: 'src_wmlfc3zyhqzehihu7giusaaawu' + name: + type: string + description: The customer's name + example: 'Bruce Wayne' + phone: + description: The customer's phone number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + metadata: + type: object + description: A set of key-value pairs that is attached to a customer + example: + coupon_code: 'NY2018' + partner_id: 123989 + instruments: + type: array + title: Instrument + description: The details of the instruments linked to this customer + items: + $ref: '#/components/schemas/RetrieveCustomerInstrumentResponse' diff --git a/nas_spec/components/schemas/customers/StoreCustomerRequest.yaml b/nas_spec/components/schemas/customers/StoreCustomerRequest.yaml new file mode 100644 index 000000000..409aafed8 --- /dev/null +++ b/nas_spec/components/schemas/customers/StoreCustomerRequest.yaml @@ -0,0 +1,36 @@ +type: object +description: Create a customer +required: + - email +properties: + email: + type: string + format: email + description: The customer's email address + maxLength: 255 + example: 'brucewayne@gmail.com' + name: + type: string + description: The customer's name + maxLength: 255 + example: 'Bruce Wayne' + phone: + description: The customer's phone number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + metadata: + type: object + description: Allows you to store additional information about a customer. You can include a maximum of 10 key-value pairs. Each key and value can be up to 100 characters long. + example: + coupon_code: 'NY2018' + partner_id: 123989 + default: + type: string + description: The ID of the instrument you want to set as this customer's default instrument + example: 'src_wmlfc3zyhqzehihu7giusaaawu' + instruments: + type: array + items: + type: string + description: The IDs of the instruments you want to link to this customer + example: ['src_y3oqhf46pyzuxjbcn2giaqnb44', 'src_wmlfc3zyhqzehihu7giusaaawu'] diff --git a/nas_spec/components/schemas/customers/StoreCustomerResponse.yaml b/nas_spec/components/schemas/customers/StoreCustomerResponse.yaml new file mode 100644 index 000000000..7e67b83d8 --- /dev/null +++ b/nas_spec/components/schemas/customers/StoreCustomerResponse.yaml @@ -0,0 +1,9 @@ +type: object +description: Customer created successfully +required: + - id +properties: + id: + description: The customer's unique identifier + type: string + example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44' diff --git a/nas_spec/components/schemas/customers/UpdateCustomerDetailsRequest.yaml b/nas_spec/components/schemas/customers/UpdateCustomerDetailsRequest.yaml new file mode 100644 index 000000000..dae86872c --- /dev/null +++ b/nas_spec/components/schemas/customers/UpdateCustomerDetailsRequest.yaml @@ -0,0 +1,34 @@ +type: object +description: The customer's details +properties: + email: + type: string + format: email + description: The email address of the customer + maxLength: 255 + example: 'brucewayne@gmail.com' + name: + type: string + description: The name of the customer + maxLength: 255 + example: 'Bruce Wayne' + phone: + description: The customer's phone number + allOf: + - $ref: '#/components/schemas/PhoneNumber' + metadata: + type: object + description: Allows you to store additional information about a customer. You can include a maximum of 10 key-value pairs. Each key and value can be up to 100 characters long. Providing metadata in this request will replace any existing stored for this customer. + example: + coupon_code: 'NY2018' + partner_id: 123989 + default: + type: string + description: The ID of this customer's default instrument + example: 'src_wmlfc3zyhqzehihu7giusaaawu' + instruments: + type: array + items: + type: string + description: The IDs of the instruments you want to link to this customer + example: ['src_y3oqhf46pyzuxjbcn2giaqnb44', 'src_wmlfc3zyhqzehihu7giusaaawu'] diff --git a/nas_spec/components/schemas/issuing/card-management/cardholders/add-cardholder/add-cardholder-request.yaml b/nas_spec/components/schemas/issuing/card-management/cardholders/add-cardholder/add-cardholder-request.yaml new file mode 100644 index 000000000..ef4aba9e7 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cardholders/add-cardholder/add-cardholder-request.yaml @@ -0,0 +1,18 @@ +type: object +description: The cardholder to create. +discriminator: + propertyName: type + mapping: + individual: '#/components/schemas/add-individual-cardholder-request' +required: + - type +properties: + type: + type: string + description: The type of cardholder to create. + example: individual + reference: + $ref: '#/components/schemas/IssuingReference' + entity_id: + description: The cardholder's parent entity. This field is required if the client has multiple entities configured. + $ref: '#/components/schemas/IssuingEntityId' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cardholders/add-cardholder/add-cardholder-response.yaml b/nas_spec/components/schemas/issuing/card-management/cardholders/add-cardholder/add-cardholder-response.yaml new file mode 100644 index 000000000..d023be264 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cardholders/add-cardholder/add-cardholder-response.yaml @@ -0,0 +1,42 @@ +type: object +required: + - id + - client_id + - entity_id + - type + - status + - _links +properties: + id: + $ref: '#/components/schemas/IssuingCardholderId' + client_id: + $ref: '#/components/schemas/IssuingClientId' + entity_id: + $ref: '#/components/schemas/IssuingEntityId' + type: + type: string + description: The cardholder's type. + enum: + - individual + status: + type: string + description: The cardholder's status, after creation. + enum: + - active + - pending + - restricted + - requirements_due + - inactive + - rejected + reference: + $ref: '#/components/schemas/IssuingReference' + created_date: + type: string + format: datetime + last_modified_date: + type: string + format: datetime + example: "2019-09-10T10:11:12Z" + _links: + allOf: + - $ref: '#/components/schemas/IssuingCardholderLinks' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cardholders/add-cardholder/add-individual-cardholder-request.yaml b/nas_spec/components/schemas/issuing/card-management/cardholders/add-cardholder/add-individual-cardholder-request.yaml new file mode 100644 index 000000000..f76f1b898 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cardholders/add-cardholder/add-individual-cardholder-request.yaml @@ -0,0 +1,46 @@ +type: object +required: + - first_name + - last_name + - billing_address +allOf: + - $ref: '#/components/schemas/add-cardholder-request' + - type: object + properties: + first_name: + type: string + description: The cardholder's first name. + example: John + minLength: 1 + maxLength: 40 + middle_name: + type: string + description: The cardholder's middle name. + example: Fitzgerald + minLength: 1 + maxLength: 40 + last_name: + type: string + description: The cardholder's last name. + example: Kennedy + minLength: 1 + maxLength: 40 + email: + description: The cardholder's email. + $ref: '#/components/schemas/IssuingEmail' + phone_number: + description: The cardholder's phone number. This information will be used for authorizations requiring a 3DS challenge. + $ref: '#/components/schemas/IssuingPhoneNumber' + date_of_birth: + type: string + format: date + description: The cardholder's date of birth, in the format `YYYY-MM-DD`. + example: "1985-05-15" + billing_address: + description: The cardholder's billing address. + $ref: '#/components/schemas/IssuingAddress' + residency_address: + description: The cardholder's residency address. If this value is not provided, the cardholder's billing address will be used by default instead. + $ref: '#/components/schemas/IssuingAddress' + document: + $ref: '#/components/schemas/IdentificationDocument' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cardholders/get-cardholder-response.yaml b/nas_spec/components/schemas/issuing/card-management/cardholders/get-cardholder-response.yaml new file mode 100644 index 000000000..43ea323cc --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cardholders/get-cardholder-response.yaml @@ -0,0 +1,2 @@ +type: object +$ref: '#/components/schemas/IssuingCardholder' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cardholders/properties/IdentificationDocument.yaml b/nas_spec/components/schemas/issuing/card-management/cardholders/properties/IdentificationDocument.yaml new file mode 100644 index 000000000..9651ce5ff --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cardholders/properties/IdentificationDocument.yaml @@ -0,0 +1,30 @@ +type: object +description: A legal document used to verify the cardholder's identity. +required: + - type + - front_document_id +properties: + type: + type: string + description: The type of document being supplied for identity verification. + enum: + [ + passport, + national_identity_card, + driving_license, + citizen_card, + residence_permit, + electoral_id, + ] + example: national_identity_card + front_document_id: + type: string + description: The ID displayed on the front of the document, as represented by Checkout.com systems. + example: file_6lbss42ezvoufcb2beo76rvwly + back_document_id: + type: string + description: | + The ID displayed on the back of the document, as represented by Checkout.com systems. + + If you're supplying a `passport` for identity verification, this field is optional. + example: file_aaz5pemp6326zbuvevp6qroqu4 diff --git a/nas_spec/components/schemas/issuing/card-management/cardholders/properties/IssuingCardholder.yaml b/nas_spec/components/schemas/issuing/card-management/cardholders/properties/IssuingCardholder.yaml new file mode 100644 index 000000000..bf4cf51a9 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cardholders/properties/IssuingCardholder.yaml @@ -0,0 +1,80 @@ +type: object +required: + - id + - client_id + - entity_id + - type + - first_name + - last_name + - billing_address +properties: + id: + $ref: '#/components/schemas/IssuingCardholderId' + type: + type: string + description: The cardholder type. Currently `individual` is the only supported value. + example: individual + first_name: + type: string + description: The cardholder's first name. + example: John + pattern: ^[a-zA-Z'- ]{1,40}$ + minLength: 1 + maxLength: 40 + middle_name: + type: string + description: The cardholder's middle name. + example: Fitzgerald + pattern: ^[a-zA-Z'- ]{1,40}$ + minLength: 1 + maxLength: 40 + last_name: + type: string + description: The cardholder's last name. + example: Kennedy + pattern: ^[a-zA-Z'- ]{1,40}$ + minLength: 1 + maxLength: 40 + email: + description: The cardholder's email. + $ref: '#/components/schemas/IssuingEmail' + phone_number: + description: The cardholder's phone number. This information will be used for authorizations requiring a 3DS challenge. + $ref: '#/components/schemas/IssuingPhoneNumber' + date_of_birth: + type: string + format: date + description: The cardholder's date of birth, in the format `YYYY-MM-DD`. + example: "1985-05-28" + billing_address: + description: The cardholder's billing address. + $ref: '#/components/schemas/IssuingAddress' + residency_address: + description: The cardholder's residency address. If this value is not provided, the cardholder's billing address will be used by default instead. + $ref: '#/components/schemas/IssuingAddress' + reference: + $ref: '#/components/schemas/IssuingReference' + client_id: + $ref: '#/components/schemas/IssuingClientId' + account_entity_id: + description: The unique identifier of the entity that holds the cardholder's currency account. + allOf: # This is a workaround to support ref sibling, we should remove it once Microsoft.OpenApi support Open API 3.1.0 (https://github.com/microsoft/OpenAPI.NET/issues/795) + - $ref: '#/components/schemas/IssuingEntityId' + parent_sub_entity_id: + description: The unique identifier of the cardholder's parent sub-entity, if they have one. + allOf: + - $ref: '#/components/schemas/IssuingEntityId' + entity_id: + description: The unique identifier of the cardholder's root client entity. + allOf: + - $ref: '#/components/schemas/IssuingEntityId' + created_date: + type: string + format: datetime + example: "2019-09-10T10:11:12Z" + last_modified_date: + type: string + format: datetime + example: "2019-09-11T10:11:12Z" + _links: + $ref: '#/components/schemas/IssuingCardholderLinks' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cardholders/properties/IssuingCardholderLinks.yaml b/nas_spec/components/schemas/issuing/card-management/cardholders/properties/IssuingCardholderLinks.yaml new file mode 100644 index 000000000..fd1037805 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cardholders/properties/IssuingCardholderLinks.yaml @@ -0,0 +1,19 @@ +type: object +description: The links related to the current cardholder. +minItems: 1 +required: + - self +properties: + self: + type: object + description: The URI to retrieve the cardholder + $ref: '#/components/schemas/IssuingLink' + cards: + type: object + description: The URI to add or retrieve the cards issued to the cardholder + $ref: '#/components/schemas/IssuingLink' +example: + self: + href: "https://api.checkout.com/issuing/cardholders/crh_d3ozhf43pcq2xbldn2g45qnb44" + cards: + href: "https://api.checkout.com/issuing/cards" \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/get-response/3ds-enrollment-get-response.yaml b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/get-response/3ds-enrollment-get-response.yaml new file mode 100644 index 000000000..65e423f20 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/get-response/3ds-enrollment-get-response.yaml @@ -0,0 +1,23 @@ +type: object +description: The card's 3DS enrollment details. +required: + - locale + - phone_number + - created_date + - last_modified_date +properties: + locale: + $ref: '#/components/schemas/3dsLocale' + phone_number: + $ref: '#/components/schemas/3dsPhoneNumber' + created_date: + type: string + format: datetime + example: "2019-09-10T10:11:12Z" + last_modified_date: + type: string + format: datetime + example: "2019-09-11T10:11:12Z" + _links: + allOf: + - $ref: '#/components/schemas/3dsLink' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/patch/3ds-enrollment-patch-request.yaml b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/patch/3ds-enrollment-patch-request.yaml new file mode 100644 index 000000000..266569fa4 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/patch/3ds-enrollment-patch-request.yaml @@ -0,0 +1,10 @@ +type: object +properties: + security_pair: + $ref: '#/components/schemas/3dsSecurityPair' + password: + $ref: '#/components/schemas/3dsPassword' + locale: + $ref: '#/components/schemas/3dsLocale' + phone_number: + $ref: '#/components/schemas/3dsPhoneNumber' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/patch/3ds-enrollment-patch-response.yaml b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/patch/3ds-enrollment-patch-response.yaml new file mode 100644 index 000000000..11d7942c2 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/patch/3ds-enrollment-patch-response.yaml @@ -0,0 +1,12 @@ +type: object +description: The card's 3DS authentication details. +required: + - last_modified_date +properties: + last_modified_date: + type: string + format: datetime + example: "2019-09-11T10:11:12Z" + _links: + allOf: + - $ref: '#/components/schemas/3dsLink' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/post/3ds-enrollment-post-response.yaml b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/post/3ds-enrollment-post-response.yaml new file mode 100644 index 000000000..abfae77ca --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/post/3ds-enrollment-post-response.yaml @@ -0,0 +1,12 @@ +type: object +description: The card's 3DS authentication details. +required: + - created_date +properties: + created_date: + type: string + format: datetime + example: "2019-09-10T10:11:12Z" + _links: + allOf: + - $ref: '#/components/schemas/3dsLink' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/3dsLink.yaml b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/3dsLink.yaml new file mode 100644 index 000000000..0b6a75c01 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/3dsLink.yaml @@ -0,0 +1,13 @@ +type: object +description: The link to the card's 3DS enrollment details. +minItems: 1 +required: + - self +properties: + self: + type: object + $ref: '#/components/schemas/IssuingLink' + description: The URI to retrieve the card's 3DS enrollment details. +example: + self: + href: "https://api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491/3ds-enrollment" diff --git a/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/3dsLocale.yaml b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/3dsLocale.yaml new file mode 100644 index 000000000..efe8044f6 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/3dsLocale.yaml @@ -0,0 +1,11 @@ +type: string +enum: [en-US, fr-FR] +description: | + The card's locale, as one of the possible ISO 639-2 formatted enum values. + + The locale determines the language that text messages and 3DS challenge prompts are displayed to the user in, as well as the format used for amounts and dates. +format: language-COUNTRY +example: en-US +pattern: ^[a-z]{2}-[A-Z]{2}$ +maxLength: 5 +minLength: 5 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/3dsPassword.yaml b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/3dsPassword.yaml new file mode 100644 index 000000000..81cc8ddfa --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/3dsPassword.yaml @@ -0,0 +1,11 @@ +type: string +description: | + The case-sensitive password used to support knowledge-based 3DS authentication. + + Leading and trailing white spaces will be ignored. +maxLength: 30 +minLength: 4 +pattern: ^[a-zA-Z0-9àÀáÁâÂäÄçÇèÈéÉêÊëËìÌíÍîÎïÏñÑòÒóÓôÔõÕöÖùÙúÚûÛüÜýÝ+-*/%()=?!~#'\",;:$&\\s\\.]+$ +example: Xtui43FvfiZ + + diff --git a/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/3dsPhoneNumber.yaml b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/3dsPhoneNumber.yaml new file mode 100644 index 000000000..148c482b7 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/3dsPhoneNumber.yaml @@ -0,0 +1,18 @@ +type: object +description: | + The phone number to send the one-time password (OTP) for 3DS authentication to. + + This phone number is independent of the cardholder's phone number on file. +properties: + country_code: + type: string + description: The phone number's international country calling code. + minLength: 1 + maxLength: 7 + example: "+1" + number: + type: string + description: The phone number. + minLength: 6 + maxLength: 25 + example: 415 555 2671 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/3dsSecurityPair.yaml b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/3dsSecurityPair.yaml new file mode 100644 index 000000000..ba224d232 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/3dsSecurityPair.yaml @@ -0,0 +1,26 @@ +type: object +description: | + The question and answer security pair used to support knowledge-based 3DS authentication. + + Security pairs are set per-card, not per-cardholder. +required: + - question + - answer +properties: + question: + type: string + description: The cardholder’s security question. + pattern: ^[a-zA-Z0-9àÀáÁâÂäÄçÇèÈéÉêÊëËìÌíÍîÎïÏñÑòÒóÓôÔõÕöÖùÙúÚûÛüÜýÝ+-*/%()=?!~#'\",;:$&\\s\\.]{4,45}$ + maxLength: 45 + minLength: 4 + example: Who are you? + answer: + type: string + description: | + The cardholder’s answer to the security question. + + The answer is not case-sensitive. Leading and trailing white spaces will be ignored. + pattern: ^[a-zA-Z0-9àÀáÁâÂäÄçÇèÈéÉêÊëËìÌíÍîÎïÏñÑòÒóÓôÔõÕöÖùÙúÚûÛüÜýÝ+-*/%()=?!~#'\",;:$&\\s\\.]{4,30}$ + maxLength: 30 + minLength: 4 + example: Bond. James Bond. \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/Password.yaml b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/Password.yaml new file mode 100644 index 000000000..2b48c4304 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/Password.yaml @@ -0,0 +1,12 @@ +type: object +required: + - password + - locale + - phone_number +properties: + password: + $ref: '#/components/schemas/3dsPassword' + locale: + $ref: '#/components/schemas/3dsLocale' + phone_number: + $ref: '#/components/schemas/3dsPhoneNumber' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/security_question.yaml b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/security_question.yaml new file mode 100644 index 000000000..3552ff06d --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/3ds-authentication/properties/security_question.yaml @@ -0,0 +1,12 @@ +type: object +required: + - security_pair + - locale + - phone_number +properties: + security_pair: + $ref: '#/components/schemas/3dsSecurityPair' + locale: + $ref: '#/components/schemas/3dsLocale' + phone_number: + $ref: '#/components/schemas/3dsPhoneNumber' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/activate-card/activate-card-response.yaml b/nas_spec/components/schemas/issuing/card-management/cards/activate-card/activate-card-response.yaml new file mode 100644 index 000000000..b2c177c17 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/activate-card/activate-card-response.yaml @@ -0,0 +1,5 @@ +type: object +properties: + _links: + allOf: + - $ref: '#/components/schemas/ActivatedCardLinks' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-card-request.yaml b/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-card-request.yaml new file mode 100644 index 000000000..d6badb081 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-card-request.yaml @@ -0,0 +1,29 @@ +type: object +discriminator: + propertyName: type + mapping: + physical: '#/components/schemas/add-physical-card-request' + virtual: '#/components/schemas/add-virtual-card-request' +required: + - type + - cardholder_id +properties: + type: + type: string + description: The card type. + example: virtual + cardholder_id: + $ref: '#/components/schemas/IssuingCardholderId' + lifetime: + $ref: '#/components/schemas/CardLifetime' + reference: + $ref: '#/components/schemas/IssuingReference' + metadata: + description: User's metadata + $ref: '#/components/schemas/IssuingCardMetadata' + revocation_date: + $ref: '#/components/schemas/IssuingRevocationDate' + card_product_id: + description: The card product's unique identifier. This field is required if there are multiple card products associated with the entity. + allOf: + - $ref: '#/components/schemas/IssuingCardProductId' diff --git a/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-card-response.yaml b/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-card-response.yaml new file mode 100644 index 000000000..6cafc2f26 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-card-response.yaml @@ -0,0 +1,42 @@ +type: object +required: + - id + - client_id + - entity_id + - display_name + - last_four + - expiry_month + - expiry_year + - billing_currency + - issuing_country + - created_date +properties: + id: + $ref: '#/components/schemas/IssuingCardId' + client_id: + $ref: '#/components/schemas/IssuingClientId' + entity_id: + $ref: '#/components/schemas/IssuingEntityId' + display_name: + $ref: '#/components/schemas/DisplayName' + last_four: + $ref: '#/components/schemas/LastFour' + expiry_month: + $ref: '#/components/schemas/ExpiryMonth' + expiry_year: + $ref: '#/components/schemas/ExpiryYear' + billing_currency: + $ref: '#/components/schemas/IssuingCurrency' + issuing_country: + $ref: '#/components/schemas/IssuingCountry' + reference: + $ref: '#/components/schemas/IssuingReference' + created_date: + type: string + format: datetime + example: "2019-09-10T10:11:12Z" + credentials: + $ref: '#/components/schemas/Credentials' + _links: + allOf: + - $ref: '#/components/schemas/CardLinks' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-physical-card-request.yaml b/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-physical-card-request.yaml new file mode 100644 index 000000000..087aedfda --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-physical-card-request.yaml @@ -0,0 +1,19 @@ +type: object +allOf: + - $ref: '#/components/schemas/add-card-request' + - type: object + properties: + display_name: + $ref: '#/components/schemas/DisplayName' + shipping_instructions: + $ref: '#/components/schemas/IssuingShippingInstruction' + activate_card: + type: bool + default: false + description: | + Sets whether to activate the newly created card upon creation. + + If set to `false`, the cardholder will not be able to process transactions until you activate the card. +required: + - shipping_instructions + - display_name diff --git a/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-virtual-card-control-mcc-limit-request.yaml b/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-virtual-card-control-mcc-limit-request.yaml new file mode 100644 index 000000000..245777aab --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-virtual-card-control-mcc-limit-request.yaml @@ -0,0 +1,9 @@ +type: object +allOf: + - $ref: '#/components/schemas/add-virtual-card-control-request' + - type: object + properties: + mcc_limit: + $ref: '#/components/schemas/MccLimit' +required: + - mcc_limit diff --git a/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-virtual-card-control-mid-limit-request.yaml b/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-virtual-card-control-mid-limit-request.yaml new file mode 100644 index 000000000..a466d39e1 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-virtual-card-control-mid-limit-request.yaml @@ -0,0 +1,9 @@ +type: object +allOf: + - $ref: '#/components/schemas/add-virtual-card-control-request' + - type: object + properties: + mid_limit: + $ref: '#/components/schemas/MidLimit' +required: + - mid_limit diff --git a/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-virtual-card-control-request.yaml b/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-virtual-card-control-request.yaml new file mode 100644 index 000000000..abe31ee15 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-virtual-card-control-request.yaml @@ -0,0 +1,17 @@ +type: object +description: The control to create. +discriminator: + propertyName: control_type + mapping: + velocity_limit: '#/components/schemas/add-virtual-card-control-velocity-limit-request' + mcc_limit: '#/components/schemas/add-virtual-card-control-mcc-limit-request' + mid_limit: '#/components/schemas/add-virtual-card-control-mid-limit-request' +required: + - control_type +properties: + description: + type: string + maxLength: 256 + description: A description for the control. + control_type: + $ref: '#/components/schemas/IssuingControlType' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-virtual-card-control-velocity-limit-request.yaml b/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-virtual-card-control-velocity-limit-request.yaml new file mode 100644 index 000000000..eaa760392 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-virtual-card-control-velocity-limit-request.yaml @@ -0,0 +1,9 @@ +type: object +allOf: + - $ref: '#/components/schemas/add-virtual-card-control-request' + - type: object + properties: + velocity_limit: + $ref: '#/components/schemas/VelocityLimit' +required: + - velocity_limit diff --git a/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-virtual-card-request.yaml b/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-virtual-card-request.yaml new file mode 100644 index 000000000..30a6fc28c --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/add-card/add-virtual-card-request.yaml @@ -0,0 +1,56 @@ +type: object +allOf: + - $ref: '#/components/schemas/add-card-request' + - type: object + properties: + display_name: + $ref: '#/components/schemas/DisplayName' + is_single_use: + type: bool + description: Sets whether the virtual card should expire after a single use. + default: false + activate_card: + type: bool + default: true + description: | + Sets whether to activate the newly created card upon creation. + + If set to `false`, the cardholder will not be able to process transactions until you activate the card. + return_credentials: + type: array + items: + type: string + enum: + - number + - cvc2 + description: | + The credentials to retrieve on card creation. + example: ["number","cvc2"] + controls: + type: array + description: The controls that will be set on the card. + items: + $ref: '#/components/schemas/add-virtual-card-control-request' + example: + [ + { + "description": "50 euros daily", + "control_type": "velocity_limit", + "velocity_limit": { + "amount_limit": 5000, + "velocity_window": { + "type": "daily" + } + } + }, + { + "description": "Block gambling", + "control_type": "mcc_limit", + "mcc_limit": { + "type": "block", + "mcc_list": [ + "7995" + ] + } + } + ] \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/add-card/properties/DisplayName.yaml b/nas_spec/components/schemas/issuing/card-management/cards/add-card/properties/DisplayName.yaml new file mode 100644 index 000000000..47963d88c --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/add-card/properties/DisplayName.yaml @@ -0,0 +1,6 @@ +type: string +pattern: ^[0-9a-zA-Z'- ]{2,26}$ +minLength: 2 +maxLength: 26 +example: JOHN KENNEDY +description: The name to display on the card. \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/get-card/get-card-response.yaml b/nas_spec/components/schemas/issuing/card-management/cards/get-card/get-card-response.yaml new file mode 100644 index 000000000..7ec468548 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/get-card/get-card-response.yaml @@ -0,0 +1,61 @@ +type: object +discriminator: + propertyName: type + mapping: + physical: '#/components/schemas/get-physical-card-response' + virtual: '#/components/schemas/get-virtual-card-response' +required: + - id + - client_id + - entity_id + - cardholder_id + - card_product_id + - last_four + - expiry_month + - expiry_year + - status + - active + - type + - display_name + - billing_currency + - issuing_country +properties: + id: + $ref: '#/components/schemas/IssuingCardId' + client_id: + $ref: '#/components/schemas/IssuingClientId' + entity_id: + $ref: '#/components/schemas/IssuingEntityId' + cardholder_id: + $ref: '#/components/schemas/IssuingCardholderId' + card_product_id: + $ref: '#/components/schemas/IssuingCardProductId' + last_four: + $ref: '#/components/schemas/LastFour' + expiry_month: + $ref: '#/components/schemas/ExpiryMonth' + expiry_year: + $ref: '#/components/schemas/ExpiryYear' + status: + $ref: '#/components/schemas/IssuingStatus' + display_name: + $ref: '#/components/schemas/DisplayName' + type: + $ref: '#/components/schemas/IssuingType' + billing_currency: + $ref: '#/components/schemas/IssuingCurrency' + issuing_country: + $ref: '#/components/schemas/IssuingCountry' + reference: + $ref: '#/components/schemas/IssuingReference' + metadata: + $ref: '#/components/schemas/IssuingCardMetadata' + revocation-date: + $ref: '#/components/schemas/IssuingRevocationDate' + created_date: + $ref: '#/components/schemas/Datetime' + last_modified_date: + $ref: '#/components/schemas/Datetime' + _links: + allOf: + - $ref: '#/components/schemas/CardLinks' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/get-card/get-physical-card-response.yaml b/nas_spec/components/schemas/issuing/card-management/cards/get-card/get-physical-card-response.yaml new file mode 100644 index 000000000..cae11b293 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/get-card/get-physical-card-response.yaml @@ -0,0 +1,4 @@ +type: object +allOf: + - $ref: '#/components/schemas/get-card-response' + - type: object diff --git a/nas_spec/components/schemas/issuing/card-management/cards/get-card/get-virtual-card-response.yaml b/nas_spec/components/schemas/issuing/card-management/cards/get-card/get-virtual-card-response.yaml new file mode 100644 index 000000000..5d60b9632 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/get-card/get-virtual-card-response.yaml @@ -0,0 +1,9 @@ +type: object +allOf: + - $ref: '#/components/schemas/get-card-response' + - type: object + properties: + is_single_use: + type: bool + description: Specifies whether the virtual card is set to expire after a single use. + default: false \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/get-cardholder-cards/get-cardholder-cards-response.yaml b/nas_spec/components/schemas/issuing/card-management/cards/get-cardholder-cards/get-cardholder-cards-response.yaml new file mode 100644 index 000000000..1f426754b --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/get-cardholder-cards/get-cardholder-cards-response.yaml @@ -0,0 +1,9 @@ +type: object +required: + - cards +properties: + cards: + type: array + description: The list of cards associated with the specified cardholder. + items: + $ref: '#/components/schemas/get-card-response' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/properties/ActivatedCardLinks.yaml b/nas_spec/components/schemas/issuing/card-management/cards/properties/ActivatedCardLinks.yaml new file mode 100644 index 000000000..3475b3850 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/properties/ActivatedCardLinks.yaml @@ -0,0 +1,27 @@ +type: object +description: The links related to the card. +minItems: 1 +required: + - self + - credentials + - revoke +properties: + self: + type: object + $ref: '#/components/schemas/IssuingLink' + description: The URI to retrieve the card's details. + revoke: + type: object + $ref: '#/components/schemas/IssuingLink' + description: The URI to revoke the card. + suspend: + type: object + $ref: '#/components/schemas/IssuingLink' + description: The URI to suspend the card. +example: + self: + href: "https://api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491" + revoke: + href: "https://api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491/revoke" + suspend: + href: "https://api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491/suspend" diff --git a/nas_spec/components/schemas/issuing/card-management/cards/properties/CVC2.yaml b/nas_spec/components/schemas/issuing/card-management/cards/properties/CVC2.yaml new file mode 100644 index 000000000..667ecef01 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/properties/CVC2.yaml @@ -0,0 +1,6 @@ +type: string +minimum: 3 +maximum: 3 +pattern: ^[0-9]{3}$ +description: The card's verification code, also known as the CVV or CVC2. +example: 604 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/properties/CardLifetime.yaml b/nas_spec/components/schemas/issuing/card-management/cards/properties/CardLifetime.yaml new file mode 100644 index 000000000..3d4ac40c7 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/properties/CardLifetime.yaml @@ -0,0 +1,26 @@ +type: object +description: | + The duration of time during which the card will accept incoming authorizations. + + The `unit` and `value` combination you supply will determine the card's expiry date from the date of issue. For example, to set the card to expire in a year and a half, pass the following: + ``` + { + "lifetime": { + "unit": "months", + "value": "18" + } + } + ``` +required: + - value +properties: + unit: + type: string + enum: [Months, Years] + description: The unit of time to specify the card lifetime's in. + example: Months + default: Years + value: + type: integer + description: The length of time before the card will expire, in the `unit` of time specified. + example: 6 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/properties/CardLink.yaml b/nas_spec/components/schemas/issuing/card-management/cards/properties/CardLink.yaml new file mode 100644 index 000000000..45e05b79b --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/properties/CardLink.yaml @@ -0,0 +1,20 @@ +type: object +description: The links related to the card. +minItems: 1 +required: + - self + - controls +properties: + self: + type: object + $ref: '#/components/schemas/IssuingLink' + description: The URI to retrieve the card's details. + controls: + type: object + $ref: '#/components/schemas/IssuingLink' + description: The URI to retrieve the card's controls. +example: + self: + href: "https://api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491" + controls: + href: "https://api.checkout.com/issuing/controls?target_id=crd_fa6psq42dcdd6fdn5gifcq1491" \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/properties/CardLinks.yaml b/nas_spec/components/schemas/issuing/card-management/cards/properties/CardLinks.yaml new file mode 100644 index 000000000..f6a138530 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/properties/CardLinks.yaml @@ -0,0 +1,34 @@ +type: object +description: The links related to the card. +minItems: 1 +required: + - self + - credentials + - revoke + - controls +properties: + self: + type: object + $ref: '#/components/schemas/IssuingLink' + description: The URI to retrieve the card's details. + credentials: + type: object + $ref: '#/components/schemas/IssuingLink' + description: The URI to retrieve the card's credentials. + revoke: + type: object + $ref: '#/components/schemas/IssuingLink' + description: The URI to revoke the card. + controls: + type: object + $ref: '#/components/schemas/IssuingLink' + description: The URI to retrieve the card's controls. +example: + self: + href: "https://api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491" + credentials: + href: "https://api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491/credentials" + revoke: + href: "https://api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491/revoke" + controls: + href: "https://api.checkout.com/issuing/controls?target_id=crd_fa6psq42dcdd6fdn5gifcq1491" diff --git a/nas_spec/components/schemas/issuing/card-management/cards/properties/CardNumber.yaml b/nas_spec/components/schemas/issuing/card-management/cards/properties/CardNumber.yaml new file mode 100644 index 000000000..7e6763b9e --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/properties/CardNumber.yaml @@ -0,0 +1,7 @@ +type: string +format: pan +description: The unencrypted card number. +pattern: ^[0-9]{16}$ +minLength: 16 +maxLength: 16 +example: 4242424242424242 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/properties/Credentials.yaml b/nas_spec/components/schemas/issuing/card-management/cards/properties/Credentials.yaml new file mode 100644 index 000000000..5f69dbaf2 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/properties/Credentials.yaml @@ -0,0 +1,7 @@ +type: object +properties: + number: + $ref: '#/components/schemas/CardNumber' + cvc2: + $ref: '#/components/schemas/CVC2' + \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/properties/DigitalCardLinks.yaml b/nas_spec/components/schemas/issuing/card-management/cards/properties/DigitalCardLinks.yaml new file mode 100644 index 000000000..ceee089cc --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/properties/DigitalCardLinks.yaml @@ -0,0 +1,13 @@ +type: object +description: The links related to the digital card. +minItems: 1 +required: + - self +properties: + self: + type: object + $ref: '#/components/schemas/IssuingLink' + description: The URI to retrieve the digital card's details. +example: + self: + href: "https://api.checkout.com/issuing/digital-cards/dcr_5ngxzsynm2me3oxf73esbhda6q" \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/properties/DigitalCardType.yaml b/nas_spec/components/schemas/issuing/card-management/cards/properties/DigitalCardType.yaml new file mode 100644 index 000000000..66dc6b39f --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/properties/DigitalCardType.yaml @@ -0,0 +1,10 @@ +description: | + The type of digital card +type: string +enum: + - secure_element + - host_card_emulation + - card_on_file + - e_commerce + - qr_code +example: secure_element diff --git a/nas_spec/components/schemas/issuing/card-management/cards/properties/ExpiryMonth.yaml b/nas_spec/components/schemas/issuing/card-management/cards/properties/ExpiryMonth.yaml new file mode 100644 index 000000000..a1baa3089 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/properties/ExpiryMonth.yaml @@ -0,0 +1,6 @@ +type: integer +format: int32 +description: The card's expiration month. +minimum: 1 +maximum: 12 +example: 5 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/properties/ExpiryYear.yaml b/nas_spec/components/schemas/issuing/card-management/cards/properties/ExpiryYear.yaml new file mode 100644 index 000000000..7d30466f8 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/properties/ExpiryYear.yaml @@ -0,0 +1,6 @@ +type: integer +format: int32 +description: The card's expiration year. +example: 2025 +maxLength: 4 +minLength: 4 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingCardMetadata.yaml b/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingCardMetadata.yaml new file mode 100644 index 000000000..08ee16043 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingCardMetadata.yaml @@ -0,0 +1,29 @@ +type: object +description: | + User's metadata +properties: + udf1: + type: string + description: User defined field 1 + pattern: ^[.*]{255}$ + example: metadata1 + udf2: + type: string + description: User defined field 2 + pattern: ^[.*]{255}$ + example: metadata2 + udf3: + type: string + description: User defined field 3 + pattern: ^[.*]{255}$ + example: metadata3 + udf4: + type: string + description: User defined field 4 + pattern: ^[.*]{255}$ + example: metadata4 + udf5: + type: string + description: User defined field 5 + pattern: ^[.*]{255}$ + example: metadata5 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingDevice.yaml b/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingDevice.yaml new file mode 100644 index 000000000..f406a1fae --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingDevice.yaml @@ -0,0 +1,90 @@ +type: object +properties: + id: + type: string + description: The device ID. + example: 04431C7B514E80018306224737548585F11415F67C4E2EB6 + type: + type: string + description: The device type. + enum: + - host_card_emulation + - samsung_phone + - samsung_tablet + - samsung_watch + - samsung_tv + - iphone + - iwatch + - ipad + - mac_book + - android_phone + - android_tablet + - android_watch + - mobile_phone + - tablet + - watch + - mobile_phone_or_tablet + - bracelet + - unknown + example: iphone + manufacturer: + type: string + description: The device manufacturer. + example: ios + brand: + type: string + description: The device brand. + model: + type: string + description: The device model. + os_version: + type: string + description: The device operating system version. + example: "13" + firmware_version: + type: string + description: The device firmware version. + phone_number: + type: string + description: The device phone number. + example: "447505551234" + device_name: + type: string + description: The device name. + example: John's iPhone + device_parent_id: + type: string + description: The device parent ID. + language: + type: string + description: The device language. + serial_number: + type: string + description: The device serial number. + time_zone: + type: string + description: The device time zone. + time_zone_setting: + type: string + description: The device time zone setting. + enum: + - network_set + - consumer_set + example: network_set + sim_serial_number: + type: string + description: The device SIM serial number. + imei: + type: string + description: The device International Mobile Equipment Identity (IMEI) number. + example: "000000000000024" + network_operator: + type: string + description: The device network operator. + network_type: + type: string + description: The device network type. + enum: + - cellular + - wifi + example: wifi \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingDigitalStatus.yaml b/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingDigitalStatus.yaml new file mode 100644 index 000000000..914beb103 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingDigitalStatus.yaml @@ -0,0 +1,12 @@ +description: | + The digital card's current status, which determines whether it can approve incoming authorizations: + + - `inactive`: the default state - authorizations will be declined until the card is activated + - `active`: authorization requests can be approved + - `deleted`: incoming authorization requests will be declined, permanently — the card cannot be reactivated from this state +type: string +enum: + - active + - inactive + - deleted +example: active diff --git a/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingRequestor.yaml b/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingRequestor.yaml new file mode 100644 index 000000000..2ce1ef2f1 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingRequestor.yaml @@ -0,0 +1,10 @@ +type: object +properties: + id: + type: string + description: The requestor ID. + example: "501103353211" + name: + type: string + description: The requestor name. + example: APPLE PAY diff --git a/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingRevocationDate.yaml b/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingRevocationDate.yaml new file mode 100644 index 000000000..df9bcf5e3 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingRevocationDate.yaml @@ -0,0 +1,3 @@ +type: string +description: Date for the card to be automatically revoked. Must be after the current date and date only in the form `yyyy-mm-dd`. +example: "2027-03-12" \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingStatus.yaml b/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingStatus.yaml new file mode 100644 index 000000000..c22df7e2c --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingStatus.yaml @@ -0,0 +1,14 @@ +description: | + The card's current status, which determines whether it can approve incoming authorizations: + + - `inactive`: the default state - authorizations will be declined until the card is activated + - `active`: authorization requests can be approved + - `suspended`: incoming authorization requests will be declined - the card can be reactivated to accept new authorizations + - `revoked`: incoming authorization requests will be permanently declined - the card cannot be reactivated from this state +type: string +enum: + - active + - inactive + - revoked + - suspended +example: active diff --git a/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingType.yaml b/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingType.yaml new file mode 100644 index 000000000..c02632176 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/properties/IssuingType.yaml @@ -0,0 +1,6 @@ +type: string +description: The card type. +enum: + - virtual + - physical +example: virtual \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/properties/LastFour.yaml b/nas_spec/components/schemas/issuing/card-management/cards/properties/LastFour.yaml new file mode 100644 index 000000000..afca93e30 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/properties/LastFour.yaml @@ -0,0 +1,6 @@ +type: string +minimum: 4 +maximum: 4 +pattern: ^[0-9]{4}$ +description: The last four digits of the card number, also known as the PAN. +example: 1234 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/properties/SuspendedCardLinks.yaml b/nas_spec/components/schemas/issuing/card-management/cards/properties/SuspendedCardLinks.yaml new file mode 100644 index 000000000..a52d52ac0 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/properties/SuspendedCardLinks.yaml @@ -0,0 +1,27 @@ +type: object +description: The links related to the card. +minItems: 1 +required: + - self + - credentials + - revoke +properties: + self: + type: object + $ref: '#/components/schemas/IssuingLink' + description: The URI to retrieve the card details. + activate: + type: object + $ref: '#/components/schemas/IssuingLink' + description: The URI to activate the card. + revoke: + type: object + $ref: '#/components/schemas/IssuingLink' + description: The URI to revoke the card. +example: + self: + href: "https://api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491" + activate: + href: "https://api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491/activate" + revoke: + href: "https://api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491/revoke" diff --git a/nas_spec/components/schemas/issuing/card-management/cards/revoke-card/revoke-card-request.yaml b/nas_spec/components/schemas/issuing/card-management/cards/revoke-card/revoke-card-request.yaml new file mode 100644 index 000000000..ef1a8fbe2 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/revoke-card/revoke-card-request.yaml @@ -0,0 +1,10 @@ +type: object +properties: + reason: + description: The reason why the card is being revoked. + type: string + enum: + - expired + - reported_lost + - reported_stolen + example: reported_lost \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/revoke-card/revoke-card-response.yaml b/nas_spec/components/schemas/issuing/card-management/cards/revoke-card/revoke-card-response.yaml new file mode 100644 index 000000000..db9f42a3c --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/revoke-card/revoke-card-response.yaml @@ -0,0 +1,5 @@ +type: object +properties: + _links: + allOf: + - $ref: '#/components/schemas/CardLink' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/schedule-revocation/schedule-revocation-request.yaml b/nas_spec/components/schemas/issuing/card-management/cards/schedule-revocation/schedule-revocation-request.yaml new file mode 100644 index 000000000..d8f481524 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/schedule-revocation/schedule-revocation-request.yaml @@ -0,0 +1,6 @@ +type: object +required: + - revocation_date +properties: + revocation_date: + $ref: '#/components/schemas/IssuingRevocationDate' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/schedule-revocation/schedule-revocation-response.yaml b/nas_spec/components/schemas/issuing/card-management/cards/schedule-revocation/schedule-revocation-response.yaml new file mode 100644 index 000000000..db9f42a3c --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/schedule-revocation/schedule-revocation-response.yaml @@ -0,0 +1,5 @@ +type: object +properties: + _links: + allOf: + - $ref: '#/components/schemas/CardLink' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/suspend-card/suspend-card-request.yaml b/nas_spec/components/schemas/issuing/card-management/cards/suspend-card/suspend-card-request.yaml new file mode 100644 index 000000000..3a772a3a1 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/suspend-card/suspend-card-request.yaml @@ -0,0 +1,9 @@ +type: object +properties: + reason: + description: The reason why the card is being suspended. + type: string + enum: + - suspected_lost + - suspected_stolen + example: suspected_lost \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/cards/suspend-card/suspend-card-response.yaml b/nas_spec/components/schemas/issuing/card-management/cards/suspend-card/suspend-card-response.yaml new file mode 100644 index 000000000..4902906a6 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/cards/suspend-card/suspend-card-response.yaml @@ -0,0 +1,5 @@ +type: object +properties: + _links: + allOf: + - $ref: '#/components/schemas/SuspendedCardLinks' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/digital-cards/get-digital-card/get-digital-card-response.yaml b/nas_spec/components/schemas/issuing/card-management/digital-cards/get-digital-card/get-digital-card-response.yaml new file mode 100644 index 000000000..bacafc2ec --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/digital-cards/get-digital-card/get-digital-card-response.yaml @@ -0,0 +1,31 @@ +type: object +required: + - id + - card_id + - client_id + - entity_id + - last_four + - status + - type +properties: + id: + $ref: '#/components/schemas/IssuingDigitalCardId' + card_id: + $ref: '#/components/schemas/IssuingCardId' + client_id: + $ref: '#/components/schemas/IssuingClientId' + entity_id: + $ref: '#/components/schemas/IssuingEntityId' + last_four: + $ref: '#/components/schemas/LastFour' + status: + $ref: '#/components/schemas/IssuingDigitalStatus' + type: + $ref: '#/components/schemas/DigitalCardType' + requestor: + $ref: '#/components/schemas/IssuingRequestor' + device: + $ref: '#/components/schemas/IssuingDevice' + _links: + allOf: + - $ref: '#/components/schemas/DigitalCardLinks' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/properties/Datetime.yaml b/nas_spec/components/schemas/issuing/card-management/properties/Datetime.yaml new file mode 100644 index 000000000..0ca3750ba --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/properties/Datetime.yaml @@ -0,0 +1,3 @@ +type: string +format: UTC +example: "2021-09-09T19:41:39Z" \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/properties/IssuingAddress.yaml b/nas_spec/components/schemas/issuing/card-management/properties/IssuingAddress.yaml new file mode 100644 index 000000000..996b535de --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/properties/IssuingAddress.yaml @@ -0,0 +1,49 @@ +type: object +required: + - address_line1 + - city + - zip + - country +properties: + address_line1: + type: string + description: The first line of the address. + example: Checkout.com + pattern: ^[a-zA-Z0-9/àáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçčšžÀÁÂÄÃÅĄĆČĖĘÈÉÊËÌÍÎÏĮŁŃÒÓÔÖÕØÙÚÛÜŲŪŸÝŻŹÑßÇŒÆČŠŽ∂ð \-,.'_#:]{1,256}$ + maxLength: 256 + minLength: 1 + address_line2: + type: string + description: The second line of the address. + example: 90 Tottenham Court Road + pattern: ^[a-zA-Z0-9/àáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçčšžÀÁÂÄÃÅĄĆČĖĘÈÉÊËÌÍÎÏĮŁŃÒÓÔÖÕØÙÚÛÜŲŪŸÝŻŹÑßÇŒÆČŠŽ∂ð \-,.'_#:]{1,256}$ + maxLength: 256 + minLength: 1 + city: + type: string + description: The address city. + example: London + pattern: ^[a-zA-ZàáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçčšžÀÁÂÄÃÅĄĆČĖĘÈÉÊËÌÍÎÏĮŁŃÒÓÔÖÕØÙÚÛÜŲŪŸÝŻŹÑßÇŒÆČŠŽ∂ð ,.'\-]{1,128}$ + maxLength: 128 + minLength: 1 + state: + type: string + description: The address state. + example: London + pattern: ^[a-zA-ZàáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçčšžÀÁÂÄÃÅĄĆČĖĘÈÉÊËÌÍÎÏĮŁŃÒÓÔÖÕØÙÚÛÜŲŪŸÝŻŹÑßÇŒÆČŠŽ∂ð ,.'\-]{1,128}$ + maxLength: 128 + minLength: 1 + zip: + type: string + description: The address zip code, or postal code. + example: W1T 4TJ + pattern: ^[0-9a-zA-Z ]{1,10}$ + maxLength: 10 + minLength: 1 + country: + type: string + description: The address country, as an ISO country code. + example: GB + pattern: ^[A-Z]{2}$ + maxLength: 2 + minLength: 2 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/properties/IssuingCardId.yaml b/nas_spec/components/schemas/issuing/card-management/properties/IssuingCardId.yaml new file mode 100644 index 000000000..f5c3d67ee --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/properties/IssuingCardId.yaml @@ -0,0 +1,6 @@ +type: string +pattern: "^crd_[a-z0-9]{26}$" +description: The card's unique identifier. +maxLength: 30 +minLength: 30 +example: crd_fa6psq242dcd6fdn5gifcq1491 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/properties/IssuingCardProductId.yaml b/nas_spec/components/schemas/issuing/card-management/properties/IssuingCardProductId.yaml new file mode 100644 index 000000000..3a3a219bf --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/properties/IssuingCardProductId.yaml @@ -0,0 +1,6 @@ +type: string +pattern: "^pro_[a-z0-9]{26}$" +description: The card product's unique identifier. +maxLength: 30 +minLength: 30 +example: pro_7syjig3jq3mezlc3vjrdpfitl4 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/properties/IssuingCardholderId.yaml b/nas_spec/components/schemas/issuing/card-management/properties/IssuingCardholderId.yaml new file mode 100644 index 000000000..3ae9faa7a --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/properties/IssuingCardholderId.yaml @@ -0,0 +1,6 @@ +type: string +pattern: "^crh_[a-z0-9]{26}$" +description: The cardholder's unique identifier. +maxLength: 30 +minLength: 30 +example: crh_d3ozhf43pcq2xbldn2g45qnb44 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/properties/IssuingClientId.yaml b/nas_spec/components/schemas/issuing/card-management/properties/IssuingClientId.yaml new file mode 100644 index 000000000..faff6e0c4 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/properties/IssuingClientId.yaml @@ -0,0 +1,6 @@ +type: string +pattern: "^cli_[a-z0-9]{26}$" +description: The client's unique identifier. +maxLength: 30 +minLength: 30 +example: cli_vkuhvk4vjn2edkps7dfsq6emqm \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/properties/IssuingCountry.yaml b/nas_spec/components/schemas/issuing/card-management/properties/IssuingCountry.yaml new file mode 100644 index 000000000..bead6427a --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/properties/IssuingCountry.yaml @@ -0,0 +1,5 @@ +type: string +description: The issuing country, as a two-letter ISO country code. +example: US +maxLength: 2 +minLength: 2 diff --git a/nas_spec/components/schemas/issuing/card-management/properties/IssuingCurrency.yaml b/nas_spec/components/schemas/issuing/card-management/properties/IssuingCurrency.yaml new file mode 100644 index 000000000..f99176d65 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/properties/IssuingCurrency.yaml @@ -0,0 +1,7 @@ +type: string +description: The issuing currency, as a three-letter ISO currency code. +format: ISO4217 +example: USD +pattern: ^[a-zA-Z]{3}$ +maxLength: 3 +minLength: 3 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/properties/IssuingDigitalCardId.yaml b/nas_spec/components/schemas/issuing/card-management/properties/IssuingDigitalCardId.yaml new file mode 100644 index 000000000..66ae5742f --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/properties/IssuingDigitalCardId.yaml @@ -0,0 +1,6 @@ +type: string +pattern: "^dcr_[a-z0-9]{26}$" +description: The digital card's unique identifier. +maxLength: 30 +minLength: 30 +example: dcr_5ngxzsynm2me3oxf73esbhda6q \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/properties/IssuingEmail.yaml b/nas_spec/components/schemas/issuing/card-management/properties/IssuingEmail.yaml new file mode 100644 index 000000000..d26bb82c3 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/properties/IssuingEmail.yaml @@ -0,0 +1,9 @@ +type: string +format: email +description: | + The cardholder's email. + + Emails are validated against the rfc6530 standard. +example: john.kennedy@myemaildomain.com +minLength: 3 +maxLength: 254 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/properties/IssuingEntityId.yaml b/nas_spec/components/schemas/issuing/card-management/properties/IssuingEntityId.yaml new file mode 100644 index 000000000..6eb249811 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/properties/IssuingEntityId.yaml @@ -0,0 +1,6 @@ +type: string +pattern: "^ent_[a-z0-9]{26}$" +description: The entity's unique identifier. +maxLength: 30 +minLength: 30 +example: ent_fa6psq242dcd6fdn5gifcq1491 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/properties/IssuingLink.yaml b/nas_spec/components/schemas/issuing/card-management/properties/IssuingLink.yaml new file mode 100644 index 000000000..ec5bc10c3 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/properties/IssuingLink.yaml @@ -0,0 +1,7 @@ +type: object +properties: + href: + description: The link URL. + type: string +required: + - href \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/properties/IssuingPhoneNumber.yaml b/nas_spec/components/schemas/issuing/card-management/properties/IssuingPhoneNumber.yaml new file mode 100644 index 000000000..0101f23b8 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/properties/IssuingPhoneNumber.yaml @@ -0,0 +1,15 @@ +type: object +description: The cardholder's phone number. +properties: + country_code: + type: string + description: The international country calling code. + minLength: 1 + maxLength: 7 + example: "+1" + number: + type: string + description: The phone number. + minLength: 6 + maxLength: 25 + example: 415 555 2671 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/properties/IssuingReference.yaml b/nas_spec/components/schemas/issuing/card-management/properties/IssuingReference.yaml new file mode 100644 index 000000000..014c26566 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/properties/IssuingReference.yaml @@ -0,0 +1,4 @@ +type: string +description: Your reference. +example: X-123456-N11 +maxLength: 256 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/properties/IssuingShippingInstruction.yaml b/nas_spec/components/schemas/issuing/card-management/properties/IssuingShippingInstruction.yaml new file mode 100644 index 000000000..67fac624d --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/properties/IssuingShippingInstruction.yaml @@ -0,0 +1,22 @@ +type: object +required: + - shipping_recipient + - shipping_address +properties: + shipping_recipient: + type: string + description: The name of the person the card will be shipped to. + minLength: 1 + maxLength: 256 + example: john kennedy + shipping_address: + $ref: '#/components/schemas/IssuingAddress' + description : The address to ship the physical card to. + additional_comment: + description: + type: string + maxLength: 256 + minLength: 1 + + + \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/card-management/properties/IssuingValidationError.yaml b/nas_spec/components/schemas/issuing/card-management/properties/IssuingValidationError.yaml new file mode 100644 index 000000000..87e3bac01 --- /dev/null +++ b/nas_spec/components/schemas/issuing/card-management/properties/IssuingValidationError.yaml @@ -0,0 +1,13 @@ +type: object +properties: + request_id: + type: string + example: 0HLHPN8802NUF:00000003 + error_type: + type: string + example: request_invalid + error_codes: + type: array + items: + type: string + example: request_body_malformed \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/controls-api/add-control/add-control-request.yaml b/nas_spec/components/schemas/issuing/controls-api/add-control/add-control-request.yaml new file mode 100644 index 000000000..55521c2ce --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/add-control/add-control-request.yaml @@ -0,0 +1,20 @@ +type: object +description: The control to create. +discriminator: + propertyName: control_type + mapping: + velocity_limit: '#/components/schemas/velocity-limit-request' + mcc_limit: '#/components/schemas/mcc-limit-request' + mid_limit: '#/components/schemas/mid-limit-request' +required: + - control_type + - target_id +properties: + description: + type: string + maxLength: 256 + description: A description for the control. + control_type: + $ref: '#/components/schemas/IssuingControlType' + target_id: + $ref: '#/components/schemas/IssuingTargetId' diff --git a/nas_spec/components/schemas/issuing/controls-api/add-control/add-control-response.yaml b/nas_spec/components/schemas/issuing/controls-api/add-control/add-control-response.yaml new file mode 100644 index 000000000..b725d4e7f --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/add-control/add-control-response.yaml @@ -0,0 +1,33 @@ +type: object +description: The control's details. +discriminator: + propertyName: control_type + mapping: + velocity_limit: '#/components/schemas/velocity-limit-response' + mcc_limit: '#/components/schemas/mcc-limit-response' + mid_limit: '#/components/schemas/mid-limit-response' +required: + - id + - control_type + - target_id + - created_date + - last_modified_date +properties: + id: + $ref: '#/components/schemas/IssuingControlId' + description: + type: string + maxLength: 256 + description: A description for the control. + control_type: + $ref: '#/components/schemas/IssuingControlType' + target_id: + $ref: '#/components/schemas/IssuingTargetId' + created_date: + type: string + format: datetime + example: "2023-03-12T18:20:12Z" + last_modified_date: + type: string + format: datetime + example: "2023-03-12T18:20:12Z" diff --git a/nas_spec/components/schemas/issuing/controls-api/add-control/mcc-limit-request.yaml b/nas_spec/components/schemas/issuing/controls-api/add-control/mcc-limit-request.yaml new file mode 100644 index 000000000..ec4fb06c1 --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/add-control/mcc-limit-request.yaml @@ -0,0 +1,11 @@ +type: object +allOf: + - $ref: '#/components/schemas/add-control-request' + - type: object + properties: + mcc_limit: + $ref: '#/components/schemas/MccLimit' + description: + example: Allow the card to be used only in restaurants and supermarkets +required: + - mcc_limit diff --git a/nas_spec/components/schemas/issuing/controls-api/add-control/mcc-limit-response.yaml b/nas_spec/components/schemas/issuing/controls-api/add-control/mcc-limit-response.yaml new file mode 100644 index 000000000..6acfa0941 --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/add-control/mcc-limit-response.yaml @@ -0,0 +1,11 @@ +type: object +allOf: + - $ref: '#/components/schemas/add-control-response' + - type: object + properties: + mcc_limit: + $ref: '#/components/schemas/MccLimit' + description: + example: Allow the card to be used only in restaurants and supermarkets +required: + - mcc_limit diff --git a/nas_spec/components/schemas/issuing/controls-api/add-control/mid-limit-request.yaml b/nas_spec/components/schemas/issuing/controls-api/add-control/mid-limit-request.yaml new file mode 100644 index 000000000..44fb21184 --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/add-control/mid-limit-request.yaml @@ -0,0 +1,11 @@ +type: object +allOf: + - $ref: '#/components/schemas/add-control-request' + - type: object + properties: + mid_limit: + $ref: '#/components/schemas/MidLimit' + description: + example: Allow the card to be used only in AZ Pizza +required: + - mid_limit diff --git a/nas_spec/components/schemas/issuing/controls-api/add-control/mid-limit-response.yaml b/nas_spec/components/schemas/issuing/controls-api/add-control/mid-limit-response.yaml new file mode 100644 index 000000000..19d287e47 --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/add-control/mid-limit-response.yaml @@ -0,0 +1,11 @@ +type: object +allOf: + - $ref: '#/components/schemas/add-control-response' + - type: object + properties: + mid_limit: + $ref: '#/components/schemas/MidLimit' + description: + example: Allow the card to be used only in AZ Pizza +required: + - mid_limit diff --git a/nas_spec/components/schemas/issuing/controls-api/add-control/velocity-limit-request.yaml b/nas_spec/components/schemas/issuing/controls-api/add-control/velocity-limit-request.yaml new file mode 100644 index 000000000..d805a2735 --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/add-control/velocity-limit-request.yaml @@ -0,0 +1,11 @@ +type: object +allOf: + - $ref: '#/components/schemas/add-control-request' + - type: object + properties: + velocity_limit: + $ref: '#/components/schemas/VelocityLimit' + description: + example: Maximum spend of 500€ per week for restaurants +required: + - velocity_limit diff --git a/nas_spec/components/schemas/issuing/controls-api/add-control/velocity-limit-response.yaml b/nas_spec/components/schemas/issuing/controls-api/add-control/velocity-limit-response.yaml new file mode 100644 index 000000000..3aea69138 --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/add-control/velocity-limit-response.yaml @@ -0,0 +1,11 @@ +type: object +allOf: + - $ref: '#/components/schemas/add-control-response' + - type: object + properties: + velocity_limit: + $ref: '#/components/schemas/VelocityLimit' + description: + example: Maximum spend of 500€ per week for restaurants +required: + - velocity_limit diff --git a/nas_spec/components/schemas/issuing/controls-api/get-controls/get-control-mcc-limit-response.yaml b/nas_spec/components/schemas/issuing/controls-api/get-controls/get-control-mcc-limit-response.yaml new file mode 100644 index 000000000..41d1a69e3 --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/get-controls/get-control-mcc-limit-response.yaml @@ -0,0 +1,7 @@ +type: object +allOf: + - $ref: '#/components/schemas/get-control-response' + - type: object + properties: + mcc_limit: + $ref: '#/components/schemas/MccLimit' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/controls-api/get-controls/get-control-mid-limit-response.yaml b/nas_spec/components/schemas/issuing/controls-api/get-controls/get-control-mid-limit-response.yaml new file mode 100644 index 000000000..58a2fc77c --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/get-controls/get-control-mid-limit-response.yaml @@ -0,0 +1,7 @@ +type: object +allOf: + - $ref: '#/components/schemas/get-control-response' + - type: object + properties: + mid_limit: + $ref: '#/components/schemas/MidLimit' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/controls-api/get-controls/get-control-response.yaml b/nas_spec/components/schemas/issuing/controls-api/get-controls/get-control-response.yaml new file mode 100644 index 000000000..37c6c989a --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/get-controls/get-control-response.yaml @@ -0,0 +1,29 @@ +type: object +description: The card control's details. +discriminator: + propertyName: control_type + mapping: + velocity_limit: '#/components/schemas/get-control-velocity-limit-response' + mcc_limit: '#/components/schemas/get-control-mcc-limit-response' + mid_limit: '#/components/schemas/get-control-mid-limit-response' +required: + - id + - target_id + - description + - control_type +properties: + id: + $ref: '#/components/schemas/IssuingControlId' + target_id: + $ref: '#/components/schemas/IssuingTargetId' + description: + type: string + maxLength: 256 + description: A description for the control. + example: Max spend of 500€ per week for restaurants + control_type: + $ref: '#/components/schemas/IssuingControlType' + created_date: + $ref: '#/components/schemas/Datetime' + last_modified_date: + $ref: '#/components/schemas/Datetime' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/controls-api/get-controls/get-control-velocity-limit-response.yaml b/nas_spec/components/schemas/issuing/controls-api/get-controls/get-control-velocity-limit-response.yaml new file mode 100644 index 000000000..df98f79c8 --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/get-controls/get-control-velocity-limit-response.yaml @@ -0,0 +1,7 @@ +type: object +allOf: + - $ref: '#/components/schemas/get-control-response' + - type: object + properties: + velocity_limit: + $ref: '#/components/schemas/VelocityLimit' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/controls-api/get-controls/get-controls-array-response.yaml b/nas_spec/components/schemas/issuing/controls-api/get-controls/get-controls-array-response.yaml new file mode 100644 index 000000000..65ce8985d --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/get-controls/get-controls-array-response.yaml @@ -0,0 +1,10 @@ +type: object +description: The list of card controls applied to the specified card. +required: + - controls +properties: + controls: + type: array + description: The list of card controls applied to the specified card. + items: + $ref: '#/components/schemas/get-control-response' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/controls-api/properties/IssuingControlId.yaml b/nas_spec/components/schemas/issuing/controls-api/properties/IssuingControlId.yaml new file mode 100644 index 000000000..8c85dd0dd --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/properties/IssuingControlId.yaml @@ -0,0 +1,6 @@ +type: string +pattern: "^ctr_[a-z0-9]{26}$" +description: The control's unique identifier. +maxLength: 30 +minLength: 30 +example: ctr_gp7vkmxayztufjz6top5bjcdra \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/controls-api/properties/IssuingControlType.yaml b/nas_spec/components/schemas/issuing/controls-api/properties/IssuingControlType.yaml new file mode 100644 index 000000000..0c05c3d02 --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/properties/IssuingControlType.yaml @@ -0,0 +1,7 @@ +type: string +enum: [velocity_limit, mcc_limit] +description: | + The card control's type. + + A `velocity_limit` determines how much a card can spend over a given period of time. A `mcc_limit` determines the types of businesses a card can process transactions from. An `mid_limit` determines the merchants a card can process transactions from. +example: velocity_limit \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/controls-api/properties/IssuingTargetId.yaml b/nas_spec/components/schemas/issuing/controls-api/properties/IssuingTargetId.yaml new file mode 100644 index 000000000..719c22c48 --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/properties/IssuingTargetId.yaml @@ -0,0 +1,6 @@ +type: string +pattern: ^crd_[a-z0-9]{26}$ +description: The ID of the card to apply the control to. +maxLength: 30 +minLength: 30 +example: crd_fa6psq42dcdd6fdn5gifcq1491 diff --git a/nas_spec/components/schemas/issuing/controls-api/properties/MccLimit.yaml b/nas_spec/components/schemas/issuing/controls-api/properties/MccLimit.yaml new file mode 100644 index 000000000..ee4cd224c --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/properties/MccLimit.yaml @@ -0,0 +1,17 @@ +type: object +description: The merchant category code (MCC) rule, which determines the types of businesses a card can process transactions from. +required: + - mcc_list + - type +properties: + type: + type: string + enum: [allow, block] + description: Sets whether to allow or block the list of MCCs supplied. + example: allow + mcc_list: + type: array + description: The list of MCCs to allow or block transactions from, as 4-digit ISO 18245 codes. + example: ["5932", "5411"] + items: + type: string \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/controls-api/properties/MidLimit.yaml b/nas_spec/components/schemas/issuing/controls-api/properties/MidLimit.yaml new file mode 100644 index 000000000..5c604e50c --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/properties/MidLimit.yaml @@ -0,0 +1,17 @@ +type: object +description: The merchant identification number (MID) rule, which determines the merchants a card can process transactions from. +required: + - mid_list + - type +properties: + type: + type: string + enum: [allow, block] + description: Sets whether to allow or block the list of MIDs supplied. + example: allow + mid_list: + type: array + description: The list of merchant identification numbers (MID) to allow or block transactions from. + example: ["593278", "541114"] + items: + type: string \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/controls-api/properties/VelocityLimit.yaml b/nas_spec/components/schemas/issuing/controls-api/properties/VelocityLimit.yaml new file mode 100644 index 000000000..725885038 --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/properties/VelocityLimit.yaml @@ -0,0 +1,24 @@ +type: object +description: The velocity limit, which determines how much a card can spend over a given period of time. +required: + - velocity_window +properties: + amount_limit: + type: int64 + description: The amount the card can spend, in base units. + example: 5000 + minimum: 0 + velocity_window: + $ref: '#/components/schemas/VelocityWindow' + mcc_list: + type: array + description: The list of merchant category codes (MCCs) that the velocity limit applies to, as 4-digit ISO 18245 codes. + example: ["4121", "4582"] + items: + type: string + mid_list: + type: array + description: The list of merchant identification numbers (MID) to allow or block transactions from. Note that `mcc_list` and `mid_list` cannot be set together. + example: + items: + type: string \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/controls-api/properties/VelocityWindow.yaml b/nas_spec/components/schemas/issuing/controls-api/properties/VelocityWindow.yaml new file mode 100644 index 000000000..2c60b0856 --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/properties/VelocityWindow.yaml @@ -0,0 +1,10 @@ +type: object +description: The period of time over which the card can spend the specified `amount_limit`. +required: + - value +properties: + type: + type: string + enum: [daily, weekly, monthly, all_time] + description: The velocity window's unit of time. + example: weekly \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/controls-api/remove-control/remove-control-response.yaml b/nas_spec/components/schemas/issuing/controls-api/remove-control/remove-control-response.yaml new file mode 100644 index 000000000..6062959af --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/remove-control/remove-control-response.yaml @@ -0,0 +1,7 @@ +type: object +description: The card control's details. +required: + - id +properties: + id: + $ref: '#/components/schemas/IssuingControlId' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/controls-api/update-control/update-control-request.yaml b/nas_spec/components/schemas/issuing/controls-api/update-control/update-control-request.yaml new file mode 100644 index 000000000..00ba5b48c --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/update-control/update-control-request.yaml @@ -0,0 +1,17 @@ +type: object +description: | + The card control to update. + + You can only update one control per request. +properties: + description: + type: string + maxLength: 256 + description: A description for the control. + example: Max spend of 500€ per week for restaurants + velocity_limit: + $ref: '#/components/schemas/VelocityLimit' + mcc_limit: + $ref: '#/components/schemas/MccLimit' + mid_limit: + $ref: '#/components/schemas/MidLimit' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/controls-api/update-control/update-control-response.yaml b/nas_spec/components/schemas/issuing/controls-api/update-control/update-control-response.yaml new file mode 100644 index 000000000..612ba9768 --- /dev/null +++ b/nas_spec/components/schemas/issuing/controls-api/update-control/update-control-response.yaml @@ -0,0 +1,30 @@ +type: object +description: The card control's details. +discriminator: + propertyName: control_type + mapping: + velocity_limit: '#/components/schemas/velocity-limit-response' + mcc_limit: '#/components/schemas/mcc-limit-response' + mid_limit: '#/components/schemas/mid-limit-response' +required: + - id + - control_type + - target_id + - created_date + - last_modified_date +properties: + id: + $ref: '#/components/schemas/IssuingControlId' + description: + type: string + maxLength: 256 + description: The description of the control. + example: Max spend of 500€ per week for restaurants + control_type: + $ref: '#/components/schemas/IssuingControlType' + target_id: + $ref: '#/components/schemas/IssuingTargetId' + created_date: + $ref: '#/components/schemas/Datetime' + last_modified_date: + $ref: '#/components/schemas/Datetime' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/transaction-simulator/authorizations/SimulateAuthorizationRequest.yaml b/nas_spec/components/schemas/issuing/transaction-simulator/authorizations/SimulateAuthorizationRequest.yaml new file mode 100644 index 000000000..256e152ce --- /dev/null +++ b/nas_spec/components/schemas/issuing/transaction-simulator/authorizations/SimulateAuthorizationRequest.yaml @@ -0,0 +1,6 @@ +type: object +properties: + card: + $ref: '#/components/schemas/IssuingSimulateCard' + transaction: + $ref: '#/components/schemas/IssuingSimulateTransaction' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/transaction-simulator/authorizations/SimulateAuthorizationResponse.yaml b/nas_spec/components/schemas/issuing/transaction-simulator/authorizations/SimulateAuthorizationResponse.yaml new file mode 100644 index 000000000..32999823c --- /dev/null +++ b/nas_spec/components/schemas/issuing/transaction-simulator/authorizations/SimulateAuthorizationResponse.yaml @@ -0,0 +1,19 @@ +type: object +description: Authorization Response. +required: + - status +properties: + id: + type: string + description: | + The transaction's unique identifier. + + This same ID is carried throughout all authorization, reversal, and clearing messages related to the given transaction. + example: trx_aaqc4uaaybigcaaqc4uaayfiga + status: + type: string + description: The transaction's status. + enum: + - Authorized + - Declined + example: Authorized \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/transaction-simulator/authorizations/SimulateIncrementalAuthorizationRequest.yaml b/nas_spec/components/schemas/issuing/transaction-simulator/authorizations/SimulateIncrementalAuthorizationRequest.yaml new file mode 100644 index 000000000..3e8b15378 --- /dev/null +++ b/nas_spec/components/schemas/issuing/transaction-simulator/authorizations/SimulateIncrementalAuthorizationRequest.yaml @@ -0,0 +1,8 @@ +type: object +properties: + amount: + type: integer + description: | + You must provide the amount in the minor currency unit. + minimum: 0 + example: 3500 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/transaction-simulator/authorizations/SimulateIncrementalAuthorizationResponse.yaml b/nas_spec/components/schemas/issuing/transaction-simulator/authorizations/SimulateIncrementalAuthorizationResponse.yaml new file mode 100644 index 000000000..c90b593b2 --- /dev/null +++ b/nas_spec/components/schemas/issuing/transaction-simulator/authorizations/SimulateIncrementalAuthorizationResponse.yaml @@ -0,0 +1,12 @@ +type: object +description: Authorization Response. +required: + - status +properties: + status: + type: string + description: The transaction's status. + enum: + - Authorized + - Declined + example: Authorized \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/transaction-simulator/clearing/PresentmentRequest.yaml b/nas_spec/components/schemas/issuing/transaction-simulator/clearing/PresentmentRequest.yaml new file mode 100644 index 000000000..a9893f32d --- /dev/null +++ b/nas_spec/components/schemas/issuing/transaction-simulator/clearing/PresentmentRequest.yaml @@ -0,0 +1,10 @@ +type: object +properties: + amount: + type: integer + description: | + The amount to clear. If not specified, the full authorized amount will be cleared. + + You must provide the amount in the minor currency unit. + minimum: 0 + example: 2500 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/transaction-simulator/properties/IssuingAuthorizationTypes.yaml b/nas_spec/components/schemas/issuing/transaction-simulator/properties/IssuingAuthorizationTypes.yaml new file mode 100644 index 000000000..a6c928afd --- /dev/null +++ b/nas_spec/components/schemas/issuing/transaction-simulator/properties/IssuingAuthorizationTypes.yaml @@ -0,0 +1,7 @@ +type: string +enum: + - authorization + - pre_authorization +default: authorization +description: Use `authorization` for a known final amount or `pre_authorization` for an estimated amount. +example: authorization \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/transaction-simulator/properties/IssuingMerchant.yaml b/nas_spec/components/schemas/issuing/transaction-simulator/properties/IssuingMerchant.yaml new file mode 100644 index 000000000..09666ca2e --- /dev/null +++ b/nas_spec/components/schemas/issuing/transaction-simulator/properties/IssuingMerchant.yaml @@ -0,0 +1,10 @@ +type: object +description: The merchant related data to use for the transaction. +properties: + category_code: + type: string + description: > + The merchant category code (MCC), which determines the types of businesses the card can process the transaction from. + example: 7399 + maxLength: 4 + minLength: 4 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/transaction-simulator/properties/IssuingSimulateCard.yaml b/nas_spec/components/schemas/issuing/transaction-simulator/properties/IssuingSimulateCard.yaml new file mode 100644 index 000000000..8bbf81cfa --- /dev/null +++ b/nas_spec/components/schemas/issuing/transaction-simulator/properties/IssuingSimulateCard.yaml @@ -0,0 +1,13 @@ +type: object +description: The card to simulate an authorization with. +required: + - id + - expiry_month + - expiry_year +properties: + id: + $ref: '#/components/schemas/IssuingCardId' + expiry_month: + $ref: '#/components/schemas/ExpiryMonth' + expiry_year: + $ref: '#/components/schemas/ExpiryYear' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/transaction-simulator/properties/IssuingSimulateTransaction.yaml b/nas_spec/components/schemas/issuing/transaction-simulator/properties/IssuingSimulateTransaction.yaml new file mode 100644 index 000000000..8fb74e911 --- /dev/null +++ b/nas_spec/components/schemas/issuing/transaction-simulator/properties/IssuingSimulateTransaction.yaml @@ -0,0 +1,15 @@ +type: object +description: > + The transaction to simulate with the specified card. For example, a purchase. +discriminator: + propertyName: type + mapping: + purchase: '#/components/schemas/Purchase' +required: + - type +properties: + type: + type: string + description: > + The transaction type. + example: 'purchase' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/transaction-simulator/properties/IssuingTransactionId.yaml b/nas_spec/components/schemas/issuing/transaction-simulator/properties/IssuingTransactionId.yaml new file mode 100644 index 000000000..04d825c64 --- /dev/null +++ b/nas_spec/components/schemas/issuing/transaction-simulator/properties/IssuingTransactionId.yaml @@ -0,0 +1,6 @@ +type: string +pattern: "^trx_[a-z0-9]{26}$" +description: The transaction's unique identifier. +maxLength: 30 +minLength: 30 +example: trx_aayhhfwbdyxwcaeyhhfwbd4xga \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/transaction-simulator/properties/Purchase.yaml b/nas_spec/components/schemas/issuing/transaction-simulator/properties/Purchase.yaml new file mode 100644 index 000000000..34d69d28b --- /dev/null +++ b/nas_spec/components/schemas/issuing/transaction-simulator/properties/Purchase.yaml @@ -0,0 +1,25 @@ +type: object +required: + - currency +allOf: + - $ref: '#/components/schemas/IssuingSimulateTransaction' + - type: object + properties: + amount: + type: integer + description: | + The payment amount, in the minor currency unit. + + To perform a card verification, set `amount` to `0`, or omit the field entirely. + minimum: 0 + example: 6540 + currency: + type: string + description: The currency to use for the transaction, as a three-letter ISO currency code. + example: GBP + maxLength: 3 + minLength: 3 + merchant: + $ref: '#/components/schemas/IssuingMerchant' + authorization_type: + $ref: '#/components/schemas/IssuingAuthorizationTypes' \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/transaction-simulator/refunds/SimulateRefundRequest.yaml b/nas_spec/components/schemas/issuing/transaction-simulator/refunds/SimulateRefundRequest.yaml new file mode 100644 index 000000000..f4897a8fd --- /dev/null +++ b/nas_spec/components/schemas/issuing/transaction-simulator/refunds/SimulateRefundRequest.yaml @@ -0,0 +1,10 @@ +type: object +properties: + amount: + type: integer + description: | + The amount to refund. If not specified, the full cleared amount will be refunded. + + The amount must be provided in the minor currency unit. + minimum: 0 + example: 2500 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/transaction-simulator/reversals/ReversalRequest.yaml b/nas_spec/components/schemas/issuing/transaction-simulator/reversals/ReversalRequest.yaml new file mode 100644 index 000000000..514114f8f --- /dev/null +++ b/nas_spec/components/schemas/issuing/transaction-simulator/reversals/ReversalRequest.yaml @@ -0,0 +1,10 @@ +type: object +properties: + amount: + type: integer + description: | + The amount to reverse. If unspecified, the full transaction amount will be reversed. + + You must provide the amount in the minor currency unit. + minimum: 0 + example: 2500 \ No newline at end of file diff --git a/nas_spec/components/schemas/issuing/transaction-simulator/reversals/ReversalResponse.yaml b/nas_spec/components/schemas/issuing/transaction-simulator/reversals/ReversalResponse.yaml new file mode 100644 index 000000000..ce063e24b --- /dev/null +++ b/nas_spec/components/schemas/issuing/transaction-simulator/reversals/ReversalResponse.yaml @@ -0,0 +1,12 @@ +type: object +description: Reversal Response. +required: + - status +properties: + status: + type: string + description: The status of the transaction (either Reversed or Declined). + enum: + - Reversed + - Declined + example: Reversed \ No newline at end of file diff --git a/nas_spec/components/securitySchemes/ApiPublicKey.yaml b/nas_spec/components/securitySchemes/ApiPublicKey.yaml new file mode 100644 index 000000000..b29178bdc --- /dev/null +++ b/nas_spec/components/securitySchemes/ApiPublicKey.yaml @@ -0,0 +1,14 @@ +description: | + Public keys are used for client-side authentication, and should only be used in JavaScript or native applications. + + #### Format + + - Sandbox `pk_sbox_xxxxxxxxxxxxxxxxxxxxxxxxxx` + + - Production `pk_xxxxxxxxxxxxxxxxxxxxxxxxxx` + + When specifying your public key in the Authorization header, you must include the `Bearer` prefix. For example, `Bearer {{public API key}}`. +name: Authorization +type: apiKey +in: header +x-cko-type: publicKey \ No newline at end of file diff --git a/nas_spec/components/securitySchemes/ApiSecretKey.yaml b/nas_spec/components/securitySchemes/ApiSecretKey.yaml new file mode 100644 index 000000000..0fa3d2181 --- /dev/null +++ b/nas_spec/components/securitySchemes/ApiSecretKey.yaml @@ -0,0 +1,28 @@ +description: | + You can use your secret API key in the Authorization header of your API requests for supported endpoints. + + #### Format + + - Sandbox `sk_sbox_xxxxxxxxxxxxxxxxxxxxxxxxxx` + + - Production `sk_xxxxxxxxxxxxxxxxxxxxxxxxxx` + + ``` + curl --location --request POST 'https://api.checkout.com/payments' \ + --header 'Content-Type: application/json' \ + --header 'Accept: application/json' \ + --header 'Authorization: Bearer {{AccessToken}}' \ + --data-raw '{ + "amount": 10000, + "currency": "USD", + "reference": "Visa-USD-Test", + ... + }' + ``` + + When specifying your secret key in the Authorization header, you must include the `Bearer ` prefix. For example, `Bearer {{secret API key}}`. + +name: Authorization +type: apiKey +in: header +x-cko-type: secretKey diff --git a/nas_spec/components/securitySchemes/OAuth.yaml b/nas_spec/components/securitySchemes/OAuth.yaml new file mode 100644 index 000000000..21686b867 --- /dev/null +++ b/nas_spec/components/securitySchemes/OAuth.yaml @@ -0,0 +1,80 @@ +type: oauth2 +description: | + Your OAuth credentials consist of an access key ID and an access key secret (corresponding to OAuth 2.0 client ID and client secret). You can exchange these for an access token by calling the [request an access token](#tag/Access/paths/~1connect~1token/post) endpoint. + You will need to authenticate using basic authentication, using your access key ID and access key secret as your username and password: + + ``` + curl --location --request POST 'https://access.checkout.com/connect/token' \ + --header 'Content-Type: application/x-www-form-urlencoded' \ + --header 'Authorization: Basic dGVzdC1hY2Nlc3Mta2V5LWlkOnRlc3QtYWNjZXNzLWtleS1zZWNyZXQ=' \ + --data-urlencode 'grant_type=client_credentials' \ + --data-urlencode 'scope=gateway' + ``` + + The token server will return a Bearer `access_token` in JSON Web Token (JWT) format which you should use in the `Authorization` + header of your API requests: + + ``` + curl --location --request POST 'https://api.checkout.com/payments' \ + --header 'Content-Type: application/json' \ + --header 'Accept: application/json' \ + --header 'Authorization: Bearer {{AccessToken}}' \ + --data-raw '{ + "amount": 10000, + "currency": "USD", + "reference": "Visa-USD-Test", + ... + }' + ``` + + Your access token will be valid for a length of time (in seconds) indicated by the `expires_in` field in the response. When it expires, you'll need to request a new one. + + Depending on the Environment against which you're making your requests against you'll need to request the token from a different Authorization Server. + + | Environment | Authorization Server | + |---------------|------------------------------------------------------| + | Sandbox | https://access.sandbox.checkout.com/connect/token | + | Production | https://access.checkout.com/connect/token | + +flows: + clientCredentials: + tokenUrl: string + scopes: + vault: Access to all Vault resources + 'vault:instruments': Create instruments + 'vault:tokenization': Tokenize payment instruments + gateway: Access to all Gateway resources + 'gateway:payment': Request payments + 'gateway:payment-details': Get payment details + 'gateway:payment-authorizations': Increment authorizations + 'gateway:payment-voids': Void payments + 'gateway:payment-captures': Capture payments + 'gateway:payment-refunds': Refund payments + 'fx': Foreign exchange services + 'payouts:bank-details': Get bank details + 'sessions:app': App-based authentication + 'sessions:browser': Browser-based authentication + disputes: Access to all Disputes resources + 'disputes:view': View disputes + 'disputes:provide-evidence': Provide dispute evidence + 'disputes:accept': Accept disputes + accounts: Manage sub-entities + flow: Access to all Flow resources + 'flow:workflows': Manage workflows + 'flow:events': Retrieve events + files: Access to all Files resources + 'files:retrieve': Retrieve files + 'files:upload': Upload files + 'files:download': Download files + balances: Access to all Balances resources + 'balances:view': View balances + transfers: Access to all Transfers resources + 'transfers:view': View transfers + 'transfers:create': Create transfers + middleware: Access to all Middleware resources + 'middleware:merchants-secret': Allows merchant identity and Middleware token exchange from a secure execution environment + 'middleware:merchants-public': Allows merchant identity and Middleware token exchange from an insecure execution environment + reports: Access to all Reports resources + 'reports:view': View reports + financial-actions: Access to all Financial actions resources + 'financial-actions:view': View financial actions diff --git a/nas_spec/components/securitySchemes/SessionSecret.yaml b/nas_spec/components/securitySchemes/SessionSecret.yaml new file mode 100644 index 000000000..dd0cc0694 --- /dev/null +++ b/nas_spec/components/securitySchemes/SessionSecret.yaml @@ -0,0 +1,5 @@ +name: Authorization +type: apiKey +in: header +description: > + A base64 encoded value prefixed with `sek_` that gives access to client-side operations for a single authentication within the Sessions API. This value is returned as the `session_secret` when requesting a session. diff --git a/nas_spec/future/code_samples/Node/event-types/get.js b/nas_spec/future/code_samples/Node/event-types/get.js new file mode 100644 index 000000000..2d22a8df0 --- /dev/null +++ b/nas_spec/future/code_samples/Node/event-types/get.js @@ -0,0 +1,5 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const events = await cko.events.retrieveEventTypes(); diff --git a/nas_spec/future/code_samples/Node/events@{eventId}/get.js b/nas_spec/future/code_samples/Node/events@{eventId}/get.js new file mode 100644 index 000000000..d886a50cd --- /dev/null +++ b/nas_spec/future/code_samples/Node/events@{eventId}/get.js @@ -0,0 +1,5 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const event = await cko.events.retrieveEvent('evt_c2qelfixai2u3es3ksovngkx3e'); diff --git a/nas_spec/future/code_samples/Node/events@{eventId}@notifications@{notificationId}/get.js b/nas_spec/future/code_samples/Node/events@{eventId}@notifications@{notificationId}/get.js new file mode 100644 index 000000000..2bc087028 --- /dev/null +++ b/nas_spec/future/code_samples/Node/events@{eventId}@notifications@{notificationId}/get.js @@ -0,0 +1,8 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const notification = await cko.events.retrieveEventNotification({ + eventId: 'evt_c2qelfixai2u3es3ksovngkx3e', + notificationId: 'ntf_wqjkqpgjy33uxoywcej4fnw6qm', +}); diff --git a/nas_spec/future/code_samples/Node/events@{eventId}@webhooks@retry/post.js b/nas_spec/future/code_samples/Node/events@{eventId}@webhooks@retry/post.js new file mode 100644 index 000000000..d661f77b8 --- /dev/null +++ b/nas_spec/future/code_samples/Node/events@{eventId}@webhooks@retry/post.js @@ -0,0 +1,5 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const retryAll = await cko.events.retryAll('evt_c2qelfixai2u3es3ksovngkx3e'); diff --git a/nas_spec/future/code_samples/Node/events@{eventId}@webhooks@{webhookId}@retry/post.js b/nas_spec/future/code_samples/Node/events@{eventId}@webhooks@{webhookId}@retry/post.js new file mode 100644 index 000000000..1cae1638e --- /dev/null +++ b/nas_spec/future/code_samples/Node/events@{eventId}@webhooks@{webhookId}@retry/post.js @@ -0,0 +1,8 @@ +import { Checkout } from 'checkout-sdk-node'; + +const cko = new Checkout('sk_XXXX'); + +const retry = await cko.events.retry({ + eventId: 'evt_c2qelfixai2u3es3ksovngkx3e', + webhookId: 'wh_mpkyioafmajulnhjvwmrklenb4', +}); diff --git a/nas_spec/future/components/schemas/Files/File.yaml b/nas_spec/future/components/schemas/Files/File.yaml new file mode 100644 index 000000000..0a79c8bb8 --- /dev/null +++ b/nas_spec/future/components/schemas/Files/File.yaml @@ -0,0 +1,50 @@ +type: object +required: + - id + - filename + - purpose + - size + - uploaded_on + - _links +properties: + id: + type: string + description: The file identifier + example: file_6lbss42ezvoufcb2beo76rvwly + filename: + type: string + description: The file name + example: receipt.jpg + purpose: + type: string + description: The purpose of the uploaded file + example: dispute_evidence + size: + type: number + description: The size in bytes of the file upload object + example: 1024 + uploaded_on: + type: string + format: date-time + description: File upload date and time in UTC + example: '2016-05-17T16:48:52.000Z' + _links: + type: object + required: + - self + - download + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The file information retrieval URL + example: + href: https://api.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly + download: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The temporary file download URL. The URL expires after a certain time period + example: + href: https://checkout-file-upload.s3.eu-west-2.amazonaws.com/ucdac/ucdac/6lbss42ezvoufcb2beo76rvwly?X-Amz-Expires=3600&x-amz-security-token=FQoDYXdzENL%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEa diff --git a/nas_spec/future/components/schemas/Files/FileUploadResponse.yaml b/nas_spec/future/components/schemas/Files/FileUploadResponse.yaml new file mode 100644 index 000000000..8b3488a06 --- /dev/null +++ b/nas_spec/future/components/schemas/Files/FileUploadResponse.yaml @@ -0,0 +1,24 @@ +type: object +required: + - id + - _links +properties: + id: + type: string + description: The unique identifier of the file uploaded + example: file_6lbss42ezvoufcb2beo76rvwly + _links: + type: object + description: The links related to the file + readOnly: true + minItems: 1 + properties: + self: + type: object + allOf: + - $ref: '#/components/schemas/Link' + description: The URI of the file uploaded. Use this to retrieve detailed file information + example: + href: https://api.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly + required: + - self diff --git a/nas_spec/future/paths/files.yaml b/nas_spec/future/paths/files.yaml new file mode 100644 index 000000000..1c053ebda --- /dev/null +++ b/nas_spec/future/paths/files.yaml @@ -0,0 +1,46 @@ +post: + tags: + - Files + summary: Upload a file + description: | + Upload a file so that it can be used by other APIs, e.g. submit dispute evidence. + The file requirements (type/size) differ depending on the file `purpose`. + requestBody: + content: + multipart/form-data: + schema: + required: + - file + - purpose + properties: + file: + type: string + format: binary + description: The file to upload + purpose: + type: string + enum: + - dispute_evidence + description: The purpose of the file upload + responses: + '201': + description: File uploaded successfully + content: + application/json: + schema: + $ref: '#/components/schemas/FileUploadResponse' + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' diff --git a/nas_spec/future/paths/files@{id}.yaml b/nas_spec/future/paths/files@{id}.yaml new file mode 100644 index 000000000..3c0e7b444 --- /dev/null +++ b/nas_spec/future/paths/files@{id}.yaml @@ -0,0 +1,31 @@ +get: + tags: + - Files + summary: Get file information + description: Gets the information of file with the specified file identifier. + parameters: + - in: path + name: id + schema: + type: string + pattern: "^file_(\\w{26})$" + required: true + description: The file identifier + responses: + '200': + description: File was retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/File' + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: File not found diff --git a/nas_spec/future/securitySchemas/ApiKey.yaml b/nas_spec/future/securitySchemas/ApiKey.yaml new file mode 100644 index 000000000..2c2da7db0 --- /dev/null +++ b/nas_spec/future/securitySchemas/ApiKey.yaml @@ -0,0 +1,8 @@ +description: > + Unless explicitly stated, all endpoints require authentication using your secret key. + Public keys should only be used in JavaScript or native applications. + + You can find your API keys, and generate new ones, in your Hub account. +name: Authorization +type: apiKey +in: header diff --git a/nas_spec/paths/README.md b/nas_spec/paths/README.md new file mode 100644 index 000000000..7cb32fe08 --- /dev/null +++ b/nas_spec/paths/README.md @@ -0,0 +1,4 @@ +# Paths + +- Write each path specification in separate file +- File name repeat the path, the slash replaced with `@` sign, i.e. `user@{username}.yaml` matches to `user/{username}` diff --git a/nas_spec/paths/_platforms-files.yaml b/nas_spec/paths/_platforms-files.yaml new file mode 100644 index 000000000..1f4b19e1f --- /dev/null +++ b/nas_spec/paths/_platforms-files.yaml @@ -0,0 +1,86 @@ +post: + servers: + - url: https://files.checkout.com/files + description: Production server + - url: https://files.sandbox.checkout.com/files + description: Sandbox server + tags: + - Platforms + security: + - OAuth: + - files + - ApiSecretKey: + - files + summary: Upload a file + operationId: uploadAFile + description: | + Our Platforms solution provides an easy way to upload documentation required for full due diligence. + + Use this endpoint to generate a file upload link, which you can then upload a file to using a data-binary type request. + + Please note that the sub-domain – https://files.checkout.com – is slightly different to Checkout.com's other endpoints. See the documentation for more information. + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/PlatformsFileUpload' + responses: + '200': + description: File uploaded successfully + content: + application/json: + schema: + $ref: '#/components/schemas/PlatformsFileUploadResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '422': + description: Unprocessable + '429': + description: Too many requests + +get: + servers: + - url: https://files.checkout.com/files/{file_id} + description: Production server + - url: https://files.sandbox.checkout.com/files/{file_id} + description: Sandbox server + tags: + - Platforms + security: + - OAuth: + - files + - files:retrieve + - ApiSecretKey: + - files + summary: Retrieve a file + operationId: retrieveAFile + description: >- + Retrieve information about a previously uploaded file. + parameters: + - in: path + name: file_id + schema: + type: string + required: true + description: The ID of the file. The value is always prefixed by `file_`. + responses: + '200': + description: OK + headers: + Cko-Version: + $ref: '#/components/headers/Cko-Version' + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + content: + application/json: + schema: + $ref: '#/components/schemas/PlatformsFileRetrieveResponse' + '404': + description: File not found + '401': + description: Unauthorized \ No newline at end of file diff --git a/nas_spec/paths/accounts@entities.yaml b/nas_spec/paths/accounts@entities.yaml new file mode 100644 index 000000000..84614d370 --- /dev/null +++ b/nas_spec/paths/accounts@entities.yaml @@ -0,0 +1,153 @@ +post: + description: | + Onboard a sub-entity so they can start receiving payments. Once created, Checkout.com will run due diligence checks. + If the checks are successful, we'll enable payment capabilities for that sub-entity and they will start receiving payments. + summary: Onboard a sub-entity + operationId: onboardSubEntity + requestBody: + required: true + description: The sub-entity to be onboarded. + content: + application/json: + schema: + $ref: '#/components/schemas/EntityCreateRequest' + examples: + Company: + value: + reference: superhero1234 + contact_details: + phone: + number: '2345678910' + email_addresses: + primary: 'admin@superhero1234.com' + profile: + urls: + - https://www.superheroexample.com + mccs: + - '5311' + company: + business_registration_number: '452349600005' + business_type: "public_limited_company" + legal_name: 'Super Hero Masks Inc.' + trading_name: 'Super Hero Masks' + principal_address: + address_line1: '90 Tottenham Court Road' + city: 'London' + zip: 'W1T4TJ' + country: 'GB' + registered_address: + address_line1: '90 Tottenham Court Road' + city: 'London' + zip: 'W1T4TJ' + country: 'GB' + representatives: + - first_name: 'John' + last_name: 'Doe' + address: + address_line1: '90 Tottenham Court Road' + city: 'London' + zip: 'W1T4TJ' + country: 'GB' + identification: + national_id_number: 'AB123456C' + phone: + number: '2345678910' + date_of_birth: + day: 05 + month: 06 + year: 1995 + place_of_birth: + country: 'ES' + roles: + - 'ubo' + financial_details: + annual_processing_volume: 120000 + average_transaction_value: 10000 + highest_transaction_value: 2500 + documents: + bank_statement: + file_id: file_aaz5pemp6326zbuvevp6qroqu4 + type: bank_statement + financial_statement: + file_id: file_b3i2pl2eo2dr2knb5dqkcmktwy + type: financial_statement + Individual: + value: + reference: superhero1234 + contact_details: + phone: + number: '2345678910' + email_addresses: + primary: 'john@superhero1234.com' + profile: + urls: + - https://www.superheroexample.com + mccs: + - '5311' + individual: + first_name: 'John' + last_name: 'Doe' + trading_name: "John's Super Hero Masks" + registered_address: + address_line1: '90 Tottenham Court Road' + city: 'London' + zip: 'W1T4TJ' + country: 'GB' + national_tax_id: 'TAX123456' + date_of_birth: + day: 05 + month: 06 + year: 1995 + place_of_birth: + country: 'ES' + identification: + national_id_number: 'AB123456C' + security: + - OAuth: + - accounts + - ApiSecretKey: + - accounts + responses: + '201': + description: Sub-entity onboarded successfully + content: + application/json: + schema: + $ref: '#/components/schemas/EntityBasicResponseWithLinks' + headers: + Cko-Version: + $ref: '#/components/headers/Cko-Version' + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + '400': + description: Bad Request + '401': + description: Unauthorized + '409': + description: Sub-entity onboarding request conflicted with an existing sub-entity + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/EntityLinks' + - type: object + properties: + id: + type: string + description: The unique identifier of the sub-entity + example: "ent_w4jelhppmfiufdnatam37wrfc4" + '422': + description: Invalid data was sent + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ValidationError' + - type: object + properties: + error_codes: + example: + - error_code1 + - error_code2 + tags: + - Platforms diff --git a/nas_spec/paths/accounts@entities@{entityId}@payment-instruments@{id}.yaml b/nas_spec/paths/accounts@entities@{entityId}@payment-instruments@{id}.yaml new file mode 100644 index 000000000..d171bf41e --- /dev/null +++ b/nas_spec/paths/accounts@entities@{entityId}@payment-instruments@{id}.yaml @@ -0,0 +1,119 @@ +parameters: + - in: path + name: entityId + description: The sub-entity's ID. + required: true + allowEmptyValue: false + example: ent_w4jelhppmfiufdnatam37wrfc4 + style: simple + schema: + type: string + - in: path + name: id + description: The payment instrument's ID. + required: true + allowEmptyValue: false + example: ppi_qn4nis4k3ykpzzu7cvtuvhqqga + style: simple + schema: + type: string +get: + description: Retrieve the details of a specific payment instrument used for sub-entity payouts. + summary: Get payment instrument details + operationId: getPlatformsPaymentInstrument + + security: + - OAuth: + - accounts + - ApiSecretKey: + - accounts + responses: + '200': + description: Payment instrument details + headers: + Cko-Version: + $ref: '#/components/headers/Cko-Version' + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + content: + application/json: + schema: + $ref: '#/components/schemas/PlatformsPaymentInstrumentRead' + examples: + BankAccount: + value: + id: ppi_qn4nis4k3ykpzzu7cvtuvhqqga + label: Bob's Bank Account + type: bank_account + currency: GBP + country: GB + document: + type: bank_statement + file_id: file_wxglze3wwywujg4nna5fb7ldli + status: 'verified' + default: true + instrument_id: 'src_pdasnoaxrtoevpyh3opgaxcrti' + CardToken: + value: + id: ppi_cwfekfw2d7mmcto5ql4lpjgrxq + instrument_id: 'src_jpu3ev6prk7utb5jonqgvvsshm' + label: Carol's Card + country: GB + currency: GBP + status: 'verified' + default: false + type: card_token + '400': + description: Bad Request + '401': + description: Unauthorized + tags: + - Payment instruments +patch: + description: Set an existing payment instrument as default. This will make it the destination instrument when a scheduled payout is made. You can also update the label of a payment instrument. + summary: Update payment instrument details + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PlatformsPaymentInstrumentUpdate' + security: + - OAuth: + - accounts + - ApiSecretKey: + - accounts + responses: + '200': + description: Payment instrument updated successfully + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/EntityLinks' + - type: object + properties: + id: + type: string + example: ppi_qn4nis4k3ykpzzu7cvtuvhqqga + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '422': + description: Unprocessable entity + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '428': + description: Precondition required + content: + application/json: + schema: + $ref: '#/components/schemas/PreconditionRequiredError' + tags: + - Payment instruments diff --git a/nas_spec/paths/accounts@entities@{id}.yaml b/nas_spec/paths/accounts@entities@{id}.yaml new file mode 100644 index 000000000..669f82155 --- /dev/null +++ b/nas_spec/paths/accounts@entities@{id}.yaml @@ -0,0 +1,318 @@ +parameters: + - in: path + name: id + description: The ID of the sub-entity. + + required: true + allowEmptyValue: false + example: ent_w4jelhppmfiufdnatam37wrfc4 + style: simple + schema: + type: string +get: + description: Use this endpoint to retrieve a sub-entity and its full details. + summary: Get sub-entity details + operationId: getSubEntityDetails + security: + - OAuth: + - accounts + - ApiSecretKey: + - accounts + responses: + '200': + description: Sub-entity retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/EntityExtendedResponse' + examples: + Company: + value: + id: ent_wxglze3wwywujg4nna5fb7ldli + reference: superhero1234 + capabilities: + payments: + available: true + enabled: false + payouts: + available: true + enabled: false + status: pending + contact_details: + phone: + number: '2345678910' + email_addresses: + primary: 'admin@superhero1234.com' + profile: + urls: + - https://www.superheroexample.com + mccs: + - '5311' + company: + business_registration_number: '452349600005' + business_type: "public_limited_company" + legal_name: Super Hero Masks Inc. + trading_name: Super Hero Masks + principal_address: + address_line1: 90 Tottenham Court Road + city: London + zip: W1T4TJ + country: GB + registered_address: + address_line1: 90 Tottenham Court Road + city: London + zip: W1T4TJ + country: GB + representatives: + - first_name: John + middle_name: + last_name: Doe + address: + address_line1: 90 Tottenham Court Road + city: London + zip: W1T4TJ + country: GB + identification: + national_id_number: 'AB123456C' + document: + type: 'driving_license' + front: 'file_wxglze3wwywujg4nna5fb7ldli' + back: 'file_adglze3wwywujg4nna5fb7l1sg' + phone: + number: '2345678910' + date_of_birth: + day: 05 + month: 06 + year: 1995 + place_of_birth: + country: "ES" + roles: + - "ubo" + financial_details: + annual_processing_volume: 120000 + average_transaction_value: 10000 + highest_transaction_value: 2500 + documents: + bank_statement: + file_id: file_aaz5pemp6326zbuvevp6qroqu4 + type: bank_statement + financial_statement: + file_id: file_b3i2pl2eo2dr2knb5dqkcmktwy + type: financial_statement + instruments: + - id: src_hmnkhxlshf3uhljow7zt7sf2cq + label: Peter's Personal Account + _links: + self: + href: https://api.checkout.com/accounts/entities/ent_wxglze3wwywujg4nna5fb7ldli + Individual: + value: + id: ent_wxglze3wwywujg4nna5fb7ldli + reference: superhero1234 + capabilities: + payments: + available: true + enabled: false + payouts: + available: true + enabled: false + contact_details: + phone: + number: '2345678910' + email_addresses: + primary: 'admin@superhero1234.com' + profile: + urls: + - https://www.superheroexample.com + mccs: + - '5311' + individual: + first_name: John + middle_name: Paul + last_name: Doe + trading_name: Super Hero Masks + legal_name: John Paul Doe + national_tax_id: '1234567' + registered_address: + address_line1: 90 Tottenham Court Road + city: London + zip: W1T4TJ + country: GB + date_of_birth: + day: 05 + month: 06 + year: 1995 + identification: + national_id_number: 'AB123456C' + document: + type: 'driving_license' + front: 'file_wxglze3wwywujg4nna5fb7ldli' + back: 'file_adglze3wwywujg4nna5fb7l1sg' + instruments: + - id: src_hmnkhxlshf3uhljow7zt7sf2cq + label: Peter's Personal Account + _links: + self: + href: https://api.checkout.com/accounts/entities/ent_wxglze3wwywujg4nna5fb7ldli + headers: + Cko-Version: + $ref: '#/components/headers/Cko-Version' + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + '401': + description: Unauthorized + '404': + description: Sub-entity not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ValidationError' + - type: object + properties: + error_codes: + example: + - error_code1 + - error_code2 + tags: + - Platforms +put: + description: | + You can update all fields under the Contact details, Profile, and Company objects. You can also add identification information to complete due diligence requirements.

+ Note: when you update a sub-entity we may conduct further due diligence checks when necessary. During these checks, your payment capabilities will remain the same. + summary: Update sub-entity details + operationId: putSubEntityDetails + requestBody: + required: true + description: The sub-entity to be updated. + content: + application/json: + schema: + $ref: '#/components/schemas/EntityUpdateRequest' + examples: + Company: + value: + contact_details: + phone: + number: '2345678910' + email_addresses: + primary: 'admin@superhero1234.com' + profile: + urls: + - https://www.superheroexample.com + mccs: + - '5311' + company: + business_registration_number: '452349600005' + business_type: "public_limited_company" + legal_name: 'Super Hero Masks Inc.' + trading_name: 'Super Hero Masks' + principal_address: + address_line1: '90 Tottenham Court Road' + city: 'London' + zip: 'W1T4TJ' + country: 'GB' + registered_address: + address_line1: '90 Tottenham Court Road' + city: 'London' + zip: 'W1T4TJ' + country: 'GB' + representatives: + - first_name: 'John' + last_name: 'Doe' + address: + address_line1: '90 Tottenham Court Road' + city: 'London' + zip: 'W1T4TJ' + country: 'GB' + identification: + national_id_number: 'AB123456C' + phone: + number: '2345678910' + date_of_birth: + day: 05 + month: 06 + year: 1995 + place_of_birth: + country: "ES" + roles: + - "ubo" + financial_details: + annual_processing_volume: 120000 + average_transaction_value: 10000 + highest_transaction_value: 2500 + documents: + bank_statement: + file_id: file_aaz5pemp6326zbuvevp6qroqu4 + type: bank_statement + financial_statement: + file_id: file_b3i2pl2eo2dr2knb5dqkcmktwy + type: financial_statement + Individual: + value: + contact_details: + phone: + number: '2345678910' + email_addresses: + primary: 'admin@superhero1234.com' + profile: + urls: + - https://www.superheroexample.com + mccs: + - '5311' + individual: + first_name: 'John' + last_name: 'Doe' + trading_name: "John's Super Hero Masks" + registered_address: + address_line1: '90 Tottenham Court Road' + city: 'London' + zip: 'W1T4TJ' + country: 'GB' + national_tax_id: 'TAX123456' + date_of_birth: + day: 05 + month: 06 + year: 1995 + place_of_birth: + country: "ES" + identification: + national_id_number: 'AB123456C' + security: + - OAuth: + - accounts + - ApiSecretKey: + - accounts + responses: + '200': + description: Sub-entity updated successfully + content: + application/json: + schema: + $ref: '#/components/schemas/EntityBasicResponseWithLinks' + headers: + Cko-Version: + $ref: '#/components/headers/Cko-Version' + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + '401': + description: Unauthorized + '404': + description: Sub-entity not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ValidationError' + - type: object + properties: + error_codes: + example: + - error_code1 + - error_code2 + tags: + - Platforms diff --git a/nas_spec/paths/accounts@entities@{id}@payment-instruments.yaml b/nas_spec/paths/accounts@entities@{id}@payment-instruments.yaml new file mode 100644 index 000000000..b7b29c593 --- /dev/null +++ b/nas_spec/paths/accounts@entities@{id}@payment-instruments.yaml @@ -0,0 +1,151 @@ +parameters: + - in: path + name: id + description: The sub-entity's ID. + required: true + allowEmptyValue: false + example: ent_w4jelhppmfiufdnatam37wrfc4 + style: simple + schema: + type: string +post: + description: Create a bank account payment instrument for your sub-entity. You can use this payment instrument as a payout destination. + summary: Add a payment instrument + operationId: addPlatformsPaymentInstrument + requestBody: + required: true + description: A JSON payload containing the payment instrument details. + content: + application/json: + schema: + $ref: '#/components/schemas/PlatformsPaymentInstrumentCreate' + examples: + FasterPaymentsBankAccount: + value: + label: Bob's Bank Account + type: bank_account + currency: GBP + country: GB + default: true + instrument_details: + account_number: '12345678' + bank_code: '050389' + document: + type: bank_statement + file_id: file_wxglze3wwywujg4nna5fb7ldli + SepaBankAccount: + value: + label: Bruno's Bank Account + type: bank_account + currency: EUR + country: FR + default: true + instrument_details: + iban: FR1420041010050500013M02606, + swift_bic: LZSKFR2E98I + document: + type: bank_statement + file_id: file_wxglze3wwywujg4nna5fb7ldli + CardToken: + value: + label: Carol's Card + type: card_token + currency: GBP + instrument_details: + token: tok_ru6xnh53uovethkr2gy3gwpl2a + security: + - OAuth: + - accounts + - ApiSecretKey: + - accounts + responses: + '201': + description: Created + headers: + Cko-Version: + $ref: '#/components/headers/Cko-Version' + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + content: + application/json: + schema: + type: object + properties: + id: + type: string + example: ppi_qn4nis4k3ykpzzu7cvtuvhqqga + '400': + description: Bad Request + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ValidationError' + - type: object + properties: + error_codes: + example: + - error_code1 + - error_code2 + tags: [ Payment instruments ] + +get: + description: Fetch all of the payment instruments for a sub-entity. You can filter by `status` to identify `verified` instruments that are ready to be used for Payouts. + summary: Query payment instruments + operationId: queryPlatformsPaymentInstruments + + parameters: + - in: query + name: status + schema: + $ref: '#/components/schemas/PlatformsPaymentInstrumentStatus' + + + security: + - OAuth: + - accounts + - ApiSecretKey: + - accounts + responses: + '200': + description: OK + headers: + Cko-Version: + $ref: '#/components/headers/Cko-Version' + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + content: + application/json: + schema: + $ref: '#/components/schemas/PlatformsPaymentInstrumentQuery' + examples: + BankAccounts: + value: + data: + - id: ppi_qn4nis4k3ykpzzu7cvtuvhqqga + label: Bob's Bank Account + type: bank_account + currency: GBP + country: GB + status: 'verified' + default: true + instrument_id: 'src_pdasnoaxrtoevpyh3opgaxcrti' + - id: ppi_yk7nmh5jypmqzw5kb6kshj2iiy + label: Bruno's Bank Account + type: bank_account + currency: EUR + country: FR + status: 'pending' + default: false + + '400': + description: Bad Request + '401': + description: Unauthorized + tags: + - Payment instruments + diff --git a/nas_spec/paths/accounts@entities@{id}@payout-schedules.yaml b/nas_spec/paths/accounts@entities@{id}@payout-schedules.yaml new file mode 100644 index 000000000..c90ca679b --- /dev/null +++ b/nas_spec/paths/accounts@entities@{id}@payout-schedules.yaml @@ -0,0 +1,83 @@ +get: + tags: + - Payout schedules + parameters: + - in: path + name: id + description: The ID of the sub-entity. + required: true + allowEmptyValue: false + example: ent_w4jelhppmfiufdnatam37wrfc4 + style: simple + schema: + type: string + security: + - OAuth: + - accounts + - ApiSecretKey: + - accounts + summary: Retrieve a sub-entity's payout schedule + operationId: getSubEntitysPayoutSchedule + description: >- + You can schedule when your sub-entities receive their funds using our Platforms solution. Use this endpoint to retrieve information about a sub-entity's schedule. + responses: + '200': + description: Schedule retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/GetScheduleResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized. + '404': + description: Sub-entity not found, or scheduled payouts are not available to the sub-entity. + '422': + description: Invalid data sent. + '429': + description: Too many requests. + +put: + tags: + - Payout schedules + security: + - OAuth: + - accounts + - ApiSecretKey: + - accounts + summary: Update a sub-entity's payout schedule + operationId: putSubEntitysPayoutSchedule + description: >- + You can schedule when your sub-entities receive their funds using our Platforms solution. Use this endpoint to update a sub-entity's schedule. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateScheduleRequest' + responses: + '200': + description: Schedule updated successfully + content: + application/json: + schema: + $ref: '#/components/schemas/EntityLinks' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '422': + description: Unprocessable entity + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '429': + description: Too many requests diff --git a/nas_spec/paths/applepay@certificates.yaml b/nas_spec/paths/applepay@certificates.yaml new file mode 100644 index 000000000..9df205d98 --- /dev/null +++ b/nas_spec/paths/applepay@certificates.yaml @@ -0,0 +1,29 @@ +post: + tags: + - Apple Pay + security: + - ApiPublicKey: [ ] + summary: Upload a payment processing certificate + operationId: uploadApplePayCertificate + description: | + Upload a payment processing certificate. This will allow you to start processing payments via Apple Pay. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ApplePayCertificateRequest' + responses: + '201': + description: Certificate uploaded successfully + content: + application/json: + schema: + $ref: '#/components/schemas/ApplePayCertificateResponse' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' diff --git a/nas_spec/paths/applepay@signing-requests.yaml b/nas_spec/paths/applepay@signing-requests.yaml new file mode 100644 index 000000000..b15bbe6de --- /dev/null +++ b/nas_spec/paths/applepay@signing-requests.yaml @@ -0,0 +1,24 @@ +post: + tags: + - Apple Pay + security: + - ApiPublicKey: [ ] + summary: Generate a certificate signing request + operationId: generateApplePaySigningRequest + description: | + Generate a certificate signing request. You'll need to upload this to your Apple Developer account to download a payment processing certificate. + responses: + '200': + description: Generated signing request successfully + content: + application/json: + schema: + $ref: '#/components/schemas/ApplePaySigningRequestResponse' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' diff --git a/nas_spec/paths/balances@{id}.yaml b/nas_spec/paths/balances@{id}.yaml new file mode 100644 index 000000000..e9c06a18f --- /dev/null +++ b/nas_spec/paths/balances@{id}.yaml @@ -0,0 +1,50 @@ +servers: + - url: https://balances.checkout.com + description: Production server + - url: https://balances.sandbox.checkout.com + description: Sandbox server +parameters: + - $ref: '#/components/parameters/EntityId' + - $ref: '#/components/parameters/Query' +get: + summary: Retrieve entity balances + operationId: getEntityBalances + description: Use this endpoint to retrieve balances for each currency account belonging to an entity. + security: + - OAuth: + - balances + - ApiSecretKey: + - balances + responses: + '200': + description: Balances retrieved successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/BalancesResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '400': + description: Query format not supported + '401': + description: Unauthorized + '404': + description: Entity not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ValidationError' + - type: object + properties: + error_codes: + example: + - error_code1 + - error_code2 + tags: + - Balances diff --git a/nas_spec/paths/connect@token.yaml b/nas_spec/paths/connect@token.yaml new file mode 100644 index 000000000..1d0b67947 --- /dev/null +++ b/nas_spec/paths/connect@token.yaml @@ -0,0 +1,72 @@ +servers: + - url: https://access.checkout.com + description: Live API + - url: https://access.sandbox.checkout.com + description: Sandbox API +post: + summary: Request an access token + operationId: requestAnAccessToken + tags: + - Access + responses: + '200': + description: OK - A successful access token response as per [RFC6749](https://tools.ietf.org/html/rfc6749#section-4.4.3) + content: + application/json: + schema: + type: object + properties: + access_token: + type: string + example: 2YotnFZFEjr1zCsicMWpAA + token_type: + type: string + example: example + expires_in: + type: number + example: 3600 + + '400': + description: Bad request - An unsuccessful access token response as per [RFC6749](https://tools.ietf.org/html/rfc6749#section-4.4.3) + content: + application/json: + schema: + type: object + properties: + error: + type: string + enum: + - invalid_request + - invalid_client + - invalid_grant + - unauthorized_client + - unsupported_grant_type + - invalid_scope + description: OAuth endpoint to exchange your access key ID and access key secret for an access token. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + grant_type: + type: string + enum: + - client_credentials + example: client_credentials + client_id: + type: string + description: 'Access key ID' + client_secret: + type: string + description: 'Access key secret' + scope: + type: string + description: The access key scope + example: gateway + examples: + example-1: + value: + grant_type: client_credentials + client_id: ack_clckqmmnyfiupexjew7shh5ahe + client_secret: Pmg36sDWQ9WxtPR3 diff --git a/nas_spec/paths/customers.yaml b/nas_spec/paths/customers.yaml new file mode 100644 index 000000000..67261fa4f --- /dev/null +++ b/nas_spec/paths/customers.yaml @@ -0,0 +1,37 @@ +post: + tags: + - Customers + security: + - OAuth: + - vault + - vault:customers + - ApiSecretKey: [] + summary: Create a customer + operationId: createCustomer + description: > + Store a customer's details in a customer object to reuse in future payments. When creating a customer, you can link payment instruments – the customer `id` returned can be passed as a source when making a payment. +

+ **NOTE:** Specify a `default` instrument, otherwise the `instruments` array will not be saved on creation. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/StoreCustomerRequest' + responses: + '201': + description: Customer created successfully + content: + application/json: + schema: + $ref: '#/components/schemas/StoreCustomerResponse' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '500': + description: Internal Error diff --git a/nas_spec/paths/customers@{identifier}.yaml b/nas_spec/paths/customers@{identifier}.yaml new file mode 100644 index 000000000..45f4a99f5 --- /dev/null +++ b/nas_spec/paths/customers@{identifier}.yaml @@ -0,0 +1,110 @@ +get: + security: + - OAuth: + - vault + - vault:customers + - ApiSecretKey: [ ] + tags: + - Customers + summary: Get customer details + operationId: getCustomerDetails + description: Returns the details of a customer and their payment instruments. + parameters: + - in: path + name: identifier + required: true + description: The customer's ID or email + schema: + type: string + properties: + id: + type: string + pattern: "^(cus)_(\\w{26})$" + email: + type: string + format: email + maxLength: 255 + additionalProperties: false + oneOf: + - required: [ id ] + - required: [ email ] + responses: + '200': + description: Customer retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/RetrieveCustomerResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Customer not found + +patch: + tags: + - Customers + security: + - OAuth: + - vault + - vault:customers + - ApiSecretKey: [ ] + summary: Update customer details + description: Update the details of a customer and link payment instruments to them. + parameters: + - in: path + name: identifier + schema: + type: string + pattern: "^(cus)_(\\w{26})$" + required: true + description: The customer's ID + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateCustomerDetailsRequest' + responses: + '204': + description: Customer updated successfully + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '404': + description: Customer not found + +delete: + tags: + - Customers + security: + - OAuth: + - vault + - vault:customers + - ApiSecretKey: [ ] + summary: Delete a customer + description: Delete a customer and all of their linked payment instruments. + parameters: + - in: path + name: identifier + required: true + schema: + type: string + pattern: "^(cus)_(\\w{26})$" + description: The customer's ID + responses: + '204': + description: Customer deleted successfully + '401': + description: Unauthorized + '404': + description: Customer not found or not associated with client diff --git a/nas_spec/paths/disputes.yaml b/nas_spec/paths/disputes.yaml new file mode 100644 index 000000000..395f8ba24 --- /dev/null +++ b/nas_spec/paths/disputes.yaml @@ -0,0 +1,127 @@ +get: + tags: + - Disputes + security: + - OAuth: + - disputes + - disputes:view + - ApiSecretKey: [ ] + summary: Get disputes + operationId: getDisputes + description: >- + Returns a list of all disputes against your business. The results will be + returned in reverse chronological order, showing the last modified dispute + (for example, where you've recently added a piece of evidence) first. You + can use the optional parameters below to skip or limit results. + parameters: + - in: query + name: limit + schema: + type: integer + minimum: 1 + maximum: 250 + default: 50 + required: false + description: The numbers of results to return + - in: query + name: skip + schema: + type: integer + minimum: 0 + default: 0 + required: false + description: The number of results to skip + - in: query + name: from + schema: + type: string + format: date-time + required: false + description: The date and time from which to filter disputes, based on the dispute's + `last_update` field + - in: query + name: to + schema: + type: string + format: date-time + required: false + description: The date and time until which to filter disputes, based on the dispute's + `last_update` field + - in: query + name: id + schema: + type: string + required: false + description: The unique identifier of the dispute + - in: query + name: entity_ids + schema: + type: string + example: 'ent_wxglze3wwywujg4nna5fb7ldli,ent_vkb5zcy64zoe3cwfmaqvqyqyku' + required: false + description: One or more comma-separated client entities. This works like a logical *OR* + operator + - in: query + name: sub_entity_ids + schema: + type: string + example: 'ent_uzm3uxtssvmuxnyrfdffcyjxeu,ent_hy5wtzwzeuwefmsnjtdhw4scfi' + required: false + description: One or more comma-separated sub-entities. This works like a logical *OR* + operator + - in: query + name: statuses + schema: + type: string + example: 'evidence_required,evidence_under_review' + required: false + description: One or more comma-separated statuses. This works like a logical *OR* + operator + - in: query + name: payment_id + schema: + type: string + required: false + description: The unique identifier of the payment + - in: query + name: payment_reference + schema: + type: string + required: false + description: An optional reference (such as an order ID) that you can use later to identify the payment. Previously known as `TrackId` + - in: query + name: payment_arn + schema: + type: string + required: false + description: The acquirer reference number (ARN) that you can use to query the + issuing bank + - in: query + name: payment_mcc + schema: + type: string + required: false + description: The merchant category code (MCC) of the payment (ISO 18245) + - in: query + name: this_channel_only + schema: + type: boolean + required: false + description: + If `true`, only returns disputes of the specific channel that the secret key is associated with. Otherwise, returns all disputes for that + business + responses: + '200': + description: Disputes retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/DisputePaged' + '401': + description: Unauthorized + '422': + description: Unprocessable paging + content: + application/json: + schema: + $ref: '#/components/schemas/PagingError' diff --git a/nas_spec/paths/disputes@{dispute_id}.yaml b/nas_spec/paths/disputes@{dispute_id}.yaml new file mode 100644 index 000000000..6692dba15 --- /dev/null +++ b/nas_spec/paths/disputes@{dispute_id}.yaml @@ -0,0 +1,30 @@ +get: + tags: + - Disputes + security: + - OAuth: + - disputes + - disputes:view + - ApiSecretKey: [ ] + summary: Get dispute details + operationId: getDisputeDetails + description: Returns all the details of a dispute using the dispute identifier. + parameters: + - in: path + name: dispute_id + schema: + type: string + pattern: '^(dsp)_(\\w{26})$' + required: true + description: The dispute identifier + responses: + '200': + description: Dispute retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/Dispute' + '401': + description: Unauthorized + '404': + description: Dispute not found diff --git a/nas_spec/paths/disputes@{dispute_id}@accept.yaml b/nas_spec/paths/disputes@{dispute_id}@accept.yaml new file mode 100644 index 000000000..1ed39d942 --- /dev/null +++ b/nas_spec/paths/disputes@{dispute_id}@accept.yaml @@ -0,0 +1,29 @@ +post: + tags: + - Disputes + security: + - OAuth: + - disputes + - disputes:accept + - ApiSecretKey: [ ] + summary: Accept dispute + operationId: acceptDispute + description: >- + If a dispute is legitimate, you can choose to accept it. This will close it + for you and remove it from your list of open disputes. There are no further + financial implications. + parameters: + - in: path + name: dispute_id + schema: + type: string + pattern: '^(dsp)_(\w{26})$' + required: true + description: The dispute identifier + responses: + '204': + description: Dispute accepted successfully + '401': + description: Unauthorized + '404': + description: Dispute not found diff --git a/nas_spec/paths/disputes@{dispute_id}@evidence.yaml b/nas_spec/paths/disputes@{dispute_id}@evidence.yaml new file mode 100644 index 000000000..de161070a --- /dev/null +++ b/nas_spec/paths/disputes@{dispute_id}@evidence.yaml @@ -0,0 +1,102 @@ +put: + tags: + - Disputes + security: + - OAuth: + - disputes + - disputes:provide-evidence + - ApiSecretKey: [ ] + summary: Provide dispute evidence + operationId: provideDisputeEvidence + description: > + Adds supporting evidence to a dispute. Before using this endpoint, you first + need to [upload your files](#tag/Disputes/paths/~1files/post) using the file + uploader. You will receive a file id (prefixed by `file_`) which you can + then use in your request. + Note that this only attaches the evidence to the dispute, it does not send + it to us. Once ready, you will need to submit it. + **You must provide at least one evidence type in the body of your request.** + parameters: + - in: path + name: dispute_id + schema: + type: string + pattern: '^(dsp)_(\w{26})$' + required: true + description: The dispute identifier + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProvideEvidenceRequest' + responses: + '204': + description: Dispute evidence provided successfully + '400': + description: Unprocessable + '401': + description: Unauthorized + '404': + description: Dispute not found + '422': + description: Unprocessable entity +get: + tags: + - Disputes + security: + - OAuth: + - disputes + - disputes:view + # - ApiKey: [] + summary: Get dispute evidence + description: > + Retrieves a list of the evidence submitted in response to a specific + dispute. + parameters: + - in: path + name: dispute_id + schema: + type: string + pattern: '^(dsp)_(\w{26})$' + required: true + description: The dispute identifier + responses: + '200': + description: Dispute evidence retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/Evidence' + '401': + description: Unauthorized + '404': + description: Dispute not found +post: + tags: + - Disputes + security: + - OAuth: + - disputes + - disputes:provide-evidence + # - ApiKey: [] + summary: Submit dispute evidence + description: >- + With this final request, you can submit the evidence that you have + previously provided. Make sure you have provided all the relevant + information before using this request. You will not be able to amend your + evidence once you have submitted it. + parameters: + - in: path + name: dispute_id + schema: + type: string + pattern: '^(dsp)_(\w{26})$' + required: true + description: The dispute identifier + responses: + '204': + description: Dispute evidence submitted successfully + '401': + description: Unauthorized + '404': + description: Dispute not found diff --git a/nas_spec/paths/disputes@{dispute_id}@schemefiles.yaml b/nas_spec/paths/disputes@{dispute_id}@schemefiles.yaml new file mode 100644 index 000000000..1bef8cc98 --- /dev/null +++ b/nas_spec/paths/disputes@{dispute_id}@schemefiles.yaml @@ -0,0 +1,31 @@ +get: + security: + - OAuth: + - disputes + - disputes:scheme-files + - ApiSecretKey: [ ] + tags: + - Disputes + summary: Get dispute scheme files + operationId: getDisputeSchemeFiles + description: | + Returns all of the scheme files of a dispute using the dispute identifier. Currently available only for VISA disputes. + parameters: + - in: path + name: dispute_id + schema: + type: string + pattern: "^(dsp)_(\\w{26})$" + required: true + description: The dispute identifier + responses: + '200': + description: Dispute retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/SchemeFileResponse' + '401': + description: Unauthorized + '404': + description: Dispute not found diff --git a/nas_spec/paths/files.yaml b/nas_spec/paths/files.yaml new file mode 100644 index 000000000..d416294a2 --- /dev/null +++ b/nas_spec/paths/files.yaml @@ -0,0 +1,36 @@ +post: + tags: + - Disputes + security: + - OAuth: + - disputes + - disputes:provide-evidence + - ApiSecretKey: [ ] + summary: Upload file + operationId: uploadFile + description: >- + Upload a file to use as evidence in a dispute. Your file must be in either + JPEG/JPG, PNG or PDF format, and be no larger than 4MB. + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/File' + responses: + '200': + description: File uploaded successfully + content: + application/json: + schema: + $ref: '#/components/schemas/FileUploadResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '422': + description: Unprocessable + '429': + description: Too many requests diff --git a/nas_spec/paths/files@{file_id}.yaml b/nas_spec/paths/files@{file_id}.yaml new file mode 100644 index 000000000..59727c9ab --- /dev/null +++ b/nas_spec/paths/files@{file_id}.yaml @@ -0,0 +1,36 @@ +get: + tags: + - Disputes + security: + - OAuth: + - disputes + - disputes:view + - ApiSecretKey: [ ] + summary: Get file information + operationId: getFileInformation + description: Retrieve information about a file that was previously uploaded. + parameters: + - in: path + name: file_id + schema: + type: string + required: true + description: The file identifier. It is always prefixed by `file_`. + responses: + '200': + description: File information retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/FileResult' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: File not found + '429': + description: Too many requests or duplicate request detected diff --git a/nas_spec/paths/financial-actions.yaml b/nas_spec/paths/financial-actions.yaml new file mode 100644 index 000000000..1c9b6516f --- /dev/null +++ b/nas_spec/paths/financial-actions.yaml @@ -0,0 +1,153 @@ +servers: + - url: https://api.sandbox.checkout.com + description: Sandbox + - url: https://api.checkout.com + description: Production +get: + tags: + - Financial actions + security: + - OAuth: + - financial-actions + - financial-actions:view + - ApiSecretKey: [ ] + summary: Get financial actions + operationId: getFinancialActions + description: | + Returns the list of financial actions and their details. + x-codeSamples: + - lang: 'cURL' + label: 'curl' + source: | + curl -i -X GET \ + 'https://api.sandbox.checkout.com/financial-actions?payment_id=pay_qqufsd3rfnqufngwklghlxrzpm&limit=5' \ + -H 'Authorization: Bearer ' + - lang: 'Java' + label: 'Java' + source: | + import java.net.*; + import java.net.http.*; + import java.util.*; + import java.nio.charset.StandardCharsets; + import java.util.stream.Collectors; + + public class App { + public static void main(String[] args) throws Exception { + var httpClient = HttpClient.newBuilder().build(); + + HashMap params = new HashMap<>(); + params.put("payment_id", "pay_qqufsd3rfnqufngwklghlxrzpm"); + params.put("limit", "5"); + + var query = params.keySet().stream() + .map(key -> key + "=" + URLEncoder.encode(params.get(key), StandardCharsets.UTF_8)) + .collect(Collectors.joining("&")); + + var host = "https://api.sandbox.checkout.com"; + var pathname = "/financial-actions"; + var request = HttpRequest.newBuilder() + .GET() + .uri(URI.create(host + pathname + '?' + query)) + .header("Authorization", "Bearer ") + .build(); + + var response = httpClient.send(request, HttpResponse.BodyHandlers.ofString()); + + System.out.println(response.body()); + } + } + - lang: 'C#' + label: 'C#' + source: | + using System; + using System.Net.Http; + using System.Threading.Tasks; + + public class Program + { + private readonly IHttpClientFactory _httpClientFactory; + public static async Task Main(string[] args) + { + var client = _httpClientFactory.CreateClient(); + client.DefaultRequestHeaders.Add("Authorization", "Bearer "); + var request = await client.GetAsync("https://api.sandbox.checkout.com/financial-actions?payment_id=pay_qqufsd3rfnqufngwklghlxrzpm&limit=5"); + var response = await request.Content.ReadAsStringAsync(); + + Console.WriteLine(response); + } + } + - lang: 'Python' + label: 'Python' + source: | + import requests + + url = "https://api.sandbox.checkout.com/financial-actions" + + query = { + "payment_id": "pay_qqufsd3rfnqufngwklghlxrzpm", + "limit": "5" + } + + headers = {"Authorization": "Bearer "} + + response = requests.get(url, headers=headers, params=query) + + data = response.json() + print(data) + parameters: + - name: payment_id + in: query + description: The ID of the payment you want to retrieve financial actions for. Required if `action_id` or `reference` are not used. + schema: + type: string + example: pay_qqufsd3rfnqufngwklghlxrzpm + - name: action_id + in: query + description: The ID of the action you want to retrieve financial actions for. Required if `payment_id` or `reference` are not used. + schema: + type: string + example: act_wsnyzbzmr2huxcekoj7qqhxwuy + - name: reference + in: query + description: An optional ID you submit in the gateway request to retrieve financial actions for. Required if `payment_id` or `action_id` are not used. + schema: + type: string + example: '8f13507d-60e1-455d-b700-4f1b39a35e23' + - name: limit + in: query + description: The number of results to retrieve per page.
For example, if the total result count is 50, and you use `limit=10`, you will need to iterate over 5 pages containing 10 results each to retrieve all of the reports that match your query. + schema: + type: integer + format: int32 + minimum: 1 + maximum: 100 + default: 100 + example: 5 + - name: pagination_token + in: query + description: A token used for pagination when a response contains results across multiple pages. + schema: + type: string + responses: + '200': + description: Financial actions retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/FinancialActionListResponse' + headers: + Cko-Version: + $ref: '#/components/headers/Cko-Version' + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + '401': + description: Unauthorized. Likely cause is that access token is not valid or was not specified. + '422': + description: Unprocessable entity + content: + application/json: + schema: + $ref: '#/components/schemas/FinancialActionErrorResponse' + application/problem+json: + schema: + $ref: '#/components/schemas/FinancialActionErrorResponse' diff --git a/nas_spec/paths/flow/workflows/workflows.yaml b/nas_spec/paths/flow/workflows/workflows.yaml new file mode 100644 index 000000000..0bd748cb6 --- /dev/null +++ b/nas_spec/paths/flow/workflows/workflows.yaml @@ -0,0 +1,71 @@ +get: + security: + - OAuth: + - flow + - flow:workflows + - ApiSecretKey: [ ] + tags: + - Workflows + summary: Get all workflows + description: | + Get all workflows + responses: + '200': + description: Workflows retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/get-all-workflows-response' + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '500': + description: Internal Error + +post: + security: + - OAuth: + - flow + - flow:workflows + - ApiSecretKey: [ ] + tags: + - Workflows + summary: Add a workflow + description: | + Add a new Flow workflow + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/add-workflow-request' + responses: + '201': + description: Workflow added successfully + content: + application/json: + schema: + $ref: '#/components/schemas/add-workflow-response' + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '500': + description: Internal Error diff --git a/nas_spec/paths/flow/workflows/workflows@event-types.yaml b/nas_spec/paths/flow/workflows/workflows@event-types.yaml new file mode 100644 index 000000000..d193a794a --- /dev/null +++ b/nas_spec/paths/flow/workflows/workflows@event-types.yaml @@ -0,0 +1,29 @@ +get: + security: + - OAuth: + - flow + - flow:workflows + - ApiSecretKey: [ ] + tags: + - Workflows + summary: Get event types + description: | + Get a list of sources and their events for building new workflows + responses: + '200': + description: Event types retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/get-event-types-response' + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '500': + description: Internal Error diff --git a/nas_spec/paths/flow/workflows/workflows@events@reflow.yaml b/nas_spec/paths/flow/workflows/workflows@events@reflow.yaml new file mode 100644 index 000000000..1efc685af --- /dev/null +++ b/nas_spec/paths/flow/workflows/workflows@events@reflow.yaml @@ -0,0 +1,41 @@ +post: + security: + - OAuth: + - flow + - flow:reflow + - ApiSecretKey: [ ] + tags: + - Workflows + summary: Reflow + description: | + Reflow past events attached to multiple event IDs and workflow IDs, or to multiple subject IDs and workflow IDs. If you don't specify any workflow IDs, all matching workflows will be retriggered. + requestBody: + required: true + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/reflow-events-by-event-and-workflow-ids' + - $ref: '#/components/schemas/reflow-events-by-subject-and-workflow-ids' + responses: + '202': + description: Event reflow initiated successfully + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Events for reflow not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ids-validation-error' + '500': + description: Internal Error diff --git a/nas_spec/paths/flow/workflows/workflows@events@subject@{subjectId}.yaml b/nas_spec/paths/flow/workflows/workflows@events@subject@{subjectId}.yaml new file mode 100644 index 000000000..d106ad4f1 --- /dev/null +++ b/nas_spec/paths/flow/workflows/workflows@events@subject@{subjectId}.yaml @@ -0,0 +1,46 @@ +get: + security: + - OAuth: + - flow + - flow:events + - ApiSecretKey: [ ] + tags: + - Workflows + summary: Get subject events + description: | + Get all events that relate to a specific subject + parameters: + - in: path + name: subjectId + schema: + type: string + required: true + description: The event identifier + example: pay_wlu3wxc26jounofs5iez75qaqa + responses: + '200': + description: Events retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/subject-events-response' + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '404': + description: Subject not found + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '500': + description: Internal Error diff --git a/nas_spec/paths/flow/workflows/workflows@events@subject@{subjectId}@reflow.yaml b/nas_spec/paths/flow/workflows/workflows@events@subject@{subjectId}@reflow.yaml new file mode 100644 index 000000000..af36779f3 --- /dev/null +++ b/nas_spec/paths/flow/workflows/workflows@events@subject@{subjectId}@reflow.yaml @@ -0,0 +1,36 @@ +post: + security: + - OAuth: + - flow + - flow:reflow + - ApiSecretKey: [ ] + tags: + - Workflows + summary: Reflow by subject + description: | + Reflows the events associated with a subject ID (for example, a payment ID or a dispute ID) and triggers the actions of any workflows with matching conditions. + parameters: + - in: path + name: subjectId + schema: + type: string + pattern: ^[a-z]{3}_[a-z0-9]{26}$ + required: true + description: The subject identifier (for example, a payment ID or a dispute ID). The events associated with these subjects will be reflowed. + example: pay_x5zm2po6kimubhlfitgt2mfwgi + responses: + '202': + description: Event reflow initiated successfully + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Events for reflow not found + '500': + description: Internal Error diff --git a/nas_spec/paths/flow/workflows/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow.yaml b/nas_spec/paths/flow/workflows/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow.yaml new file mode 100644 index 000000000..395fcba29 --- /dev/null +++ b/nas_spec/paths/flow/workflows/workflows@events@subject@{subjectId}@workflow@{workflowId}@reflow.yaml @@ -0,0 +1,44 @@ +post: + security: + - OAuth: + - flow + - flow:reflow + - ApiSecretKey: [ ] + tags: + - Workflows + summary: Reflow by subject and workflow + description: | + Reflows the events associated with a subject ID (for example, a payment ID or a dispute ID) and triggers the actions of the specified workflow if the conditions match. + parameters: + - in: path + name: subjectId + schema: + type: string + pattern: ^[a-z]{3}_[a-z0-9]{26}$ + required: true + description: The subject identifier (for example, a payment ID or a dispute ID). The events associated with these subjects will be reflowed. + example: pay_x5zm2po6kimubhlfitgt2mfwgi + - in: path + name: workflowId + schema: + type: string + pattern: ^wf_[a-z0-9]{26}$ + required: true + description: The identifier of the workflow whose actions you want to trigger. + example: wf_c8zm2po6kimubhlfitgt2mferf + responses: + '202': + description: Event reflow initiated successfully + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Events for reflow not found + '500': + description: Internal Error diff --git a/nas_spec/paths/flow/workflows/workflows@events@{eventId}.yaml b/nas_spec/paths/flow/workflows/workflows@events@{eventId}.yaml new file mode 100644 index 000000000..8d0e14b70 --- /dev/null +++ b/nas_spec/paths/flow/workflows/workflows@events@{eventId}.yaml @@ -0,0 +1,40 @@ +get: + security: + - OAuth: + - flow + - flow:events + - ApiSecretKey: [ ] + tags: + - Workflows + summary: Get an event + description: | + Get the details of an event + parameters: + - in: path + name: eventId + schema: + type: string + pattern: ^evt_[a-z0-9]{26}$ + required: true + description: The event identifier + example: evt_x5zm2po6kimubhlfitgt2mfwgi + responses: + '200': + description: Event retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/get-event-response' + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Event not found + '500': + description: Internal Error diff --git a/nas_spec/paths/flow/workflows/workflows@events@{eventId}@actions@{workflowActionId}.yaml b/nas_spec/paths/flow/workflows/workflows@events@{eventId}@actions@{workflowActionId}.yaml new file mode 100644 index 000000000..0cf50a6ec --- /dev/null +++ b/nas_spec/paths/flow/workflows/workflows@events@{eventId}@actions@{workflowActionId}.yaml @@ -0,0 +1,49 @@ +get: + security: + - OAuth: + - flow + - flow:events + - flow:workflows + - ApiSecretKey: [] + tags: + - Workflows + summary: Get action invocations + description: | + Get the details of a workflow action executed for the specified event. + parameters: + - in: path + name: eventId + schema: + type: string + pattern: ^evt_[a-z0-9]{26}$ + required: true + description: The event identifier + example: evt_x5zm2po6kimubhlfitgt2mfwgi + - in: path + name: workflowActionId + schema: + type: string + pattern: ^wfa_[a-z0-9]{26}$ + required: true + description: The workflow action identifier + example: wfa_uzkxpffkvpiu5fe3h5ira7sqpa + responses: + '200': + description: Workflow action retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/get-invocations-response' + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Event not found + '500': + description: Internal Error diff --git a/nas_spec/paths/flow/workflows/workflows@events@{eventId}@reflow.yaml b/nas_spec/paths/flow/workflows/workflows@events@{eventId}@reflow.yaml new file mode 100644 index 000000000..14426b535 --- /dev/null +++ b/nas_spec/paths/flow/workflows/workflows@events@{eventId}@reflow.yaml @@ -0,0 +1,36 @@ +post: + security: + - OAuth: + - flow + - flow:reflow + - ApiSecretKey: [ ] + tags: + - Workflows + summary: Reflow by event + description: | + Reflows a past event denoted by the event ID and triggers the actions of any workflows with matching conditions. + parameters: + - in: path + name: eventId + schema: + type: string + pattern: ^evt_[a-z0-9]{26}$ + required: true + description: The unique identifier for the event to be reflowed. + example: evt_x5zm2po6kimubhlfitgt2mfwgi + responses: + '202': + description: Event reflow initiated successfully + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Events for reflow not found + '500': + description: Internal Error diff --git a/nas_spec/paths/flow/workflows/workflows@events@{eventId}@workflow@{workflowId}@reflow.yaml b/nas_spec/paths/flow/workflows/workflows@events@{eventId}@workflow@{workflowId}@reflow.yaml new file mode 100644 index 000000000..bf2b03f5a --- /dev/null +++ b/nas_spec/paths/flow/workflows/workflows@events@{eventId}@workflow@{workflowId}@reflow.yaml @@ -0,0 +1,44 @@ +post: + security: + - OAuth: + - flow + - flow:reflow + - ApiSecretKey: [ ] + tags: + - Workflows + summary: Reflow by event and workflow + description: | + Reflows a past event by event ID and workflow ID. Triggers all the actions of a specific event and workflow combination if the event denoted by the event ID matches the workflow conditions. + parameters: + - in: path + name: eventId + schema: + type: string + pattern: ^evt_[a-z0-9]{26}$ + required: true + description: The unique identifier for the event to be reflowed. + example: evt_x5zm2po6kimubhlfitgt2mfwgi + - in: path + name: workflowId + schema: + type: string + pattern: ^wf_[a-z0-9]{26}$ + required: true + description: The identifier of the workflow whose actions you want to trigger. + example: wf_c8zm2po6kimubhlfitgt2mferf + responses: + '202': + description: Event reflow initiated successfully + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Events for reflow not found + '500': + description: Internal Error diff --git a/nas_spec/paths/flow/workflows/workflows@{workflowId}.yaml b/nas_spec/paths/flow/workflows/workflows@{workflowId}.yaml new file mode 100644 index 000000000..dc89cbbd8 --- /dev/null +++ b/nas_spec/paths/flow/workflows/workflows@{workflowId}.yaml @@ -0,0 +1,131 @@ +get: + security: + - OAuth: + - flow + - flow:workflows + - ApiSecretKey: [ ] + tags: + - Workflows + summary: Get a workflow + description: | + Get the details of a workflow + parameters: + - in: path + name: workflowId + schema: + type: string + pattern: ^wf_[a-z0-9]{26}$ + required: true + description: The workflow identifier + example: wf_c7svxlvo2bbuva4f6s3xu4f7wm + responses: + '200': + description: Workflow retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/get-workflow-response' + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Workflow not found + '500': + description: Internal Error + +delete: + security: + - OAuth: + - flow + - flow:workflows + - ApiSecretKey: [ ] + tags: + - Workflows + summary: Remove a workflow + description: | + Removes a workflow so it is no longer being executed. + Actions of already executed workflows will be still processed. + parameters: + - in: path + name: workflowId + schema: + type: string + pattern: ^wf_[a-z0-9]{26}$ + required: true + description: The workflow identifier + example: wf_c7svxlvo2bbuva4f6s3xu4f7wm + responses: + '204': + description: Workflow removed successfully + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Workflow not found + '500': + description: Internal Error + +patch: + security: + - OAuth: + - flow + - flow:workflows + - ApiSecretKey: [ ] + tags: + - Workflows + summary: Patch a workflow + description: | + Update a workflow. + parameters: + - in: path + name: workflowId + schema: + type: string + pattern: ^wf_[a-z0-9]{26}$ + required: true + description: The workflow identifier + example: wf_c7svxlvo2bbuva4f6s3xu4f7wm + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/patch-workflow-request' + responses: + '200': + description: Workflow updated successfully + content: + application/json: + schema: + $ref: '#/components/schemas/patch-workflow-response' + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Workflow not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '500': + description: Internal Error diff --git a/nas_spec/paths/flow/workflows/workflows@{workflowId}@actions.yaml b/nas_spec/paths/flow/workflows/workflows@{workflowId}@actions.yaml new file mode 100644 index 000000000..f2c5c8a3b --- /dev/null +++ b/nas_spec/paths/flow/workflows/workflows@{workflowId}@actions.yaml @@ -0,0 +1,52 @@ +post: + security: + - OAuth: + - flow + - flow:workflows + - ApiSecretKey: [ ] + tags: + - Workflows + summary: Add a workflow action + description: | + Adds a workflow action. Actions determine what the workflow will do when it is triggered. + parameters: + - in: path + name: workflowId + schema: + type: string + pattern: ^wf_[a-z2-7]{26}$ + required: true + description: The workflow identifier + example: wf_c7svxlvo2bbuva4f6s3xu4f7wm + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/add-update-workflow-action-request' + responses: + '201': + description: Workflow action added successfully + content: + application/json: + schema: + $ref: '#/components/schemas/add-workflow-action-response' + headers: + Cko-Request-Id: + schema: + $ref: "#/components/headers/Cko-Request-Id" + Cko-Version: + schema: + $ref: "#/components/headers/Cko-Version" + '401': + description: Unauthorized + '404': + description: Workflow not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '500': + description: Internal Error \ No newline at end of file diff --git a/nas_spec/paths/flow/workflows/workflows@{workflowId}@actions@{workflowActionId}.yaml b/nas_spec/paths/flow/workflows/workflows@{workflowId}@actions@{workflowActionId}.yaml new file mode 100644 index 000000000..3c60b1dd2 --- /dev/null +++ b/nas_spec/paths/flow/workflows/workflows@{workflowId}@actions@{workflowActionId}.yaml @@ -0,0 +1,107 @@ +put: + security: + - OAuth: + - flow + - flow:workflows + - ApiSecretKey: [ ] + tags: + - Workflows + summary: Update a workflow action + description: | + Update a workflow action. + parameters: + - in: path + name: workflowId + schema: + type: string + pattern: ^wf_[a-z0-9]{26}$ + required: true + description: The workflow identifier + example: wf_c7svxlvo2bbuva4f6s3xu4f7wm + - in: path + name: workflowActionId + schema: + type: string + pattern: ^wfa_[a-z0-9]{26}$ + required: true + description: The workflow action identifier + example: wfa_d5estuyxzshubhly2wu3hloehi + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/add-update-workflow-action-request' + responses: + '200': + description: Workflow action updated successfully + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Workflow or workflow action not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '500': + description: Internal Error + +delete: + security: + - OAuth: + - flow + - flow:workflows + - ApiSecretKey: [ ] + tags: + - Workflows + summary: Remove a workflow action + description: | + Removes a workflow action. Actions determine what the workflow will do when it is triggered. + parameters: + - in: path + name: workflowId + schema: + type: string + pattern: ^wf_[a-z2-7]{26}$ + required: true + description: The workflow identifier + example: wf_c7svxlvo2bbuva4f6s3xu4f7wm + - in: path + name: workflowActionId + schema: + type: string + pattern: ^wfa_[a-z2-7]{26}$ + required: true + description: The workflow action identifier + example: wfa_c7svxlvo2bbuva4f6s3xu4f7wm + responses: + '204': + description: Workflow action removed successfully + headers: + Cko-Request-Id: + schema: + $ref: "#/components/headers/Cko-Request-Id" + Cko-Version: + schema: + $ref: "#/components/headers/Cko-Version" + '401': + description: Unauthorized + '404': + description: Workflow or workflow action not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '500': + description: Internal Error \ No newline at end of file diff --git a/nas_spec/paths/flow/workflows/workflows@{workflowId}@conditions.yaml b/nas_spec/paths/flow/workflows/workflows@{workflowId}@conditions.yaml new file mode 100644 index 000000000..7ece78a7f --- /dev/null +++ b/nas_spec/paths/flow/workflows/workflows@{workflowId}@conditions.yaml @@ -0,0 +1,52 @@ +post: + security: + - OAuth: + - flow + - flow:workflows + - ApiSecretKey: [ ] + tags: + - Workflows + summary: Add a workflow condition + description: | + Adds a workflow condition. Conditions determine when the workflow will trigger. + parameters: + - in: path + name: workflowId + schema: + type: string + pattern: ^wf_[a-z2-7]{26}$ + required: true + description: The workflow identifier + example: wf_c7svxlvo2bbuva4f6s3xu4f7wm + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/add-update-workflow-condition-request' + responses: + '201': + description: Workflow condition added successfully + content: + application/json: + schema: + $ref: '#/components/schemas/add-workflow-condition-response' + headers: + Cko-Request-Id: + schema: + $ref: "#/components/headers/Cko-Request-Id" + Cko-Version: + schema: + $ref: "#/components/headers/Cko-Version" + '401': + description: Unauthorized + '404': + description: Workflow not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '500': + description: Internal Error \ No newline at end of file diff --git a/nas_spec/paths/flow/workflows/workflows@{workflowId}@conditions@{workflowConditionId}.yaml b/nas_spec/paths/flow/workflows/workflows@{workflowId}@conditions@{workflowConditionId}.yaml new file mode 100644 index 000000000..0c5abfa0c --- /dev/null +++ b/nas_spec/paths/flow/workflows/workflows@{workflowId}@conditions@{workflowConditionId}.yaml @@ -0,0 +1,101 @@ +put: + security: + - OAuth: + - flow + - flow:workflows + - ApiSecretKey: [ ] + tags: + - Workflows + summary: Update a workflow condition + description: | + Update a workflow condition. + parameters: + - in: path + name: workflowId + schema: + type: string + pattern: ^wf_[a-z0-9]{26}$ + required: true + description: The workflow identifier + example: wf_c7svxlvo2bbuva4f6s3xu4f7wm + - in: path + name: workflowConditionId + schema: + type: string + pattern: ^wfc_[a-z0-9]{26}$ + required: true + description: The workflow condition identifier + example: wfc_d5estuyxzshubhly2wu3hloehi + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/add-update-workflow-condition-request' + responses: + '200': + description: Workflow condition updated successfully + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Workflow or workflow condition not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '500': + description: Internal Error + +delete: + security: + - OAuth: + - flow + - flow:workflows + - ApiSecretKey: [ ] + tags: + - Workflows + summary: Remove a workflow condition + description: | + Removes a workflow condition. Conditions determine when the workflow will trigger. + parameters: + - in: path + name: workflowId + schema: + type: string + pattern: ^wf_[a-z2-7]{26}$ + required: true + description: The workflow identifier + example: wf_c7svxlvo2bbuva4f6s3xu4f7wm + - in: path + name: workflowConditionId + schema: + type: string + pattern: ^wfc_[a-z2-7]{26}$ + required: true + description: The workflow condition identifier + example: wfc_c7svxlvo2bbuva4f6s3xu4f7wm + responses: + '204': + description: Workflow condition removed successfully + headers: + Cko-Request-Id: + schema: + $ref: "#/components/headers/Cko-Request-Id" + Cko-Version: + schema: + $ref: "#/components/headers/Cko-Version" + '401': + description: Unauthorized + '404': + description: Workflow or workflow condition not found + '500': + description: Internal Error diff --git a/nas_spec/paths/flow/workflows/workflows@{workflowId}@test.yaml b/nas_spec/paths/flow/workflows/workflows@{workflowId}@test.yaml new file mode 100644 index 000000000..2dcf893ba --- /dev/null +++ b/nas_spec/paths/flow/workflows/workflows@{workflowId}@test.yaml @@ -0,0 +1,62 @@ +servers: + - url: https://api.sandbox.checkout.com + description: Sandbox +post: + security: + - OAuth: + - flow + - flow:workflows + tags: + - Workflows + summary: Test a workflow + description: > + Validate a workflow in our Sandbox environment. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/test-workflow-request' + parameters: + - in: path + name: workflowId + schema: + type: string + pattern: ^wf_[a-z2-7]{26}$ + required: true + description: The workflow identifier + example: wf_c7svxlvo2bbuva4f6s3xu4f7wm + responses: + '204': + description: Workflow test initiated + headers: + Cko-Request-Id: + schema: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + schema: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Workflow not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + type: object + properties: + request_id: + type: string + example: 0HLHPN8802NUF:00000003 + error_type: + type: string + example: request_invalid + error_codes: + type: array + items: + type: string + example: event_types_invalid + '500': + description: Internal Error diff --git a/nas_spec/paths/forex@rates.yaml b/nas_spec/paths/forex@rates.yaml new file mode 100644 index 000000000..9573c92ab --- /dev/null +++ b/nas_spec/paths/forex@rates.yaml @@ -0,0 +1,58 @@ +get: + tags: + - Forex + security: + - OAuth: + - fx + summary: Get FX rates + operationId: getFxRates + description: | + Use the Forex (FX) rates API to get the indicative foreign exchange rates that Checkout.com uses to process payments for card payouts. You can query the rates and the related source of rates (for example, Visa, Mastercard). + parameters: + - name: product + in: query + required: true + schema: + $ref: '#/components/schemas/ForexProduct' + - name: source + in: query + required: true + schema: + $ref: '#/components/schemas/ForexSource' + - name: currency_pairs + in: query + required: true + schema: + type: string + description: Comma-separated list of currency pairs + example: 'GBPEUR,USDNOK,JPNCAD' + - name: processing_channel_id + in: query + required: true + schema: + $ref: '#/components/schemas/ForexProcessingChannelId' + responses: + '200': + description: Rates retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/ForexRatesResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + '401': + description: Unauthorized + '429': + description: Too many requests or duplicate requests detected + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + '502': + description: Bad gateway diff --git a/nas_spec/paths/hosted-payments.yaml b/nas_spec/paths/hosted-payments.yaml new file mode 100644 index 000000000..c90248036 --- /dev/null +++ b/nas_spec/paths/hosted-payments.yaml @@ -0,0 +1,32 @@ +post: + security: + - ApiSecretKey: [ ] + tags: + - Hosted Payments Page + summary: Create a Hosted Payments Page session + operationId: createAHostedPaymentsSession + description: | + Create a Hosted Payments Page session and pass through all the payment information, like the amount, currency, country and reference. + + To get started with our Hosted Payments Page, contact your Solutions Engineer or support@checkout.com. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/HostedPaymentsRequest' + responses: + '201': + description: Created Hosted Payments Page + content: + application/json: + schema: + $ref: '#/components/schemas/HostedPaymentsResponse' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' diff --git a/nas_spec/paths/hosted-payments@{id}.yaml b/nas_spec/paths/hosted-payments@{id}.yaml new file mode 100644 index 000000000..b2b6f9373 --- /dev/null +++ b/nas_spec/paths/hosted-payments@{id}.yaml @@ -0,0 +1,28 @@ +get: + security: + - ApiSecretKey: [] + tags: + - Hosted Payments Page + summary: Get Hosted Payments Page details + operationId: getHostedPaymentsPageDetails + description: | + Retrieve details about a specific Hosted Payments Page using the ID returned when it was created. In the response, you will see the status of the Hosted Payments Page.

+ For more information, see the Hosted Payments Page documentation. + parameters: + - in: path + name: id + required: true + schema: + allOf: + - $ref: '#/components/schemas/HostedPaymentId' + responses: + '200': + description: Hosted Payments Page details retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/GetHostedPaymentsResponse' + '401': + description: Unauthorized + '404': + description: Hosted Payments Page not found diff --git a/nas_spec/paths/instruments.yaml b/nas_spec/paths/instruments.yaml new file mode 100644 index 000000000..f820e1dfb --- /dev/null +++ b/nas_spec/paths/instruments.yaml @@ -0,0 +1,35 @@ +post: + tags: + - Instruments + security: + - OAuth: + - vault + - vault:instruments + - ApiSecretKey: [ ] + summary: Create an instrument + operationId: createAnInstrument + description: | + Create a card or bank account payment instrument to use for future payments and payouts.

The parameters you need to provide when creating a bank account payment instrument depend on the account's country and currency. See our docs and the GET endpoint below. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/StoreInstrumentRequest' + responses: + '201': + description: Instrument created successfully + content: + application/json: + schema: + $ref: '#/components/schemas/StoreInstrumentResponse' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '500': + description: Internal Error diff --git a/nas_spec/paths/instruments@{id}.yaml b/nas_spec/paths/instruments@{id}.yaml new file mode 100644 index 000000000..f66306760 --- /dev/null +++ b/nas_spec/paths/instruments@{id}.yaml @@ -0,0 +1,116 @@ +get: + security: + - OAuth: + - vault + - vault:instruments + - ApiSecretKey: [ ] + tags: + - Instruments + summary: Get instrument details + operationId: getInstrumentDetails + description: Retrieve the details of a payment instrument. + parameters: + - in: path + name: id + schema: + type: string + pattern: "^(src)_(\\w{26})$" + required: true + description: The instrument ID + responses: + '200': + description: Instrument retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/RetrieveInstrumentResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Instrument not found + +patch: + tags: + - Instruments + security: + - OAuth: + - vault + - vault:instruments + - ApiSecretKey: [ ] + summary: Update an instrument + description: | + Update the details of a payment instrument. + parameters: + - in: path + name: id + required: true + schema: + type: string + pattern: '^(src_)[a-z0-9]{26}$' + example: src_ubfj2q76miwundwlk72vxt2i7q + description: The instrument ID + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateInstrumentRequest' + responses: + '200': + description: Instrument updated successfully + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateInstrumentResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Instrument not found or not associated with client + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '500': + description: Internal Error + +delete: + tags: + - Instruments + security: + - OAuth: + - vault + - vault:instruments + - ApiSecretKey: [ ] + summary: Delete an instrument + description: | + Delete a payment instrument. + parameters: + - in: path + name: id + required: true + schema: + type: string + pattern: '^(src_)[a-z0-9]{26}$' + example: src_ubfj2q76miwundwlk72vxt2i7q + description: The ID of the payment instrument to be deleted + responses: + '204': + description: Instrument deleted successfully + '401': + description: Unauthorized + '404': + description: Instrument not found or not associated with client + '500': + description: Internal Error diff --git a/nas_spec/paths/issuing/issuing@cardholders.yaml b/nas_spec/paths/issuing/issuing@cardholders.yaml new file mode 100644 index 000000000..59d2717f0 --- /dev/null +++ b/nas_spec/paths/issuing/issuing@cardholders.yaml @@ -0,0 +1,34 @@ +post: + tags: + - Cardholders + summary: Create a cardholder + description: Create a new cardholder that you can issue + a card to at a later point. + servers: + - url: https://api.checkout.com/ + description: Live API + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/add-cardholder-request' + responses: + '201': + description: Cardholder created successfully + content: + application/json: + schema: + $ref: '#/components/schemas/add-cardholder-response' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/IssuingValidationError' + '500': + description: Internal Server Error diff --git a/nas_spec/paths/issuing/issuing@cardholders@{cardholderId}.yaml b/nas_spec/paths/issuing/issuing@cardholders@{cardholderId}.yaml new file mode 100644 index 000000000..ee24221a3 --- /dev/null +++ b/nas_spec/paths/issuing/issuing@cardholders@{cardholderId}.yaml @@ -0,0 +1,29 @@ +get: + tags: + - Cardholders + summary: Get cardholder details + description: Retrieve the details for a cardholder you created previously. + servers: + - url: https://api.checkout.com/ + description: Live API + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + parameters: + - in: path + name: cardholderId + required: true + schema: + $ref: '#/components/schemas/IssuingCardholderId' + responses: + '200': + description: Cardholder returned successfully + content: + application/json: + schema: + $ref: '#/components/schemas/get-cardholder-response' + '401': + description: Unauthorized + '404': + description: Cardholder not found + '500': + description: Internal Server Error diff --git a/nas_spec/paths/issuing/issuing@cardholders@{cardholderId}@cards.yaml b/nas_spec/paths/issuing/issuing@cardholders@{cardholderId}@cards.yaml new file mode 100644 index 000000000..2512c4158 --- /dev/null +++ b/nas_spec/paths/issuing/issuing@cardholders@{cardholderId}@cards.yaml @@ -0,0 +1,34 @@ +get: + tags: + - Cardholders + summary: Get a cardholder's cards + description: 'Retrieves the cards issued to the specified cardholder. + + + Card credentials are not returned in the response. + + ' + servers: + - url: https://api.checkout.com/ + description: Live API + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + parameters: + - in: path + name: cardholderId + required: true + schema: + $ref: '#/components/schemas/IssuingCardholderId' + responses: + '200': + description: Cardholder's cards returned successfully + content: + application/json: + schema: + $ref: '#/components/schemas/get-cardholder-cards-response' + '401': + description: Unauthorized + '404': + description: Cardholder not found + '500': + description: Internal Server Error diff --git a/nas_spec/paths/issuing/issuing@cards.yaml b/nas_spec/paths/issuing/issuing@cards.yaml new file mode 100644 index 000000000..9d3bde553 --- /dev/null +++ b/nas_spec/paths/issuing/issuing@cards.yaml @@ -0,0 +1,35 @@ +post: + tags: + - Cards + summary: Create a card + description: Creates a physical or virtual card and issues it to the specified cardholder. + servers: + - url: https://api.checkout.com/ + description: Live API + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/add-card-request' + responses: + '201': + description: Card created successfully + content: + application/json: + schema: + $ref: '#/components/schemas/add-card-response' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/IssuingValidationError' + '500': + description: Internal Server Error + '503': + description: Service Unavailable diff --git a/nas_spec/paths/issuing/issuing@cards@{cardId}.yaml b/nas_spec/paths/issuing/issuing@cards@{cardId}.yaml new file mode 100644 index 000000000..0c7c3d4ea --- /dev/null +++ b/nas_spec/paths/issuing/issuing@cards@{cardId}.yaml @@ -0,0 +1,34 @@ +get: + tags: + - Cards + summary: Get card details + description: 'Retrieves the details for a card you issued previously. + + + The card''s credentials are not returned in the response. + + ' + servers: + - url: https://api.checkout.com/ + description: Live API + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + parameters: + - in: path + name: cardId + required: true + schema: + $ref: '#/components/schemas/IssuingCardId' + responses: + '200': + description: Card returned successfully + content: + application/json: + schema: + $ref: '#/components/schemas/get-card-response' + '401': + description: Unauthorized + '404': + description: Card not found + '500': + description: Internal Server Error diff --git a/nas_spec/paths/issuing/issuing@cards@{cardId}@3ds-enrollment.yaml b/nas_spec/paths/issuing/issuing@cards@{cardId}@3ds-enrollment.yaml new file mode 100644 index 000000000..46b0a3309 --- /dev/null +++ b/nas_spec/paths/issuing/issuing@cards@{cardId}@3ds-enrollment.yaml @@ -0,0 +1,122 @@ +post: + tags: + - Cards + summary: Enroll a card in 3DS + description: 'Enrolls a card in 3D + Secure (3DS). Additional information is requested from the cardholder through + a 3DS challenge when performing a transaction. + + + Two-factor authentication (2FA) is supported. For maximum security, we recommend + using a combination of a one-time password (OTP) sent via SMS, along with a password + or question and answer security pair. + + ' + servers: + - url: https://api.checkout.com/ + description: Live API + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + parameters: + - in: path + name: cardId + required: true + schema: + $ref: '#/components/schemas/IssuingCardId' + requestBody: + required: true + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/security_question' + - $ref: '#/components/schemas/Password' + responses: + '202': + description: 3DS card enrollment completed successfully + content: + application/json: + schema: + $ref: '#/components/schemas/3ds-enrollment-post-response' + '401': + description: Unauthorized + '404': + description: Card not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/IssuingValidationError' + '500': + description: Internal Server Error +patch: + tags: + - Cards + summary: Update a card's 3DS details + description: Updates a card's 3DS enrollment details. + servers: + - url: https://api.checkout.com/ + description: Live API + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + parameters: + - in: path + name: cardId + required: true + schema: + $ref: '#/components/schemas/IssuingCardId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/3ds-enrollment-patch-request' + responses: + '202': + description: Card 3DS details updated successfully + content: + application/json: + schema: + $ref: '#/components/schemas/3ds-enrollment-patch-response' + '401': + description: Unauthorized + '404': + description: Card not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/IssuingValidationError' + '500': + description: Internal Server Error +get: + tags: + - Cards + summary: Get a card's 3DS enrollment details + description: Retrieves a card's 3DS enrollment details. + servers: + - url: https://api.checkout.com/ + description: Live API + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + parameters: + - in: path + name: cardId + required: true + schema: + $ref: '#/components/schemas/IssuingCardId' + responses: + '200': + description: Card 3DS enrollment details retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/3ds-enrollment-get-response' + '401': + description: Unauthorized + '404': + description: Card not found + '500': + description: Internal Server Error diff --git a/nas_spec/paths/issuing/issuing@cards@{cardId}@activate.yaml b/nas_spec/paths/issuing/issuing@cards@{cardId}@activate.yaml new file mode 100644 index 000000000..855a635ea --- /dev/null +++ b/nas_spec/paths/issuing/issuing@cards@{cardId}@activate.yaml @@ -0,0 +1,34 @@ +post: + tags: + - Cards + summary: Activate a card + description: Activates an `inactive` or `suspended` card so that incoming authorizations + can be approved. + servers: + - url: https://api.checkout.com/ + description: Live API + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + parameters: + - in: path + name: cardId + required: true + schema: + $ref: '#/components/schemas/IssuingCardId' + responses: + '200': + description: Card activated successfully + content: + application/json: + schema: + $ref: '#/components/schemas/activate-card-response' + '401': + description: Unauthorized + '404': + description: Card not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/IssuingValidationError' diff --git a/nas_spec/paths/issuing/issuing@cards@{cardId}@credentials.yaml b/nas_spec/paths/issuing/issuing@cards@{cardId}@credentials.yaml new file mode 100644 index 000000000..50b425424 --- /dev/null +++ b/nas_spec/paths/issuing/issuing@cards@{cardId}@credentials.yaml @@ -0,0 +1,61 @@ +get: + tags: + - Cards + summary: Get the card credentials + description: Retrieves the credentials for a card you issued previously. + servers: + - url: https://api.checkout.com/ + description: Live API + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + parameters: + - in: path + name: cardId + required: true + schema: + $ref: '#/components/schemas/IssuingCardId' + - in: query + name: credentials + required: false + schema: + type: string + enum: + - number + - cvc2 + example: number,cvc2 + description: 'The credentials to retrieve. + + + You can either specify `number` or `cvc2` to retrieve the specified credential, + or both as a comma-separated list. For example, to retrieve both the CVC and + PAN: + + + ``` + + "credentials": "number, cvc2" + + ``` + + ' + responses: + '200': + description: Card credentials returned successfully + content: + application/json: + schema: + $ref: '#/components/schemas/Credentials' + '401': + description: Unauthorized + '404': + description: Card not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/IssuingValidationError' + '500': + description: Internal Server Error + '503': + description: Service Unavailable diff --git a/nas_spec/paths/issuing/issuing@cards@{cardId}@revoke.yaml b/nas_spec/paths/issuing/issuing@cards@{cardId}@revoke.yaml new file mode 100644 index 000000000..17abb7065 --- /dev/null +++ b/nas_spec/paths/issuing/issuing@cards@{cardId}@revoke.yaml @@ -0,0 +1,45 @@ +post: + tags: + - Cards + summary: Revoke a card + description: 'Revokes an `inactive`, `active`, or `suspended` card to permanently + decline all incoming authorizations. + + + This is a permanent action. Revoked cards cannot be reactivated. + + ' + servers: + - url: https://api.checkout.com/ + description: Live API + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + parameters: + - in: path + name: cardId + required: true + schema: + $ref: '#/components/schemas/IssuingCardId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/revoke-card-request' + responses: + '200': + description: Card revoked successfully + content: + application/json: + schema: + $ref: '#/components/schemas/revoke-card-response' + '401': + description: Unauthorized + '404': + description: Card not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/IssuingValidationError' diff --git a/nas_spec/paths/issuing/issuing@cards@{cardId}@schedule-revocation.yaml b/nas_spec/paths/issuing/issuing@cards@{cardId}@schedule-revocation.yaml new file mode 100644 index 000000000..e6f151f0f --- /dev/null +++ b/nas_spec/paths/issuing/issuing@cards@{cardId}@schedule-revocation.yaml @@ -0,0 +1,35 @@ +post: + tags: + - Cards + summary: Schedule card revocation + description: Schedules a card to be revoked on a specific date. + servers: + - url: https://api.checkout.com/ + description: Live API + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/schedule-revocation-request' + responses: + '200': + description: Revocation scheduled successfully + content: + application/json: + schema: + $ref: '#/components/schemas/schedule-revocation-response' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/IssuingValidationError' + '500': + description: Internal Server Error + '503': + description: Service Unavailable diff --git a/nas_spec/paths/issuing/issuing@cards@{cardId}@suspend.yaml b/nas_spec/paths/issuing/issuing@cards@{cardId}@suspend.yaml new file mode 100644 index 000000000..919941c9a --- /dev/null +++ b/nas_spec/paths/issuing/issuing@cards@{cardId}@suspend.yaml @@ -0,0 +1,45 @@ +post: + tags: + - Cards + summary: Suspend a card + description: 'Suspends an `active` or `inactive` card to temporarily decline all + incoming authorizations. + + + A `suspended` card can be reactivated. + + ' + servers: + - url: https://api.checkout.com/ + description: Live API + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + parameters: + - in: path + name: cardId + required: true + schema: + $ref: '#/components/schemas/IssuingCardId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/suspend-card-request' + responses: + '200': + description: Card suspended successfully + content: + application/json: + schema: + $ref: '#/components/schemas/suspend-card-response' + '401': + description: Unauthorized + '404': + description: Card not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/IssuingValidationError' diff --git a/nas_spec/paths/issuing/issuing@controls.yaml b/nas_spec/paths/issuing/issuing@controls.yaml new file mode 100644 index 000000000..862109f0a --- /dev/null +++ b/nas_spec/paths/issuing/issuing@controls.yaml @@ -0,0 +1,72 @@ +post: + tags: + - Card controls + summary: Create a control + description: Creates a card control and applies it to the specified card. + servers: + - url: https://api.checkout.com/ + description: Live API + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/add-control-request' + responses: + '201': + description: Control created successfully + content: + application/json: + schema: + $ref: '#/components/schemas/add-control-response' + '401': + description: Unauthorized + '404': + description: Target not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/IssuingValidationError' + '500': + description: Internal Server Error + '503': + description: Service Unavailable +get: + tags: + - Card controls + summary: Get a card's controls + description: Retrieves a list of spending controls applied to the specified card. + servers: + - url: https://api.checkout.com + description: Live API + - url: https://api.sandbox.checkout.com + description: Sandbox API + parameters: + - in: query + name: target_id + required: true + schema: + $ref: '#/components/schemas/IssuingTargetId' + responses: + '200': + description: Card's controls returned successfully + content: + application/json: + schema: + $ref: '#/components/schemas/get-controls-array-response' + '401': + description: Unauthorized + '404': + description: Target not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/IssuingValidationError' + '500': + description: Internal Server Error diff --git a/nas_spec/paths/issuing/issuing@controls@{controlId}.yaml b/nas_spec/paths/issuing/issuing@controls@{controlId}.yaml new file mode 100644 index 000000000..abbd19d45 --- /dev/null +++ b/nas_spec/paths/issuing/issuing@controls@{controlId}.yaml @@ -0,0 +1,115 @@ +get: + tags: + - Card controls + summary: Get control details + description: Retrieves the details of a card control you created previously. + servers: + - url: https://api.checkout.com/ + description: Live API + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + parameters: + - in: query + name: controlId + required: true + schema: + $ref: '#/components/schemas/IssuingControlId' + responses: + '200': + description: Control returned successfully + content: + application/json: + schema: + $ref: '#/components/schemas/get-control-response' + '401': + description: Unauthorized + '404': + description: Control not found + '500': + description: Internal Server Error +put: + tags: + - Card controls + summary: Update a control + description: Updates an existing card control. + servers: + - url: https://api.checkout.com + description: Live API + - url: https://api.sandbox.checkout.com + description: Sandbox API + parameters: + - in: path + name: controlId + required: true + schema: + $ref: '#/components/schemas/IssuingControlId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/update-control-request' + responses: + '200': + description: Control updated successfully + content: + application/json: + schema: + $ref: '#/components/schemas/update-control-response' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/IssuingValidationError' + '404': + description: Control not found + '500': + description: Internal Server Error + '503': + description: Service Unavailable +delete: + tags: + - Card controls + summary: Remove a control + description: 'Removes an existing card control from the card it was applied to. + + + If you want to reapply an equivalent control to the card, you''ll need to create + a new control. + + ' + servers: + - url: https://api.checkout.com + description: Live API + - url: https://api.sandbox.checkout.com + description: Sandbox API + parameters: + - in: path + name: controlId + required: true + schema: + $ref: '#/components/schemas/IssuingControlId' + responses: + '200': + description: Control removed successfully + content: + application/json: + schema: + $ref: '#/components/schemas/remove-control-response' + '401': + description: Unauthorized + '404': + description: Control not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/IssuingValidationError' + '500': + description: Internal Server Error + '503': + description: Service Unavailable diff --git a/nas_spec/paths/issuing/issuing@digital-cards@{digitalCardId}.yaml b/nas_spec/paths/issuing/issuing@digital-cards@{digitalCardId}.yaml new file mode 100644 index 000000000..caeddc2d7 --- /dev/null +++ b/nas_spec/paths/issuing/issuing@digital-cards@{digitalCardId}.yaml @@ -0,0 +1,31 @@ +get: + tags: + - Digital Cards + summary: Get digital card details + description: 'Retrieves the details for a digital card. + + ' + servers: + - url: https://api.checkout.com/ + description: Live API + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + parameters: + - in: path + name: digitalCardId + required: true + schema: + $ref: '#/components/schemas/IssuingDigitalCardId' + responses: + '200': + description: Digital card returned successfully + content: + application/json: + schema: + $ref: '#/components/schemas/get-digital-card-response' + '401': + description: Unauthorized + '404': + description: Digital card not found + '500': + description: Internal Server Error diff --git a/nas_spec/paths/issuing/issuing@simulate@authorizations.yaml b/nas_spec/paths/issuing/issuing@simulate@authorizations.yaml new file mode 100644 index 000000000..11dcf3f7c --- /dev/null +++ b/nas_spec/paths/issuing/issuing@simulate@authorizations.yaml @@ -0,0 +1,57 @@ +post: + tags: + - Card testing + summary: Simulate authorization + description: Simulate an authorization request with a card you issued previously. + servers: + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SimulateAuthorizationRequest' + examples: + Purchase - Authorization: + value: + card: + id: crd_fa6psq242dcd6fdn5gifcq1491 + expiry_month: 5 + expiry_year: 2025 + transaction: + type: purchase + amount: 2500 + currency: GBP + merchant: + category_code: '7399' + Purchase - Pre-authorization: + value: + card: + id: crd_fa6psq242dcd6fdn5gifcq1491 + expiry_month: 5 + expiry_year: 2025 + transaction: + type: purchase + amount: 2500 + currency: GBP + merchant: + category_code: '7399' + authorization_type: pre_authorization + responses: + '201': + description: Authorization processed successfully + content: + application/json: + schema: + $ref: '#/components/schemas/SimulateAuthorizationResponse' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/IssuingValidationError' + '500': + description: Internal Server Error diff --git a/nas_spec/paths/issuing/issuing@simulate@authorizations@{id}@authorizations.yaml b/nas_spec/paths/issuing/issuing@simulate@authorizations@{id}@authorizations.yaml new file mode 100644 index 000000000..15a2e3df2 --- /dev/null +++ b/nas_spec/paths/issuing/issuing@simulate@authorizations@{id}@authorizations.yaml @@ -0,0 +1,46 @@ +post: + tags: + - Card testing + summary: Simulate incrementing an authorization + description: 'Simulate an incremental authorization request for an existing approved + transaction. + + + Incremental authorizations increase the total authorized amount of the transaction. + For example, adding a restaurant bill to an existing hotel booking. + + ' + servers: + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SimulateIncrementalAuthorizationRequest' + parameters: + - in: path + name: id + required: true + schema: + $ref: '#/components/schemas/IssuingTransactionId' + responses: + '201': + description: Authorization processed successfully + content: + application/json: + schema: + $ref: '#/components/schemas/SimulateIncrementalAuthorizationResponse' + '401': + description: Unauthorized + '404': + description: Authorization not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/IssuingValidationError' + '500': + description: Internal Server Error diff --git a/nas_spec/paths/issuing/issuing@simulate@authorizations@{id}@presentments.yaml b/nas_spec/paths/issuing/issuing@simulate@authorizations@{id}@presentments.yaml new file mode 100644 index 000000000..0c6196e5a --- /dev/null +++ b/nas_spec/paths/issuing/issuing@simulate@authorizations@{id}@presentments.yaml @@ -0,0 +1,35 @@ +post: + tags: + - Card testing + summary: Simulate clearing + description: Simulate the clearing of an existing approved authorization. + servers: + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PresentmentRequest' + parameters: + - in: path + name: id + required: true + schema: + $ref: '#/components/schemas/IssuingTransactionId' + responses: + '202': + description: Presentment accepted + '401': + description: Unauthorized + '404': + description: Authorization not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/IssuingValidationError' + '500': + description: Internal Server Error diff --git a/nas_spec/paths/issuing/issuing@simulate@authorizations@{id}@refunds.yaml b/nas_spec/paths/issuing/issuing@simulate@authorizations@{id}@refunds.yaml new file mode 100644 index 000000000..413d04662 --- /dev/null +++ b/nas_spec/paths/issuing/issuing@simulate@authorizations@{id}@refunds.yaml @@ -0,0 +1,36 @@ +post: + tags: + - Card testing + summary: Simulate refund + description: Simulate the refund of an existing approved authorization, after it + has been cleared. + servers: + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SimulateRefundRequest' + parameters: + - in: path + name: id + required: true + schema: + $ref: '#/components/schemas/IssuingTransactionId' + responses: + '202': + description: Refund accepted + '401': + description: Unauthorized + '404': + description: Presentment not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/IssuingValidationError' + '500': + description: Internal Server Error diff --git a/nas_spec/paths/issuing/issuing@simulate@authorizations@{id}@reversals.yaml b/nas_spec/paths/issuing/issuing@simulate@authorizations@{id}@reversals.yaml new file mode 100644 index 000000000..17dec2b6c --- /dev/null +++ b/nas_spec/paths/issuing/issuing@simulate@authorizations@{id}@reversals.yaml @@ -0,0 +1,39 @@ +post: + tags: + - Card testing + summary: Simulate reversal + description: Simulate the reversal of an existing approved authorization. + servers: + - url: https://api.sandbox.checkout.com/ + description: Sandbox API + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ReversalRequest' + parameters: + - in: path + name: id + required: true + schema: + $ref: '#/components/schemas/IssuingTransactionId' + responses: + '201': + description: Reversal processed successfully + content: + application/json: + schema: + $ref: '#/components/schemas/ReversalResponse' + '401': + description: Unauthorized + '404': + description: Authorization not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/IssuingValidationError' + '500': + description: Internal Server Error diff --git a/nas_spec/paths/metadata@card.yaml b/nas_spec/paths/metadata@card.yaml new file mode 100644 index 000000000..4c51fd912 --- /dev/null +++ b/nas_spec/paths/metadata@card.yaml @@ -0,0 +1,102 @@ +post: + tags: + - Card metadata + security: + - OAuth: + - vault:card-metadata + - ApiSecretKey: [ ] + summary: Get card metadata + operationId: requestCardMetadata + description: | + Beta

+ Returns a single metadata record for the card specified by the Primary Account Number (PAN), Bank Identification Number (BIN), token, or instrument supplied. + + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CardMetadataRequest' + examples: + card: + value: + source: + type: card + number: '4539467987109256' + format: basic + bin: + value: + source: + type: bin + bin: '424242' + format: card_payouts + token: + value: + source: + type: token + token: 'tok_ubfj2q76miwundwlk72vxt2i7q' + format: basic + id: + value: + source: + type: id + id: 'src_e7hqezhxdfeetnyfdv3ayu6yru' + format: card_payouts + + responses: + '200': + description: Metadata for the card number, BIN, token, or instrument ID provided + content: + application/json: + schema: + $ref: '#/components/schemas/CardMetadataResponse' + examples: + basic: + value: + bin: '45434720' + scheme: visa + scheme_local: cartes_bancaires + card_type: credit + card_category: consumer + issuer: 'STATE BANK OF MAURITIUS' + issuer_country: MU + issuer_country_name: Mauritius + product_id: F + product_type: Visa Classic + card_payouts: + value: + bin: '45434720' + scheme: visa + scheme_local: cartes_bancaires + card_type: credit + card_category: consumer + issuer: 'STATE BANK OF MAURITIUS' + issuer_country: MU + issuer_country_name: Mauritius + product_id: F + product_type: Visa Classic + card_payouts: + domestic_non_money_transfer: not_supported + cross_border_non_money_transfer: standard + domestic_gambling: fast_funds + cross_border_gambling: unknown + domestic_money_transfer: unknown + cross_border_money_transfer: not_supported + + '401': + description: Unauthorized + '404': + description: Card Metadata not found + '415': + description: Unsupported Media Type + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '500': + description: Internal Server Error + '502': + description: Bad Gateway + '504': + description: Gateway Timeout diff --git a/nas_spec/paths/payment-links.yaml b/nas_spec/paths/payment-links.yaml new file mode 100644 index 000000000..b69025cc5 --- /dev/null +++ b/nas_spec/paths/payment-links.yaml @@ -0,0 +1,30 @@ +post: + security: + - ApiSecretKey: [ ] + tags: + - Payment Links + summary: Create a Payment Link + operationId: createAPaymentLinkSession + description: | + Create a Payment Link and pass through all the payment information, like the amount, currency, country and reference. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentLinksRequest' + responses: + '201': + description: Create Payment Link Page + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentLinksResponse' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' diff --git a/nas_spec/paths/payment-links@{id}.yaml b/nas_spec/paths/payment-links@{id}.yaml new file mode 100644 index 000000000..d98d4d977 --- /dev/null +++ b/nas_spec/paths/payment-links@{id}.yaml @@ -0,0 +1,28 @@ +get: + security: + - ApiSecretKey: [] + tags: + - Payment Links + summary: Get Payment Link details + operationId: getPaymentLinkDetails + description: | + Retrieve details about a specific Payment Link using its ID returned when the link was created. In the response, you will see the status of the Payment Link.

+ For more information, see the Payment Links documentation. + parameters: + - in: path + name: id + required: true + schema: + allOf: + - $ref: '#/components/schemas/PaymentLinkId' + responses: + '200': + description: Payment Link details retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/GetPaymentLinkResponse' + '401': + description: Unauthorized + '404': + description: Payment Link session not found diff --git a/nas_spec/paths/payments.yaml b/nas_spec/paths/payments.yaml new file mode 100644 index 000000000..1b6590bc0 --- /dev/null +++ b/nas_spec/paths/payments.yaml @@ -0,0 +1,339 @@ +post: + security: + - OAuth: + - gateway + - gateway:payment + - ApiSecretKey: [ ] + tags: + - Payments + summary: Request a payment or payout + operationId: requestAPaymentOrPayout + description: | + Send a payment or payout.

Note: successful payout requests will always return a 202 response. + parameters: + - $ref: '#/components/parameters/ckoIdempotencyKey' + requestBody: + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/PaymentRequest' + # - $ref: '#/components/schemas/PayoutRequest' + - $ref: '#/components/schemas/CardPayoutRequest' + - $ref: '#/components/schemas/BankPayoutRequest' + examples: + Payment: + value: + source: + type: token + token: tok_4gzeau5o2uqubbk6fufs3m7p54 + amount: 6540 + currency: USD + payment_type: Recurring + reference: 'ORD-5023-4E89' + description: 'Set of 3 masks' + capture: true + capture_on: '2019-09-10T10:11:12Z' + customer: + id: 'cus_udst2tfldj6upmye2reztkmm4i' + email: 'brucewayne@gmail.com' + name: 'Bruce Wayne' + phone: + country_code: '+1' + number: '415 555 2671' + billing_descriptor: + name: SUPERHEROES.COM + city: GOTHAM + shipping: + address: + address_line1: Checkout.com + address_line2: 90 Tottenham Court Road + city: London + state: London + zip: W1T 4TJ + country: GB + phone: + country_code: '+1' + number: 415 555 2671 + 3ds: + enabled: true + attempt_n3d: true + eci: '05' + cryptogram: AgAAAAAAAIR8CQrXcIhbQAAAAAA= + xid: MDAwMDAwMDAwMDAwMDAwMzIyNzY= + version: '2.0.1' + previous_payment_id: 'pay_fun26akvvjjerahhctaq2uzhu4' + risk: + enabled: false + success_url: 'http://example.com/payments/success' + failure_url: 'http://example.com/payments/fail' + payment_ip: '90.197.169.245' + recipient: + dob: '1985-05-15' + account_number: '5555554444' + zip: W1T + last_name: Jones + metadata: + coupon_code: 'NY2018' + partner_id: 123989 + Bank Payout: + value: + source: + type: 'currency_account' + id: 'ca_y3oqhf46pyzuxjbcn2giaqnb44' + destination: + type: 'id' + id: 'src_gsd2agaqd2sernz5tpcfv555nq' + amount: 1000 + currency: GBP + reference: 'PO-215-5721' + billing_descriptor: + reference: 'Withdrawal' + sender: + type: 'instrument' + reference: '8285282045818' + instruction: + purpose: 'Withdrawal' + scheme: 'local' + quote_id: 'qte_mbabizu24mvu3mela5njyhpit4' + processing_channel_id: 'pc_hpswyyx23geezflc2ocz3exn4y' + Card Payout - Money Transfer: + value: + source: + type: 'currency_account' + id: 'ca_y3oqhf46pyzuxjbcn2giaqnb44' + destination: + type: 'card' + number: '4242424242424242' + expiry_month: 12 + expiry_year: 2024 + account_holder: + type: 'individual' + first_name: 'John' + last_name: 'Smith' + amount: 1000 + currency: GBP + instruction: + funds_transfer_type: 'AA' + processing_channel_id: 'pc_hpswyyx23geezflc2ocz3exn4y' + sender: + type: 'individual' + first_name: 'Hayley' + last_name: 'Jones' + address: + address_line1: 'A House' + address_line2: 'A Street' + city: 'A City' + zip: 'AA12 1AA' + country: 'GB' + reference: '1234567ABCDEFG' + reference_type: 'other' + date_of_birth: '1939-05-27' + source_of_funds: 'debit' + Card Payout - Direct Funds Disbursement: + value: + source: + type: 'currency_account' + id: 'ca_y3oqhf46pyzuxjbcn2giaqnb44' + destination: + type: 'id' + id: 'src_y3oqhf46pyzuxjbcn2giaqnb44' + account_holder: + type: 'corporate' + company_name: 'Checkout.com' + amount: 1000 + currency: GBP + instruction: + funds_transfer_type: 'OG' + processing_channel_id: 'pc_hpswyyx23geezflc2ocz3exn4y' + Card Payout - Third-Party Funds Disbursement: + value: + source: + type: 'currency_account' + id: 'ca_y3oqhf46pyzuxjbcn2giaqnb44' + destination: + type: 'token' + token: 'tok_y3oqhf46pyzuxjbcn2giaqnb44' + account_holder: + type: 'corporate' + company_name: 'Checkout.com' + amount: 1000 + currency: GBP + instruction: + funds_transfer_type: 'FD' + processing_channel_id: 'pc_hpswyyx23geezflc2ocz3exn4y' + sender: + type: 'corporate' + company_name: 'A Company' + address: + address_line1: 'A House' + address_line2: 'A Street' + city: 'A City' + zip: 'AA12 1AA' + country: 'GB' + reference: '1234567ABCDEFG' + reference_type: 'other' + source_of_funds: 'debit' + + responses: + '201': + description: Payment processed successfully + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentResponse' + example: + id: 'pay_mbabizu24mvu3mela5njyhpit4' + action_id: 'act_mbabizu24mvu3mela5njyhpit4' + amount: 6540 + currency: 'USD' + approved: true + status: 'Authorized' + auth_code: '770687' + response_code: '10000' + response_summary: 'Approved' + 3ds: + downgraded: true + enrolled: 'N' + risk: + flagged: true + source: + type: 'card' + id: 'src_nwd3m4in3hkuddfpjsaevunhdy' + billing_address: + address_line1: 'Checkout.com' + address_line2: '90 Tottenham Court Road' + city: 'London' + state: 'London' + zip: 'W1T 4TJ' + country: 'GB' + phone: + country_code: '+1' + number: '415 555 2671' + last4: '4242' + fingerprint: 'F31828E2BDABAE63EB694903825CDD36041CC6ED461440B81415895855502832' + bin: '424242' + customer: + id: 'cus_udst2tfldj6upmye2reztkmm4i' + email: 'brucewayne@gmail.com' + name: 'Bruce Wayne' + phone: + country_code: '+1' + number: '415 555 2671' + processed_on: '2019-09-10T10:11:12Z' + reference: 'ORD-5023-4E89' + processing: + retrieval_reference_number: '909913440644' + acquirer_transaction_id: '440644309099499894406' + recommendation_code: "02" + eci: '06' + scheme_id: '489341065491658' + _links: + self: + href: 'https://api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4' + action: + href: 'https://api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/actions' + void: + href: 'https://api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/voids' + capture: + href: 'https://api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/captures' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '202': + description: Payment asynchronous or further action required + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/PaymentAcceptedResponse' + - $ref: '#/components/schemas/PayoutAcceptedResponse' + - $ref: '#/components/schemas/CardPayoutAcceptedResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '429': + description: Too many requests or duplicate request detected + content: + application/json: + schema: + type: object + properties: + request_id: + type: string + example: 0HL80RJLS76I7 + error_type: + type: string + example: request_invalid + error_codes: + type: array + items: + type: string + example: duplicate_request + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '502': + description: Bad gateway +get: + tags: + - Payments + security: + - OAuth: + - gateway + - gateway:payment-details + - ApiSecretKey: [ ] + summary: Get payment lists + description: | + Beta

+ Returns a list of your business' payments that match the specified reference. Results are returned in reverse chronological order, with the most recent payments shown first. + + This will only return payments initiated from June 2022 onwards. Payments initiated before this date may return a `404` error code if you attempt to retrieve them. + parameters: + - in: query + name: limit + schema: + type: integer + minimum: 1 + maximum: 100 + default: 10 + required: false + description: The numbers of results to retrieve + - in: query + name: skip + schema: + type: integer + minimum: 0 + default: 0 + required: false + description: The number of results to skip + - in: query + name: reference + schema: + type: string + required: true + description: A reference, such as an order ID, that can be used to identify the payment + responses: + '200': + description: Payments retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentPaged' + '401': + description: Unauthorized + '422': + description: Unprocessable paging + content: + application/json: + schema: + $ref: '#/components/schemas/PagingError' diff --git a/nas_spec/paths/payments@{id}.yaml b/nas_spec/paths/payments@{id}.yaml new file mode 100644 index 000000000..69abb9044 --- /dev/null +++ b/nas_spec/paths/payments@{id}.yaml @@ -0,0 +1,45 @@ +get: + tags: + - Payments + security: + - OAuth: + - gateway + - gateway:payment-details + - ApiSecretKey: [ ] + summary: Get payment details + operationId: getPaymentDetails + description: | + Returns the details of the payment with the specified identifier string. + + If the payment method requires a redirection to a third party (e.g., 3D Secure), + the redirect URL back to your site will include a `cko-session-id` query parameter + containing a payment session ID that can be used to obtain the details of the payment, for example: + + http://example.com/success?cko-session-id=sid_ubfj2q76miwundwlk72vxt2i7q. + parameters: + - in: path + name: id + schema: + type: string + pattern: "^(pay|sid)_(\\w{26})$" + required: true + description: The payment or payment session identifier + responses: + '200': + description: Payment retrieved successfully + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/PaymentDetails' + - $ref: '#/components/schemas/PayoutDetails' + - $ref: '#/components/schemas/CardPayoutDetails' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Payment not found diff --git a/nas_spec/paths/payments@{id}@actions.yaml b/nas_spec/paths/payments@{id}@actions.yaml new file mode 100644 index 000000000..0d7804d2d --- /dev/null +++ b/nas_spec/paths/payments@{id}@actions.yaml @@ -0,0 +1,38 @@ +get: + tags: + - Payments + security: + - OAuth: + - gateway + - gateway:payment-details + - ApiSecretKey: [ ] + summary: Get payment actions + operationId: getPaymentActions + description: | + Returns all the actions associated with a payment ordered by processing date in descending order (latest first). + parameters: + - in: path + name: id + schema: + type: string + pattern: "^(pay)_(\\w{26})$" + required: true + description: The payment identifier + responses: + '200': + description: Payment actions retrieved successfully + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/PaymentActionsResponse' + - $ref: '#/components/schemas/CardPayoutActionsResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Payment not found diff --git a/nas_spec/paths/payments@{id}@authorizations.yaml b/nas_spec/paths/payments@{id}@authorizations.yaml new file mode 100644 index 000000000..293eaca8a --- /dev/null +++ b/nas_spec/paths/payments@{id}@authorizations.yaml @@ -0,0 +1,53 @@ +post: + tags: + - Payments + security: + - OAuth: + - gateway + - gateway:payment-authorizations + - ApiSecretKey: [ ] + summary: Increment authorization + operationId: incrementPaymentAuthorization + description: | + Request an incremental authorization to increase the authorization amount or extend the authorization's validity period. + + parameters: + - $ref: '#/components/parameters/ckoIdempotencyKey' + - in: path + name: id + schema: + type: string + pattern: "^(pay)_(\\w{26})$" + required: true + description: The payment identifier + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AuthorizationRequest' + responses: + '201': + description: Authorization processed successfully + content: + application/json: + schema: + $ref: '#/components/schemas/AuthorizationResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '403': + description: Capture not allowed + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '404': + description: Payment not found + '502': + description: Bad gateway diff --git a/nas_spec/paths/payments@{id}@captures.yaml b/nas_spec/paths/payments@{id}@captures.yaml new file mode 100644 index 000000000..f8033ef55 --- /dev/null +++ b/nas_spec/paths/payments@{id}@captures.yaml @@ -0,0 +1,54 @@ +post: + tags: + - Payments + security: + - OAuth: + - gateway + - gateway:payment-captures + - ApiSecretKey: [ ] + summary: Capture a payment + operationId: captureAPayment + description: | + Captures a payment if supported by the payment method. + + For card payments, capture requests are processed asynchronously. You can use [workflows](#tag/Workflows) to be notified if the capture is successful. + parameters: + - $ref: '#/components/parameters/ckoIdempotencyKey' + - in: path + name: id + schema: + type: string + pattern: "^(pay)_(\\w{26})$" + required: true + description: The payment identifier + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CaptureRequest' + responses: + '202': + description: Capture accepted + content: + application/json: + schema: + $ref: '#/components/schemas/CaptureAcceptedResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '403': + description: Capture not allowed + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '404': + description: Payment not found + '502': + description: Bad gateway diff --git a/nas_spec/paths/payments@{id}@refunds.yaml b/nas_spec/paths/payments@{id}@refunds.yaml new file mode 100644 index 000000000..88bdcd1ed --- /dev/null +++ b/nas_spec/paths/payments@{id}@refunds.yaml @@ -0,0 +1,54 @@ +post: + tags: + - Payments + security: + - OAuth: + - gateway + - gateway:payment-refunds + - ApiSecretKey: [ ] + summary: Refund a payment + operationId: refundAPayment + description: | + Refunds a payment if supported by the payment method. + + For card payments, refund requests are processed asynchronously. You can use [workflows](#tag/Workflows) to be notified if the refund is successful. + parameters: + - $ref: '#/components/parameters/ckoIdempotencyKey' + - in: path + name: id + schema: + type: string + pattern: "^(pay)_(\\w{26})$" + required: true + description: The payment identifier + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RefundRequest' + responses: + '202': + description: Refund accepted + content: + application/json: + schema: + $ref: '#/components/schemas/RefundAcceptedResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '403': + description: Refund not allowed + '404': + description: Payment not found + '502': + description: Bad gateway diff --git a/nas_spec/paths/payments@{id}@voids.yaml b/nas_spec/paths/payments@{id}@voids.yaml new file mode 100644 index 000000000..123771728 --- /dev/null +++ b/nas_spec/paths/payments@{id}@voids.yaml @@ -0,0 +1,54 @@ +post: + tags: + - Payments + security: + - OAuth: + - gateway + - gateway:payment-voids + - ApiSecretKey: [ ] + summary: Void a payment + operationId: voidAPayment + description: | + Voids a payment if supported by the payment method. + + For card payments, void requests are processed asynchronously. You can use [workflows](#tag/Workflows) to be notified if the void is successful. + parameters: + - $ref: '#/components/parameters/ckoIdempotencyKey' + - in: path + name: id + schema: + type: string + pattern: "^(pay)_(\\w{26})$" + required: true + description: The payment identifier + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VoidRequest' + responses: + '202': + description: Void accepted + content: + application/json: + schema: + $ref: '#/components/schemas/VoidAcceptedResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + '403': + description: Void not allowed + '404': + description: Payment not found + '502': + description: Bad gateway diff --git a/nas_spec/paths/reports.yaml b/nas_spec/paths/reports.yaml new file mode 100644 index 000000000..4be7232ed --- /dev/null +++ b/nas_spec/paths/reports.yaml @@ -0,0 +1,77 @@ +servers: + - url: https://api.sandbox.checkout.com + description: Sandbox + - url: https://api.checkout.com + description: Production +get: + tags: + - Reports + security: + - OAuth: + - reports + - reports:view + - ApiSecretKey: [ ] + summary: Get all reports + operationId: getReports + description: | + Returns the list of reports and their details. + parameters: + - name: created_after + in: query + description: Filters reports to those that were created on or after the specified timestamp. + schema: + type: string + format: date-time + example: '2022-02-17T00:00:00' + - name: created_before + in: query + description: Filters reports to those that were created before the specified timestamp. + schema: + type: string + format: date-time + example: '2022-02-19T00:00:00' + - name: entity_id + in: query + description: Filters reports to those that match the specified client entity ID. Sub-entity IDs are not supported. + schema: + type: string + example: 'ent_znj4ih5kn4fuxiaquoudv5mvwy' + pattern: "^(ent)_(\\w{26})$" + - name: limit + in: query + description: The number of results you want to retrieve per page.
For example, if the total result count is 50 and you use limit=10, you will need to iterate over 5 pages containing 10 elements each to be able to retrieve all of the reports that match your query. + schema: + type: integer + format: int32 + minimum: 1 + maximum: 100 + default: 100 + example: 5 + - name: pagination_token + in: query + description: A token used for pagination when a response contains results across multiple pages. + schema: + type: string + responses: + '200': + description: Reports retrieved succesfully + content: + application/json: + schema: + $ref: '#/components/schemas/ReportListResponse' + headers: + Cko-Version: + $ref: '#/components/headers/Cko-Version' + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + '401': + description: Unauthorized. Likely cause is that access token is not valid or was not specified. + '422': + description: Unprocessable entity + content: + application/json: + schema: + $ref: '#/components/schemas/ReportErrorResponse' + application/problem+json: + schema: + $ref: '#/components/schemas/ReportErrorResponse' diff --git a/nas_spec/paths/reports@{id}.yaml b/nas_spec/paths/reports@{id}.yaml new file mode 100644 index 000000000..e43c980d4 --- /dev/null +++ b/nas_spec/paths/reports@{id}.yaml @@ -0,0 +1,55 @@ +servers: + - url: https://api.sandbox.checkout.com + description: Sandbox + - url: https://api.checkout.com + description: Production +get: + tags: + - Reports + security: + - OAuth: + - reports + - reports:view + - ApiSecretKey: [ ] + summary: Get report details + operationId: getReportDetails + description: | + Use this endpoint to retrieve a specific report using its ID. + parameters: + - name: id + in: path + description: The ID of the report to retrieve. + required: true + schema: + type: string + example: rpt_lmmldzousk7etoqijqundqexa4 + pattern: "^(rpt)_(\\w{26})$" + responses: + '200': + description: Report details retrieved succesfully + content: + application/json: + schema: + $ref: '#/components/schemas/ReportResponse' + headers: + Cko-Version: + $ref: '#/components/headers/Cko-Version' + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + '401': + description: Unauthorized. Likely causes include an invalid or unspecified access token. + '404': + description: No report with the specified ID was found. + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ReportErrorResponse' + - type: object + properties: + error_type: + example: 'not_found' + error_codes: + example: + - 'report_not_found' + diff --git a/nas_spec/paths/reports@{id}@files@{fileId}.yaml b/nas_spec/paths/reports@{id}@files@{fileId}.yaml new file mode 100644 index 000000000..105f88ac3 --- /dev/null +++ b/nas_spec/paths/reports@{id}@files@{fileId}.yaml @@ -0,0 +1,62 @@ +servers: + - url: https://api.sandbox.checkout.com + description: Sandbox + - url: https://api.checkout.com + description: Production +get: + tags: + - Reports + security: + - OAuth: + - reports + - reports:view + - ApiSecretKey: [ ] + summary: Get report file + operationId: getReportFile + description: | + Use this endpoint to retrieve a specific file from a given report using their respective IDs. + parameters: + - name: Id + in: path + description: The ID of the report that the file belongs to. + required: true + schema: + type: string + example: rpt_lmmldzousk7etoqijqundqexa4 + pattern: "^(rpt)_(\\w{26})$" + - name: fileId + in: path + description: The ID of the file to retrieve. + required: true + schema: + type: string + example: file_7ysmgfkj4ipunduud22uf73iey + pattern: "^(file)_(\\w{26})$" + responses: + '302': + description: Redirect to the report file download location. + headers: + Cko-Version: + $ref: '#/components/headers/Cko-Version' + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Location: + description: Link to download the file. + schema: + type: string + '401': + description: Unauthorized. Likely causes include an invalid or unspecified access token. + '404': + description: No report with the specified ID was found. + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ReportErrorResponse' + - type: object + properties: + error_type: + example: 'not_found' + error_codes: + example: + - 'report_file_not_found' diff --git a/nas_spec/paths/sessions.yaml b/nas_spec/paths/sessions.yaml new file mode 100644 index 000000000..2ddbe6d48 --- /dev/null +++ b/nas_spec/paths/sessions.yaml @@ -0,0 +1,63 @@ +post: + tags: + - Standalone + security: + - OAuth: + - sessions:app + - sessions:browser + summary: Request a session + operationId: createSession + description: | + Create a payment session to authenticate a cardholder before requesting a payment. + Payment sessions can be linked to one or more payments (in the case of recurring and other merchant-initiated payments). + + The `next_actions` object in the response tells you which actions can be performed next. + + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRequest' + responses: + '201': + description: Session processed successfully + content: + application/json: + schema: + $ref: '#/components/schemas/CreateSessionOkResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '202': + description: Session accepted and further action required + content: + application/json: + schema: + $ref: '#/components/schemas/CreateSessionAcceptedResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '403': + description: Forbidden. This can happen when the OAuth token scope is `sessions:app`, but the `channel_data` property in the request is browser related. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '503': + description: Service not available. A temporary server error. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' diff --git a/nas_spec/paths/sessions@{id}.yaml b/nas_spec/paths/sessions@{id}.yaml new file mode 100644 index 000000000..8a6bbcb89 --- /dev/null +++ b/nas_spec/paths/sessions@{id}.yaml @@ -0,0 +1,57 @@ +get: + tags: + - Standalone + security: + - OAuth: + - sessions:app + - sessions:browser + - SessionSecret: [ ] + summary: Get session details + operationId: getSession + description: | + Returns the details of the session with the specified identifier string. + parameters: + - name: id + in: path + description: Session ID + required: true + schema: + type: string + - name: channel + in: header + description: Optionally provide the type of channnel so you only get the relevant actions + schema: + type: string + enum: + - browser + - app + description: If a value is not provided, and if the `status` is `pending`, then `next_actions` will return `collect_channel_data` and if available, `issuer_fingerprint`. + example: browser + responses: + '200': + description: Session retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/GetSessionResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '403': + description: Forbidden. This can happen when the OAuth token scope is `sessions:app`, but the session was initiated with the scope `sessions:browser`. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: Session not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '502': + description: Bad gateway diff --git a/nas_spec/paths/sessions@{id}@collect-data.yaml b/nas_spec/paths/sessions@{id}@collect-data.yaml new file mode 100644 index 000000000..3d27808b0 --- /dev/null +++ b/nas_spec/paths/sessions@{id}@collect-data.yaml @@ -0,0 +1,51 @@ +put: + security: + - OAuth: + - sessions:app + - sessions:browser + - SessionSecret: [ ] + summary: Update a session + operationId: updateSession + description: Update a session by providing information about the environment. + tags: + - Standalone + parameters: + - name: id + in: path + description: Session ID + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ChannelData' + responses: + '200': + description: Session updated successfully + content: + application/json: + schema: + $ref: '#/components/schemas/GetSessionResponse' + '401': + description: Unauthorized + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: Session not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '422': + description: Unprocessable channel information + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' diff --git a/nas_spec/paths/sessions@{id}@complete.yaml b/nas_spec/paths/sessions@{id}@complete.yaml new file mode 100644 index 000000000..f6eafd616 --- /dev/null +++ b/nas_spec/paths/sessions@{id}@complete.yaml @@ -0,0 +1,58 @@ +post: + security: + - OAuth: + - sessions:app + - sessions:browser + - SessionSecret: [ ] + summary: Complete a session + operationId: completeSession + description: | + Completes a session by posting the the following request to the callback URL (only relevant for non hosted sessions): + ``` + { + "session_id": "sid_llraltf4jlwu5dxdtprcv7ba5i", + "amount" : 6540, + "currency": "USD", + "status": "approved", + "authentication_type": "regular", + "authentication_category": "payment", + "reference": "ORD-5023-4E89", + "approved": true, + "protocol_version": "2.1.0", + "response_code": "Y", + "response_reason": "01", + "cryptogram": "MTIzNDU2Nzg5MDA5ODc2NTQzMjE=", + "eci": "05", + "xid": "XSUErNftqkiTdlkpSk8p32GWOFA", + "cardholder_info": "Card declined. Please contact your issuing bank.", + "challenged": true + } + ``` +
+ The fields of the above are the same as they would be in a GET session response + tags: + - Standalone + parameters: + - name: id + in: path + description: Session ID + required: true + schema: + type: string + responses: + '204': + description: Session completed successfully + '401': + description: Unauthorized + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: Session not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' diff --git a/nas_spec/paths/sessions@{id}@issuer-fingerprint.yaml b/nas_spec/paths/sessions@{id}@issuer-fingerprint.yaml new file mode 100644 index 000000000..f6b2df03a --- /dev/null +++ b/nas_spec/paths/sessions@{id}@issuer-fingerprint.yaml @@ -0,0 +1,50 @@ +put: + security: + - OAuth: + - sessions:browser + - SessionSecret: [ ] + summary: Update session 3DS Method completion indicator + operationId: updateSessionThreeDsMethodCompletion + description: Update the session's 3DS Method completion indicator based on the result of accessing the 3DS Method URL. + tags: + - Standalone + parameters: + - name: id + in: path + description: Session ID + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ThreeDsMethodCompletion' + responses: + '200': + description: Session updated successfully + content: + application/json: + schema: + $ref: '#/components/schemas/GetSessionResponseAfterChannelDataSupplied' + '401': + description: Unauthorized + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: Session not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '422': + description: Unprocessable channel information + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' diff --git a/nas_spec/paths/tokens.yaml b/nas_spec/paths/tokens.yaml new file mode 100644 index 000000000..724c303ea --- /dev/null +++ b/nas_spec/paths/tokens.yaml @@ -0,0 +1,37 @@ +post: + tags: + - Tokens + security: + - ApiPublicKey: [ ] + summary: Request a token + operationId: requestAToken + description: | + Exchange card details for a reference token that can be used later to request a card payment. Tokens are single use and expire after 15 minutes. + To create a token, please authenticate using your public key. + + **Please note:** You should only use the `card` type for testing purposes. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TokenRequest' + responses: + '201': + description: Reference token created successfully + content: + application/json: + schema: + $ref: '#/components/schemas/TokenResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' diff --git a/nas_spec/paths/transfers.yaml b/nas_spec/paths/transfers.yaml new file mode 100644 index 000000000..d7ae48285 --- /dev/null +++ b/nas_spec/paths/transfers.yaml @@ -0,0 +1,55 @@ +servers: + - url: https://transfers.checkout.com + description: Production server + - url: https://transfers.sandbox.checkout.com + description: Sandbox server +post: + security: + - OAuth: + - transfers:create + - ApiSecretKey: + - transfers:create + description: | + Initiate a transfer of funds from source entity to destination entity. + summary: Initiate a transfer of funds + operationId: createTransfer + parameters: + - $ref: '#/components/parameters/ckoIdempotencyKeyRequired' + requestBody: + required: true + description: The details of the transfer. + content: + application/json: + schema: + $ref: '#/components/schemas/CreateTransferRequest' + responses: + '201': + description: Transfer successfully created. + content: + application/json: + schema: + $ref: '#/components/schemas/CreateTransferResponse' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '400': + description: Bad Request + '401': + description: Unauthorized + '422': + description: Invalid data was sent + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ValidationError' + - type: object + properties: + error_codes: + example: + - error_code1 + - error_code2 + tags: + - Transfers diff --git a/nas_spec/paths/transfers@{id}.yaml b/nas_spec/paths/transfers@{id}.yaml new file mode 100644 index 000000000..bae12c726 --- /dev/null +++ b/nas_spec/paths/transfers@{id}.yaml @@ -0,0 +1,55 @@ +servers: + - url: https://transfers.checkout.com + description: Production server + - url: https://transfers.sandbox.checkout.com + description: Sandbox server +get: + tags: + - Transfers + security: + - OAuth: + - transfers:view + - ApiSecretKey: + - transfers:view + summary: Retrieve a transfer + operationId: getTransferDetails + description: Retrieve transfer details using the transfer identifier. + parameters: + - in: path + name: id + description: The transfer identifier + required: true + schema: + type: string + example: tra_y3oqhf46pyzuxjbcn2giaqnb4 + responses: + '200': + description: Transfer found + content: + application/json: + schema: + $ref: '#/components/schemas/Transfer' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '400': + description: Bad Request + '401': + description: Unauthorized + '404': + description: Transfer not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ValidationError' + - type: object + properties: + error_codes: + example: + - error_code1 + - error_code2 diff --git a/nas_spec/paths/validation@bank-accounts@{country}@{currency}.yaml b/nas_spec/paths/validation@bank-accounts@{country}@{currency}.yaml new file mode 100644 index 000000000..46d75fd3a --- /dev/null +++ b/nas_spec/paths/validation@bank-accounts@{country}@{currency}.yaml @@ -0,0 +1,74 @@ +get: + tags: + - Instruments + security: + - OAuth: + - payouts:bank-details + summary: Get bank account field formatting + operationId: getBankAccountFields + description: | + Returns the bank account field formatting required to create bank account instruments or perform payouts for the specified country and currency. + parameters: + - in: path + name: country + schema: + type: string + minLength: 2 + maxLength: 2 + required: true + description: | + The two-letter ISO country code + - in: path + name: currency + schema: + type: string + minLength: 3 + maxLength: 3 + required: true + description: | + The three-letter ISO currency code + - in: query + name: account-holder-type + schema: + type: string + enum: + - individual + - corporate + - government + description: | + The type of account holder that will be used to filter the fields returned + - in: query + name: payment-network + schema: + type: string + enum: + - local + - sepa + - fps + - ach + - fedwire + - swift + description: | + The banking network that will be used to filter the fields returned + responses: + '200': + description: Bank account fields retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/BankAccountFields' + headers: + Cko-Request-Id: + $ref: '#/components/headers/Cko-Request-Id' + Cko-Version: + $ref: '#/components/headers/Cko-Version' + '401': + description: Unauthorized + '404': + description: Fields not found + '422': + description: Invalid data was sent + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' diff --git a/nas_spec/swagger.yaml b/nas_spec/swagger.yaml new file mode 100644 index 000000000..ae9182880 --- /dev/null +++ b/nas_spec/swagger.yaml @@ -0,0 +1,142 @@ +openapi: '3.0.1' +info: + title: Checkout.com API Reference + x-logo: + url: 'https://assets.checkout.com/docs/logos/logo-checkout-api-dark.svg' + backgroundColor: '#E6E7EC' + altText: 'Checkout.com API logo' + contact: + name: Checkout.com Support + url: 'https://checkout.com' + email: support@checkout.com + license: + name: Checkout.com + url: 'https://checkout.com/api/license/' + termsOfService: 'https://checkout.com/terms/' + description: > + ## Get started + + Checkout.com provides a collection of APIs that enable you to process and manage payments. Our APIs accept and return JSON in the HTTP body, and return standard HTTP response codes. + + You can consume the APIs directly using your favorite HTTP/REST library. + + We have a testing environment called sandbox, which you can sign up for to test API calls without affecting live data. + + # Authentication + + When you sign up for an account, you can authenticate with either Access keys (OAuth 2.0), or Secret API keys. + + Unless explicitly stated, all endpoints require authentication using either your Access or Secret API Keys. Public keys should only be used in JavaScript or native applications. + + - Client-side authentication. Use your [public key](#section/Authentication/ApiPublicKey) for client-side authentication. It only has access to a limited set of our APIs – mostly those called as part of your payment environment. + + - Server-to-server authentication. Use your [secret key](#section/Authentication/ApiSecretKey) or [OAuth](#section/Authentication/OAuth) for server-to-server communication. Support for API keys depends on the endpoint. + + Never share your OAuth credentials, API keys, or access tokens. Keep them guarded and secure. + + + +servers: + - url: https://api.sandbox.checkout.com + description: Sandbox API + - url: https://api.checkout.com + description: Live API +tags: + - name: Access + description: Create an access token to begin using our APIs. + - name: Payments + description: Process and manage payments from a variety of sources and to various destinations all within one integration. + - name: Payment Links + description: Create a Payment Link to accept and process payment details. + - name: Hosted Payments Page + description: Create a Hosted Payments Page to accept and process payment details. + # - name: Sources + # description: Create a payment source for a customer that you can use for one or more payments. + - name: Tokens + description: Create a token that represents a card's details that you can later use to request a payment, without you having to process or store any sensitive information. + - name: Instruments + description: Create and manage your card and bank account payment instruments. + - name: Forex + description: Checkout.com Foreign Exchange services + - name: Disputes + description: Keep track of and act on your open disputes (also known as chargebacks) to submit the best possible response. + - name: Platforms + description: Manage all your sub-entities (also known as sub-merchants) through one integration, globally. + - name: Payment instruments + description: Manage bank account payment instruments for your sub-entities. + - name: Payout schedules + description: View and manage payout schedules for your sub-entities. + - name: Reports + description: Retrieve your reconciliation reports programmatically with the Reports API. + - name: Financial actions + description: Returns all the processed financial actions associated with your given filter. The results are ordered by processing date in descending order (latest first). + - name: Standalone + description: Use Standalone Sessions to authenticate transactions with 3D Secure (3DS) and comply with Strong Customer Authentication (SCA) requirements. + - name: Workflows + description: Use Workflows to start receiving webhook notifications for your payments, disputes, and sub-entities. + - name: Apple Pay + description: Manage your Apple Pay certificates in order to process payments via Apple Pay. + - name: Transfers + description: Transfer funds while managing the entities to transfer money to recoup funds from a seller, return money from a refund or to make up the difference when running a promotion. + - name: Balances + description: View balances for currency accounts belonging to an entity. + - name: Cardholders + description: Create new cardholders to issue cards to, and manage your existing cardholders. + - name: Cards + description: Issue new cards to your cardholders, and manage cards you've already issued. + - name: Card controls + description: Set spending controls to limit how much a card can spend over a set period of time, and rules for what the card can be used to purchase. + - name: Card testing + description: Simulate transactions using a card on the sandbox environment. + - name: Card Metadata + description: Retrieve card metadata + # - name: Files + # description: | + # Upload files to be used as input to other APIs + +x-tagGroups: + - name: Set up + tags: + - Access + - name: Handle payments and payouts + tags: + - Payments + - Payment Links + - Hosted Payments Page + - Forex + - Apple Pay + - Transfers + - Balances + - name: Stored payment details + tags: + - Tokens + - Instruments + - Customers + - name: Authentication + tags: + - Standalone + - name: Risk management + tags: + - Disputes + - Risk + - name: Notifications + tags: + - Workflows + - name: Platforms + tags: + - Platforms + - Payment instruments + - Payout schedules + - name: Card issuing + tags: + - Cardholders + - Cards + - Card controls + - Card testing + - name: Reporting + tags: + - Reports + - Financial actions + - name: Metadata + tags: + - Card metadata diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..38968e2c5 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,16960 @@ +{ + "name": "checkout-openapi-spec", + "version": "0.0.1", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "checkout-openapi-spec", + "version": "0.0.1", + "dependencies": { + "connect": "^3.7.0", + "cors": "^2.8.5", + "cross-env": "^7.0.3", + "dotnet-sdk-3.1": "^3.1.1007", + "gulp": "^4.0.2", + "gulp-connect": "^5.7.0", + "gulp-exec": "^5.0.0", + "gulp-util": "^3.0.8", + "openapi-types": "^12.1.0", + "portfinder": "^1.0.28", + "prettier": "^2.3.1", + "request": "2.88.0", + "shelljs": "^0.8.5", + "swagger-cli": "4.0.4", + "swagger-repo": "^2.0.0-rc.15", + "swagger-ui": "^4.18.0", + "yamljs": "0.3.0" + }, + "engines": { + "node": "16.x" + } + }, + "node_modules/@apidevtools/json-schema-ref-parser": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", + "integrity": "sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w==", + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.6", + "call-me-maybe": "^1.0.1", + "js-yaml": "^4.1.0" + } + }, + "node_modules/@apidevtools/json-schema-ref-parser/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@apidevtools/openapi-schemas": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz", + "integrity": "sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ==", + "engines": { + "node": ">=10" + } + }, + "node_modules/@apidevtools/swagger-methods": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz", + "integrity": "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==" + }, + "node_modules/@apidevtools/swagger-parser": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-parser/-/swagger-parser-10.0.2.tgz", + "integrity": "sha512-JFxcEyp8RlNHgBCE98nwuTkZT6eNFPc1aosWV6wPcQph72TSEEu1k3baJD4/x1qznU+JiDdz8F5pTwabZh+Dhg==", + "dependencies": { + "@apidevtools/json-schema-ref-parser": "^9.0.6", + "@apidevtools/openapi-schemas": "^2.0.4", + "@apidevtools/swagger-methods": "^3.0.2", + "@jsdevtools/ono": "^7.1.3", + "call-me-maybe": "^1.0.1", + "z-schema": "^4.2.3" + }, + "peerDependencies": { + "openapi-types": ">=7" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", + "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", + "dependencies": { + "@babel/highlight": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", + "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", + "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.14.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/runtime": { + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.9.tgz", + "integrity": "sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==", + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/runtime-corejs3": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.21.0.tgz", + "integrity": "sha512-TDD4UJzos3JJtM+tHX+w2Uc+KWj7GV+VKKFdMVd2Rx8sdA19hcc3P3AHFYd5LVOw+pYuSd5lICC3gm52B6Rwxw==", + "dependencies": { + "core-js-pure": "^3.25.1", + "regenerator-runtime": "^0.13.11" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/runtime-corejs3/node_modules/regenerator-runtime": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" + }, + "node_modules/@braintree/sanitize-url": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-6.0.2.tgz", + "integrity": "sha512-Tbsj02wXCbqGmzdnXNk0SOF19ChhRU70BsroIi4Pm6Ehp56in6vch94mfbdQ17DozxkL3BAVjbZ4Qc1a0HFRAg==" + }, + "node_modules/@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==" + }, + "node_modules/@swagger-api/apidom-ast": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ast/-/apidom-ast-0.69.0.tgz", + "integrity": "sha512-JsRyi1Ir3VeNSSWmIFqgaFOQCIUvCoKcfmOcU/h4Jz1IOkQij1vj3qEFln4J9sByOWHrhA8zD1Cf+LnXkbGVZg==", + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2", + "unraw": "=2.0.1" + } + }, + "node_modules/@swagger-api/apidom-core": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-core/-/apidom-core-0.69.0.tgz", + "integrity": "sha512-n59Mz6JjgL5SJHne7om22+5RRfDNmM8oQ0NgHvWU44rHcmA/8Byxs28w6Ke2xgJFmLYasEw6hx1bwAATBLaa7w==", + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-ast": "^0.69.0", + "@types/ramda": "=0.28.23", + "minim": "=0.23.8", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "short-unique-id": "=4.4.4", + "stampit": "=4.3.2" + } + }, + "node_modules/@swagger-api/apidom-json-pointer": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-json-pointer/-/apidom-json-pointer-0.69.0.tgz", + "integrity": "sha512-TDcrES6POTBrQXDdq7VjlqFYZuZ/eqaxD9K2MUJcRckil+jxpDV0W38lgXE+c8Gjwvqqqce/izkilUgMA+ajFA==", + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0" + } + }, + "node_modules/@swagger-api/apidom-ns-api-design-systems": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-api-design-systems/-/apidom-ns-api-design-systems-0.69.0.tgz", + "integrity": "sha512-1W5N4wL5I9n4dD6AJ1Bh49kphn+DXmwggUQhwsq7phxey4jiEXUNC9W/CQDXJp0wkFtNE6REn8yks9QGqfkemw==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-openapi-3-1": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2" + } + }, + "node_modules/@swagger-api/apidom-ns-asyncapi-2": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-asyncapi-2/-/apidom-ns-asyncapi-2-0.69.0.tgz", + "integrity": "sha512-D49mduzDwVQJp55+KoT8NozQEUsLMhCxbAnD4iY1E/v4uK7xSqQ3JW/Luunz6DNKWWtcWhgCiehmBwIjVAQN/A==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-json-schema-draft-7": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2" + } + }, + "node_modules/@swagger-api/apidom-ns-json-schema-draft-4": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-4/-/apidom-ns-json-schema-draft-4-0.69.0.tgz", + "integrity": "sha512-rRo226jITgG6DZNuk1oCuKFhr0giJ6GATyQtaaEmH9bhxB8i1eeES/LolJfo4donyejCb+imJN+L1fQ1N2YOYA==", + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2" + } + }, + "node_modules/@swagger-api/apidom-ns-json-schema-draft-6": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-6/-/apidom-ns-json-schema-draft-6-0.69.0.tgz", + "integrity": "sha512-koLHh4TS3RtrWxcYX/tZobgnwUbjiFLOESiqe0FYvs82LXNwr+dveM8Umj89ACjpCd0Pq2J+5yvfNyvuIa6WFw==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-json-schema-draft-4": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2" + } + }, + "node_modules/@swagger-api/apidom-ns-json-schema-draft-7": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-7/-/apidom-ns-json-schema-draft-7-0.69.0.tgz", + "integrity": "sha512-OaEBBrgoDfqMPnZ0NCfg5HUJJ/V6XJ1AZ6OTW1AfJTqErLxYTgdNv52lYXKLiKkyLiH5olBBnPEKPPLg+DwUKQ==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-json-schema-draft-6": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2" + } + }, + "node_modules/@swagger-api/apidom-ns-openapi-3-0": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-0/-/apidom-ns-openapi-3-0-0.69.0.tgz", + "integrity": "sha512-rKgEd/k0MNV93DhwZ6yfUaIjbs6RfS9xB3QN9M6Lx5ZJktxNGAdpS/c3WEb5jBOpkQIJ6MaNI67Q0ZHHJTlrng==", + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-json-schema-draft-4": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2" + } + }, + "node_modules/@swagger-api/apidom-ns-openapi-3-1": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-1/-/apidom-ns-openapi-3-1-0.69.0.tgz", + "integrity": "sha512-l5g4K09I4znwTcXbkBaE4JKmvEQ7Q831hzpBWZimcnUGrC8/nJ7eYUc04bjgbdDZd37B0zEzRn6w92ax7Hi2Fg==", + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-openapi-3-0": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-api-design-systems-json": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-api-design-systems-json/-/apidom-parser-adapter-api-design-systems-json-0.69.0.tgz", + "integrity": "sha512-oi52u6rmLrE+iXOk5wlx1NRXHd0NtGsxF1G+g2JTtC0oh5ETrj5fMGwMQwcBqYGTj3Y6vPJMkvVyaC46KUKg0Q==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-api-design-systems": "^0.69.0", + "@swagger-api/apidom-parser-adapter-json": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-api-design-systems-yaml": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-api-design-systems-yaml/-/apidom-parser-adapter-api-design-systems-yaml-0.69.0.tgz", + "integrity": "sha512-bqgf+iHK3qrANJ5zrQJ+BoWrIftL4YhCfZyE/aWwnGW1BKdB4uGC94rx9DHhS8ZfNPz7AnW+ki6ISXpYOD8uyw==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-api-design-systems": "^0.69.0", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-asyncapi-json-2": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-asyncapi-json-2/-/apidom-parser-adapter-asyncapi-json-2-0.69.0.tgz", + "integrity": "sha512-3b1nGsbFh6DAUDB9plQE5iyqOE37DZS/X34Hr+5ENiq7DFA/19UYeUSJQfU+kWjtFzRDHBRluPo38nHdGnh4gg==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-asyncapi-2": "^0.69.0", + "@swagger-api/apidom-parser-adapter-json": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-asyncapi-yaml-2/-/apidom-parser-adapter-asyncapi-yaml-2-0.69.0.tgz", + "integrity": "sha512-JEuZw04wdtbn1WFkavB9Yn8MNAWtfUdlD6naa/Z4CL0iUOhC5BzG9dUfe6gn+Z+xtFRHm3MHMh9B6Xdr3MWDBg==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-asyncapi-2": "^0.69.0", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-json": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-json/-/apidom-parser-adapter-json-0.69.0.tgz", + "integrity": "sha512-wNSYD9FU31aSBnCCp3Nt2ZZVAdu1LGGWmlLKmcOx7SXi79F1E+T6RtqyoLa0VBGKPVEwDtaH8kWRsZzXpUZVvQ==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-ast": "^0.69.0", + "@swagger-api/apidom-core": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2", + "tree-sitter": "=0.20.1", + "tree-sitter-json": "=0.20.0", + "web-tree-sitter": "=0.20.7" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-openapi-json-3-0": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-3-0/-/apidom-parser-adapter-openapi-json-3-0-0.69.0.tgz", + "integrity": "sha512-aSNFJ4he67c5Vz9+FbKKnJzy9JdmSDqzeog8CTiLI8TFrCvj9KQns68NbemyxHHc7uH9TcOwXq3WbXgXSWv60A==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-openapi-3-0": "^0.69.0", + "@swagger-api/apidom-parser-adapter-json": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-openapi-json-3-1": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-3-1/-/apidom-parser-adapter-openapi-json-3-1-0.69.0.tgz", + "integrity": "sha512-7TCnTTKMVTyDiX7MKhphmqUaoKtWLOgKCaPEtBRFgd94yOkobWBKw7yG6G+0rdsCIb4Q9AFcL39eUDh5yI45/w==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-openapi-3-1": "^0.69.0", + "@swagger-api/apidom-parser-adapter-json": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-3-0/-/apidom-parser-adapter-openapi-yaml-3-0-0.69.0.tgz", + "integrity": "sha512-mrKLsNMsJr5Z4cUDO4v5vt59uGGWfLL36hTuSKcqO9IH/3nziPrYJ7Kd4VdiJaQYqFuUQCEG7A2pOZfkpbR1KA==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-openapi-3-0": "^0.69.0", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-3-1/-/apidom-parser-adapter-openapi-yaml-3-1-0.69.0.tgz", + "integrity": "sha512-tEyNhlGoQ7/CnC0K3NqBWfhi90U+5fFDl7Z2PyV/+fRG1F0okAoHwp9+Q3/BieWdiZ5OChX8yxwOdq1kJ2+TTQ==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-openapi-3-1": "^0.69.0", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-yaml-1-2": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-yaml-1-2/-/apidom-parser-adapter-yaml-1-2-0.69.0.tgz", + "integrity": "sha512-wfvFXg9xSz89hg/MRd1u6ESUb2UQmVJVIS2wWZwi1UXN9+F3Yh2l8RB5JchJYb5bqu2HX1ZYJ6FxG3dQTQICyQ==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-ast": "^0.69.0", + "@swagger-api/apidom-core": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2", + "tree-sitter": "=0.20.1", + "tree-sitter-yaml": "=0.5.0", + "web-tree-sitter": "=0.20.7" + } + }, + "node_modules/@swagger-api/apidom-reference": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-reference/-/apidom-reference-0.69.0.tgz", + "integrity": "sha512-Sc3My/qTa90ofWXRaULkQ2oCUlgUCTbPN209jk/Lg0cywPTgeVEVn7Awpp2ftxl007uPPr2PwUzn/K6zzj+gyg==", + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@types/ramda": "=0.28.23", + "axios": "=1.3.4", + "minimatch": "=7.3.0", + "process": "=0.11.10", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2" + }, + "optionalDependencies": { + "@swagger-api/apidom-json-pointer": "^0.69.0", + "@swagger-api/apidom-ns-asyncapi-2": "^0.69.0", + "@swagger-api/apidom-ns-openapi-3-0": "^0.69.0", + "@swagger-api/apidom-ns-openapi-3-1": "^0.69.0", + "@swagger-api/apidom-parser-adapter-api-design-systems-json": "^0.69.0", + "@swagger-api/apidom-parser-adapter-api-design-systems-yaml": "^0.69.0", + "@swagger-api/apidom-parser-adapter-asyncapi-json-2": "^0.69.0", + "@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": "^0.69.0", + "@swagger-api/apidom-parser-adapter-json": "^0.69.0", + "@swagger-api/apidom-parser-adapter-openapi-json-3-0": "^0.69.0", + "@swagger-api/apidom-parser-adapter-openapi-json-3-1": "^0.69.0", + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": "^0.69.0", + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": "^0.69.0", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.69.0" + } + }, + "node_modules/@swagger-api/apidom-reference/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@swagger-api/apidom-reference/node_modules/minimatch": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.3.0.tgz", + "integrity": "sha512-WaMDuhKa7a6zKiwplR1AOz+zGvJba24k5VU1Cy6NhEguavT2YRlHxuINUgTas4wiS6fwBpYq4TcA1XIECSntyw==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@types/hast": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.4.tgz", + "integrity": "sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/hoist-non-react-statics": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", + "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "dependencies": { + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.8", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.8.tgz", + "integrity": "sha512-YSBPTLTVm2e2OoQIDYx8HaeWJ5tTToLH67kXR7zYNGupXMEHa2++G8k+DczX2cFVgalypqtyZIcU19AFcmOpmg==" + }, + "node_modules/@types/prop-types": { + "version": "15.7.5", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" + }, + "node_modules/@types/ramda": { + "version": "0.28.23", + "resolved": "https://registry.npmjs.org/@types/ramda/-/ramda-0.28.23.tgz", + "integrity": "sha512-9TYWiwkew+mCMsL7jZ+kkzy6QXn8PL5/SKmBPmjgUlTpkokZWTBr+OhiIUDztpAEbslWyt24NNfEmZUBFmnXig==", + "dependencies": { + "ts-toolbelt": "^6.15.1" + } + }, + "node_modules/@types/react": { + "version": "18.0.28", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.28.tgz", + "integrity": "sha512-RD0ivG1kEztNBdoAK7lekI9M+azSnitIn85h4iOiaLjaTrMjzslhaqCGaI4IyCJ1RljWiLCEu4jyrLLgqxBTew==", + "dependencies": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/scheduler": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" + }, + "node_modules/@types/unist": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", + "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==" + }, + "node_modules/@types/use-sync-external-store": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz", + "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==" + }, + "node_modules/@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==" + }, + "node_modules/accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "dependencies": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-colors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", + "dependencies": { + "ansi-wrap": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "dependencies": { + "ansi-wrap": "0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dependencies": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "node_modules/anymatch/node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/append-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", + "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=", + "dependencies": { + "buffer-equal": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "optional": true + }, + "node_modules/archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=" + }, + "node_modules/are-we-there-yet": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", + "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", + "optional": true, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-filter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz", + "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=", + "dependencies": { + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz", + "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=", + "dependencies": { + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "node_modules/array-initial": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", + "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=", + "dependencies": { + "array-slice": "^1.0.0", + "is-number": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-initial/node_modules/is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-last": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz", + "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==", + "dependencies": { + "is-number": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-last/node_modules/is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-sort": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz", + "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==", + "dependencies": { + "default-compare": "^1.0.0", + "get-value": "^2.0.6", + "kind-of": "^5.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-sort/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dependencies": { + "array-uniq": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/async": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/async-done": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz", + "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.2", + "process-nextick-args": "^2.0.0", + "stream-exhaust": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==" + }, + "node_modules/async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" + }, + "node_modules/async-settle": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz", + "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=", + "dependencies": { + "async-done": "^1.2.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/autolinker": { + "version": "3.16.2", + "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-3.16.2.tgz", + "integrity": "sha512-JiYl7j2Z19F9NdTmirENSUUIIL/9MytEWtmzhfmsKPCp9E+G35Y0UNCMoM9tFigxT59qSc8Ml2dlZXOCVTYwuA==", + "dependencies": { + "tslib": "^2.3.0" + } + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, + "node_modules/axios": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", + "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", + "dependencies": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/axios/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bach": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", + "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=", + "dependencies": { + "arr-filter": "^1.1.1", + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "array-each": "^1.0.0", + "array-initial": "^1.0.0", + "array-last": "^1.1.1", + "async-done": "^1.2.2", + "async-settle": "^1.0.0", + "now-and-later": "^2.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dependencies": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=" + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/beeper": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", + "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/better-ajv-errors": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/better-ajv-errors/-/better-ajv-errors-0.5.7.tgz", + "integrity": "sha512-O7tpXektKWVwYCH5g6Vs3lKD+sJs7JHh5guapmGJd+RTwxhFZEf4FwvbHBURUnoXsTeFaMvGuhTTmEGiHpNi6w==", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "@babel/runtime": "^7.0.0", + "chalk": "^2.4.1", + "core-js": "^2.5.7", + "json-to-ast": "^2.0.3", + "jsonpointer": "^4.0.1", + "leven": "^2.1.0" + }, + "peerDependencies": { + "ajv": "4.11.8 - 6" + } + }, + "node_modules/better-ajv-errors/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/better-ajv-errors/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/better-ajv-errors/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/better-ajv-errors/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "node_modules/better-ajv-errors/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "engines": { + "node": ">=4" + } + }, + "node_modules/better-ajv-errors/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "optional": true, + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "optional": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.1.tgz", + "integrity": "sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ==", + "optional": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/body": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/body/-/body-5.1.0.tgz", + "integrity": "sha1-5LoM5BCkaTYyM2dgnstOZVMSUGk=", + "dependencies": { + "continuable-cache": "^0.3.1", + "error": "^7.0.0", + "raw-body": "~1.1.0", + "safe-json-parse": "~1.0.1" + } + }, + "node_modules/body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/body-parser/node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/body-parser/node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/body-parser/node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/body-parser/node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/body-parser/node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/body-parser/node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/body-parser/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/body-parser/node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/braces/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "optional": true, + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", + "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "node_modules/bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", + "integrity": "sha1-NWnt6Lo0MV+rmcPpLLBMciDeH6g=" + }, + "node_modules/cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dependencies": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" + }, + "node_modules/camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "deprecated": "Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies", + "dependencies": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "optionalDependencies": { + "fsevents": "^1.2.7" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "optional": true + }, + "node_modules/ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" + }, + "node_modules/class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dependencies": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + }, + "node_modules/cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dependencies": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "node_modules/clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=" + }, + "node_modules/cloneable-readable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", + "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", + "dependencies": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/code-error-fragment": { + "version": "0.0.230", + "resolved": "https://registry.npmjs.org/code-error-fragment/-/code-error-fragment-0.0.230.tgz", + "integrity": "sha512-cadkfKp6932H8UkhzE/gcUqhRMNf8jHzkAN7+5Myabswaghu4xABTgPHDCjW+dBAJxj/SpkTYokpzDqY4pCzQw==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/collection-map": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz", + "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=", + "dependencies": { + "arr-map": "^2.0.2", + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dependencies": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/comma-separated-tokens": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz", + "integrity": "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "node_modules/component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "engines": [ + "node >= 0.8" + ], + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "dependencies": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/connect-livereload": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/connect-livereload/-/connect-livereload-0.6.1.tgz", + "integrity": "sha512-3R0kMOdL7CjJpU66fzAkCe6HNtd3AavCS4m+uW4KtJjrdGPT0SQEZieAYd+cm+lJoBznNQ4lqipYWkhBMgk00g==", + "engines": { + "node": "*" + } + }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", + "optional": true + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/continuable-cache": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/continuable-cache/-/continuable-cache-0.3.1.tgz", + "integrity": "sha1-vXJ6f67XfnH/OYWskzUakSczrQ8=" + }, + "node_modules/convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "node_modules/cookiejar": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.4.tgz", + "integrity": "sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==" + }, + "node_modules/copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/copy-props": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.5.tgz", + "integrity": "sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw==", + "dependencies": { + "each-props": "^1.3.2", + "is-plain-object": "^5.0.0" + } + }, + "node_modules/copy-props/node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/copy-to-clipboard": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz", + "integrity": "sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==", + "dependencies": { + "toggle-selection": "^1.0.6" + } + }, + "node_modules/core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", + "hasInstallScript": true + }, + "node_modules/core-js-pure": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.29.0.tgz", + "integrity": "sha512-v94gUjN5UTe1n0yN/opTihJ8QBWD2O8i19RfTZR7foONPWArnjB96QA/wk5ozu1mm6ja3udQCzOzwQXTxi3xOQ==", + "hasInstallScript": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "dependencies": { + "cross-spawn": "^7.0.1" + }, + "bin": { + "cross-env": "src/bin/cross-env.js", + "cross-env-shell": "src/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=10.14", + "npm": ">=6", + "yarn": ">=1" + } + }, + "node_modules/cross-env/node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cross-env/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/cross-env/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cross-env/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/cross-env/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cross-fetch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "dependencies": { + "node-fetch": "2.6.7" + } + }, + "node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/css.escape": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", + "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==" + }, + "node_modules/csstype": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", + "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==" + }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/dateformat": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", + "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=", + "engines": { + "node": "*" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/decompress-response": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", + "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", + "optional": true, + "dependencies": { + "mimic-response": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + }, + "node_modules/deepmerge": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.0.tgz", + "integrity": "sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/default-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz", + "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==", + "dependencies": { + "kind-of": "^5.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/default-compare/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/default-resolution": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz", + "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dependencies": { + "object-keys": "^1.0.12" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-property/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-property/node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-property/node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "optional": true + }, + "node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "node_modules/detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "optional": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/dompurify": { + "version": "2.3.10", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.3.10.tgz", + "integrity": "sha512-o7Fg/AgC7p/XpKjf/+RC3Ok6k4St5F7Q6q6+Nnm3p2zGWioAY6dh0CbbuwOhH2UcSzKsdniE/YnE2/92JcsA+g==" + }, + "node_modules/dotnet-sdk-3.1": { + "version": "3.1.1007", + "resolved": "https://registry.npmjs.org/dotnet-sdk-3.1/-/dotnet-sdk-3.1-3.1.1007.tgz", + "integrity": "sha512-QkB9yyijXlq4XeLm9lMR1dshuB7XXjOiXGBQubBq0LTm5AV7EHX21nYnDIcJzE2zBgOXPFRjRvQEqMDyloY75g==", + "hasInstallScript": true, + "bin": { + "dotnet": "dist/call.js", + "dotnet-run": "dist/call.js", + "dotnet-run-3.1": "dist/call.js", + "install-dotnet-runtime": "dist/app.js", + "which-dotnet": "dist/find.js", + "which-dotnet-runtime": "dist/find.js" + }, + "engines": { + "node": ">=6.4.0" + } + }, + "node_modules/drange": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/drange/-/drange-1.1.1.tgz", + "integrity": "sha512-pYxfDYpued//QpnLIm4Avk7rsNtAtQkUES2cwAYSvD/wd2pKD71gN2Ebj3e7klzXwjocvE8c5vx/1fxwpqmSxA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/duplexer2": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", + "dependencies": { + "readable-stream": "~1.1.9" + } + }, + "node_modules/duplexer2/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "node_modules/duplexer2/node_modules/readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/duplexer2/node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "node_modules/duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dependencies": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "node_modules/each-props": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz", + "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==", + "dependencies": { + "is-plain-object": "^2.0.1", + "object.defaults": "^1.1.0" + } + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "node_modules/email-addresses": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/email-addresses/-/email-addresses-3.1.0.tgz", + "integrity": "sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg==" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/error": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/error/-/error-7.2.1.tgz", + "integrity": "sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA==", + "dependencies": { + "string-template": "~0.2.1" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es5-ext": { + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "dependencies": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" + } + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "node_modules/es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/escodegen": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", + "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=4.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/escodegen/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dependencies": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dependencies": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "optional": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express/node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/express/node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/express/node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express/node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/express/node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/express/node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/express/node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/express/node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/express/node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express/node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/express/node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express/node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/express/node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/express/node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/express/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/express/node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/express/node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/express/node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/express/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/express/node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "dependencies": { + "type": "^2.0.0" + } + }, + "node_modules/ext/node_modules/type": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", + "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==" + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extend-shallow/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dependencies": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/faker": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/faker/-/faker-4.1.0.tgz", + "integrity": "sha1-HkW7vsxndLPBlfrSg1EJxtdIzD8=" + }, + "node_modules/fancy-log": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", + "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", + "dependencies": { + "ansi-gray": "^0.1.1", + "color-support": "^1.1.3", + "parse-node-version": "^1.0.0", + "time-stamp": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-json-patch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.1.1.tgz", + "integrity": "sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "node_modules/fast-levenshtein": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz", + "integrity": "sha1-5qdUzI8V5YmHqpy9J69m/W9OWvk=" + }, + "node_modules/fast-safe-stringify": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.8.tgz", + "integrity": "sha512-lXatBjf3WPjmWD6DpIZxkeSsCOwqI0maYMpgDlx8g4U2qi4lbjA9oH/HD2a87G+KfsUmo5WbJFmqBZlPxtptag==" + }, + "node_modules/fault": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", + "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", + "dependencies": { + "format": "^0.2.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/faye-websocket": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "dependencies": { + "websocket-driver": ">=0.5.1" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "optional": true + }, + "node_modules/filename-reserved-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz", + "integrity": "sha1-5hz4BfDeHJhFZ9A4bcXfUO5a9+Q=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/filenamify": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-1.2.1.tgz", + "integrity": "sha1-qfL/0RxQO+0wABUCknI3jx8TZaU=", + "dependencies": { + "filename-reserved-regex": "^1.0.0", + "strip-outer": "^1.0.0", + "trim-repeated": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/filenamify-url": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/filenamify-url/-/filenamify-url-1.0.0.tgz", + "integrity": "sha1-syvYExnvWGO3MHi+1Q9GpPeXX1A=", + "dependencies": { + "filenamify": "^1.0.0", + "humanize-url": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fill-range/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dependencies": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/find-yarn-workspace-root": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", + "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", + "dependencies": { + "micromatch": "^4.0.2" + } + }, + "node_modules/find-yarn-workspace-root/node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-yarn-workspace-root/node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-yarn-workspace-root/node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/find-yarn-workspace-root/node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/find-yarn-workspace-root/node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/findup-sync": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", + "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", + "dependencies": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/fined": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", + "dependencies": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/flagged-respawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dependencies": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dependencies": { + "for-in": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/form-data-encoder": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz", + "integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==" + }, + "node_modules/format": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", + "integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==", + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/format-util": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/format-util/-/format-util-1.0.5.tgz", + "integrity": "sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg==" + }, + "node_modules/formdata-node": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz", + "integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==", + "dependencies": { + "node-domexception": "1.0.0", + "web-streams-polyfill": "4.0.0-beta.3" + }, + "engines": { + "node": ">= 12.20" + } + }, + "node_modules/formidable": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.2.tgz", + "integrity": "sha512-V8gLm+41I/8kguQ4/o1D3RIHRmhYFG4pnNyonvua+40rqcEmT4+V71yaZ3B457xbbgCsCfjSPi65u/W6vK1U5Q==", + "deprecated": "Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau", + "funding": { + "url": "https://ko-fi.com/tunnckoCore/commissions" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dependencies": { + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "optional": true + }, + "node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/fs-mkdirp-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", + "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", + "dependencies": { + "graceful-fs": "^4.1.11", + "through2": "^2.0.3" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "node_modules/fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "deprecated": "fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "dependencies": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + }, + "engines": { + "node": ">= 4.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg==", + "optional": true, + "dependencies": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "node_modules/get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" + }, + "node_modules/get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/get-stream/node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/gh-pages": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/gh-pages/-/gh-pages-2.2.0.tgz", + "integrity": "sha512-c+yPkNOPMFGNisYg9r4qvsMIjVYikJv7ImFOhPIVPt0+AcRUamZ7zkGRLHz7FKB0xrlZ+ddSOJsZv9XAFVXLmA==", + "dependencies": { + "async": "^2.6.1", + "commander": "^2.18.0", + "email-addresses": "^3.0.1", + "filenamify-url": "^1.0.0", + "fs-extra": "^8.1.0", + "globby": "^6.1.0" + }, + "bin": { + "gh-pages": "bin/gh-pages.js", + "gh-pages-clean": "bin/gh-pages-clean.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/gh-pages/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", + "optional": true + }, + "node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", + "dependencies": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "node_modules/glob-parent/node_modules/is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob-stream": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", + "integrity": "sha512-uMbLGAP3S2aDOHUDfdoYcdIePUCfysbAd0IAoWVZbeGU/oNQ8asHVSshLDJUPWxfzj8zsCG7/XeHPHTtow0nsw==", + "dependencies": { + "extend": "^3.0.0", + "glob": "^7.1.1", + "glob-parent": "^3.1.0", + "is-negated-glob": "^1.0.0", + "ordered-read-streams": "^1.0.0", + "pumpify": "^1.3.5", + "readable-stream": "^2.1.5", + "remove-trailing-separator": "^1.0.1", + "to-absolute-glob": "^2.0.0", + "unique-stream": "^2.0.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/glob-watcher": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.5.tgz", + "integrity": "sha512-zOZgGGEHPklZNjZQaZ9f41i7F2YwE+tS5ZHrDhbBCk3stwahn5vQxnFmBJZHoYdusR6R1bLSXeGUy/BhctwKzw==", + "dependencies": { + "anymatch": "^2.0.0", + "async-done": "^1.2.0", + "chokidar": "^2.0.0", + "is-negated-glob": "^1.0.0", + "just-debounce": "^1.0.0", + "normalize-path": "^3.0.0", + "object.defaults": "^1.1.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dependencies": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dependencies": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dependencies": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glogg": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", + "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", + "dependencies": { + "sparkles": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==" + }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==" + }, + "node_modules/graphlib": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz", + "integrity": "sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==", + "dependencies": { + "lodash": "^4.17.15" + } + }, + "node_modules/gulp": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz", + "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==", + "dependencies": { + "glob-watcher": "^5.0.3", + "gulp-cli": "^2.2.0", + "undertaker": "^1.2.1", + "vinyl-fs": "^3.0.0" + }, + "bin": { + "gulp": "bin/gulp.js" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/gulp-connect": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/gulp-connect/-/gulp-connect-5.7.0.tgz", + "integrity": "sha512-8tRcC6wgXMLakpPw9M7GRJIhxkYdgZsXwn7n56BA2bQYGLR9NOPhMzx7js+qYDy6vhNkbApGKURjAw1FjY4pNA==", + "dependencies": { + "ansi-colors": "^2.0.5", + "connect": "^3.6.6", + "connect-livereload": "^0.6.0", + "fancy-log": "^1.3.2", + "map-stream": "^0.0.7", + "send": "^0.16.2", + "serve-index": "^1.9.1", + "serve-static": "^1.13.2", + "tiny-lr": "^1.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/gulp-connect/node_modules/ansi-colors": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-2.0.5.tgz", + "integrity": "sha512-yAdfUZ+c2wetVNIFsNRn44THW+Lty6S5TwMpUfLA/UaGhiXbBv/F8E60/1hMLd0cnF/CDoWH8vzVaI5bAcHCjw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/gulp-exec": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/gulp-exec/-/gulp-exec-5.0.0.tgz", + "integrity": "sha512-XFW5GJr5gpdRc7nAS6fNK2cqtLDjNnIKLbcVGIA6XAWCx7E4aVn/pzEJm6NvjtIU9VMsl4igkkSAo8Le8L1Lww==", + "dependencies": { + "plugin-error": "^1.0.1", + "through2": "^3.0.1" + } + }, + "node_modules/gulp-exec/node_modules/through2": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", + "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "2 || 3" + } + }, + "node_modules/gulp-util": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "integrity": "sha512-q5oWPc12lwSFS9h/4VIjG+1NuNDlJ48ywV2JKItY4Ycc/n1fXJeYPVQsfu5ZrhQi7FGSDBalwUCLar/GyHXKGw==", + "deprecated": "gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5", + "dependencies": { + "array-differ": "^1.0.0", + "array-uniq": "^1.0.2", + "beeper": "^1.0.0", + "chalk": "^1.0.0", + "dateformat": "^2.0.0", + "fancy-log": "^1.1.0", + "gulplog": "^1.0.0", + "has-gulplog": "^0.1.0", + "lodash._reescape": "^3.0.0", + "lodash._reevaluate": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.template": "^3.0.0", + "minimist": "^1.1.0", + "multipipe": "^0.1.2", + "object-assign": "^3.0.0", + "replace-ext": "0.0.1", + "through2": "^2.0.0", + "vinyl": "^0.5.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/gulp-util/node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/gulp-util/node_modules/clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=" + }, + "node_modules/gulp-util/node_modules/object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/gulp-util/node_modules/replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gulp-util/node_modules/vinyl": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", + "dependencies": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + }, + "engines": { + "node": ">= 0.9" + } + }, + "node_modules/gulp/node_modules/gulp-cli": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.3.0.tgz", + "integrity": "sha512-zzGBl5fHo0EKSXsHzjspp3y5CONegCm8ErO5Qh0UzFzk2y4tMvzLWhoDokADbarfZRL2pGpRp7yt6gfJX4ph7A==", + "dependencies": { + "ansi-colors": "^1.0.1", + "archy": "^1.0.0", + "array-sort": "^1.0.0", + "color-support": "^1.1.3", + "concat-stream": "^1.6.0", + "copy-props": "^2.0.1", + "fancy-log": "^1.3.2", + "gulplog": "^1.0.0", + "interpret": "^1.4.0", + "isobject": "^3.0.1", + "liftoff": "^3.1.0", + "matchdep": "^2.0.0", + "mute-stdout": "^1.0.0", + "pretty-hrtime": "^1.0.0", + "replace-homedir": "^1.0.0", + "semver-greatest-satisfied-range": "^1.1.0", + "v8flags": "^3.2.0", + "yargs": "^7.1.0" + }, + "bin": { + "gulp": "bin/gulp.js" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "dependencies": { + "glogg": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-gulplog": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", + "dependencies": { + "sparkles": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/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==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "optional": true + }, + "node_modules/has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hast-util-parse-selector": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz", + "integrity": "sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hastscript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-6.0.0.tgz", + "integrity": "sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w==", + "dependencies": { + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^1.0.0", + "hast-util-parse-selector": "^2.0.0", + "property-information": "^5.0.0", + "space-separated-tokens": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "engines": { + "node": "*" + } + }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dependencies": { + "parse-passwd": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" + }, + "node_modules/http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/http-errors/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "node_modules/http-parser-js": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.3.tgz", + "integrity": "sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg==" + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/http2-client": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/http2-client/-/http2-client-1.3.5.tgz", + "integrity": "sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA==" + }, + "node_modules/humanize-url": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/humanize-url/-/humanize-url-1.0.1.tgz", + "integrity": "sha1-9KuZ4NKIF0yk4eUEB8VfuuRk7/8=", + "dependencies": { + "normalize-url": "^1.0.0", + "strip-url-auth": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/immutable": { + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", + "integrity": "sha512-15gZoQ38eYjEjxkorfbcgBKBL6R7T459OuK+CpcWt7O3KF4uPCx2tD0uFETlUDIyo+1789crbMhTvQBSR5yBMg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, + "node_modules/invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dependencies": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dependencies": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "node_modules/is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "node_modules/is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dependencies": { + "ci-info": "^2.0.0" + }, + "bin": { + "is-ci": "bin.js" + } + }, + "node_modules/is-core-module": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz", + "integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-descriptor/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-negated-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", + "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dependencies": { + "is-unc-path": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "node_modules/is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dependencies": { + "unc-path-regex": "^0.1.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, + "node_modules/is-valid-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", + "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "node_modules/js-base64": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", + "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==" + }, + "node_modules/js-file-download": { + "version": "0.4.12", + "resolved": "https://registry.npmjs.org/js-file-download/-/js-file-download-0.4.12.tgz", + "integrity": "sha512-rML+NkoD08p5Dllpjo0ffy4jRHeY6Zsapvr/W86N7E0yuzAO6qa5X9+xog6zQNlH102J7IXljNY2FtS6Lj3ucg==" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/js-yaml/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "node_modules/json-pointer": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.2.tgz", + "integrity": "sha512-vLWcKbOaXlO+jvRy4qNd+TI1QUPZzfJj1tpJ3vAXDych5XJf93ftpUKe5pKCrzyIIwgBJcOcCVRUfqQP25afBw==", + "dependencies": { + "foreach": "^2.0.4" + } + }, + "node_modules/json-refs": { + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/json-refs/-/json-refs-3.0.15.tgz", + "integrity": "sha512-0vOQd9eLNBL18EGl5yYaO44GhixmImes2wiYn9Z3sag3QnehWrYWlB9AFtMxCL2Bj3fyxgDYkxGFEU/chlYssw==", + "dependencies": { + "commander": "~4.1.1", + "graphlib": "^2.1.8", + "js-yaml": "^3.13.1", + "lodash": "^4.17.15", + "native-promise-only": "^0.8.1", + "path-loader": "^1.0.10", + "slash": "^3.0.0", + "uri-js": "^4.2.2" + }, + "bin": { + "json-refs": "bin/json-refs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/json-refs/node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/json-schema-faker": { + "version": "0.5.0-rcv.38", + "resolved": "https://registry.npmjs.org/json-schema-faker/-/json-schema-faker-0.5.0-rcv.38.tgz", + "integrity": "sha512-QvZ8XFeWO8xevk369Y4yoaAlay1n09V5djO0a1M5WnBMRFTnMo2W0PAEDCnx3kBS1a4rxrd3aJ5uFM8amvZPQA==", + "dependencies": { + "json-schema-ref-parser": "^6.1.0", + "jsonpath-plus": "^5.1.0" + }, + "bin": { + "jsf": "bin/gen.js" + } + }, + "node_modules/json-schema-ref-parser": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-6.1.0.tgz", + "integrity": "sha512-pXe9H1m6IgIpXmE5JSb8epilNTGsmTb2iPohAXpOdhqGFbQjNeHHsZxU+C8w6T81GZxSPFLeUoqDJmzxx5IGuw==", + "deprecated": "Please switch to @apidevtools/json-schema-ref-parser", + "dependencies": { + "call-me-maybe": "^1.0.1", + "js-yaml": "^3.12.1", + "ono": "^4.0.11" + } + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "node_modules/json-to-ast": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/json-to-ast/-/json-to-ast-2.1.0.tgz", + "integrity": "sha512-W9Lq347r8tA1DfMvAGn9QNcgYm4Wm7Yc+k8e6vezpMnRT+NHbtlxgNBXRVjXe9YM6eTn6+p/MKOlV/aABJcSnQ==", + "dependencies": { + "code-error-fragment": "0.0.230", + "grapheme-splitter": "^1.0.4" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonpath": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/jsonpath/-/jsonpath-1.1.1.tgz", + "integrity": "sha512-l6Cg7jRpixfbgoWgkrl77dgEj8RPvND0wMH6TwQmi9Qs4TFfS9u5cUFnbeKTwj5ga5Y3BTGGNI28k117LJ009w==", + "dependencies": { + "esprima": "1.2.2", + "static-eval": "2.0.2", + "underscore": "1.12.1" + } + }, + "node_modules/jsonpath-plus": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-5.1.0.tgz", + "integrity": "sha512-890w2Pjtj0iswAxalRlt2kHthi6HKrXEfZcn+ZNZptv7F3rUGIeDuZo+C+h4vXBHLEsVjJrHeCm35nYeZLzSBQ==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/jsonpath/node_modules/esprima": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz", + "integrity": "sha1-dqD9Zvz+FU/SkmZ9wmQBl1CxZXs=", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/jsonpointer": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.1.0.tgz", + "integrity": "sha512-CXcRvMyTlnR53xMcKnuMzfCA5i/nfblTnnr74CZb6C4vG39eu6w51t7nKmU5MfLfbTgGItliNyjO/ciNPDqClg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/jsprim/node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + }, + "node_modules/just-debounce": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.1.0.tgz", + "integrity": "sha512-qpcRocdkUmf+UTNBYx5w6dexX5J31AKK1OmPwH630a83DdVVUIngk55RSAiIGpQyoH0dlr872VHfPjnQnK1qDQ==" + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/klaw-sync": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", + "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", + "dependencies": { + "graceful-fs": "^4.1.11" + } + }, + "node_modules/last-run": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", + "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=", + "dependencies": { + "default-resolution": "^2.0.0", + "es6-weak-map": "^2.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "dependencies": { + "readable-stream": "^2.0.5" + }, + "engines": { + "node": ">= 0.6.3" + } + }, + "node_modules/lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dependencies": { + "invert-kv": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lead": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", + "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=", + "dependencies": { + "flush-write-stream": "^1.0.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/liftoff": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", + "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", + "dependencies": { + "extend": "^3.0.0", + "findup-sync": "^3.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/livereload": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/livereload/-/livereload-0.8.2.tgz", + "integrity": "sha512-8wCvhiCL4cGVoT3U5xoe+UjpiiVZLrlOvr6dbhb1VlyC5QarhrlyRRt4z7EMGO4KSgXj+tKF/dr284F28/wI+g==", + "dependencies": { + "chokidar": "^2.1.5", + "opts": ">= 1.2.0", + "ws": "^6.2.1" + }, + "bin": { + "livereload": "bin/livereload.js" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/livereload-js": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.4.0.tgz", + "integrity": "sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw==" + }, + "node_modules/load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=" + }, + "node_modules/lodash._basetostring": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", + "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=" + }, + "node_modules/lodash._basevalues": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", + "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=" + }, + "node_modules/lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=" + }, + "node_modules/lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=" + }, + "node_modules/lodash._reescape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", + "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=" + }, + "node_modules/lodash._reevaluate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", + "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=" + }, + "node_modules/lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=" + }, + "node_modules/lodash._root": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=" + }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" + }, + "node_modules/lodash.escape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", + "dependencies": { + "lodash._root": "^3.0.0" + } + }, + "node_modules/lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" + }, + "node_modules/lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=" + }, + "node_modules/lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=" + }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + }, + "node_modules/lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "dependencies": { + "lodash._getnative": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" + } + }, + "node_modules/lodash.restparam": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=" + }, + "node_modules/lodash.template": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "integrity": "sha512-0B4Y53I0OgHUJkt+7RmlDFWKjVAI/YUpWNiL9GQz5ORDr4ttgfQGo+phBWKFLJbBdtOwgMuUkdOHOnPg45jKmQ==", + "dependencies": { + "lodash._basecopy": "^3.0.0", + "lodash._basetostring": "^3.0.0", + "lodash._basevalues": "^3.0.0", + "lodash._isiterateecall": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0", + "lodash.keys": "^3.0.0", + "lodash.restparam": "^3.0.0", + "lodash.templatesettings": "^3.0.0" + } + }, + "node_modules/lodash.templatesettings": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", + "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", + "dependencies": { + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0" + } + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lowlight": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-1.20.0.tgz", + "integrity": "sha512-8Ktj+prEb1RoCPkEOrPMYUN/nCggB7qAWe3a7OpMjWQkh3l2RD5wKRQ+o8Q8YuI9RG/xs95waaI/E6ym/7NsTw==", + "dependencies": { + "fault": "^1.0.0", + "highlight.js": "~10.7.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-age-cleaner": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "dependencies": { + "p-defer": "^1.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz", + "integrity": "sha1-ih8HiW2CsQkmvTdEokIACfiJdKg=" + }, + "node_modules/map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dependencies": { + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/matchdep": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", + "integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=", + "dependencies": { + "findup-sync": "^2.0.0", + "micromatch": "^3.0.4", + "resolve": "^1.4.0", + "stack-trace": "0.0.10" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/matchdep/node_modules/findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "dependencies": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/matchdep/node_modules/is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mem": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", + "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", + "dependencies": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", + "bin": { + "mime": "cli.js" + } + }, + "node_modules/mime-db": { + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", + "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.32", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", + "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", + "dependencies": { + "mime-db": "1.49.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/mimic-response": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", + "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", + "optional": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minim": { + "version": "0.23.8", + "resolved": "https://registry.npmjs.org/minim/-/minim-0.23.8.tgz", + "integrity": "sha512-bjdr2xW1dBCMsMGGsUeqM4eFI60m94+szhxWys+B1ztIt6gWSfeGBdSVCIawezeHYLYn0j6zrsXdQS/JllBzww==", + "dependencies": { + "lodash": "^4.15.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" + }, + "node_modules/mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "optional": true + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "node_modules/multipipe": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", + "dependencies": { + "duplexer2": "0.0.2" + } + }, + "node_modules/mute-stdout": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", + "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", + "optional": true + }, + "node_modules/nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", + "optional": true + }, + "node_modules/native-promise-only": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/native-promise-only/-/native-promise-only-0.8.1.tgz", + "integrity": "sha1-IKMYwwy0X3H+et+/eyHJnBRy7xE=" + }, + "node_modules/negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + }, + "node_modules/node-abi": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz", + "integrity": "sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==", + "optional": true, + "dependencies": { + "semver": "^5.4.1" + } + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-fetch-h2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz", + "integrity": "sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==", + "dependencies": { + "http2-client": "^1.2.5" + }, + "engines": { + "node": "4.x || >=6.0.0" + } + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-url": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", + "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", + "dependencies": { + "object-assign": "^4.0.1", + "prepend-http": "^1.0.0", + "query-string": "^4.1.0", + "sort-keys": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/now-and-later": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", + "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", + "dependencies": { + "once": "^1.3.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dependencies": { + "path-key": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "optional": true, + "dependencies": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "node_modules/number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/oas-kit-common": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/oas-kit-common/-/oas-kit-common-1.0.8.tgz", + "integrity": "sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ==", + "dependencies": { + "fast-safe-stringify": "^2.0.7" + } + }, + "node_modules/oas-linter": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/oas-linter/-/oas-linter-1.0.8.tgz", + "integrity": "sha512-d60OArJNBalU5q9utXgsWUdxNS2EWenLp/fSrCQXFHoZhFOLQDTCh2CeqddifM0q1Q0Z9noTiFnwuyqSi2Pa6A==", + "dependencies": { + "js-yaml": "^3.12.0", + "should": "^13.2.1" + } + }, + "node_modules/oas-resolver": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-1.1.1.tgz", + "integrity": "sha512-r7jWfhtW/eQ42/eqnUXMUS46jB+XoNlIOSkjN6ZQH+3tqPQHMwAqRUQTqdh+0Qw7IAipftb6zFVwyfE6kVCmGQ==", + "dependencies": { + "js-yaml": "^3.12.0", + "node-fetch-h2": "^2.3.0", + "oas-kit-common": "^1.0.6", + "reftools": "^1.0.4", + "yargs": "^12.0.2" + } + }, + "node_modules/oas-resolver/node_modules/ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/oas-resolver/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/oas-resolver/node_modules/cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dependencies": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "node_modules/oas-resolver/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/oas-resolver/node_modules/invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/oas-resolver/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "engines": { + "node": ">=4" + } + }, + "node_modules/oas-resolver/node_modules/lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dependencies": { + "invert-kv": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/oas-resolver/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/oas-resolver/node_modules/os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "dependencies": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/oas-resolver/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/oas-resolver/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "engines": { + "node": ">=4" + } + }, + "node_modules/oas-resolver/node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/oas-resolver/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/oas-resolver/node_modules/which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "node_modules/oas-resolver/node_modules/yargs": { + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "dependencies": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + } + }, + "node_modules/oas-resolver/node_modules/yargs-parser": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "node_modules/oas-schema-walker": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/oas-schema-walker/-/oas-schema-walker-1.1.5.tgz", + "integrity": "sha512-2yucenq1a9YPmeNExoUa9Qwrt9RFkjqaMAA1X+U7sbb0AqBeTIdMHky9SQQ6iN94bO5NW0W4TRYXerG+BdAvAQ==", + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/oas-validator": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/oas-validator/-/oas-validator-1.1.13.tgz", + "integrity": "sha512-sEWaUq5/b5+iOUEtnu/Ioi3bN1SwIvexSpeFdg3H0v4ASPmK1l/70vpYXfupVElFzjx4unc2odFp9oJR+L5f7w==", + "dependencies": { + "ajv": "^5.5.2", + "better-ajv-errors": "^0.5.2", + "js-yaml": "^3.12.0", + "oas-kit-common": "^1.0.4", + "oas-linter": "^1.0.8", + "oas-resolver": "^1.0.12", + "oas-schema-walker": "^1.1.0", + "reftools": "^1.0.3", + "should": "^13.2.1" + } + }, + "node_modules/oas-validator/node_modules/ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha512-Ajr4IcMXq/2QmMkEmSvxqfLN5zGmJ92gHXAeOXq1OekoH2rfDNsgdDoL2f7QaRCy7G/E6TpxBVdRuNraMztGHw==", + "dependencies": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "node_modules/oas-validator/node_modules/fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" + }, + "node_modules/oas-validator/node_modules/json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "engines": { + "node": "*" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dependencies": { + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "dependencies": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", + "dependencies": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.reduce": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz", + "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=", + "dependencies": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/ono": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/ono/-/ono-4.0.11.tgz", + "integrity": "sha512-jQ31cORBFE6td25deYeD80wxKBMj+zBmHTrVxnc6CKhx8gho6ipmWM5zj/oeoqioZ99yqBls9Z/9Nss7J26G2g==", + "dependencies": { + "format-util": "^1.0.3" + } + }, + "node_modules/open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dependencies": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/openapi-types": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.0.tgz", + "integrity": "sha512-XpeCy01X6L5EpP+6Hc3jWN7rMZJ+/k1lwki/kTmWzbVhdPie3jd5O2ZtedEx8Yp58icJ0osVldLMrTB/zslQXA==" + }, + "node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/optionator/node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, + "node_modules/opts": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/opts/-/opts-2.0.2.tgz", + "integrity": "sha512-k41FwbcLnlgnFh69f4qdUfvDQ+5vaSDnVPFI/y5XuhKRq97EnVVneO9F1ESVCdiVu4fCS2L8usX3mU331hB7pg==" + }, + "node_modules/ordered-read-streams": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", + "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", + "dependencies": { + "readable-stream": "^2.0.1" + } + }, + "node_modules/os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dependencies": { + "lcid": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-defer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "engines": { + "node": ">=4" + } + }, + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "engines": { + "node": ">=4" + } + }, + "node_modules/p-is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dependencies": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", + "dependencies": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dependencies": { + "error-ex": "^1.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/patch-package": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-6.5.1.tgz", + "integrity": "sha512-I/4Zsalfhc6bphmJTlrLoOcAF87jcxko4q0qsv4bGcurbr8IskEOtdnt9iCmsQVGL1B+iUhSQqweyTLJfCF9rA==", + "dependencies": { + "@yarnpkg/lockfile": "^1.1.0", + "chalk": "^4.1.2", + "cross-spawn": "^6.0.5", + "find-yarn-workspace-root": "^2.0.0", + "fs-extra": "^9.0.0", + "is-ci": "^2.0.0", + "klaw-sync": "^6.0.0", + "minimist": "^1.2.6", + "open": "^7.4.2", + "rimraf": "^2.6.3", + "semver": "^5.6.0", + "slash": "^2.0.0", + "tmp": "^0.0.33", + "yaml": "^1.10.2" + }, + "bin": { + "patch-package": "index.js" + }, + "engines": { + "node": ">=10", + "npm": ">5" + } + }, + "node_modules/patch-package/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/patch-package/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/patch-package/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/patch-package/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/patch-package/node_modules/slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/patch-package/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/patch-package/node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + }, + "node_modules/path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dependencies": { + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "engines": { + "node": ">=4" + } + }, + "node_modules/path-loader": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/path-loader/-/path-loader-1.0.10.tgz", + "integrity": "sha512-CMP0v6S6z8PHeJ6NFVyVJm6WyJjIwFvyz2b0n2/4bKdS/0uZa/9sKUlYZzubrn3zuDRU0zIuEDX9DZYQ2ZI8TA==", + "dependencies": { + "native-promise-only": "^0.8.1", + "superagent": "^3.8.3" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "dependencies": { + "path-root-regex": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "node_modules/path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dependencies": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dependencies": { + "pinkie": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/plugin-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", + "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", + "dependencies": { + "ansi-colors": "^1.0.1", + "arr-diff": "^4.0.0", + "arr-union": "^3.1.0", + "extend-shallow": "^3.0.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/portfinder": { + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", + "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", + "dependencies": { + "async": "^2.6.2", + "debug": "^3.1.1", + "mkdirp": "^0.5.5" + }, + "engines": { + "node": ">= 0.12.0" + } + }, + "node_modules/portfinder/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/portfinder/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/prebuild-install": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.1.4.tgz", + "integrity": "sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ==", + "optional": true, + "dependencies": { + "detect-libc": "^1.0.3", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^1.0.1", + "node-abi": "^2.21.0", + "npmlog": "^4.0.1", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^3.0.3", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/prebuild-install/node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "optional": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/prettier": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz", + "integrity": "sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/prismjs": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", + "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==", + "engines": { + "node": ">=6" + } + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/property-information": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", + "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==", + "dependencies": { + "xtend": "^4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "node_modules/psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, + "node_modules/pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dependencies": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz", + "integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/query-string": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "dependencies": { + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", + "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" + }, + "node_modules/ramda": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.28.0.tgz", + "integrity": "sha512-9QnLuG/kPVgWvMQ4aODhsBUFKOUmnbUnsSXACv+NCQZcHbeb+v8Lodp8OVxtRULN1/xOyYLLaL6npE6dMq5QTA==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ramda" + } + }, + "node_modules/ramda-adjunct": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/ramda-adjunct/-/ramda-adjunct-3.4.0.tgz", + "integrity": "sha512-qKRgqwZzJUZmPJfGK8/uLVxQXkiftKhW6FW9NUCUlQrzsBUZBvFAZUxwH7nTRwDMg+ChRU69rVVuS/4EUgtuIg==", + "engines": { + "node": ">=0.10.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ramda-adjunct" + }, + "peerDependencies": { + "ramda": ">= 0.28.0 <= 0.28.0" + } + }, + "node_modules/randexp": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.5.3.tgz", + "integrity": "sha512-U+5l2KrcMNOUPYvazA3h5ekF80FHTUG+87SEAmHZmolh1M+i/WyTCxVzmi+tidIa1tM4BSe8g2Y/D3loWDjj+w==", + "dependencies": { + "drange": "^1.0.2", + "ret": "^0.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/randexp/node_modules/ret": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.2.2.tgz", + "integrity": "sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.1.7.tgz", + "integrity": "sha1-HQJ8K/oRasxmI7yo8AAWVyqH1CU=", + "dependencies": { + "bytes": "1", + "string_decoder": "0.10" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/raw-body/node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "optional": true, + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/react": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", + "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-copy-to-clipboard": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz", + "integrity": "sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==", + "dependencies": { + "copy-to-clipboard": "^3.3.1", + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "react": "^15.3.0 || 16 || 17 || 18" + } + }, + "node_modules/react-debounce-input": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/react-debounce-input/-/react-debounce-input-3.3.0.tgz", + "integrity": "sha512-VEqkvs8JvY/IIZvh71Z0TC+mdbxERvYF33RcebnodlsUZ8RSgyKe2VWaHXv4+/8aoOgXLxWrdsYs2hDhcwbUgA==", + "dependencies": { + "lodash.debounce": "^4", + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "react": "^15.3.0 || 16 || 17 || 18" + } + }, + "node_modules/react-dom": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", + "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "scheduler": "^0.20.2" + }, + "peerDependencies": { + "react": "17.0.2" + } + }, + "node_modules/react-immutable-proptypes": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/react-immutable-proptypes/-/react-immutable-proptypes-2.2.0.tgz", + "integrity": "sha512-Vf4gBsePlwdGvSZoLSBfd4HAP93HDauMY4fDjXhreg/vg6F3Fj/MXDNyTbltPC/xZKmZc+cjLu3598DdYK6sgQ==", + "dependencies": { + "invariant": "^2.2.2" + }, + "peerDependencies": { + "immutable": ">=3.6.2" + } + }, + "node_modules/react-immutable-pure-component": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/react-immutable-pure-component/-/react-immutable-pure-component-2.2.2.tgz", + "integrity": "sha512-vkgoMJUDqHZfXXnjVlG3keCxSO/U6WeDQ5/Sl0GK2cH8TOxEzQ5jXqDXHEL/jqk6fsNxV05oH5kD7VNMUE2k+A==", + "peerDependencies": { + "immutable": ">= 2 || >= 4.0.0-rc", + "react": ">= 16.6", + "react-dom": ">= 16.6" + } + }, + "node_modules/react-inspector": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/react-inspector/-/react-inspector-6.0.1.tgz", + "integrity": "sha512-cxKSeFTf7jpSSVddm66sKdolG90qURAX3g1roTeaN6x0YEbtWc8JpmFN9+yIqLNH2uEkYerWLtJZIXRIFuBKrg==", + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "node_modules/react-redux": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-8.0.5.tgz", + "integrity": "sha512-Q2f6fCKxPFpkXt1qNRZdEDLlScsDWyrgSj0mliK59qU6W5gvBiKkdMEG2lJzhd1rCctf0hb6EtePPLZ2e0m1uw==", + "dependencies": { + "@babel/runtime": "^7.12.1", + "@types/hoist-non-react-statics": "^3.3.1", + "@types/use-sync-external-store": "^0.0.3", + "hoist-non-react-statics": "^3.3.2", + "react-is": "^18.0.0", + "use-sync-external-store": "^1.0.0" + }, + "peerDependencies": { + "@types/react": "^16.8 || ^17.0 || ^18.0", + "@types/react-dom": "^16.8 || ^17.0 || ^18.0", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0", + "react-native": ">=0.59", + "redux": "^4" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + }, + "redux": { + "optional": true + } + } + }, + "node_modules/react-redux/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + }, + "node_modules/react-syntax-highlighter": { + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.5.0.tgz", + "integrity": "sha512-+zq2myprEnQmH5yw6Gqc8lD55QHnpKaU8TOcFeC/Lg/MQSs8UknEA0JC4nTZGFAXC2J2Hyj/ijJ7NlabyPi2gg==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "highlight.js": "^10.4.1", + "lowlight": "^1.17.0", + "prismjs": "^1.27.0", + "refractor": "^3.6.0" + }, + "peerDependencies": { + "react": ">= 0.14.0" + } + }, + "node_modules/read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dependencies": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dependencies": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/redux": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz", + "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", + "dependencies": { + "@babel/runtime": "^7.9.2" + } + }, + "node_modules/redux-immutable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/redux-immutable/-/redux-immutable-4.0.0.tgz", + "integrity": "sha512-SchSn/DWfGb3oAejd+1hhHx01xUoxY+V7TeK0BKqpkLKiQPVFf7DYzEaKmrEVxsWxielKfSK9/Xq66YyxgR1cg==", + "peerDependencies": { + "immutable": "^3.8.1 || ^4.0.0-rc.1" + } + }, + "node_modules/refractor": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/refractor/-/refractor-3.6.0.tgz", + "integrity": "sha512-MY9W41IOWxxk31o+YvFCNyNzdkc9M20NoZK5vq6jkv4I/uh2zkWcfudj0Q1fovjUQJrNewS9NMzeTtqPf+n5EA==", + "dependencies": { + "hastscript": "^6.0.0", + "parse-entities": "^2.0.0", + "prismjs": "~1.27.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/refractor/node_modules/prismjs": { + "version": "1.27.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.27.0.tgz", + "integrity": "sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/reftools": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.9.tgz", + "integrity": "sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w==", + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" + }, + "node_modules/regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/remarkable": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-2.0.1.tgz", + "integrity": "sha512-YJyMcOH5lrR+kZdmB0aJJ4+93bEojRZ1HGDn9Eagu6ibg7aVZhc3OWbbShRid+Q5eAfsEqWxpe+g5W5nYNfNiA==", + "dependencies": { + "argparse": "^1.0.10", + "autolinker": "^3.11.0" + }, + "bin": { + "remarkable": "bin/remarkable.js" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/remarkable/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/remove-bom-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", + "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", + "dependencies": { + "is-buffer": "^1.1.5", + "is-utf8": "^0.2.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/remove-bom-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", + "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=", + "dependencies": { + "remove-bom-buffer": "^3.0.0", + "safe-buffer": "^5.1.0", + "through2": "^2.0.3" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + }, + "node_modules/repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/replace-ext": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", + "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/replace-homedir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz", + "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=", + "dependencies": { + "homedir-polyfill": "^1.0.1", + "is-absolute": "^1.0.0", + "remove-trailing-separator": "^1.1.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/request/node_modules/qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/require-dir": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/require-dir/-/require-dir-1.2.0.tgz", + "integrity": "sha512-LY85DTSu+heYgDqq/mK+7zFHWkttVNRXC9NKcKGyuGLdlsfbjEPrIEYdCVrx6hqnJb+xSu3Lzaoo8VnmOhhjNA==", + "engines": { + "node": "*" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" + }, + "node_modules/reselect": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.7.tgz", + "integrity": "sha512-Zu1xbUt3/OPwsXL46hvOOoQrap2azE7ZQbokq61BQfiXvhewsKDwhMeZjTX9sX0nvw1t/U5Audyn1I9P/m9z0A==" + }, + "node_modules/resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dependencies": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dependencies": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-options": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", + "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=", + "dependencies": { + "value-or-function": "^3.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "deprecated": "https://github.com/lydell/resolve-url#deprecated" + }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "engines": { + "node": ">=0.12" + } + }, + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/safe-json-parse": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-json-parse/-/safe-json-parse-1.0.1.tgz", + "integrity": "sha1-PnZyPjjf3aE8mx0poeB//uSzC1c=" + }, + "node_modules/safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dependencies": { + "ret": "~0.1.10" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/scheduler": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", + "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/semver-greatest-satisfied-range": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz", + "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=", + "dependencies": { + "sver-compat": "^1.5.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "dependencies": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serialize-error": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-8.1.0.tgz", + "integrity": "sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "dependencies": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-static/node_modules/http-errors": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", + "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-static/node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/serve-static/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + }, + "node_modules/serve-static/node_modules/send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "dependencies": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-static/node_modules/setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "node_modules/set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "dependencies": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/short-unique-id": { + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/short-unique-id/-/short-unique-id-4.4.4.tgz", + "integrity": "sha512-oLF1NCmtbiTWl2SqdXZQbo5KM1b7axdp0RgQLq8qCBBLoq+o3A5wmLrNM6bZIh54/a8BJ3l69kTXuxwZ+XCYuw==", + "bin": { + "short-unique-id": "bin/short-unique-id", + "suid": "bin/short-unique-id" + } + }, + "node_modules/should": { + "version": "13.2.3", + "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", + "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==", + "dependencies": { + "should-equal": "^2.0.0", + "should-format": "^3.0.3", + "should-type": "^1.4.0", + "should-type-adaptors": "^1.0.1", + "should-util": "^1.0.0" + } + }, + "node_modules/should-equal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", + "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", + "dependencies": { + "should-type": "^1.4.0" + } + }, + "node_modules/should-format": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", + "integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=", + "dependencies": { + "should-type": "^1.3.0", + "should-type-adaptors": "^1.0.1" + } + }, + "node_modules/should-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", + "integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=" + }, + "node_modules/should-type-adaptors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz", + "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", + "dependencies": { + "should-type": "^1.3.0", + "should-util": "^1.0.0" + } + }, + "node_modules/should-util": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.1.tgz", + "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==" + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "optional": true + }, + "node_modules/simple-get": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz", + "integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==", + "optional": true, + "dependencies": { + "decompress-response": "^4.2.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "dependencies": { + "is-plain-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "node_modules/source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "deprecated": "See https://github.com/lydell/source-map-url#deprecated" + }, + "node_modules/space-separated-tokens": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", + "integrity": "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/sparkles": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", + "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz", + "integrity": "sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ==" + }, + "node_modules/split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "node_modules/sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", + "engines": { + "node": "*" + } + }, + "node_modules/stampit": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/stampit/-/stampit-4.3.2.tgz", + "integrity": "sha512-pE2org1+ZWQBnIxRPrBM2gVupkuDD0TTNIo1H6GdT/vO82NXli2z8lRE8cu/nBIHrcOCXFBAHpb9ZldrB2/qOA==" + }, + "node_modules/static-eval": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.2.tgz", + "integrity": "sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg==", + "dependencies": { + "escodegen": "^1.8.1" + } + }, + "node_modules/static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/stream-exhaust": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz", + "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==" + }, + "node_modules/stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" + }, + "node_modules/strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-template": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", + "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=" + }, + "node_modules/string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dependencies": { + "is-utf8": "^0.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-outer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", + "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", + "dependencies": { + "escape-string-regexp": "^1.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-url-auth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-url-auth/-/strip-url-auth-1.0.1.tgz", + "integrity": "sha1-IrD6OkE4WzO+PzMVUbu4N/oM164=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/superagent": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.3.tgz", + "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==", + "deprecated": "Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at .", + "dependencies": { + "component-emitter": "^1.2.0", + "cookiejar": "^2.1.0", + "debug": "^3.1.0", + "extend": "^3.0.0", + "form-data": "^2.3.1", + "formidable": "^1.2.0", + "methods": "^1.1.1", + "mime": "^1.4.1", + "qs": "^6.5.1", + "readable-stream": "^2.3.5" + }, + "engines": { + "node": ">= 4.0" + } + }, + "node_modules/superagent/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/superagent/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/sver-compat": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", + "integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=", + "dependencies": { + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/swagger-cli": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/swagger-cli/-/swagger-cli-4.0.4.tgz", + "integrity": "sha512-Cp8YYuLny3RJFQ4CvOBTaqmOOgYsem52dPx1xM5S4EUWFblIh2Q8atppMZvXKUr1e9xH5RwipYpmdUzdPcxWcA==", + "dependencies": { + "@apidevtools/swagger-cli": "4.0.4" + }, + "bin": { + "swagger-cli": "swagger-cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/swagger-cli/node_modules/@apidevtools/swagger-cli": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-cli/-/swagger-cli-4.0.4.tgz", + "integrity": "sha512-hdDT3B6GLVovCsRZYDi3+wMcB1HfetTU20l2DC8zD3iFRNMC6QNAZG5fo/6PYeHWBEv7ri4MvnlKodhNB0nt7g==", + "dependencies": { + "@apidevtools/swagger-parser": "^10.0.1", + "chalk": "^4.1.0", + "js-yaml": "^3.14.0", + "yargs": "^15.4.1" + }, + "bin": { + "swagger-cli": "bin/swagger-cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/swagger-cli/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/swagger-cli/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/swagger-cli/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/swagger-cli/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/swagger-cli/node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/swagger-cli/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/swagger-cli/node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/swagger-cli/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/swagger-cli/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/swagger-cli/node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, + "node_modules/swagger-cli/node_modules/string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/swagger-cli/node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/swagger-cli/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/swagger-cli/node_modules/which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "node_modules/swagger-cli/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/swagger-cli/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" + }, + "node_modules/swagger-cli/node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/swagger-cli/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/swagger-client": { + "version": "3.19.1", + "resolved": "https://registry.npmjs.org/swagger-client/-/swagger-client-3.19.1.tgz", + "integrity": "sha512-PO+ttw+PGA8umvyli4ljSlmN7Jkzao74TPvrbXoRAGW3UChb3w18fmJKebLGeo2DDebYyrQ8ycPobyNP40b7BQ==", + "dependencies": { + "@babel/runtime-corejs3": "^7.20.13", + "@swagger-api/apidom-core": "=0.69.0", + "@swagger-api/apidom-json-pointer": "=0.69.0", + "@swagger-api/apidom-ns-openapi-3-1": "=0.69.0", + "@swagger-api/apidom-reference": "=0.69.0", + "cookie": "~0.5.0", + "cross-fetch": "^3.1.5", + "deepmerge": "~4.3.0", + "fast-json-patch": "^3.0.0-1", + "form-data-encoder": "^1.4.3", + "formdata-node": "^4.0.0", + "is-plain-object": "^5.0.0", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "qs": "^6.10.2", + "traverse": "~0.6.6", + "url": "~0.11.0" + } + }, + "node_modules/swagger-client/node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/swagger-client/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/swagger-editor-dist": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/swagger-editor-dist/-/swagger-editor-dist-3.17.0.tgz", + "integrity": "sha512-Lvd17AcF/r7SLMF2JmSU3zL1g2CEdIo2E97teHuTXFMxHKCTAVRTHJv9/UxZhDaiZSJSY9Au2mBKW+MjS2ZcXw==" + }, + "node_modules/swagger-methods": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/swagger-methods/-/swagger-methods-1.0.8.tgz", + "integrity": "sha512-G6baCwuHA+C5jf4FNOrosE4XlmGsdjbOjdBK4yuiDDj/ro9uR4Srj3OR84oQMT8F3qKp00tYNv0YN730oTHPZA==", + "deprecated": "This package is no longer being maintained." + }, + "node_modules/swagger-repo": { + "version": "2.0.0-rc.15", + "resolved": "https://registry.npmjs.org/swagger-repo/-/swagger-repo-2.0.0-rc.15.tgz", + "integrity": "sha512-bXzw8oByP8RabdNHTZlCMZ3YEz3t1IKz+JbzP43JSd7N+oRe7Ms9Li46R6rqx6nF2MWClvjBSs1q949O/rqjAA==", + "dependencies": { + "body-parser": "^1.15.2", + "chalk": "^2.4.1", + "commander": "^2.9.0", + "cors": "^2.7.1", + "express": "^4.13.4", + "fs-extra": "^7.0.1", + "gh-pages": "^2.0.1", + "glob": "^7.0.0", + "js-yaml": "^3.13.1", + "json-pointer": "^0.6.0", + "jsonpath": "^1.0.2", + "livereload": "^0.8.0", + "lodash": "^4.17.15", + "mkdirp": "^0.5.1", + "node-fetch": "^2.3.0", + "oas-validator": "^1.1.13", + "require-dir": "^1.0.0", + "swagger-editor-dist": "^3.6.16", + "swagger-ui-dist": "^3.20.1", + "sway": "^2.0.6" + }, + "bin": { + "swagger-repo": "bin/swagger-repo.js" + }, + "engines": { + "node": ">=10.14.0" + } + }, + "node_modules/swagger-repo/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/swagger-repo/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/swagger-repo/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/swagger-repo/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "node_modules/swagger-repo/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "engines": { + "node": ">=4" + } + }, + "node_modules/swagger-repo/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/swagger-schema-official": { + "version": "2.0.0-bab6bed", + "resolved": "https://registry.npmjs.org/swagger-schema-official/-/swagger-schema-official-2.0.0-bab6bed.tgz", + "integrity": "sha1-cAcEaNbSl3ylI3suUZyn0Gouo/0=" + }, + "node_modules/swagger-ui": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/swagger-ui/-/swagger-ui-4.18.0.tgz", + "integrity": "sha512-SikkJEHkYR2oFARQk6xgv4SoswWpkVRlS3vVSl2zktd5DCbu/0xw0XpHfwnhrUOPquqcgNntC+O2vxxMutQ8+w==", + "hasInstallScript": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.18.9", + "@braintree/sanitize-url": "=6.0.2", + "base64-js": "^1.5.1", + "classnames": "^2.3.1", + "css.escape": "1.5.1", + "deep-extend": "0.6.0", + "dompurify": "=2.3.10", + "ieee754": "^1.2.1", + "immutable": "^3.x.x", + "js-file-download": "^0.4.12", + "js-yaml": "=4.1.0", + "lodash": "^4.17.21", + "patch-package": "^6.5.0", + "prop-types": "^15.8.1", + "randexp": "^0.5.3", + "randombytes": "^2.1.0", + "react": "=17.0.2", + "react-copy-to-clipboard": "5.1.0", + "react-debounce-input": "=3.3.0", + "react-dom": "=17.0.2", + "react-immutable-proptypes": "2.2.0", + "react-immutable-pure-component": "^2.2.0", + "react-inspector": "^6.0.1", + "react-redux": "^8.0.5", + "react-syntax-highlighter": "^15.5.0", + "redux": "^4.1.2", + "redux-immutable": "^4.0.0", + "remarkable": "^2.0.1", + "reselect": "^4.1.5", + "serialize-error": "^8.1.0", + "sha.js": "^2.4.11", + "swagger-client": "^3.19.1", + "url-parse": "^1.5.8", + "xml": "=1.0.1", + "xml-but-prettier": "^1.0.1", + "zenscroll": "^4.0.2" + } + }, + "node_modules/swagger-ui-dist": { + "version": "3.52.5", + "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-3.52.5.tgz", + "integrity": "sha512-8z18eX8G/jbTXYzyNIaobrnD7PSN7yU/YkSasMmajrXtw0FGS64XjrKn5v37d36qmU3o1xLeuYnktshRr7uIFw==" + }, + "node_modules/swagger-ui/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/sway": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/sway/-/sway-2.0.6.tgz", + "integrity": "sha512-0HRT2WuU44XIdq+eCiMx67Bl/kiEKORP+4j+Wt89rFjoR5Dwx2hmU4PkMA6hnd48XLfS50olIac3pQGrV/wv7w==", + "dependencies": { + "debug": "^3.1.0", + "faker": "^4.1.0", + "js-base64": "^2.4.5", + "js-yaml": "^3.13.1", + "json-refs": "^3.0.13", + "json-schema-faker": "^0.5.0-rc16", + "lodash": "^4.17.10", + "native-promise-only": "^0.8.1", + "path-to-regexp": "^1.7.0", + "swagger-methods": "^1.0.0", + "swagger-schema-official": "2.0.0-bab6bed", + "z-schema": "^3.22.0" + } + }, + "node_modules/sway/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/sway/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "node_modules/sway/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/sway/node_modules/path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dependencies": { + "isarray": "0.0.1" + } + }, + "node_modules/sway/node_modules/validator": { + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-10.11.0.tgz", + "integrity": "sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/sway/node_modules/z-schema": { + "version": "3.25.1", + "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-3.25.1.tgz", + "integrity": "sha512-7tDlwhrBG+oYFdXNOjILSurpfQyuVgkRe3hB2q8TEssamDHB7BbLWYkYO98nTn0FibfdFroFKDjndbgufAgS/Q==", + "dependencies": { + "core-js": "^2.5.7", + "lodash.get": "^4.0.0", + "lodash.isequal": "^4.0.0", + "validator": "^10.0.0" + }, + "bin": { + "z-schema": "bin/z-schema" + }, + "optionalDependencies": { + "commander": "^2.7.1" + } + }, + "node_modules/tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "optional": true, + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-fs/node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "optional": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "optional": true, + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar-stream/node_modules/readable-stream": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.1.tgz", + "integrity": "sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ==", + "optional": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/through2-filter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", + "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", + "dependencies": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + } + }, + "node_modules/time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tiny-lr": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tiny-lr/-/tiny-lr-1.1.1.tgz", + "integrity": "sha512-44yhA3tsaRoMOjQQ+5v5mVdqef+kH6Qze9jTpqtVufgYjYt08zyZAwNwwVBj3i1rJMnR52IxOW0LK0vBzgAkuA==", + "dependencies": { + "body": "^5.1.0", + "debug": "^3.1.0", + "faye-websocket": "~0.10.0", + "livereload-js": "^2.3.0", + "object-assign": "^4.1.0", + "qs": "^6.4.0" + } + }, + "node_modules/tiny-lr/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/tiny-lr/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-absolute-glob": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", + "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", + "dependencies": { + "is-absolute": "^1.0.0", + "is-negated-glob": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-object-path/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-through": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", + "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=", + "dependencies": { + "through2": "^2.0.3" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/toggle-selection": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz", + "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==" + }, + "node_modules/toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "dependencies": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tough-cookie/node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, + "node_modules/traverse": { + "version": "0.6.7", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.7.tgz", + "integrity": "sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tree-sitter": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.20.1.tgz", + "integrity": "sha512-Cmb8V0ocamHbgWMVhZIa+78k/7r8VCQ6+ePG8eYEAO7AccwWi06Ct4ATNiI94KwhIkRl0+OwZ42/5nk3GnEMpQ==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "nan": "^2.14.0", + "prebuild-install": "^6.0.1" + } + }, + "node_modules/tree-sitter-json": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/tree-sitter-json/-/tree-sitter-json-0.20.0.tgz", + "integrity": "sha512-PteOLH+Tx6Bz4ZA/d40/DbkiSXXRM/gKahhHI8hQ1lWNfFvdknnz9k3Mz84ol5srRyLboJ8wp8GSkhZ6ht9EGQ==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "nan": "^2.14.1" + } + }, + "node_modules/tree-sitter-yaml": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/tree-sitter-yaml/-/tree-sitter-yaml-0.5.0.tgz", + "integrity": "sha512-POJ4ZNXXSWIG/W4Rjuyg36MkUD4d769YRUGKRqN+sVaj/VCo6Dh6Pkssn1Rtewd5kybx+jT1BWMyWN0CijXnMA==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "nan": "^2.14.0" + } + }, + "node_modules/trim-repeated": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", + "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", + "dependencies": { + "escape-string-regexp": "^1.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ts-toolbelt": { + "version": "6.15.5", + "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-6.15.5.tgz", + "integrity": "sha512-FZIXf1ksVyLcfr7M317jbB67XFJhOO1YqdTcuGaq9q5jLUoTikukZ+98TPjKiP2jC5CgmYdWWYs0s2nLSU0/1A==" + }, + "node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, + "node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/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==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "node_modules/unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/underscore": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", + "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==" + }, + "node_modules/undertaker": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.3.0.tgz", + "integrity": "sha512-/RXwi5m/Mu3H6IHQGww3GNt1PNXlbeCuclF2QYR14L/2CHPz3DFZkvB5hZ0N/QUkiXWCACML2jXViIQEQc2MLg==", + "dependencies": { + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "bach": "^1.0.0", + "collection-map": "^1.0.0", + "es6-weak-map": "^2.0.1", + "fast-levenshtein": "^1.0.0", + "last-run": "^1.1.0", + "object.defaults": "^1.0.0", + "object.reduce": "^1.0.0", + "undertaker-registry": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/undertaker-registry": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz", + "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unique-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", + "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", + "dependencies": { + "json-stable-stringify-without-jsonify": "^1.0.1", + "through2-filter": "^3.0.0" + } + }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/unraw": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unraw/-/unraw-2.0.1.tgz", + "integrity": "sha512-tdOvLfRzHolwYcHS6HIX860MkK9LQ4+oLuNwFYL7bpgTEO64PZrcQxkisgwJYCfF8sKiWLwwu1c83DvMkbefIQ==" + }, + "node_modules/unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "engines": { + "node": ">=4", + "yarn": "*" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "deprecated": "Please see https://github.com/lydell/urix#deprecated" + }, + "node_modules/url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==", + "dependencies": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "node_modules/url/node_modules/punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" + }, + "node_modules/use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/use-sync-external-store": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/v8flags": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", + "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/validator": { + "version": "13.9.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.9.0.tgz", + "integrity": "sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/value-or-function": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", + "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/vinyl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", + "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", + "dependencies": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl-fs": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", + "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", + "dependencies": { + "fs-mkdirp-stream": "^1.0.0", + "glob-stream": "^6.1.0", + "graceful-fs": "^4.0.0", + "is-valid-glob": "^1.0.0", + "lazystream": "^1.0.0", + "lead": "^1.0.0", + "object.assign": "^4.0.4", + "pumpify": "^1.3.5", + "readable-stream": "^2.3.3", + "remove-bom-buffer": "^3.0.0", + "remove-bom-stream": "^1.2.0", + "resolve-options": "^1.1.0", + "through2": "^2.0.0", + "to-through": "^2.0.0", + "value-or-function": "^3.0.0", + "vinyl": "^2.0.0", + "vinyl-sourcemap": "^1.1.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl-sourcemap": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", + "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=", + "dependencies": { + "append-buffer": "^1.0.2", + "convert-source-map": "^1.5.0", + "graceful-fs": "^4.1.6", + "normalize-path": "^2.1.1", + "now-and-later": "^2.0.0", + "remove-bom-buffer": "^3.0.0", + "vinyl": "^2.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl-sourcemap/node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/web-streams-polyfill": { + "version": "4.0.0-beta.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz", + "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==", + "engines": { + "node": ">= 14" + } + }, + "node_modules/web-tree-sitter": { + "version": "0.20.7", + "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.20.7.tgz", + "integrity": "sha512-flC9JJmTII9uAeeYpWF8hxDJ7bfY+leldQryetll8Nv4WgI+MXc6h7TiyAZASWl9uC9TvmfdgOjZn1DAQecb3A==", + "optional": true + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + }, + "node_modules/websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=" + }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "optional": true, + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dependencies": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "node_modules/ws": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", + "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==", + "dependencies": { + "async-limiter": "~1.0.0" + } + }, + "node_modules/xml": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", + "integrity": "sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==" + }, + "node_modules/xml-but-prettier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xml-but-prettier/-/xml-but-prettier-1.0.1.tgz", + "integrity": "sha512-C2CJaadHrZTqESlH03WOyw0oZTtoy2uEg6dSDF6YRg+9GnYNub53RRemLpnvtbHDFelxMx4LajiFsYeR6XJHgQ==", + "dependencies": { + "repeat-string": "^1.5.2" + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==" + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/yamljs": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/yamljs/-/yamljs-0.3.0.tgz", + "integrity": "sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ==", + "dependencies": { + "argparse": "^1.0.7", + "glob": "^7.0.5" + }, + "bin": { + "json2yaml": "bin/json2yaml", + "yaml2json": "bin/yaml2json" + } + }, + "node_modules/yamljs/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/yargs": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.2.tgz", + "integrity": "sha512-ZEjj/dQYQy0Zx0lgLMLR8QuaqTihnxirir7EwUHp1Axq4e3+k8jXU5K0VLbNvedv1f4EWtBonDIZm0NUr+jCcA==", + "dependencies": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.1" + } + }, + "node_modules/yargs-parser": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.1.tgz", + "integrity": "sha512-wpav5XYiddjXxirPoCTUPbqM0PXvJ9hiBMvuJgInvo4/lAOTZzUprArw17q2O1P2+GHhbBr18/iQwjL5Z9BqfA==", + "dependencies": { + "camelcase": "^3.0.0", + "object.assign": "^4.1.0" + } + }, + "node_modules/z-schema": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-4.2.4.tgz", + "integrity": "sha512-YvBeW5RGNeNzKOUJs3rTL4+9rpcvHXt5I051FJbOcitV8bl40pEfcG0Q+dWSwS0/BIYrMZ/9HHoqLllMkFhD0w==", + "dependencies": { + "lodash.get": "^4.4.2", + "lodash.isequal": "^4.5.0", + "validator": "^13.6.0" + }, + "bin": { + "z-schema": "bin/z-schema" + }, + "engines": { + "node": ">=6.0.0" + }, + "optionalDependencies": { + "commander": "^2.7.1" + } + }, + "node_modules/zenscroll": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/zenscroll/-/zenscroll-4.0.2.tgz", + "integrity": "sha512-jEA1znR7b4C/NnaycInCU6h/d15ZzCd1jmsruqOKnZP6WXQSMH3W2GL+OXbkruslU4h+Tzuos0HdswzRUk/Vgg==" + } + }, + "dependencies": { + "@apidevtools/json-schema-ref-parser": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", + "integrity": "sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w==", + "requires": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.6", + "call-me-maybe": "^1.0.1", + "js-yaml": "^4.1.0" + }, + "dependencies": { + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "requires": { + "argparse": "^2.0.1" + } + } + } + }, + "@apidevtools/openapi-schemas": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz", + "integrity": "sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ==" + }, + "@apidevtools/swagger-methods": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz", + "integrity": "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==" + }, + "@apidevtools/swagger-parser": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-parser/-/swagger-parser-10.0.2.tgz", + "integrity": "sha512-JFxcEyp8RlNHgBCE98nwuTkZT6eNFPc1aosWV6wPcQph72TSEEu1k3baJD4/x1qznU+JiDdz8F5pTwabZh+Dhg==", + "requires": { + "@apidevtools/json-schema-ref-parser": "^9.0.6", + "@apidevtools/openapi-schemas": "^2.0.4", + "@apidevtools/swagger-methods": "^3.0.2", + "@jsdevtools/ono": "^7.1.3", + "call-me-maybe": "^1.0.1", + "z-schema": "^4.2.3" + } + }, + "@babel/code-frame": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", + "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", + "requires": { + "@babel/highlight": "^7.14.5" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", + "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==" + }, + "@babel/highlight": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", + "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "requires": { + "@babel/helper-validator-identifier": "^7.14.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/runtime": { + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.9.tgz", + "integrity": "sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/runtime-corejs3": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.21.0.tgz", + "integrity": "sha512-TDD4UJzos3JJtM+tHX+w2Uc+KWj7GV+VKKFdMVd2Rx8sdA19hcc3P3AHFYd5LVOw+pYuSd5lICC3gm52B6Rwxw==", + "requires": { + "core-js-pure": "^3.25.1", + "regenerator-runtime": "^0.13.11" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" + } + } + }, + "@braintree/sanitize-url": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-6.0.2.tgz", + "integrity": "sha512-Tbsj02wXCbqGmzdnXNk0SOF19ChhRU70BsroIi4Pm6Ehp56in6vch94mfbdQ17DozxkL3BAVjbZ4Qc1a0HFRAg==" + }, + "@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==" + }, + "@swagger-api/apidom-ast": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ast/-/apidom-ast-0.69.0.tgz", + "integrity": "sha512-JsRyi1Ir3VeNSSWmIFqgaFOQCIUvCoKcfmOcU/h4Jz1IOkQij1vj3qEFln4J9sByOWHrhA8zD1Cf+LnXkbGVZg==", + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2", + "unraw": "=2.0.1" + } + }, + "@swagger-api/apidom-core": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-core/-/apidom-core-0.69.0.tgz", + "integrity": "sha512-n59Mz6JjgL5SJHne7om22+5RRfDNmM8oQ0NgHvWU44rHcmA/8Byxs28w6Ke2xgJFmLYasEw6hx1bwAATBLaa7w==", + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-ast": "^0.69.0", + "@types/ramda": "=0.28.23", + "minim": "=0.23.8", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "short-unique-id": "=4.4.4", + "stampit": "=4.3.2" + } + }, + "@swagger-api/apidom-json-pointer": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-json-pointer/-/apidom-json-pointer-0.69.0.tgz", + "integrity": "sha512-TDcrES6POTBrQXDdq7VjlqFYZuZ/eqaxD9K2MUJcRckil+jxpDV0W38lgXE+c8Gjwvqqqce/izkilUgMA+ajFA==", + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0" + } + }, + "@swagger-api/apidom-ns-api-design-systems": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-api-design-systems/-/apidom-ns-api-design-systems-0.69.0.tgz", + "integrity": "sha512-1W5N4wL5I9n4dD6AJ1Bh49kphn+DXmwggUQhwsq7phxey4jiEXUNC9W/CQDXJp0wkFtNE6REn8yks9QGqfkemw==", + "optional": true, + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-openapi-3-1": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2" + } + }, + "@swagger-api/apidom-ns-asyncapi-2": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-asyncapi-2/-/apidom-ns-asyncapi-2-0.69.0.tgz", + "integrity": "sha512-D49mduzDwVQJp55+KoT8NozQEUsLMhCxbAnD4iY1E/v4uK7xSqQ3JW/Luunz6DNKWWtcWhgCiehmBwIjVAQN/A==", + "optional": true, + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-json-schema-draft-7": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2" + } + }, + "@swagger-api/apidom-ns-json-schema-draft-4": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-4/-/apidom-ns-json-schema-draft-4-0.69.0.tgz", + "integrity": "sha512-rRo226jITgG6DZNuk1oCuKFhr0giJ6GATyQtaaEmH9bhxB8i1eeES/LolJfo4donyejCb+imJN+L1fQ1N2YOYA==", + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2" + } + }, + "@swagger-api/apidom-ns-json-schema-draft-6": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-6/-/apidom-ns-json-schema-draft-6-0.69.0.tgz", + "integrity": "sha512-koLHh4TS3RtrWxcYX/tZobgnwUbjiFLOESiqe0FYvs82LXNwr+dveM8Umj89ACjpCd0Pq2J+5yvfNyvuIa6WFw==", + "optional": true, + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-json-schema-draft-4": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2" + } + }, + "@swagger-api/apidom-ns-json-schema-draft-7": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-7/-/apidom-ns-json-schema-draft-7-0.69.0.tgz", + "integrity": "sha512-OaEBBrgoDfqMPnZ0NCfg5HUJJ/V6XJ1AZ6OTW1AfJTqErLxYTgdNv52lYXKLiKkyLiH5olBBnPEKPPLg+DwUKQ==", + "optional": true, + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-json-schema-draft-6": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2" + } + }, + "@swagger-api/apidom-ns-openapi-3-0": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-0/-/apidom-ns-openapi-3-0-0.69.0.tgz", + "integrity": "sha512-rKgEd/k0MNV93DhwZ6yfUaIjbs6RfS9xB3QN9M6Lx5ZJktxNGAdpS/c3WEb5jBOpkQIJ6MaNI67Q0ZHHJTlrng==", + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-json-schema-draft-4": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2" + } + }, + "@swagger-api/apidom-ns-openapi-3-1": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-1/-/apidom-ns-openapi-3-1-0.69.0.tgz", + "integrity": "sha512-l5g4K09I4znwTcXbkBaE4JKmvEQ7Q831hzpBWZimcnUGrC8/nJ7eYUc04bjgbdDZd37B0zEzRn6w92ax7Hi2Fg==", + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-openapi-3-0": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2" + } + }, + "@swagger-api/apidom-parser-adapter-api-design-systems-json": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-api-design-systems-json/-/apidom-parser-adapter-api-design-systems-json-0.69.0.tgz", + "integrity": "sha512-oi52u6rmLrE+iXOk5wlx1NRXHd0NtGsxF1G+g2JTtC0oh5ETrj5fMGwMQwcBqYGTj3Y6vPJMkvVyaC46KUKg0Q==", + "optional": true, + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-api-design-systems": "^0.69.0", + "@swagger-api/apidom-parser-adapter-json": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0" + } + }, + "@swagger-api/apidom-parser-adapter-api-design-systems-yaml": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-api-design-systems-yaml/-/apidom-parser-adapter-api-design-systems-yaml-0.69.0.tgz", + "integrity": "sha512-bqgf+iHK3qrANJ5zrQJ+BoWrIftL4YhCfZyE/aWwnGW1BKdB4uGC94rx9DHhS8ZfNPz7AnW+ki6ISXpYOD8uyw==", + "optional": true, + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-api-design-systems": "^0.69.0", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0" + } + }, + "@swagger-api/apidom-parser-adapter-asyncapi-json-2": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-asyncapi-json-2/-/apidom-parser-adapter-asyncapi-json-2-0.69.0.tgz", + "integrity": "sha512-3b1nGsbFh6DAUDB9plQE5iyqOE37DZS/X34Hr+5ENiq7DFA/19UYeUSJQfU+kWjtFzRDHBRluPo38nHdGnh4gg==", + "optional": true, + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-asyncapi-2": "^0.69.0", + "@swagger-api/apidom-parser-adapter-json": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0" + } + }, + "@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-asyncapi-yaml-2/-/apidom-parser-adapter-asyncapi-yaml-2-0.69.0.tgz", + "integrity": "sha512-JEuZw04wdtbn1WFkavB9Yn8MNAWtfUdlD6naa/Z4CL0iUOhC5BzG9dUfe6gn+Z+xtFRHm3MHMh9B6Xdr3MWDBg==", + "optional": true, + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-asyncapi-2": "^0.69.0", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0" + } + }, + "@swagger-api/apidom-parser-adapter-json": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-json/-/apidom-parser-adapter-json-0.69.0.tgz", + "integrity": "sha512-wNSYD9FU31aSBnCCp3Nt2ZZVAdu1LGGWmlLKmcOx7SXi79F1E+T6RtqyoLa0VBGKPVEwDtaH8kWRsZzXpUZVvQ==", + "optional": true, + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-ast": "^0.69.0", + "@swagger-api/apidom-core": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2", + "tree-sitter": "=0.20.1", + "tree-sitter-json": "=0.20.0", + "web-tree-sitter": "=0.20.7" + } + }, + "@swagger-api/apidom-parser-adapter-openapi-json-3-0": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-3-0/-/apidom-parser-adapter-openapi-json-3-0-0.69.0.tgz", + "integrity": "sha512-aSNFJ4he67c5Vz9+FbKKnJzy9JdmSDqzeog8CTiLI8TFrCvj9KQns68NbemyxHHc7uH9TcOwXq3WbXgXSWv60A==", + "optional": true, + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-openapi-3-0": "^0.69.0", + "@swagger-api/apidom-parser-adapter-json": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0" + } + }, + "@swagger-api/apidom-parser-adapter-openapi-json-3-1": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-3-1/-/apidom-parser-adapter-openapi-json-3-1-0.69.0.tgz", + "integrity": "sha512-7TCnTTKMVTyDiX7MKhphmqUaoKtWLOgKCaPEtBRFgd94yOkobWBKw7yG6G+0rdsCIb4Q9AFcL39eUDh5yI45/w==", + "optional": true, + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-openapi-3-1": "^0.69.0", + "@swagger-api/apidom-parser-adapter-json": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0" + } + }, + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-3-0/-/apidom-parser-adapter-openapi-yaml-3-0-0.69.0.tgz", + "integrity": "sha512-mrKLsNMsJr5Z4cUDO4v5vt59uGGWfLL36hTuSKcqO9IH/3nziPrYJ7Kd4VdiJaQYqFuUQCEG7A2pOZfkpbR1KA==", + "optional": true, + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-openapi-3-0": "^0.69.0", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0" + } + }, + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-3-1/-/apidom-parser-adapter-openapi-yaml-3-1-0.69.0.tgz", + "integrity": "sha512-tEyNhlGoQ7/CnC0K3NqBWfhi90U+5fFDl7Z2PyV/+fRG1F0okAoHwp9+Q3/BieWdiZ5OChX8yxwOdq1kJ2+TTQ==", + "optional": true, + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-ns-openapi-3-1": "^0.69.0", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0" + } + }, + "@swagger-api/apidom-parser-adapter-yaml-1-2": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-yaml-1-2/-/apidom-parser-adapter-yaml-1-2-0.69.0.tgz", + "integrity": "sha512-wfvFXg9xSz89hg/MRd1u6ESUb2UQmVJVIS2wWZwi1UXN9+F3Yh2l8RB5JchJYb5bqu2HX1ZYJ6FxG3dQTQICyQ==", + "optional": true, + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-ast": "^0.69.0", + "@swagger-api/apidom-core": "^0.69.0", + "@types/ramda": "=0.28.23", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2", + "tree-sitter": "=0.20.1", + "tree-sitter-yaml": "=0.5.0", + "web-tree-sitter": "=0.20.7" + } + }, + "@swagger-api/apidom-reference": { + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-reference/-/apidom-reference-0.69.0.tgz", + "integrity": "sha512-Sc3My/qTa90ofWXRaULkQ2oCUlgUCTbPN209jk/Lg0cywPTgeVEVn7Awpp2ftxl007uPPr2PwUzn/K6zzj+gyg==", + "requires": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.69.0", + "@swagger-api/apidom-json-pointer": "^0.69.0", + "@swagger-api/apidom-ns-asyncapi-2": "^0.69.0", + "@swagger-api/apidom-ns-openapi-3-0": "^0.69.0", + "@swagger-api/apidom-ns-openapi-3-1": "^0.69.0", + "@swagger-api/apidom-parser-adapter-api-design-systems-json": "^0.69.0", + "@swagger-api/apidom-parser-adapter-api-design-systems-yaml": "^0.69.0", + "@swagger-api/apidom-parser-adapter-asyncapi-json-2": "^0.69.0", + "@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": "^0.69.0", + "@swagger-api/apidom-parser-adapter-json": "^0.69.0", + "@swagger-api/apidom-parser-adapter-openapi-json-3-0": "^0.69.0", + "@swagger-api/apidom-parser-adapter-openapi-json-3-1": "^0.69.0", + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": "^0.69.0", + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": "^0.69.0", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.69.0", + "@types/ramda": "=0.28.23", + "axios": "=1.3.4", + "minimatch": "=7.3.0", + "process": "=0.11.10", + "ramda": "=0.28.0", + "ramda-adjunct": "=3.4.0", + "stampit": "=4.3.2" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.3.0.tgz", + "integrity": "sha512-WaMDuhKa7a6zKiwplR1AOz+zGvJba24k5VU1Cy6NhEguavT2YRlHxuINUgTas4wiS6fwBpYq4TcA1XIECSntyw==", + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, + "@types/hast": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.4.tgz", + "integrity": "sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==", + "requires": { + "@types/unist": "*" + } + }, + "@types/hoist-non-react-statics": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", + "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "requires": { + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0" + } + }, + "@types/json-schema": { + "version": "7.0.8", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.8.tgz", + "integrity": "sha512-YSBPTLTVm2e2OoQIDYx8HaeWJ5tTToLH67kXR7zYNGupXMEHa2++G8k+DczX2cFVgalypqtyZIcU19AFcmOpmg==" + }, + "@types/prop-types": { + "version": "15.7.5", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" + }, + "@types/ramda": { + "version": "0.28.23", + "resolved": "https://registry.npmjs.org/@types/ramda/-/ramda-0.28.23.tgz", + "integrity": "sha512-9TYWiwkew+mCMsL7jZ+kkzy6QXn8PL5/SKmBPmjgUlTpkokZWTBr+OhiIUDztpAEbslWyt24NNfEmZUBFmnXig==", + "requires": { + "ts-toolbelt": "^6.15.1" + } + }, + "@types/react": { + "version": "18.0.28", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.28.tgz", + "integrity": "sha512-RD0ivG1kEztNBdoAK7lekI9M+azSnitIn85h4iOiaLjaTrMjzslhaqCGaI4IyCJ1RljWiLCEu4jyrLLgqxBTew==", + "requires": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "@types/scheduler": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" + }, + "@types/unist": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", + "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==" + }, + "@types/use-sync-external-store": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz", + "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==" + }, + "@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==" + }, + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", + "requires": { + "ansi-wrap": "^0.1.0" + } + }, + "ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=" + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "append-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", + "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=", + "requires": { + "buffer-equal": "^1.0.0" + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "optional": true + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=" + }, + "are-we-there-yet": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", + "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "arr-filter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz", + "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=", + "requires": { + "make-iterator": "^1.0.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + }, + "arr-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz", + "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=", + "requires": { + "make-iterator": "^1.0.0" + } + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=" + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=" + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "array-initial": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", + "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=", + "requires": { + "array-slice": "^1.0.0", + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==" + } + } + }, + "array-last": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz", + "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==", + "requires": { + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==" + } + } + }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==" + }, + "array-sort": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz", + "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==", + "requires": { + "default-compare": "^1.0.0", + "get-value": "^2.0.6", + "kind-of": "^5.0.2" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" + }, + "async": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "requires": { + "lodash": "^4.17.14" + } + }, + "async-done": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz", + "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.2", + "process-nextick-args": "^2.0.0", + "stream-exhaust": "^1.0.1" + } + }, + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==" + }, + "async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" + }, + "async-settle": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz", + "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=", + "requires": { + "async-done": "^1.2.2" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==" + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" + }, + "autolinker": { + "version": "3.16.2", + "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-3.16.2.tgz", + "integrity": "sha512-JiYl7j2Z19F9NdTmirENSUUIIL/9MytEWtmzhfmsKPCp9E+G35Y0UNCMoM9tFigxT59qSc8Ml2dlZXOCVTYwuA==", + "requires": { + "tslib": "^2.3.0" + } + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, + "axios": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", + "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", + "requires": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + }, + "dependencies": { + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + } + } + }, + "bach": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", + "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=", + "requires": { + "arr-filter": "^1.1.1", + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "array-each": "^1.0.0", + "array-initial": "^1.0.0", + "array-last": "^1.1.1", + "async-done": "^1.2.2", + "async-settle": "^1.0.0", + "now-and-later": "^2.0.0" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "beeper": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", + "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=" + }, + "better-ajv-errors": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/better-ajv-errors/-/better-ajv-errors-0.5.7.tgz", + "integrity": "sha512-O7tpXektKWVwYCH5g6Vs3lKD+sJs7JHh5guapmGJd+RTwxhFZEf4FwvbHBURUnoXsTeFaMvGuhTTmEGiHpNi6w==", + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/runtime": "^7.0.0", + "chalk": "^2.4.1", + "core-js": "^2.5.7", + "json-to-ast": "^2.0.3", + "jsonpointer": "^4.0.1", + "leven": "^2.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==" + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "optional": true, + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.1.tgz", + "integrity": "sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ==", + "optional": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "body": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/body/-/body-5.1.0.tgz", + "integrity": "sha1-5LoM5BCkaTYyM2dgnstOZVMSUGk=", + "requires": { + "continuable-cache": "^0.3.1", + "error": "^7.0.0", + "raw-body": "~1.1.0", + "safe-json-parse": "~1.0.1" + } + }, + "body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "requires": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "dependencies": { + "bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, + "destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" + }, + "http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "requires": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + } + }, + "on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "requires": { + "ee-first": "1.1.1" + } + }, + "qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "requires": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" + }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "optional": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", + "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=" + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", + "integrity": "sha1-NWnt6Lo0MV+rmcPpLLBMciDeH6g=" + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==" + }, + "character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==" + }, + "character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==" + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "optional": true + }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=" + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=" + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=" + }, + "cloneable-readable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", + "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", + "requires": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "code-error-fragment": { + "version": "0.0.230", + "resolved": "https://registry.npmjs.org/code-error-fragment/-/code-error-fragment-0.0.230.tgz", + "integrity": "sha512-cadkfKp6932H8UkhzE/gcUqhRMNf8jHzkAN7+5Myabswaghu4xABTgPHDCjW+dBAJxj/SpkTYokpzDqY4pCzQw==" + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "collection-map": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz", + "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=", + "requires": { + "arr-map": "^2.0.2", + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "comma-separated-tokens": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz", + "integrity": "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==" + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + } + }, + "connect-livereload": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/connect-livereload/-/connect-livereload-0.6.1.tgz", + "integrity": "sha512-3R0kMOdL7CjJpU66fzAkCe6HNtd3AavCS4m+uW4KtJjrdGPT0SQEZieAYd+cm+lJoBznNQ4lqipYWkhBMgk00g==" + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", + "optional": true + }, + "content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==" + }, + "continuable-cache": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/continuable-cache/-/continuable-cache-0.3.1.tgz", + "integrity": "sha1-vXJ6f67XfnH/OYWskzUakSczrQ8=" + }, + "convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "cookiejar": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.4.tgz", + "integrity": "sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==" + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" + }, + "copy-props": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.5.tgz", + "integrity": "sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw==", + "requires": { + "each-props": "^1.3.2", + "is-plain-object": "^5.0.0" + }, + "dependencies": { + "is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" + } + } + }, + "copy-to-clipboard": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz", + "integrity": "sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==", + "requires": { + "toggle-selection": "^1.0.6" + } + }, + "core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==" + }, + "core-js-pure": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.29.0.tgz", + "integrity": "sha512-v94gUjN5UTe1n0yN/opTihJ8QBWD2O8i19RfTZR7foONPWArnjB96QA/wk5ozu1mm6ja3udQCzOzwQXTxi3xOQ==" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, + "cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "requires": { + "cross-spawn": "^7.0.1" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "cross-fetch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "requires": { + "node-fetch": "2.6.7" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "css.escape": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", + "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==" + }, + "csstype": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", + "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==" + }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "dateformat": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", + "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==" + }, + "decompress-response": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", + "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", + "optional": true, + "requires": { + "mimic-response": "^2.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + }, + "deepmerge": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.0.tgz", + "integrity": "sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og==" + }, + "default-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz", + "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==", + "requires": { + "kind-of": "^5.0.2" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "default-resolution": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz", + "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=" + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "optional": true + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=" + }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "optional": true + }, + "dompurify": { + "version": "2.3.10", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.3.10.tgz", + "integrity": "sha512-o7Fg/AgC7p/XpKjf/+RC3Ok6k4St5F7Q6q6+Nnm3p2zGWioAY6dh0CbbuwOhH2UcSzKsdniE/YnE2/92JcsA+g==" + }, + "dotnet-sdk-3.1": { + "version": "3.1.1007", + "resolved": "https://registry.npmjs.org/dotnet-sdk-3.1/-/dotnet-sdk-3.1-3.1.1007.tgz", + "integrity": "sha512-QkB9yyijXlq4XeLm9lMR1dshuB7XXjOiXGBQubBq0LTm5AV7EHX21nYnDIcJzE2zBgOXPFRjRvQEqMDyloY75g==" + }, + "drange": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/drange/-/drange-1.1.1.tgz", + "integrity": "sha512-pYxfDYpued//QpnLIm4Avk7rsNtAtQkUES2cwAYSvD/wd2pKD71gN2Ebj3e7klzXwjocvE8c5vx/1fxwpqmSxA==" + }, + "duplexer2": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", + "requires": { + "readable-stream": "~1.1.9" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "each-props": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz", + "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==", + "requires": { + "is-plain-object": "^2.0.1", + "object.defaults": "^1.1.0" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "email-addresses": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/email-addresses/-/email-addresses-3.1.0.tgz", + "integrity": "sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg==" + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, + "error": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/error/-/error-7.2.1.tgz", + "integrity": "sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA==", + "requires": { + "string-template": "~0.2.1" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es5-ext": { + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "requires": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "escodegen": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", + "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", + "requires": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true + } + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "optional": true + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "requires": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "requires": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + } + }, + "body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "requires": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + } + }, + "bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" + }, + "content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "requires": { + "safe-buffer": "5.2.1" + } + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, + "destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" + }, + "finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + } + }, + "http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "requires": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" + }, + "on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "requires": { + "ee-first": "1.1.1" + } + }, + "qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "requires": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "requires": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + } + }, + "serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + } + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" + }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" + } + } + }, + "ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "requires": { + "type": "^2.0.0" + }, + "dependencies": { + "type": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", + "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==" + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "faker": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/faker/-/faker-4.1.0.tgz", + "integrity": "sha1-HkW7vsxndLPBlfrSg1EJxtdIzD8=" + }, + "fancy-log": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", + "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", + "requires": { + "ansi-gray": "^0.1.1", + "color-support": "^1.1.3", + "parse-node-version": "^1.0.0", + "time-stamp": "^1.0.0" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-json-patch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.1.1.tgz", + "integrity": "sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==" + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "fast-levenshtein": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz", + "integrity": "sha1-5qdUzI8V5YmHqpy9J69m/W9OWvk=" + }, + "fast-safe-stringify": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.8.tgz", + "integrity": "sha512-lXatBjf3WPjmWD6DpIZxkeSsCOwqI0maYMpgDlx8g4U2qi4lbjA9oH/HD2a87G+KfsUmo5WbJFmqBZlPxtptag==" + }, + "fault": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", + "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", + "requires": { + "format": "^0.2.0" + } + }, + "faye-websocket": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "requires": { + "websocket-driver": ">=0.5.1" + } + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "optional": true + }, + "filename-reserved-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz", + "integrity": "sha1-5hz4BfDeHJhFZ9A4bcXfUO5a9+Q=" + }, + "filenamify": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-1.2.1.tgz", + "integrity": "sha1-qfL/0RxQO+0wABUCknI3jx8TZaU=", + "requires": { + "filename-reserved-regex": "^1.0.0", + "strip-outer": "^1.0.0", + "trim-repeated": "^1.0.0" + } + }, + "filenamify-url": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/filenamify-url/-/filenamify-url-1.0.0.tgz", + "integrity": "sha1-syvYExnvWGO3MHi+1Q9GpPeXX1A=", + "requires": { + "filenamify": "^1.0.0", + "humanize-url": "^1.0.0" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "find-yarn-workspace-root": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", + "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", + "requires": { + "micromatch": "^4.0.2" + }, + "dependencies": { + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "findup-sync": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", + "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "fined": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + } + }, + "flagged-respawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==" + }, + "flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "requires": { + "for-in": "^1.0.1" + } + }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "form-data-encoder": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz", + "integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==" + }, + "format": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", + "integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==" + }, + "format-util": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/format-util/-/format-util-1.0.5.tgz", + "integrity": "sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg==" + }, + "formdata-node": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz", + "integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==", + "requires": { + "node-domexception": "1.0.0", + "web-streams-polyfill": "4.0.0-beta.3" + } + }, + "formidable": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.2.tgz", + "integrity": "sha512-V8gLm+41I/8kguQ4/o1D3RIHRmhYFG4pnNyonvua+40rqcEmT4+V71yaZ3B457xbbgCsCfjSPi65u/W6vK1U5Q==" + }, + "forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "optional": true + }, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs-mkdirp-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", + "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", + "requires": { + "graceful-fs": "^4.1.11", + "through2": "^2.0.3" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg==", + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "requires": { + "pump": "^3.0.0" + }, + "dependencies": { + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "gh-pages": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/gh-pages/-/gh-pages-2.2.0.tgz", + "integrity": "sha512-c+yPkNOPMFGNisYg9r4qvsMIjVYikJv7ImFOhPIVPt0+AcRUamZ7zkGRLHz7FKB0xrlZ+ddSOJsZv9XAFVXLmA==", + "requires": { + "async": "^2.6.1", + "commander": "^2.18.0", + "email-addresses": "^3.0.1", + "filenamify-url": "^1.0.0", + "fs-extra": "^8.1.0", + "globby": "^6.1.0" + }, + "dependencies": { + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + } + } + }, + "github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", + "optional": true + }, + "glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "glob-stream": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", + "integrity": "sha512-uMbLGAP3S2aDOHUDfdoYcdIePUCfysbAd0IAoWVZbeGU/oNQ8asHVSshLDJUPWxfzj8zsCG7/XeHPHTtow0nsw==", + "requires": { + "extend": "^3.0.0", + "glob": "^7.1.1", + "glob-parent": "^3.1.0", + "is-negated-glob": "^1.0.0", + "ordered-read-streams": "^1.0.0", + "pumpify": "^1.3.5", + "readable-stream": "^2.1.5", + "remove-trailing-separator": "^1.0.1", + "to-absolute-glob": "^2.0.0", + "unique-stream": "^2.0.2" + } + }, + "glob-watcher": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.5.tgz", + "integrity": "sha512-zOZgGGEHPklZNjZQaZ9f41i7F2YwE+tS5ZHrDhbBCk3stwahn5vQxnFmBJZHoYdusR6R1bLSXeGUy/BhctwKzw==", + "requires": { + "anymatch": "^2.0.0", + "async-done": "^1.2.0", + "chokidar": "^2.0.0", + "is-negated-glob": "^1.0.0", + "just-debounce": "^1.0.0", + "normalize-path": "^3.0.0", + "object.defaults": "^1.1.0" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "glogg": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", + "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", + "requires": { + "sparkles": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==" + }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==" + }, + "graphlib": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz", + "integrity": "sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==", + "requires": { + "lodash": "^4.17.15" + } + }, + "gulp": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz", + "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==", + "requires": { + "glob-watcher": "^5.0.3", + "gulp-cli": "^2.2.0", + "undertaker": "^1.2.1", + "vinyl-fs": "^3.0.0" + }, + "dependencies": { + "gulp-cli": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.3.0.tgz", + "integrity": "sha512-zzGBl5fHo0EKSXsHzjspp3y5CONegCm8ErO5Qh0UzFzk2y4tMvzLWhoDokADbarfZRL2pGpRp7yt6gfJX4ph7A==", + "requires": { + "ansi-colors": "^1.0.1", + "archy": "^1.0.0", + "array-sort": "^1.0.0", + "color-support": "^1.1.3", + "concat-stream": "^1.6.0", + "copy-props": "^2.0.1", + "fancy-log": "^1.3.2", + "gulplog": "^1.0.0", + "interpret": "^1.4.0", + "isobject": "^3.0.1", + "liftoff": "^3.1.0", + "matchdep": "^2.0.0", + "mute-stdout": "^1.0.0", + "pretty-hrtime": "^1.0.0", + "replace-homedir": "^1.0.0", + "semver-greatest-satisfied-range": "^1.1.0", + "v8flags": "^3.2.0", + "yargs": "^7.1.0" + } + } + } + }, + "gulp-connect": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/gulp-connect/-/gulp-connect-5.7.0.tgz", + "integrity": "sha512-8tRcC6wgXMLakpPw9M7GRJIhxkYdgZsXwn7n56BA2bQYGLR9NOPhMzx7js+qYDy6vhNkbApGKURjAw1FjY4pNA==", + "requires": { + "ansi-colors": "^2.0.5", + "connect": "^3.6.6", + "connect-livereload": "^0.6.0", + "fancy-log": "^1.3.2", + "map-stream": "^0.0.7", + "send": "^0.16.2", + "serve-index": "^1.9.1", + "serve-static": "^1.13.2", + "tiny-lr": "^1.1.1" + }, + "dependencies": { + "ansi-colors": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-2.0.5.tgz", + "integrity": "sha512-yAdfUZ+c2wetVNIFsNRn44THW+Lty6S5TwMpUfLA/UaGhiXbBv/F8E60/1hMLd0cnF/CDoWH8vzVaI5bAcHCjw==" + } + } + }, + "gulp-exec": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/gulp-exec/-/gulp-exec-5.0.0.tgz", + "integrity": "sha512-XFW5GJr5gpdRc7nAS6fNK2cqtLDjNnIKLbcVGIA6XAWCx7E4aVn/pzEJm6NvjtIU9VMsl4igkkSAo8Le8L1Lww==", + "requires": { + "plugin-error": "^1.0.1", + "through2": "^3.0.1" + }, + "dependencies": { + "through2": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", + "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "requires": { + "inherits": "^2.0.4", + "readable-stream": "2 || 3" + } + } + } + }, + "gulp-util": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "integrity": "sha512-q5oWPc12lwSFS9h/4VIjG+1NuNDlJ48ywV2JKItY4Ycc/n1fXJeYPVQsfu5ZrhQi7FGSDBalwUCLar/GyHXKGw==", + "requires": { + "array-differ": "^1.0.0", + "array-uniq": "^1.0.2", + "beeper": "^1.0.0", + "chalk": "^1.0.0", + "dateformat": "^2.0.0", + "fancy-log": "^1.1.0", + "gulplog": "^1.0.0", + "has-gulplog": "^0.1.0", + "lodash._reescape": "^3.0.0", + "lodash._reevaluate": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.template": "^3.0.0", + "minimist": "^1.1.0", + "multipipe": "^0.1.2", + "object-assign": "^3.0.0", + "replace-ext": "0.0.1", + "through2": "^2.0.0", + "vinyl": "^0.5.0" + }, + "dependencies": { + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=" + }, + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=" + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=" + }, + "vinyl": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + } + } + } + }, + "gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "requires": { + "glogg": "^1.0.0" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "requires": { + "ajv": "^6.12.3", + "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==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "has-gulplog": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", + "requires": { + "sparkles": "^1.0.0" + } + }, + "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==" + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "optional": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hast-util-parse-selector": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz", + "integrity": "sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==" + }, + "hastscript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-6.0.0.tgz", + "integrity": "sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w==", + "requires": { + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^1.0.0", + "hast-util-parse-selector": "^2.0.0", + "property-information": "^5.0.0", + "space-separated-tokens": "^1.0.0" + } + }, + "highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==" + }, + "hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "requires": { + "react-is": "^16.7.0" + } + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + } + } + }, + "http-parser-js": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.3.tgz", + "integrity": "sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg==" + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "http2-client": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/http2-client/-/http2-client-1.3.5.tgz", + "integrity": "sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA==" + }, + "humanize-url": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/humanize-url/-/humanize-url-1.0.1.tgz", + "integrity": "sha1-9KuZ4NKIF0yk4eUEB8VfuuRk7/8=", + "requires": { + "normalize-url": "^1.0.0", + "strip-url-auth": "^1.0.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "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==" + }, + "immutable": { + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", + "integrity": "sha512-15gZoQ38eYjEjxkorfbcgBKBL6R7T459OuK+CpcWt7O3KF4uPCx2tD0uFETlUDIyo+1789crbMhTvQBSR5yBMg==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "requires": { + "loose-envify": "^1.0.0" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" + }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==" + }, + "is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "requires": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "requires": { + "ci-info": "^2.0.0" + } + }, + "is-core-module": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz", + "integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==", + "requires": { + "has": "^1.0.3" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==" + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==" + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==" + }, + "is-negated-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", + "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=" + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "requires": { + "isobject": "^3.0.1" + } + }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "requires": { + "is-unc-path": "^1.0.0" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "requires": { + "unc-path-regex": "^0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, + "is-valid-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", + "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=" + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" + }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "requires": { + "is-docker": "^2.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "js-base64": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", + "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==" + }, + "js-file-download": { + "version": "0.4.12", + "resolved": "https://registry.npmjs.org/js-file-download/-/js-file-download-0.4.12.tgz", + "integrity": "sha512-rML+NkoD08p5Dllpjo0ffy4jRHeY6Zsapvr/W86N7E0yuzAO6qa5X9+xog6zQNlH102J7IXljNY2FtS6Lj3ucg==" + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + } + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "json-pointer": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.2.tgz", + "integrity": "sha512-vLWcKbOaXlO+jvRy4qNd+TI1QUPZzfJj1tpJ3vAXDych5XJf93ftpUKe5pKCrzyIIwgBJcOcCVRUfqQP25afBw==", + "requires": { + "foreach": "^2.0.4" + } + }, + "json-refs": { + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/json-refs/-/json-refs-3.0.15.tgz", + "integrity": "sha512-0vOQd9eLNBL18EGl5yYaO44GhixmImes2wiYn9Z3sag3QnehWrYWlB9AFtMxCL2Bj3fyxgDYkxGFEU/chlYssw==", + "requires": { + "commander": "~4.1.1", + "graphlib": "^2.1.8", + "js-yaml": "^3.13.1", + "lodash": "^4.17.15", + "native-promise-only": "^0.8.1", + "path-loader": "^1.0.10", + "slash": "^3.0.0", + "uri-js": "^4.2.2" + }, + "dependencies": { + "commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==" + } + } + }, + "json-schema-faker": { + "version": "0.5.0-rcv.38", + "resolved": "https://registry.npmjs.org/json-schema-faker/-/json-schema-faker-0.5.0-rcv.38.tgz", + "integrity": "sha512-QvZ8XFeWO8xevk369Y4yoaAlay1n09V5djO0a1M5WnBMRFTnMo2W0PAEDCnx3kBS1a4rxrd3aJ5uFM8amvZPQA==", + "requires": { + "json-schema-ref-parser": "^6.1.0", + "jsonpath-plus": "^5.1.0" + } + }, + "json-schema-ref-parser": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-6.1.0.tgz", + "integrity": "sha512-pXe9H1m6IgIpXmE5JSb8epilNTGsmTb2iPohAXpOdhqGFbQjNeHHsZxU+C8w6T81GZxSPFLeUoqDJmzxx5IGuw==", + "requires": { + "call-me-maybe": "^1.0.1", + "js-yaml": "^3.12.1", + "ono": "^4.0.11" + } + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "json-to-ast": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/json-to-ast/-/json-to-ast-2.1.0.tgz", + "integrity": "sha512-W9Lq347r8tA1DfMvAGn9QNcgYm4Wm7Yc+k8e6vezpMnRT+NHbtlxgNBXRVjXe9YM6eTn6+p/MKOlV/aABJcSnQ==", + "requires": { + "code-error-fragment": "0.0.230", + "grapheme-splitter": "^1.0.4" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsonpath": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/jsonpath/-/jsonpath-1.1.1.tgz", + "integrity": "sha512-l6Cg7jRpixfbgoWgkrl77dgEj8RPvND0wMH6TwQmi9Qs4TFfS9u5cUFnbeKTwj5ga5Y3BTGGNI28k117LJ009w==", + "requires": { + "esprima": "1.2.2", + "static-eval": "2.0.2", + "underscore": "1.12.1" + }, + "dependencies": { + "esprima": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz", + "integrity": "sha1-dqD9Zvz+FU/SkmZ9wmQBl1CxZXs=" + } + } + }, + "jsonpath-plus": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-5.1.0.tgz", + "integrity": "sha512-890w2Pjtj0iswAxalRlt2kHthi6HKrXEfZcn+ZNZptv7F3rUGIeDuZo+C+h4vXBHLEsVjJrHeCm35nYeZLzSBQ==" + }, + "jsonpointer": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.1.0.tgz", + "integrity": "sha512-CXcRvMyTlnR53xMcKnuMzfCA5i/nfblTnnr74CZb6C4vG39eu6w51t7nKmU5MfLfbTgGItliNyjO/ciNPDqClg==" + }, + "jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "dependencies": { + "json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + } + } + }, + "just-debounce": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.1.0.tgz", + "integrity": "sha512-qpcRocdkUmf+UTNBYx5w6dexX5J31AKK1OmPwH630a83DdVVUIngk55RSAiIGpQyoH0dlr872VHfPjnQnK1qDQ==" + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + }, + "klaw-sync": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", + "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", + "requires": { + "graceful-fs": "^4.1.11" + } + }, + "last-run": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", + "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=", + "requires": { + "default-resolution": "^2.0.0", + "es6-weak-map": "^2.0.1" + } + }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "requires": { + "readable-stream": "^2.0.5" + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "^1.0.0" + } + }, + "lead": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", + "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=", + "requires": { + "flush-write-stream": "^1.0.2" + } + }, + "leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=" + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "liftoff": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", + "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", + "requires": { + "extend": "^3.0.0", + "findup-sync": "^3.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + } + }, + "livereload": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/livereload/-/livereload-0.8.2.tgz", + "integrity": "sha512-8wCvhiCL4cGVoT3U5xoe+UjpiiVZLrlOvr6dbhb1VlyC5QarhrlyRRt4z7EMGO4KSgXj+tKF/dr284F28/wI+g==", + "requires": { + "chokidar": "^2.1.5", + "opts": ">= 1.2.0", + "ws": "^6.2.1" + } + }, + "livereload-js": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.4.0.tgz", + "integrity": "sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw==" + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=" + }, + "lodash._basetostring": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", + "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=" + }, + "lodash._basevalues": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", + "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=" + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=" + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=" + }, + "lodash._reescape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", + "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=" + }, + "lodash._reevaluate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", + "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=" + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=" + }, + "lodash._root": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=" + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" + }, + "lodash.escape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", + "requires": { + "lodash._root": "^3.0.0" + } + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=" + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=" + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "requires": { + "lodash._getnative": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" + } + }, + "lodash.restparam": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=" + }, + "lodash.template": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "integrity": "sha512-0B4Y53I0OgHUJkt+7RmlDFWKjVAI/YUpWNiL9GQz5ORDr4ttgfQGo+phBWKFLJbBdtOwgMuUkdOHOnPg45jKmQ==", + "requires": { + "lodash._basecopy": "^3.0.0", + "lodash._basetostring": "^3.0.0", + "lodash._basevalues": "^3.0.0", + "lodash._isiterateecall": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0", + "lodash.keys": "^3.0.0", + "lodash.restparam": "^3.0.0", + "lodash.templatesettings": "^3.0.0" + } + }, + "lodash.templatesettings": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", + "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", + "requires": { + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0" + } + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "lowlight": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-1.20.0.tgz", + "integrity": "sha512-8Ktj+prEb1RoCPkEOrPMYUN/nCggB7qAWe3a7OpMjWQkh3l2RD5wKRQ+o8Q8YuI9RG/xs95waaI/E6ym/7NsTw==", + "requires": { + "fault": "^1.0.0", + "highlight.js": "~10.7.0" + } + }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "requires": { + "kind-of": "^6.0.2" + } + }, + "map-age-cleaner": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "requires": { + "p-defer": "^1.0.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + }, + "map-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz", + "integrity": "sha1-ih8HiW2CsQkmvTdEokIACfiJdKg=" + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "requires": { + "object-visit": "^1.0.0" + } + }, + "matchdep": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", + "integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=", + "requires": { + "findup-sync": "^2.0.0", + "micromatch": "^3.0.4", + "resolve": "^1.4.0", + "stack-trace": "0.0.10" + }, + "dependencies": { + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "mem": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", + "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" + } + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + }, + "mime-db": { + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", + "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==" + }, + "mime-types": { + "version": "2.1.32", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", + "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", + "requires": { + "mime-db": "1.49.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, + "mimic-response": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", + "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", + "optional": true + }, + "minim": { + "version": "0.23.8", + "resolved": "https://registry.npmjs.org/minim/-/minim-0.23.8.tgz", + "integrity": "sha512-bjdr2xW1dBCMsMGGsUeqM4eFI60m94+szhxWys+B1ztIt6gWSfeGBdSVCIawezeHYLYn0j6zrsXdQS/JllBzww==", + "requires": { + "lodash": "^4.15.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "optional": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "multipipe": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", + "requires": { + "duplexer2": "0.0.2" + } + }, + "mute-stdout": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", + "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==" + }, + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", + "optional": true + }, + "native-promise-only": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/native-promise-only/-/native-promise-only-0.8.1.tgz", + "integrity": "sha1-IKMYwwy0X3H+et+/eyHJnBRy7xE=" + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + }, + "node-abi": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz", + "integrity": "sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==", + "optional": true, + "requires": { + "semver": "^5.4.1" + } + }, + "node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" + }, + "node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "requires": { + "whatwg-url": "^5.0.0" + } + }, + "node-fetch-h2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz", + "integrity": "sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==", + "requires": { + "http2-client": "^1.2.5" + } + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "normalize-url": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", + "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", + "requires": { + "object-assign": "^4.0.1", + "prepend-http": "^1.0.0", + "query-string": "^4.1.0", + "sort-keys": "^1.0.0" + } + }, + "now-and-later": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", + "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", + "requires": { + "once": "^1.3.2" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "requires": { + "path-key": "^2.0.0" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "oas-kit-common": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/oas-kit-common/-/oas-kit-common-1.0.8.tgz", + "integrity": "sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ==", + "requires": { + "fast-safe-stringify": "^2.0.7" + } + }, + "oas-linter": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/oas-linter/-/oas-linter-1.0.8.tgz", + "integrity": "sha512-d60OArJNBalU5q9utXgsWUdxNS2EWenLp/fSrCQXFHoZhFOLQDTCh2CeqddifM0q1Q0Z9noTiFnwuyqSi2Pa6A==", + "requires": { + "js-yaml": "^3.12.0", + "should": "^13.2.1" + } + }, + "oas-resolver": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-1.1.1.tgz", + "integrity": "sha512-r7jWfhtW/eQ42/eqnUXMUS46jB+XoNlIOSkjN6ZQH+3tqPQHMwAqRUQTqdh+0Qw7IAipftb6zFVwyfE6kVCmGQ==", + "requires": { + "js-yaml": "^3.12.0", + "node-fetch-h2": "^2.3.0", + "oas-kit-common": "^1.0.6", + "reftools": "^1.0.4", + "yargs": "^12.0.2" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==" + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "requires": { + "locate-path": "^3.0.0" + } + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "requires": { + "invert-kv": "^2.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "yargs": { + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + } + }, + "yargs-parser": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "oas-schema-walker": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/oas-schema-walker/-/oas-schema-walker-1.1.5.tgz", + "integrity": "sha512-2yucenq1a9YPmeNExoUa9Qwrt9RFkjqaMAA1X+U7sbb0AqBeTIdMHky9SQQ6iN94bO5NW0W4TRYXerG+BdAvAQ==" + }, + "oas-validator": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/oas-validator/-/oas-validator-1.1.13.tgz", + "integrity": "sha512-sEWaUq5/b5+iOUEtnu/Ioi3bN1SwIvexSpeFdg3H0v4ASPmK1l/70vpYXfupVElFzjx4unc2odFp9oJR+L5f7w==", + "requires": { + "ajv": "^5.5.2", + "better-ajv-errors": "^0.5.2", + "js-yaml": "^3.12.0", + "oas-kit-common": "^1.0.4", + "oas-linter": "^1.0.8", + "oas-resolver": "^1.0.12", + "oas-schema-walker": "^1.1.0", + "reftools": "^1.0.3", + "should": "^13.2.1" + }, + "dependencies": { + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha512-Ajr4IcMXq/2QmMkEmSvxqfLN5zGmJ92gHXAeOXq1OekoH2rfDNsgdDoL2f7QaRCy7G/E6TpxBVdRuNraMztGHw==", + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + } + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==" + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "requires": { + "isobject": "^3.0.1" + } + }, + "object.reduce": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz", + "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=", + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "ono": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/ono/-/ono-4.0.11.tgz", + "integrity": "sha512-jQ31cORBFE6td25deYeD80wxKBMj+zBmHTrVxnc6CKhx8gho6ipmWM5zj/oeoqioZ99yqBls9Z/9Nss7J26G2g==", + "requires": { + "format-util": "^1.0.3" + } + }, + "open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "requires": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + } + }, + "openapi-types": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.0.tgz", + "integrity": "sha512-XpeCy01X6L5EpP+6Hc3jWN7rMZJ+/k1lwki/kTmWzbVhdPie3jd5O2ZtedEx8Yp58icJ0osVldLMrTB/zslQXA==" + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "dependencies": { + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + } + } + }, + "opts": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/opts/-/opts-2.0.2.tgz", + "integrity": "sha512-k41FwbcLnlgnFh69f4qdUfvDQ+5vaSDnVPFI/y5XuhKRq97EnVVneO9F1ESVCdiVu4fCS2L8usX3mU331hB7pg==" + }, + "ordered-read-streams": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", + "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", + "requires": { + "readable-stream": "^2.0.1" + } + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "^1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==" + }, + "p-defer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=" + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, + "p-is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==" + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "requires": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + } + }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", + "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==" + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=" + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + }, + "patch-package": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-6.5.1.tgz", + "integrity": "sha512-I/4Zsalfhc6bphmJTlrLoOcAF87jcxko4q0qsv4bGcurbr8IskEOtdnt9iCmsQVGL1B+iUhSQqweyTLJfCF9rA==", + "requires": { + "@yarnpkg/lockfile": "^1.1.0", + "chalk": "^4.1.2", + "cross-spawn": "^6.0.5", + "find-yarn-workspace-root": "^2.0.0", + "fs-extra": "^9.0.0", + "is-ci": "^2.0.0", + "klaw-sync": "^6.0.0", + "minimist": "^1.2.6", + "open": "^7.4.2", + "rimraf": "^2.6.3", + "semver": "^5.6.0", + "slash": "^2.0.0", + "tmp": "^0.0.33", + "yaml": "^1.10.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + } + } + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + }, + "path-loader": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/path-loader/-/path-loader-1.0.10.tgz", + "integrity": "sha512-CMP0v6S6z8PHeJ6NFVyVJm6WyJjIwFvyz2b0n2/4bKdS/0uZa/9sKUlYZzubrn3zuDRU0zIuEDX9DZYQ2ZI8TA==", + "requires": { + "native-promise-only": "^0.8.1", + "superagent": "^3.8.3" + } + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "^2.0.0" + } + }, + "plugin-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", + "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", + "requires": { + "ansi-colors": "^1.0.1", + "arr-diff": "^4.0.0", + "arr-union": "^3.1.0", + "extend-shallow": "^3.0.2" + } + }, + "portfinder": { + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", + "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", + "requires": { + "async": "^2.6.2", + "debug": "^3.1.1", + "mkdirp": "^0.5.5" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + }, + "prebuild-install": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.1.4.tgz", + "integrity": "sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ==", + "optional": true, + "requires": { + "detect-libc": "^1.0.3", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^1.0.1", + "node-abi": "^2.21.0", + "npmlog": "^4.0.1", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^3.0.3", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "dependencies": { + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "optional": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + }, + "prettier": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz", + "integrity": "sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==" + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=" + }, + "prismjs": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", + "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==" + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "property-information": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", + "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==", + "requires": { + "xtend": "^4.0.0" + } + }, + "proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "requires": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + } + }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "qs": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz", + "integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "query-string": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "requires": { + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==" + }, + "querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" + }, + "ramda": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.28.0.tgz", + "integrity": "sha512-9QnLuG/kPVgWvMQ4aODhsBUFKOUmnbUnsSXACv+NCQZcHbeb+v8Lodp8OVxtRULN1/xOyYLLaL6npE6dMq5QTA==" + }, + "ramda-adjunct": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/ramda-adjunct/-/ramda-adjunct-3.4.0.tgz", + "integrity": "sha512-qKRgqwZzJUZmPJfGK8/uLVxQXkiftKhW6FW9NUCUlQrzsBUZBvFAZUxwH7nTRwDMg+ChRU69rVVuS/4EUgtuIg==", + "requires": {} + }, + "randexp": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.5.3.tgz", + "integrity": "sha512-U+5l2KrcMNOUPYvazA3h5ekF80FHTUG+87SEAmHZmolh1M+i/WyTCxVzmi+tidIa1tM4BSe8g2Y/D3loWDjj+w==", + "requires": { + "drange": "^1.0.2", + "ret": "^0.2.0" + }, + "dependencies": { + "ret": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.2.2.tgz", + "integrity": "sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==" + } + } + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "raw-body": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.1.7.tgz", + "integrity": "sha1-HQJ8K/oRasxmI7yo8AAWVyqH1CU=", + "requires": { + "bytes": "1", + "string_decoder": "0.10" + }, + "dependencies": { + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + } + }, + "react": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", + "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "react-copy-to-clipboard": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz", + "integrity": "sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==", + "requires": { + "copy-to-clipboard": "^3.3.1", + "prop-types": "^15.8.1" + } + }, + "react-debounce-input": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/react-debounce-input/-/react-debounce-input-3.3.0.tgz", + "integrity": "sha512-VEqkvs8JvY/IIZvh71Z0TC+mdbxERvYF33RcebnodlsUZ8RSgyKe2VWaHXv4+/8aoOgXLxWrdsYs2hDhcwbUgA==", + "requires": { + "lodash.debounce": "^4", + "prop-types": "^15.8.1" + } + }, + "react-dom": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", + "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "scheduler": "^0.20.2" + } + }, + "react-immutable-proptypes": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/react-immutable-proptypes/-/react-immutable-proptypes-2.2.0.tgz", + "integrity": "sha512-Vf4gBsePlwdGvSZoLSBfd4HAP93HDauMY4fDjXhreg/vg6F3Fj/MXDNyTbltPC/xZKmZc+cjLu3598DdYK6sgQ==", + "requires": { + "invariant": "^2.2.2" + } + }, + "react-immutable-pure-component": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/react-immutable-pure-component/-/react-immutable-pure-component-2.2.2.tgz", + "integrity": "sha512-vkgoMJUDqHZfXXnjVlG3keCxSO/U6WeDQ5/Sl0GK2cH8TOxEzQ5jXqDXHEL/jqk6fsNxV05oH5kD7VNMUE2k+A==", + "requires": {} + }, + "react-inspector": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/react-inspector/-/react-inspector-6.0.1.tgz", + "integrity": "sha512-cxKSeFTf7jpSSVddm66sKdolG90qURAX3g1roTeaN6x0YEbtWc8JpmFN9+yIqLNH2uEkYerWLtJZIXRIFuBKrg==", + "requires": {} + }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "react-redux": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-8.0.5.tgz", + "integrity": "sha512-Q2f6fCKxPFpkXt1qNRZdEDLlScsDWyrgSj0mliK59qU6W5gvBiKkdMEG2lJzhd1rCctf0hb6EtePPLZ2e0m1uw==", + "requires": { + "@babel/runtime": "^7.12.1", + "@types/hoist-non-react-statics": "^3.3.1", + "@types/use-sync-external-store": "^0.0.3", + "hoist-non-react-statics": "^3.3.2", + "react-is": "^18.0.0", + "use-sync-external-store": "^1.0.0" + }, + "dependencies": { + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + } + } + }, + "react-syntax-highlighter": { + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.5.0.tgz", + "integrity": "sha512-+zq2myprEnQmH5yw6Gqc8lD55QHnpKaU8TOcFeC/Lg/MQSs8UknEA0JC4nTZGFAXC2J2Hyj/ijJ7NlabyPi2gg==", + "requires": { + "@babel/runtime": "^7.3.1", + "highlight.js": "^10.4.1", + "lowlight": "^1.17.0", + "prismjs": "^1.27.0", + "refractor": "^3.6.0" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "requires": { + "resolve": "^1.1.6" + } + }, + "redux": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz", + "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", + "requires": { + "@babel/runtime": "^7.9.2" + } + }, + "redux-immutable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/redux-immutable/-/redux-immutable-4.0.0.tgz", + "integrity": "sha512-SchSn/DWfGb3oAejd+1hhHx01xUoxY+V7TeK0BKqpkLKiQPVFf7DYzEaKmrEVxsWxielKfSK9/Xq66YyxgR1cg==", + "requires": {} + }, + "refractor": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/refractor/-/refractor-3.6.0.tgz", + "integrity": "sha512-MY9W41IOWxxk31o+YvFCNyNzdkc9M20NoZK5vq6jkv4I/uh2zkWcfudj0Q1fovjUQJrNewS9NMzeTtqPf+n5EA==", + "requires": { + "hastscript": "^6.0.0", + "parse-entities": "^2.0.0", + "prismjs": "~1.27.0" + }, + "dependencies": { + "prismjs": { + "version": "1.27.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.27.0.tgz", + "integrity": "sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==" + } + } + }, + "reftools": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.9.tgz", + "integrity": "sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w==" + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "remarkable": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-2.0.1.tgz", + "integrity": "sha512-YJyMcOH5lrR+kZdmB0aJJ4+93bEojRZ1HGDn9Eagu6ibg7aVZhc3OWbbShRid+Q5eAfsEqWxpe+g5W5nYNfNiA==", + "requires": { + "argparse": "^1.0.10", + "autolinker": "^3.11.0" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + } + } + }, + "remove-bom-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", + "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", + "requires": { + "is-buffer": "^1.1.5", + "is-utf8": "^0.2.1" + } + }, + "remove-bom-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", + "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=", + "requires": { + "remove-bom-buffer": "^3.0.0", + "safe-buffer": "^5.1.0", + "through2": "^2.0.3" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + }, + "repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==" + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "replace-ext": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", + "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==" + }, + "replace-homedir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz", + "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=", + "requires": { + "homedir-polyfill": "^1.0.1", + "is-absolute": "^1.0.0", + "remove-trailing-separator": "^1.1.0" + } + }, + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" + } + } + }, + "require-dir": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/require-dir/-/require-dir-1.2.0.tgz", + "integrity": "sha512-LY85DTSu+heYgDqq/mK+7zFHWkttVNRXC9NKcKGyuGLdlsfbjEPrIEYdCVrx6hqnJb+xSu3Lzaoo8VnmOhhjNA==" + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" + }, + "reselect": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.7.tgz", + "integrity": "sha512-Zu1xbUt3/OPwsXL46hvOOoQrap2azE7ZQbokq61BQfiXvhewsKDwhMeZjTX9sX0nvw1t/U5Audyn1I9P/m9z0A==" + }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-options": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", + "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=", + "requires": { + "value-or-function": "^3.0.0" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safe-json-parse": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-json-parse/-/safe-json-parse-1.0.1.tgz", + "integrity": "sha1-PnZyPjjf3aE8mx0poeB//uSzC1c=" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "scheduler": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", + "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "semver-greatest-satisfied-range": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz", + "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=", + "requires": { + "sver-compat": "^1.5.0" + } + }, + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + }, + "dependencies": { + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + } + } + }, + "serialize-error": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-8.1.0.tgz", + "integrity": "sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==", + "requires": { + "type-fest": "^0.20.2" + } + }, + "serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "requires": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + } + }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + }, + "dependencies": { + "http-errors": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", + "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + } + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + } + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + }, + "shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "short-unique-id": { + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/short-unique-id/-/short-unique-id-4.4.4.tgz", + "integrity": "sha512-oLF1NCmtbiTWl2SqdXZQbo5KM1b7axdp0RgQLq8qCBBLoq+o3A5wmLrNM6bZIh54/a8BJ3l69kTXuxwZ+XCYuw==" + }, + "should": { + "version": "13.2.3", + "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", + "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==", + "requires": { + "should-equal": "^2.0.0", + "should-format": "^3.0.3", + "should-type": "^1.4.0", + "should-type-adaptors": "^1.0.1", + "should-util": "^1.0.0" + } + }, + "should-equal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", + "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", + "requires": { + "should-type": "^1.4.0" + } + }, + "should-format": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", + "integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=", + "requires": { + "should-type": "^1.3.0", + "should-type-adaptors": "^1.0.1" + } + }, + "should-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", + "integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=" + }, + "should-type-adaptors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz", + "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", + "requires": { + "should-type": "^1.3.0", + "should-util": "^1.0.0" + } + }, + "should-util": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.1.tgz", + "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==" + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "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", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + }, + "simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "optional": true + }, + "simple-get": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz", + "integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==", + "optional": true, + "requires": { + "decompress-response": "^4.2.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "requires": { + "is-plain-obj": "^1.0.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==" + }, + "space-separated-tokens": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", + "integrity": "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==" + }, + "sparkles": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", + "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==" + }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz", + "integrity": "sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ==" + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" + }, + "stampit": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/stampit/-/stampit-4.3.2.tgz", + "integrity": "sha512-pE2org1+ZWQBnIxRPrBM2gVupkuDD0TTNIo1H6GdT/vO82NXli2z8lRE8cu/nBIHrcOCXFBAHpb9ZldrB2/qOA==" + }, + "static-eval": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.2.tgz", + "integrity": "sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg==", + "requires": { + "escodegen": "^1.8.1" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + }, + "stream-exhaust": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz", + "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==" + }, + "stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "string-template": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", + "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=" + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "optional": true + }, + "strip-outer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", + "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, + "strip-url-auth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-url-auth/-/strip-url-auth-1.0.1.tgz", + "integrity": "sha1-IrD6OkE4WzO+PzMVUbu4N/oM164=" + }, + "superagent": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.3.tgz", + "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==", + "requires": { + "component-emitter": "^1.2.0", + "cookiejar": "^2.1.0", + "debug": "^3.1.0", + "extend": "^3.0.0", + "form-data": "^2.3.1", + "formidable": "^1.2.0", + "methods": "^1.1.1", + "mime": "^1.4.1", + "qs": "^6.5.1", + "readable-stream": "^2.3.5" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + }, + "sver-compat": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", + "integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=", + "requires": { + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" + } + }, + "swagger-cli": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/swagger-cli/-/swagger-cli-4.0.4.tgz", + "integrity": "sha512-Cp8YYuLny3RJFQ4CvOBTaqmOOgYsem52dPx1xM5S4EUWFblIh2Q8atppMZvXKUr1e9xH5RwipYpmdUzdPcxWcA==", + "requires": { + "@apidevtools/swagger-cli": "4.0.4" + }, + "dependencies": { + "@apidevtools/swagger-cli": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-cli/-/swagger-cli-4.0.4.tgz", + "integrity": "sha512-hdDT3B6GLVovCsRZYDi3+wMcB1HfetTU20l2DC8zD3iFRNMC6QNAZG5fo/6PYeHWBEv7ri4MvnlKodhNB0nt7g==", + "requires": { + "@apidevtools/swagger-parser": "^10.0.1", + "chalk": "^4.1.0", + "js-yaml": "^3.14.0", + "yargs": "^15.4.1" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "swagger-client": { + "version": "3.19.1", + "resolved": "https://registry.npmjs.org/swagger-client/-/swagger-client-3.19.1.tgz", + "integrity": "sha512-PO+ttw+PGA8umvyli4ljSlmN7Jkzao74TPvrbXoRAGW3UChb3w18fmJKebLGeo2DDebYyrQ8ycPobyNP40b7BQ==", + "requires": { + "@babel/runtime-corejs3": "^7.20.13", + "@swagger-api/apidom-core": "=0.69.0", + "@swagger-api/apidom-json-pointer": "=0.69.0", + "@swagger-api/apidom-ns-openapi-3-1": "=0.69.0", + "@swagger-api/apidom-reference": "=0.69.0", + "cookie": "~0.5.0", + "cross-fetch": "^3.1.5", + "deepmerge": "~4.3.0", + "fast-json-patch": "^3.0.0-1", + "form-data-encoder": "^1.4.3", + "formdata-node": "^4.0.0", + "is-plain-object": "^5.0.0", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "qs": "^6.10.2", + "traverse": "~0.6.6", + "url": "~0.11.0" + }, + "dependencies": { + "is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "requires": { + "argparse": "^2.0.1" + } + } + } + }, + "swagger-editor-dist": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/swagger-editor-dist/-/swagger-editor-dist-3.17.0.tgz", + "integrity": "sha512-Lvd17AcF/r7SLMF2JmSU3zL1g2CEdIo2E97teHuTXFMxHKCTAVRTHJv9/UxZhDaiZSJSY9Au2mBKW+MjS2ZcXw==" + }, + "swagger-methods": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/swagger-methods/-/swagger-methods-1.0.8.tgz", + "integrity": "sha512-G6baCwuHA+C5jf4FNOrosE4XlmGsdjbOjdBK4yuiDDj/ro9uR4Srj3OR84oQMT8F3qKp00tYNv0YN730oTHPZA==" + }, + "swagger-repo": { + "version": "2.0.0-rc.15", + "resolved": "https://registry.npmjs.org/swagger-repo/-/swagger-repo-2.0.0-rc.15.tgz", + "integrity": "sha512-bXzw8oByP8RabdNHTZlCMZ3YEz3t1IKz+JbzP43JSd7N+oRe7Ms9Li46R6rqx6nF2MWClvjBSs1q949O/rqjAA==", + "requires": { + "body-parser": "^1.15.2", + "chalk": "^2.4.1", + "commander": "^2.9.0", + "cors": "^2.7.1", + "express": "^4.13.4", + "fs-extra": "^7.0.1", + "gh-pages": "^2.0.1", + "glob": "^7.0.0", + "js-yaml": "^3.13.1", + "json-pointer": "^0.6.0", + "jsonpath": "^1.0.2", + "livereload": "^0.8.0", + "lodash": "^4.17.15", + "mkdirp": "^0.5.1", + "node-fetch": "^2.3.0", + "oas-validator": "^1.1.13", + "require-dir": "^1.0.0", + "swagger-editor-dist": "^3.6.16", + "swagger-ui-dist": "^3.20.1", + "sway": "^2.0.6" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "swagger-schema-official": { + "version": "2.0.0-bab6bed", + "resolved": "https://registry.npmjs.org/swagger-schema-official/-/swagger-schema-official-2.0.0-bab6bed.tgz", + "integrity": "sha1-cAcEaNbSl3ylI3suUZyn0Gouo/0=" + }, + "swagger-ui": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/swagger-ui/-/swagger-ui-4.18.0.tgz", + "integrity": "sha512-SikkJEHkYR2oFARQk6xgv4SoswWpkVRlS3vVSl2zktd5DCbu/0xw0XpHfwnhrUOPquqcgNntC+O2vxxMutQ8+w==", + "requires": { + "@babel/runtime-corejs3": "^7.18.9", + "@braintree/sanitize-url": "=6.0.2", + "base64-js": "^1.5.1", + "classnames": "^2.3.1", + "css.escape": "1.5.1", + "deep-extend": "0.6.0", + "dompurify": "=2.3.10", + "ieee754": "^1.2.1", + "immutable": "^3.x.x", + "js-file-download": "^0.4.12", + "js-yaml": "=4.1.0", + "lodash": "^4.17.21", + "patch-package": "^6.5.0", + "prop-types": "^15.8.1", + "randexp": "^0.5.3", + "randombytes": "^2.1.0", + "react": "=17.0.2", + "react-copy-to-clipboard": "5.1.0", + "react-debounce-input": "=3.3.0", + "react-dom": "=17.0.2", + "react-immutable-proptypes": "2.2.0", + "react-immutable-pure-component": "^2.2.0", + "react-inspector": "^6.0.1", + "react-redux": "^8.0.5", + "react-syntax-highlighter": "^15.5.0", + "redux": "^4.1.2", + "redux-immutable": "^4.0.0", + "remarkable": "^2.0.1", + "reselect": "^4.1.5", + "serialize-error": "^8.1.0", + "sha.js": "^2.4.11", + "swagger-client": "^3.19.1", + "url-parse": "^1.5.8", + "xml": "=1.0.1", + "xml-but-prettier": "^1.0.1", + "zenscroll": "^4.0.2" + }, + "dependencies": { + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "requires": { + "argparse": "^2.0.1" + } + } + } + }, + "swagger-ui-dist": { + "version": "3.52.5", + "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-3.52.5.tgz", + "integrity": "sha512-8z18eX8G/jbTXYzyNIaobrnD7PSN7yU/YkSasMmajrXtw0FGS64XjrKn5v37d36qmU3o1xLeuYnktshRr7uIFw==" + }, + "sway": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/sway/-/sway-2.0.6.tgz", + "integrity": "sha512-0HRT2WuU44XIdq+eCiMx67Bl/kiEKORP+4j+Wt89rFjoR5Dwx2hmU4PkMA6hnd48XLfS50olIac3pQGrV/wv7w==", + "requires": { + "debug": "^3.1.0", + "faker": "^4.1.0", + "js-base64": "^2.4.5", + "js-yaml": "^3.13.1", + "json-refs": "^3.0.13", + "json-schema-faker": "^0.5.0-rc16", + "lodash": "^4.17.10", + "native-promise-only": "^0.8.1", + "path-to-regexp": "^1.7.0", + "swagger-methods": "^1.0.0", + "swagger-schema-official": "2.0.0-bab6bed", + "z-schema": "^3.22.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "requires": { + "isarray": "0.0.1" + } + }, + "validator": { + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-10.11.0.tgz", + "integrity": "sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw==" + }, + "z-schema": { + "version": "3.25.1", + "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-3.25.1.tgz", + "integrity": "sha512-7tDlwhrBG+oYFdXNOjILSurpfQyuVgkRe3hB2q8TEssamDHB7BbLWYkYO98nTn0FibfdFroFKDjndbgufAgS/Q==", + "requires": { + "commander": "^2.7.1", + "core-js": "^2.5.7", + "lodash.get": "^4.0.0", + "lodash.isequal": "^4.0.0", + "validator": "^10.0.0" + } + } + } + }, + "tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "optional": true, + "requires": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + }, + "dependencies": { + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "optional": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "optional": true, + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.1.tgz", + "integrity": "sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ==", + "optional": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "through2-filter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", + "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", + "requires": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + } + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=" + }, + "tiny-lr": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tiny-lr/-/tiny-lr-1.1.1.tgz", + "integrity": "sha512-44yhA3tsaRoMOjQQ+5v5mVdqef+kH6Qze9jTpqtVufgYjYt08zyZAwNwwVBj3i1rJMnR52IxOW0LK0vBzgAkuA==", + "requires": { + "body": "^5.1.0", + "debug": "^3.1.0", + "faye-websocket": "~0.10.0", + "livereload-js": "^2.3.0", + "object-assign": "^4.1.0", + "qs": "^6.4.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-absolute-glob": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", + "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", + "requires": { + "is-absolute": "^1.0.0", + "is-negated-glob": "^1.0.0" + } + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "to-through": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", + "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=", + "requires": { + "through2": "^2.0.3" + } + }, + "toggle-selection": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz", + "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==" + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + } + } + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, + "traverse": { + "version": "0.6.7", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.7.tgz", + "integrity": "sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg==" + }, + "tree-sitter": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.20.1.tgz", + "integrity": "sha512-Cmb8V0ocamHbgWMVhZIa+78k/7r8VCQ6+ePG8eYEAO7AccwWi06Ct4ATNiI94KwhIkRl0+OwZ42/5nk3GnEMpQ==", + "optional": true, + "requires": { + "nan": "^2.14.0", + "prebuild-install": "^6.0.1" + } + }, + "tree-sitter-json": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/tree-sitter-json/-/tree-sitter-json-0.20.0.tgz", + "integrity": "sha512-PteOLH+Tx6Bz4ZA/d40/DbkiSXXRM/gKahhHI8hQ1lWNfFvdknnz9k3Mz84ol5srRyLboJ8wp8GSkhZ6ht9EGQ==", + "optional": true, + "requires": { + "nan": "^2.14.1" + } + }, + "tree-sitter-yaml": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/tree-sitter-yaml/-/tree-sitter-yaml-0.5.0.tgz", + "integrity": "sha512-POJ4ZNXXSWIG/W4Rjuyg36MkUD4d769YRUGKRqN+sVaj/VCo6Dh6Pkssn1Rtewd5kybx+jT1BWMyWN0CijXnMA==", + "optional": true, + "requires": { + "nan": "^2.14.0" + } + }, + "trim-repeated": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", + "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, + "ts-toolbelt": { + "version": "6.15.5", + "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-6.15.5.tgz", + "integrity": "sha512-FZIXf1ksVyLcfr7M317jbB67XFJhOO1YqdTcuGaq9q5jLUoTikukZ+98TPjKiP2jC5CgmYdWWYs0s2nLSU0/1A==" + }, + "tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "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==" + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=" + }, + "underscore": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", + "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==" + }, + "undertaker": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.3.0.tgz", + "integrity": "sha512-/RXwi5m/Mu3H6IHQGww3GNt1PNXlbeCuclF2QYR14L/2CHPz3DFZkvB5hZ0N/QUkiXWCACML2jXViIQEQc2MLg==", + "requires": { + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "bach": "^1.0.0", + "collection-map": "^1.0.0", + "es6-weak-map": "^2.0.1", + "fast-levenshtein": "^1.0.0", + "last-run": "^1.1.0", + "object.defaults": "^1.0.0", + "object.reduce": "^1.0.0", + "undertaker-registry": "^1.0.0" + } + }, + "undertaker-registry": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz", + "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=" + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "unique-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", + "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", + "requires": { + "json-stable-stringify-without-jsonify": "^1.0.1", + "through2-filter": "^3.0.0" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "unraw": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unraw/-/unraw-2.0.1.tgz", + "integrity": "sha512-tdOvLfRzHolwYcHS6HIX860MkK9LQ4+oLuNwFYL7bpgTEO64PZrcQxkisgwJYCfF8sKiWLwwu1c83DvMkbefIQ==" + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + } + } + }, + "upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==" + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" + } + } + }, + "url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" + }, + "use-sync-external-store": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", + "requires": {} + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, + "v8flags": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", + "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "validator": { + "version": "13.9.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.9.0.tgz", + "integrity": "sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA==" + }, + "value-or-function": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", + "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vinyl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", + "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + }, + "vinyl-fs": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", + "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", + "requires": { + "fs-mkdirp-stream": "^1.0.0", + "glob-stream": "^6.1.0", + "graceful-fs": "^4.0.0", + "is-valid-glob": "^1.0.0", + "lazystream": "^1.0.0", + "lead": "^1.0.0", + "object.assign": "^4.0.4", + "pumpify": "^1.3.5", + "readable-stream": "^2.3.3", + "remove-bom-buffer": "^3.0.0", + "remove-bom-stream": "^1.2.0", + "resolve-options": "^1.1.0", + "through2": "^2.0.0", + "to-through": "^2.0.0", + "value-or-function": "^3.0.0", + "vinyl": "^2.0.0", + "vinyl-sourcemap": "^1.1.0" + } + }, + "vinyl-sourcemap": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", + "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=", + "requires": { + "append-buffer": "^1.0.2", + "convert-source-map": "^1.5.0", + "graceful-fs": "^4.1.6", + "normalize-path": "^2.1.1", + "now-and-later": "^2.0.0", + "remove-bom-buffer": "^3.0.0", + "vinyl": "^2.0.0" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "web-streams-polyfill": { + "version": "4.0.0-beta.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz", + "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==" + }, + "web-tree-sitter": { + "version": "0.20.7", + "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.20.7.tgz", + "integrity": "sha512-flC9JJmTII9uAeeYpWF8hxDJ7bfY+leldQryetll8Nv4WgI+MXc6h7TiyAZASWl9uC9TvmfdgOjZn1DAQecb3A==", + "optional": true + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + }, + "websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "requires": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=" + }, + "wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "ws": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", + "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==", + "requires": { + "async-limiter": "~1.0.0" + } + }, + "xml": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", + "integrity": "sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==" + }, + "xml-but-prettier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xml-but-prettier/-/xml-but-prettier-1.0.1.tgz", + "integrity": "sha512-C2CJaadHrZTqESlH03WOyw0oZTtoy2uEg6dSDF6YRg+9GnYNub53RRemLpnvtbHDFelxMx4LajiFsYeR6XJHgQ==", + "requires": { + "repeat-string": "^1.5.2" + } + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "y18n": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==" + }, + "yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==" + }, + "yamljs": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/yamljs/-/yamljs-0.3.0.tgz", + "integrity": "sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ==", + "requires": { + "argparse": "^1.0.7", + "glob": "^7.0.5" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + } + } + }, + "yargs": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.2.tgz", + "integrity": "sha512-ZEjj/dQYQy0Zx0lgLMLR8QuaqTihnxirir7EwUHp1Axq4e3+k8jXU5K0VLbNvedv1f4EWtBonDIZm0NUr+jCcA==", + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.1" + } + }, + "yargs-parser": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.1.tgz", + "integrity": "sha512-wpav5XYiddjXxirPoCTUPbqM0PXvJ9hiBMvuJgInvo4/lAOTZzUprArw17q2O1P2+GHhbBr18/iQwjL5Z9BqfA==", + "requires": { + "camelcase": "^3.0.0", + "object.assign": "^4.1.0" + } + }, + "z-schema": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-4.2.4.tgz", + "integrity": "sha512-YvBeW5RGNeNzKOUJs3rTL4+9rpcvHXt5I051FJbOcitV8bl40pEfcG0Q+dWSwS0/BIYrMZ/9HHoqLllMkFhD0w==", + "requires": { + "commander": "^2.7.1", + "lodash.get": "^4.4.2", + "lodash.isequal": "^4.5.0", + "validator": "^13.6.0" + } + }, + "zenscroll": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/zenscroll/-/zenscroll-4.0.2.tgz", + "integrity": "sha512-jEA1znR7b4C/NnaycInCU6h/d15ZzCd1jmsruqOKnZP6WXQSMH3W2GL+OXbkruslU4h+Tzuos0HdswzRUk/Vgg==" + } + } +} diff --git a/package.json b/package.json index cdc2555ef..81e408d0c 100644 --- a/package.json +++ b/package.json @@ -1,30 +1,48 @@ { - "name": "gateway-openapi-spec", + "name": "checkout-openapi-spec", "version": "0.0.1", + "private": true, + "engines": { + "node": "16.x" + }, "dependencies": { - "bower": "^1.7.7", - "connect": "^3.4.1", - "cors": "^2.7.1", - "deploy-to-gh-pages": "^1.1.0", - "gulp": "^3.9.1", - "gulp-connect": "^4.2.0", - "gulp-util": "^3.0.7", - "portfinder": "^1.0.3", + "connect": "^3.7.0", + "cors": "^2.8.5", + "cross-env": "^7.0.3", + "dotnet-sdk-3.1": "^3.1.1007", + "gulp": "^4.0.2", + "gulp-connect": "^5.7.0", + "gulp-exec": "^5.0.0", + "gulp-util": "^3.0.8", + "openapi-types": "^12.1.0", + "portfinder": "^1.0.28", + "prettier": "^2.3.1", "request": "2.88.0", - "shelljs": "^0.7.0", - "swagger-repo": "^1.0.0", - "swagger-ui": "^2.1.4", - "swagger-cli": "2.1.0", + "shelljs": "^0.8.5", + "swagger-cli": "4.0.4", + "swagger-repo": "^2.0.0-rc.15", + "swagger-ui": "^4.18.0", "yamljs": "0.3.0" }, - "private": true, "scripts": { - "deploy": "npm run build && deploy-to-gh-pages --update web_deploy", - "build": "node ./scripts/build.js", - "swagger": "swagger-repo", - "test": "swagger-cli validate --no-schema web_deploy/swagger.yaml", + "build:abc": "cross-env ACCOUNT=abc node ./scripts/build.js", + "build:all": "cross-env ACCOUNT=abc node ./scripts/build.js && cross-env ACCOUNT=nas node ./scripts/build.js", + "build:nas": "cross-env ACCOUNT=nas node ./scripts/build.js", + "test:abc": "swagger-cli validate --no-schema web_deploy/previous/swagger.yaml", + "test:nas": "swagger-cli validate --no-schema web_deploy/swagger.yaml", + "prettier": "npx prettier --write '**/*.{js,yaml}'", "start": "gulp serve", - "deploy-branch": "node ./scripts/deploy-branch.js", - "sync-generated-specs": "node ./scripts/sync-generated-specs.js" + "swagger": "swagger-repo", + "sync-generated-apm-specs": "node ./scripts/sync-generated-apm-specs.js", + "sync-generated-apm-specs-legacy-aws-env": "node ./scripts/sync-generated-apm-specs-legacy-aws-env.js" + }, + "prettier": { + "printWidth": 120, + "tabWidth": 2, + "useTabs": true, + "semi": true, + "singleQuote": true, + "trailingComma": "es5", + "bracketSpacing": true } } diff --git a/scripts/build.js b/scripts/build.js index 6d51541dc..4ed526565 100755 --- a/scripts/build.js +++ b/scripts/build.js @@ -5,18 +5,31 @@ var Path = require('path'); require('shelljs/global'); set('-e'); -mkdir('-p', 'web_deploy') +mkdir('-p', 'web_deploy/previous'); cp('-R', 'web/*', 'web_deploy/'); exec('dotnet build src/OpenApiGenerator/OpenApiGenerator.csproj'); -exec('dotnet run -p src/OpenApiGenerator/OpenApiGenerator.csproj'); +exec(`cross-env ASPNETCORE_ENVIRONMENT=${process.env.ACCOUNT} dotnet run -p src/OpenApiGenerator/OpenApiGenerator.csproj`); -cp('-R', 'output/*', 'web_deploy/'); -rm('-rf', 'output') +if (process.env.ACCOUNT === 'nas') { + cp('-R', 'output/*', 'web_deploy/'); +} else { + cp('-R', 'output/*', 'web_deploy/previous'); +} +rm('-rf', 'output'); var SWAGGER_UI_DIST = Path.dirname(require.resolve('swagger-ui')); -rm('-rf', 'web_deploy/swagger-ui/') -cp('-R', SWAGGER_UI_DIST, 'web_deploy/swagger-ui/') -sed('-i', 'http://petstore.swagger.io/v2/swagger.json', '../swagger.json', 'web_deploy/swagger-ui/index.html') +rm('-rf', 'web_deploy/swagger-ui/'); +cp('-R', SWAGGER_UI_DIST, 'web_deploy/swagger-ui/'); +if (process.env.ACCOUNT === 'nas') { + sed( + '-i', + 'http://petstore.swagger.io/v2/swagger.json', + '../swagger.json', + 'web_deploy/index.html' + ); +} else { + sed('-i', 'http://petstore.swagger.io/v2/swagger.json', '../previous/swagger.json', 'web_deploy/previous/index.html'); +} diff --git a/scripts/deploy-branch.js b/scripts/deploy-branch.js deleted file mode 100644 index f692c513e..000000000 --- a/scripts/deploy-branch.js +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env node -'use strict'; -require('shelljs/global'); -var path = require('path'); - -set('-e'); -set('-v'); - -var branch = process.env.TRAVIS_BRANCH && process.env.TRAVIS_BRANCH.toLowerCase(); -if (branch && branch !== 'gh-pages') { - var branchPath = path.join('.tmp', 'preview', branch, '/'); - mkdir('-p', branchPath); - - exec('dotnet build src/OpenApiGenerator/OpenApiGenerator.csproj'); - exec('dotnet run -p src/OpenApiGenerator/OpenApiGenerator.csproj'); - - cp('-R', 'output/*', branchPath); - rm('-rf', 'output') - - cp('web/index.html', branchPath); - exec('deploy-to-gh-pages --update .tmp'); -} diff --git a/scripts/generate-cko-collection.js b/scripts/generate-cko-collection.js new file mode 100644 index 000000000..c3d125705 --- /dev/null +++ b/scripts/generate-cko-collection.js @@ -0,0 +1,32 @@ +const fs = require('fs'), + Converter = require('cko-openapi-to-postmanv2'); +const openapiData = fs.readFileSync('web_deploy/swagger.yaml', { encoding: 'UTF8' }); + +const options = { folderStrategy: 'Tags', requestParametersResolution: 'Example' }; + +const userAgentPreRequest = [ + { + listen: 'prerequest', + script: { + type: 'text/javascript', + exec: ["pm.request.headers.add({key: 'User-Agent', value: 'CheckoutComPostman/1.0' })"], + }, + }, + { + listen: 'test', + script: { + type: 'text/javascript', + exec: [''], + }, + }, +]; + +Converter.convert({ type: 'string', data: openapiData }, options, (err, conversionResult) => { + if (!conversionResult.result) { + console.log('Could not convert', conversionResult.reason); + } else { + conversionResult.output[0].data.event = userAgentPreRequest; + const content = conversionResult.output[0].data; + fs.writeFileSync('cko_collection_beta.json', JSON.stringify(content)); + } +}); diff --git a/scripts/link_checker/link_checker.py b/scripts/link_checker/link_checker.py new file mode 100644 index 000000000..dfebe8230 --- /dev/null +++ b/scripts/link_checker/link_checker.py @@ -0,0 +1,36 @@ +import re +import os +import requests +from requests.exceptions import ConnectionError, MissingSchema, InvalidSchema +from bs4 import BeautifulSoup + +BASE_DIR = os.path.join(os.path.dirname(__file__), '..') +IGNORED_URLS = [] +IGNORED_PATTERNS = ["mailto", "#"] + + +def check_broken_links(swagger_file: str): + if swagger_file == "abc": + swagger_file = f"{BASE_DIR}/../web_deploy/previous/swagger.yaml" + elif swagger_file == "nas": + swagger_file = f"{BASE_DIR}/../web_deploy/swagger.yaml" + + broken_link_array = [] + contents = open(swagger_file, 'r') + soup = BeautifulSoup(contents, features="html.parser") + raw_links = [a['href'] for a in soup.findAll("a")] + + combined_regex = "".join([f"(?=^((?!^{combination}).)*$)" for combination in IGNORED_PATTERNS]) + all_links = [filtered_links for filtered_links in raw_links if filtered_links not in IGNORED_URLS + and re.compile(combined_regex).match(filtered_links)] + + for i in all_links: + try: + response = requests.get(i) + except (ConnectionError, MissingSchema, InvalidSchema): + broken_link_array.append(i) + else: + if response.status_code >= 400 and response.status_code != 999 and response.status_code != 429: + broken_link_array.append(i) + + return broken_link_array diff --git a/scripts/link_checker/requirements.txt b/scripts/link_checker/requirements.txt new file mode 100644 index 000000000..f0e7f85e9 --- /dev/null +++ b/scripts/link_checker/requirements.txt @@ -0,0 +1,2 @@ +beautifulsoup4==4.10.0 +requests==2.31.0 diff --git a/scripts/link_checker/run.py b/scripts/link_checker/run.py new file mode 100644 index 000000000..9d08e0160 --- /dev/null +++ b/scripts/link_checker/run.py @@ -0,0 +1,23 @@ +from link_checker import check_broken_links +import sys + +BROKEN_LINKS_EXIST = False + +print("ABC broken links", sep="\n") +print("-----------------", sep="\n") +for i in check_broken_links("abc"): + print(i) + if i: + BROKEN_LINKS_EXIST = True +print("-----------------", sep="\n") + +print("NAS broken links", sep="\n") +print("-----------------", sep="\n") +for i in check_broken_links("nas"): + print(i) + if i: + BROKEN_LINKS_EXIST = True +print("-----------------", sep="\n") + +if BROKEN_LINKS_EXIST: + sys.exit(1) diff --git a/scripts/postman_placeholders.py b/scripts/postman_placeholders.py new file mode 100755 index 000000000..67c5f9211 --- /dev/null +++ b/scripts/postman_placeholders.py @@ -0,0 +1,23 @@ +import re +import os + +filename = "cko_collection_beta.json" + +prefixes = ['pay_', 'bat_', 'cus_', 'sid_', 'evt_', 'ntf_', 'src_', 'tok_', 'act_', 'ras_', 'pl_', 'wh_'] + +placeholders = ['', '', '', '', '', '', '', '', ''] + +zip_iterator = zip(prefixes, placeholders) + +replacement_dict = dict(zip_iterator) + +postman_prefixes = open(filename, "r") +postman_placeholders = open(filename+'.tmp', "w") + +text = postman_prefixes.read() +for i,j in replacement_dict.items(): + postman_prefixes.seek(0) + text = re.sub(rf"{i}.[a-zA-Z0-9_]*", f"{j}", text) +postman_placeholders.write(text) + +os.rename(filename+'.tmp', filename) diff --git a/scripts/sync-generated-apm-specs-legacy-aws-env.js b/scripts/sync-generated-apm-specs-legacy-aws-env.js new file mode 100644 index 000000000..eea3b1e4a --- /dev/null +++ b/scripts/sync-generated-apm-specs-legacy-aws-env.js @@ -0,0 +1,49 @@ +// To run this script use the command 'npm run sync-generated-apm-specs-legacy-aws-env' on the LON VPN Profile. + +var specs = require('./sync-specs'); + +specs.syncPaymentRequest('Giropay', 'http://sb-gateway-internal.cko.lon/giropay-internal/giropay/relations/gw/pay'); +specs.syncPaymentResponse( + 'Giropay', + 'http://sb-gateway-internal.cko.lon/giropay-internal/giropay/relations/gw/payment' +); +specs.syncPaymentRequest('Eps', 'http://sb-gateway-internal.cko.lon/giropay-internal/eps/relations/gw/pay'); +specs.syncPaymentResponse('Eps', 'http://sb-gateway-internal.cko.lon/giropay-internal/eps/relations/gw/payment'); +specs.syncPaymentRequest('Ideal', 'http://sb-gateway-internal.cko.lon/ideal-internal-api/relations/gw/pay'); +specs.syncPaymentResponse('Ideal', 'http://sb-gateway-internal.cko.lon/ideal-internal-api/relations/gw/payment'); +specs.syncPaymentRequest('Klarna', 'http://sb-gateway-internal.cko.lon/klarna-internal/relations/gw/pay'); +specs.syncPaymentResponse('Klarna', 'http://sb-gateway-internal.cko.lon/klarna-internal/relations/gw/payment'); +specs.syncPaymentRequest('Knet', 'http://sb-gateway-internal.cko.lon/knet-internal/relations/gw/pay'); +specs.syncPaymentResponse('Knet', 'http://sb-gateway-internal.cko.lon/knet-internal/relations/gw/payment'); +specs.syncPaymentRequest('Bancontact', 'http://sb-gateway-internal.cko.lon/ppro-internal/bancontact/relations/gw/pay'); +specs.syncPaymentResponse( + 'Bancontact', + 'http://sb-gateway-internal.cko.lon/ppro-internal/bancontact/relations/gw/payment' +); +specs.syncPaymentRequest('Fawry', 'http://sb-gateway-internal.cko.lon/fawry-internal/relations/gw/pay'); +specs.syncPaymentResponse('Fawry', 'http://sb-gateway-internal.cko.lon/fawry-internal/relations/gw/payment'); +specs.syncPaymentRequest('QPay', 'http://sb-gateway-internal.cko.lon/qpay-internal/relations/gw/pay'); +specs.syncPaymentResponse('QPay', 'http://sb-gateway-internal.cko.lon/qpay-internal/relations/gw/payment'); +specs.syncPaymentRequest('P24', 'http://sb-gateway-internal.cko.lon/ppro-internal/p24/relations/gw/pay'); +specs.syncPaymentResponse('P24', 'http://sb-gateway-internal.cko.lon/ppro-internal/p24/relations/gw/payment'); +specs.syncPaymentRequest('Multibanco', 'http://sb-gateway-internal.cko.lon/ppro-internal/multibanco/relations/gw/pay'); +specs.syncPaymentResponse( + 'Multibanco', + 'http://sb-gateway-internal.cko.lon/ppro-internal/multibanco/relations/gw/payment' +); +specs.syncPaymentRequest('BenefitPay', 'http://sb-gateway-internal.cko.lon/benefitpay-internal/relations/gw/pay'); +specs.syncPaymentResponse('BenefitPay', 'http://sb-gateway-internal.cko.lon/benefitpay-internal/relations/gw/payment'); +specs.syncPaymentRequest('OXXO', 'http://sb-gateway-internal.cko.lon/dlocal-internal/oxxo/relations/gw/pay'); +specs.syncPaymentResponse('OXXO', 'http://sb-gateway-internal.cko.lon/dlocal-internal/oxxo/relations/gw/payment'); +specs.syncPaymentRequest('Boleto', 'http://sb-gateway-internal.cko.lon/dlocal-internal/boleto/relations/gw/pay'); +specs.syncPaymentResponse('Boleto', 'http://sb-gateway-internal.cko.lon/dlocal-internal/boleto/relations/gw/payment'); +specs.syncPaymentRequest('PagoFacil', 'http://sb-gateway-internal.cko.lon/dlocal-internal/pagofacil/relations/gw/pay'); +specs.syncPaymentResponse( + 'PagoFacil', + 'http://sb-gateway-internal.cko.lon/dlocal-internal/pagofacil/relations/gw/payment' +); +specs.syncPaymentRequest('RapiPago', 'http://sb-gateway-internal.cko.lon/dlocal-internal/rapipago/relations/gw/pay'); +specs.syncPaymentResponse( + 'RapiPago', + 'http://sb-gateway-internal.cko.lon/dlocal-internal/rapipago/relations/gw/payment' +); diff --git a/scripts/sync-generated-apm-specs.js b/scripts/sync-generated-apm-specs.js new file mode 100644 index 000000000..4b3c394a8 --- /dev/null +++ b/scripts/sync-generated-apm-specs.js @@ -0,0 +1,15 @@ +// To run this script use the command 'npm run sync-generated-apm-specs' on the IRE VPN Profile. + +var specs = require('./sync-specs'); + +specs.syncPaymentRequest('Sofort', 'https://apm-sofort.cko-sbox.ckotech.co/relations/gw/pay'); +specs.syncPaymentResponse('Sofort', 'https://apm-sofort.cko-sbox.ckotech.co/relations/gw/payment'); + +specs.syncPaymentRequest('QPay', 'https://apm-qpay.cko-sbox.ckotech.co/relations/gw/pay'); +specs.syncPaymentResponse('QPay', 'https://apm-qpay.cko-sbox.ckotech.co/relations/gw/payment'); + +specs.syncPaymentRequest('Benefit', 'https://apm-benefit.cko-qa.ckotech.co/relations/gw/pay'); +specs.syncPaymentResponse('Benefit', 'https://apm-benefit.cko-qa.ckotech.co/relations/gw/payment'); + +specs.syncPaymentRequest('Klarna', 'https://apm-klarna-v2.cko-qa.ckotech.co/relations/gw/pay'); +specs.syncPaymentResponse('Klarna', 'https://apm-klarna-v2.cko-qa.ckotech.co/relations/gw/payment'); \ No newline at end of file diff --git a/scripts/sync-generated-specs.js b/scripts/sync-generated-specs.js deleted file mode 100644 index 574807a78..000000000 --- a/scripts/sync-generated-specs.js +++ /dev/null @@ -1,143 +0,0 @@ -#!/usr/bin/env node -'use strict'; -var request = require('request'); -var YAML = require('yamljs'); -var fs = require('fs'); -require('shelljs/global'); -set('-e'); -set('-v'); - -var syncPaymentSources = function() -{ - syncPaymentRequest('Giropay', 'http://sb-gateway-internal.cko.lon/giropay-internal/giropay/relations/gw/pay'); - syncPaymentResponse('Giropay', 'http://sb-gateway-internal.cko.lon/giropay-internal/giropay/relations/gw/payment'); - syncPaymentRequest('Eps', 'http://sb-gateway-internal.cko.lon/giropay-internal/eps/relations/gw/pay'); - syncPaymentResponse('Eps', 'http://sb-gateway-internal.cko.lon/giropay-internal/eps/relations/gw/payment'); - syncPaymentRequest('Ideal', 'http://sb-gateway-internal.cko.lon/ideal-internal-api/relations/gw/pay'); - syncPaymentResponse('Ideal', 'http://sb-gateway-internal.cko.lon/ideal-internal-api/relations/gw/payment'); - syncPaymentRequest('Klarna', 'http://sb-gateway-internal.cko.lon/klarna-internal/relations/gw/pay'); - syncPaymentResponse('Klarna', 'http://sb-gateway-internal.cko.lon/klarna-internal/relations/gw/payment'); - syncPaymentRequest('Knet', 'http://sb-gateway-internal.cko.lon/knet-internal/relations/gw/pay'); - syncPaymentResponse('Knet', 'http://sb-gateway-internal.cko.lon/knet-internal/relations/gw/payment'); - syncPaymentResponse('Bancontact', 'http://sb-gateway-internal.cko.lon/ppro-internal/bancontact/relations/gw/pay'); - syncPaymentResponse('Bancontact', 'http://sb-gateway-internal.cko.lon/ppro-internal/bancontact/relations/gw/payment'); - syncPaymentRequest('Fawry', 'http://sb-gateway-internal.cko.lon/fawry-internal/relations/gw/pay'); - syncPaymentResponse('Fawry', 'http://sb-gateway-internal.cko.lon/fawry-internal/relations/gw/payment'); -} - -var syncPaymentRequest = function(paymentSourceName, paymentSpecUrl) { - var outputFilename = 'PaymentRequest' + paymentSourceName + 'Source.yaml' - var outputFilePath = 'spec/components/schemas/Payments/RequestSources/' + outputFilename; - var buildPaymentRequestFunction = getFunctionToBuildPaymentRequest(paymentSourceName); - sync(paymentSpecUrl, buildPaymentRequestFunction, outputFilePath); -}; - -var syncPaymentResponse = function(paymentSourceName, paymentSpecUrl) { - var outputFilename = 'PaymentResponse' + paymentSourceName + 'Source.yaml' - var outputFilePath = 'spec/components/schemas/Payments/ResponseSources/' + outputFilename; - var buildPaymentResponseFunction = getFunctionToBuildPaymentResponse(paymentSourceName); - sync(paymentSpecUrl, buildPaymentResponseFunction, outputFilePath); -}; - -var sync = function(paymentSpecUrl, buildPaymentResponseFunction, outputFilePath) { - console.log('Requesting payment spec from: ' + paymentSpecUrl + ', to output: ' + outputFilePath); - var buildOutputFunction = getFunctionToBuildYaml(buildPaymentResponseFunction); - request({ url: paymentSpecUrl, json: true}, thenBuildOutputAndWrite(buildOutputFunction, outputFilePath)); -}; - -var getFunctionToBuildPaymentRequest = function(paymentSourceName) { - return function(responseBody) { - var requestData = responseBody.put.requestBody.content['application/json'].schema.properties.request_data; - if (requestData.properties.type) { - delete requestData.properties.type; - } - addDescriptionToKlarnaPassthroughObjects(requestData, paymentSourceName); - return { - type: 'object', - description: paymentSourceName + ' Source', - allOf: [{ - $ref: '#/components/schemas/PaymentRequestSource', - }, { - type: 'object', - required: requestData.required, - properties: requestData.properties - } - ] - }; - }; -}; - -var addDescriptionToKlarnaPassthroughObjects = function(requestData, paymentSourceName) { - Object.keys(requestData.properties).forEach(propertyName => { - var property = requestData.properties[propertyName]; - if (property['x-cko-passthrough'] === true && property['x-klarna-docs']) { - var apmPropertyName = property['x-klarna-name'] || propertyName; - var apmPropertyDocs = property['x-klarna-docs']; - property.description += ' \nThis object is passed directly to ' + paymentSourceName + ' as `' + apmPropertyName + '`, ' + - '\nso for the object definition use the [' + paymentSourceName + ' documentation](' + apmPropertyDocs + ').'; - } - }); -}; - -var getFunctionToBuildPaymentResponse = function(paymentSourceName) { - return function(responseBody) { - var properties = responseBody.get.responses[200].content['application/json'].schema.properties; - var responseDataProperties = null; - if (properties) { - responseDataProperties = properties.response_data.properties; - if (responseDataProperties && responseDataProperties.type) { - delete responseDataProperties.type; - } - } - return { - type: 'object', - description: paymentSourceName + ' Source', - allOf: [{ - $ref: '#/components/schemas/PaymentResponseSource', - }, { - type: 'object', - properties: responseDataProperties - } - ] - }; - }; -}; - -var getFunctionToBuildYaml = function(buildOutputFunction) { - return function(responseBody) { - var builtOutput = buildOutputFunction(responseBody); - var generatedFileWarningComment = '###\n# Warning: this file was auto generated from OpenAPI specs using \'npm run sync-generated-specs\'. Do not manually edit. \n###\n'; - return generatedFileWarningComment + YAML.stringify(builtOutput, 20, 2); - }; -}; - -var thenBuildOutputAndWrite = function(buildOutputFunction, outputFilePath) { - return function(error, response, responseBody) { - if (error || response.statusCode !== 200) { - handleRequestError(error, response); - } else { - console.log('Response from url received.'); - var builtOutput = buildOutputFunction(responseBody); - fs.writeFile(outputFilePath, builtOutput, thenHandleFileWrite(outputFilePath)); - } - } -}; - -var handleRequestError = function(error, response) { - console.log('Invalid response from url. Error = ' + error); - if (response) { - console.log('response.statusCode = ' + response.statusCode); - } -}; - -var thenHandleFileWrite = function(outputFilePath) { - return function (error) { - if (error) { - console.log('File write error received: ' + error); - } else { - console.log('File written to ' + outputFilePath); - } - } -}; - -syncPaymentSources(); \ No newline at end of file diff --git a/scripts/sync-specs.js b/scripts/sync-specs.js new file mode 100644 index 000000000..be302442b --- /dev/null +++ b/scripts/sync-specs.js @@ -0,0 +1,179 @@ +#!/usr/bin/env node +'use strict'; +var request = require('request'); +var YAML = require('yamljs'); +var fs = require('fs'); +var path = require('path'); +require('shelljs/global'); +set('-e'); +set('-v'); + +var syncPaymentRequest = function (paymentSourceName, paymentSpecUrl) { + var outputFilename = 'PaymentRequest' + paymentSourceName + 'Source.yaml'; + var outputFilePath = 'spec/components/schemas/Payments/RequestSources/' + outputFilename; + var buildPaymentRequestFunction = getFunctionToBuildPaymentRequest(paymentSourceName); + sync(paymentSpecUrl, buildPaymentRequestFunction, outputFilePath); +}; + +var syncPaymentResponse = function (paymentSourceName, paymentSpecUrl) { + var outputFilename = 'PaymentResponse' + paymentSourceName + 'Source.yaml'; + var outputFilePath = 'spec/components/schemas/Payments/ResponseSources/' + outputFilename; + var buildPaymentResponseFunction = getFunctionToBuildPaymentResponse(paymentSourceName); + sync(paymentSpecUrl, buildPaymentResponseFunction, outputFilePath); +}; + +var sync = function (paymentSpecUrl, buildPaymentResponseFunction, outputFilePath) { + console.log('Requesting payment spec from: ' + paymentSpecUrl + ', to output: ' + outputFilePath); + var buildOutputFunction = getFunctionToBuildYaml(buildPaymentResponseFunction); + request({ url: paymentSpecUrl, json: true }, thenBuildOutputAndWrite(buildOutputFunction, outputFilePath)); +}; + +// Copy properties that should be included in the merchant-facing API specification +var copyRelevantProperties = function (outputSchema, inputSchema) { + if (!inputSchema) return; + + outputSchema.type = 'object'; + + if (inputSchema.required) { + outputSchema.required = inputSchema.required; + } + + if (inputSchema.properties) { + outputSchema.properties = inputSchema.properties; + if (outputSchema.properties.type) { + delete outputSchema.properties.type; + } + } + + if (inputSchema.allOf) { + outputSchema.allOf = inputSchema.allOf; + if (outputSchema.allOf.properties && outputSchema.allOf.properties.type) { + delete outputSchema.allOf.properties.type; + } + } + + if (inputSchema.anyOf) { + outputSchema.anyOf = inputSchema.anyOf; + if (outputSchema.anyOf.properties && outputSchema.anyOf.properties.type) { + delete outputSchema.anyOf.properties.type; + } + } + + if (inputSchema.oneOf) { + outputSchema.oneOf = properties.response_data.oneOf; + if (outputSchema.oneOf.properties && outputSchema.oneOf.properties.type) { + delete outputSchema.oneOf.properties.type; + } + } + + return outputSchema; +}; + +var getFunctionToBuildPaymentRequest = function (paymentSourceName) { + return function (responseBody) { + var properties = responseBody.put.requestBody.content['application/json'].schema.properties; + var requestData = {}; + if (properties) { + copyRelevantProperties(requestData, properties.request_data); + } + addDescriptionToKlarnaPassthroughObjects(requestData, paymentSourceName); + return { + type: 'object', + description: paymentSourceName + ' Source', + allOf: [ + { + $ref: '#/components/schemas/PaymentRequestSource', + }, + requestData, + ], + }; + }; +}; + +var addDescriptionToKlarnaPassthroughObjects = function (requestData, paymentSourceName) { + if (requestData && requestData.properties) { + Object.keys(requestData.properties).forEach((propertyName) => { + var property = requestData.properties[propertyName]; + if (property['x-cko-passthrough'] === true && property['x-klarna-docs']) { + var apmPropertyName = property['x-klarna-name'] || propertyName; + var apmPropertyDocs = property['x-klarna-docs']; + property.description += + ' \nThis object is passed directly to ' + + paymentSourceName + + ' as `' + + apmPropertyName + + '`, ' + + '\nso for the object definition use the [' + + paymentSourceName + + ' documentation](' + + apmPropertyDocs + + ').'; + } + }); + } else { + console.info(`request_data is empty for ${paymentSourceName}`) + } +}; + +var getFunctionToBuildPaymentResponse = function (paymentSourceName) { + return function (responseBody) { + var properties = responseBody.get.responses[200].content['application/json'].schema.properties; + var responseData = {}; + if (properties) { + copyRelevantProperties(responseData, properties.response_data); + } + return { + type: 'object', + description: paymentSourceName + ' Source', + allOf: [ + { + $ref: '#/components/schemas/PaymentResponseSource', + }, + responseData, + ], + }; + }; +}; + +var getFunctionToBuildYaml = function (buildOutputFunction) { + return function (responseBody) { + var builtOutput = buildOutputFunction(responseBody); + var generatedFileWarningComment = + '###\n# Warning: this file was auto generated from OpenAPI specs. Do not manually edit. \n###\n'; + return generatedFileWarningComment + YAML.stringify(builtOutput, 20, 2); + }; +}; + +var thenBuildOutputAndWrite = function (buildOutputFunction, outputFilePath) { + return function (error, response, responseBody) { + if (error || response.statusCode !== 200) { + handleRequestError(error, response); + } else { + console.log('Response from url received.'); + var builtOutput = buildOutputFunction(responseBody); + var dirPath = (fullPath) => path.resolve(path.parse(fullPath).dir); + fs.mkdirSync(dirPath(outputFilePath), { recursive: true }); + fs.writeFile(outputFilePath, builtOutput, thenHandleFileWrite(outputFilePath)); + } + }; +}; + +var handleRequestError = function (error, response) { + console.log('Invalid response from url. Error = ' + error); + if (response) { + console.log('response.statusCode = ' + response.statusCode); + } +}; + +var thenHandleFileWrite = function (outputFilePath) { + return function (error) { + if (error) { + console.log('File write error received: ' + error); + } else { + console.log('File written to ' + outputFilePath); + } + }; +}; + +exports.syncPaymentRequest = syncPaymentRequest; +exports.syncPaymentResponse = syncPaymentResponse; diff --git a/spec/README.md b/spec/README.md deleted file mode 100644 index e9c2b5874..000000000 --- a/spec/README.md +++ /dev/null @@ -1,24 +0,0 @@ -## Global headers - -In order to minimize duplications you can use `headers` global object (similar to `definitions`, `responses`). -During build process all references to global `headers` will be inlined and `headers` will be removed form resulting spec so spec will be valid (global `headers` is not allowed by Swagger spec): - -Example: -```yaml -... -headers: - Rate-Limit-Limit: - description: The number of allowed requests in the current period - type: integer -... -paths: - /api-keys: - get: - summary: Retrieve a list of api keys - responses: - 200: - description: A list of api keys was retrieved successfully - headers: - Rate-Limit-Limit: - $ref: "#/components/schemas/Rate-Limit-Limit" -``` diff --git a/spec/code_samples/C#/payments/post.cs b/spec/code_samples/C#/payments/post.cs deleted file mode 100644 index 606158601..000000000 --- a/spec/code_samples/C#/payments/post.cs +++ /dev/null @@ -1,32 +0,0 @@ -var api = CheckoutApi.Create("your secret key"); -var tokenSource = new TokenSource("tok_ubfj2q76miwundwlk72vxt2i7q"); -var paymentRequest = new PaymentRequest(tokenSource, Currency.USD, 5600) -{ - Reference = "ORD-090857", - Capture = false, - ThreeDs = true -}; - -try -{ - var response = await api.Payments.RequestAsync(paymentRequest); - - if (response.IsPending && response.Pending.RequiresRedirect()) - { - return Redirect(response.Pending.GetRedirectLink().Href); - } - - if (response.Payment.Approved) - return PaymentSucessful(response.Payment); - - return PaymentDeclined(response.Payment); -} -catch (CheckoutValidationException validationEx) -{ - return ValidationError(validationEx.Error); -} -catch (CheckoutApiException apiEx) -{ - Log.Error("Payment request failed with status code {HttpStatusCode}", apiEx.HttpStatusCode); - throw; -} \ No newline at end of file diff --git a/spec/code_samples/C#/payments@{id}/get.cs b/spec/code_samples/C#/payments@{id}/get.cs deleted file mode 100644 index 5a19b58eb..000000000 --- a/spec/code_samples/C#/payments@{id}/get.cs +++ /dev/null @@ -1,8 +0,0 @@ -var api = CheckoutApi.Create("your secret key"); -var sessionId = "sid_y3oqhf46pyzuxjbcn2giaqnb44"; -GetPaymentResponse payment = await api.Payments.GetAsync(sessionId); - -if (payment.Approved) -{ - var cardSourceId = payment.Source.AsCard().Id; -} \ No newline at end of file diff --git a/spec/code_samples/C#/payments@{id}@actions/get.cs b/spec/code_samples/C#/payments@{id}@actions/get.cs deleted file mode 100644 index 5b0ec9003..000000000 --- a/spec/code_samples/C#/payments@{id}@actions/get.cs +++ /dev/null @@ -1,4 +0,0 @@ -var api = CheckoutApi.Create("your secret key"); -var paymentId = "pay_y3oqhf46pyzuxjbcn2giaqnb44"; - -IEnumerable paymentActions = await api.Payments.GetActionsAsync(paymentId); \ No newline at end of file diff --git a/spec/code_samples/C#/payments@{id}@captures/post.cs b/spec/code_samples/C#/payments@{id}@captures/post.cs deleted file mode 100644 index 8d70c4cc9..000000000 --- a/spec/code_samples/C#/payments@{id}@captures/post.cs +++ /dev/null @@ -1,14 +0,0 @@ -var api = CheckoutApi.Create("your secret key"); -var paymentId = "pay_y3oqhf46pyzuxjbcn2giaqnb44"; - -// Full capture -await api.Payments.CaptureAsync(paymentId); - -// Or partial capture -var captureRequest = new CaptureRequest -{ - Reference = "your reference", - Amount = 100 -}; - -await api.Payments.CaptureAsync(paymentId, captureRequest); diff --git a/spec/code_samples/C#/payments@{id}@refunds/post.cs b/spec/code_samples/C#/payments@{id}@refunds/post.cs deleted file mode 100644 index 1d8e6e27a..000000000 --- a/spec/code_samples/C#/payments@{id}@refunds/post.cs +++ /dev/null @@ -1,14 +0,0 @@ -var api = CheckoutApi.Create("your secret key"); -var paymentId = "pay_y3oqhf46pyzuxjbcn2giaqnb44"; - -// Full refund -await api.Payments.RefundAsync(paymentId); - -// Or partial refund -var refundRequest = new RefundRequest -{ - Reference = "your reference", - Amount = 100 -}; - -await api.Payments.RefundAsync(paymentId, refundRequest); diff --git a/spec/code_samples/C#/payments@{id}@voids/post.cs b/spec/code_samples/C#/payments@{id}@voids/post.cs deleted file mode 100644 index f9e2bf58f..000000000 --- a/spec/code_samples/C#/payments@{id}@voids/post.cs +++ /dev/null @@ -1,4 +0,0 @@ -var api = CheckoutApi.Create("your secret key"); -var paymentId = "pay_y3oqhf46pyzuxjbcn2giaqnb44"; - -await api.Payments.VoidAsync(paymentId); diff --git a/spec/code_samples/README.md b/spec/code_samples/README.md deleted file mode 100644 index 0470a94f2..000000000 --- a/spec/code_samples/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Code samples -===== - -Generate [x-code-samples](https://github.com/Rebilly/ReDoc/blob/master/docs/redoc-vendor-extensions.md#x-code-samples) -Path `//.` where: - * `` - name of the language from [this](https://github.com/github/linguist/blob/master/lib/linguist/popular.yml) list. - * `` - path of target method, where all slashes replaced with `@` sign. - * `` - verb of target method. - * `` - ignored. diff --git a/spec/components/headers/Cko-Request-Id.yaml b/spec/components/headers/Cko-Request-Id.yaml deleted file mode 100644 index fe1e23083..000000000 --- a/spec/components/headers/Cko-Request-Id.yaml +++ /dev/null @@ -1,3 +0,0 @@ -description: Unique identifer of the request -schema: - type: string \ No newline at end of file diff --git a/spec/components/headers/Cko-Version.yaml b/spec/components/headers/Cko-Version.yaml deleted file mode 100644 index b805b1672..000000000 --- a/spec/components/headers/Cko-Version.yaml +++ /dev/null @@ -1,3 +0,0 @@ -description: Version of the API -schema: - type: string \ No newline at end of file diff --git a/spec/components/parameters/collectionCriteria.yaml b/spec/components/parameters/collectionCriteria.yaml deleted file mode 100644 index 6e78cf27b..000000000 --- a/spec/components/parameters/collectionCriteria.yaml +++ /dev/null @@ -1,5 +0,0 @@ -name: criteria -in: query -schema: - type: string -description: The json criteria for collection \ No newline at end of file diff --git a/spec/components/parameters/collectionExpand.yaml b/spec/components/parameters/collectionExpand.yaml deleted file mode 100644 index 8cf3efcdb..000000000 --- a/spec/components/parameters/collectionExpand.yaml +++ /dev/null @@ -1,7 +0,0 @@ -name: expand -in: query -schema: - type: string -description: >- - Expand response to get full related object intead of ID. See the expand - guide for more info. \ No newline at end of file diff --git a/spec/components/parameters/collectionFields.yaml b/spec/components/parameters/collectionFields.yaml deleted file mode 100644 index 11ad1f4d8..000000000 --- a/spec/components/parameters/collectionFields.yaml +++ /dev/null @@ -1,7 +0,0 @@ -name: fields -in: query -schema: - type: string -description: >- - Limit the returned fields to the list specified, separated by comma. Note - that id is always returned. \ No newline at end of file diff --git a/spec/components/parameters/collectionFilter.yaml b/spec/components/parameters/collectionFilter.yaml deleted file mode 100644 index 33132116c..000000000 --- a/spec/components/parameters/collectionFilter.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: filter -in: query -schema: - type: string -description: | - The collection items filter requires a special format. - Use "," for multiple allowed values. Use ";" for multiple fields. - See the filter guide for more options and examples about this format. \ No newline at end of file diff --git a/spec/components/parameters/collectionLimit.yaml b/spec/components/parameters/collectionLimit.yaml deleted file mode 100644 index 034698368..000000000 --- a/spec/components/parameters/collectionLimit.yaml +++ /dev/null @@ -1,7 +0,0 @@ -name: limit -in: query -description: The collection items limit -schema: - type: integer - minimum: 0 - maximum: 1000 \ No newline at end of file diff --git a/spec/components/parameters/collectionOffset.yaml b/spec/components/parameters/collectionOffset.yaml deleted file mode 100644 index 217ab7969..000000000 --- a/spec/components/parameters/collectionOffset.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: offset -in: query -description: The collection items offset -schema: - type: integer - minimum: 0 \ No newline at end of file diff --git a/spec/components/parameters/collectionQuery.yaml b/spec/components/parameters/collectionQuery.yaml deleted file mode 100644 index 1a318eb05..000000000 --- a/spec/components/parameters/collectionQuery.yaml +++ /dev/null @@ -1,5 +0,0 @@ -name: q -in: query -schema: - type: string -description: The partial search of the text fields. \ No newline at end of file diff --git a/spec/components/parameters/hash.yaml b/spec/components/parameters/hash.yaml deleted file mode 100644 index 723852e71..000000000 --- a/spec/components/parameters/hash.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: hash -in: path -description: The token identifier string -schema: - type: string -required: true \ No newline at end of file diff --git a/spec/components/parameters/mediaType.yaml b/spec/components/parameters/mediaType.yaml deleted file mode 100644 index c9845143c..000000000 --- a/spec/components/parameters/mediaType.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: Accept -in: header -schema: - type: string - enum: - - application/json - default: application/json -description: The response media type \ No newline at end of file diff --git a/spec/components/parameters/resourceId.yaml b/spec/components/parameters/resourceId.yaml deleted file mode 100644 index 87ece9723..000000000 --- a/spec/components/parameters/resourceId.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: id -in: path -description: The resource identifier string -schema: - type: string -required: true \ No newline at end of file diff --git a/spec/components/parameters/rulesVersion.yaml b/spec/components/parameters/rulesVersion.yaml deleted file mode 100644 index 96534892f..000000000 --- a/spec/components/parameters/rulesVersion.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: version -in: path -schema: - type: integer - minimum: 1 -required: true -description: >- - The rule set version. Expand response to get full related object instead - of ID. See the expand guide for more info. \ No newline at end of file diff --git a/spec/components/parameters/systemEventType.yaml b/spec/components/parameters/systemEventType.yaml deleted file mode 100644 index 9bbe5ff2d..000000000 --- a/spec/components/parameters/systemEventType.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: eventType -in: path -description: The event type -schema: - type: string -required: true \ No newline at end of file diff --git a/spec/components/responses/AccessForbidden.yaml b/spec/components/responses/AccessForbidden.yaml deleted file mode 100644 index ca9a47df3..000000000 --- a/spec/components/responses/AccessForbidden.yaml +++ /dev/null @@ -1,5 +0,0 @@ -description: 'Access forbidden, invalid API-KEY was used' -content: - application/json: - schema: - $ref: '#/components/schemas/Error' \ No newline at end of file diff --git a/spec/components/responses/Conflict.yaml b/spec/components/responses/Conflict.yaml deleted file mode 100644 index 55b9c9e3e..000000000 --- a/spec/components/responses/Conflict.yaml +++ /dev/null @@ -1,5 +0,0 @@ -description: Conflict -content: - application/json: - schema: - $ref: '#/components/schemas/Error' \ No newline at end of file diff --git a/spec/components/responses/InvalidDataError.yaml b/spec/components/responses/InvalidDataError.yaml deleted file mode 100644 index e0daf3f8f..000000000 --- a/spec/components/responses/InvalidDataError.yaml +++ /dev/null @@ -1,5 +0,0 @@ -description: Invalid data was sent -content: - application/json: - schema: - $ref: '#/components/schemas/ValidationError' \ No newline at end of file diff --git a/spec/components/responses/NotFound.yaml b/spec/components/responses/NotFound.yaml deleted file mode 100644 index 8f5bd63a0..000000000 --- a/spec/components/responses/NotFound.yaml +++ /dev/null @@ -1,5 +0,0 @@ -description: Resource was not found -content: - application/json: - schema: - $ref: '#/components/schemas/Error' \ No newline at end of file diff --git a/spec/components/schemas/Address.yaml b/spec/components/schemas/Address.yaml deleted file mode 100644 index 5318cd87d..000000000 --- a/spec/components/schemas/Address.yaml +++ /dev/null @@ -1,26 +0,0 @@ -type: object -properties: - address_line1: - type: string - description: Line 1 of the address - example: Checkout.com - address_line2: - type: string - description: Line 2 of the address - example: 90 Tottenham Court Road - city: - type: string - description: The address city - example: London - state: - type: string - description: The address state - example: London - zip: - type: string - description: The address zip/postal code - example: W1T 4TJ - country: - type: string - description: The two-letter ISO code of the address country - example: GB \ No newline at end of file diff --git a/spec/components/schemas/Batches/Batch.yaml b/spec/components/schemas/Batches/Batch.yaml deleted file mode 100644 index 02e2728f9..000000000 --- a/spec/components/schemas/Batches/Batch.yaml +++ /dev/null @@ -1,27 +0,0 @@ -type: object -required: - - id - - status - - _links -properties: - id: - type: string - description: Batch identifier - pattern: "^bat_(\\w{26})$" - example: bat_cyukd74c4xoezfuarvuwdcpzou - status: - type: string - description: The status of the batch - example: Processing - _links: - type: object - required: - - self - properties: - self: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: The URI of the batch - example: - href: "https://api.checkout.com/batches/bat_fa72f568492b4d3eb6d81e0645e320f6" \ No newline at end of file diff --git a/spec/components/schemas/Batches/SubmitBatchRequest.yaml b/spec/components/schemas/Batches/SubmitBatchRequest.yaml deleted file mode 100644 index c8ee91df5..000000000 --- a/spec/components/schemas/Batches/SubmitBatchRequest.yaml +++ /dev/null @@ -1,21 +0,0 @@ -type: object -description: The batch request -required: - - file_id - - action -properties: - file_id: - type: string - pattern: "^file_(\\w{26})$" - description: The identifier of the batch file previously uploaded via the [Files API](#tag/Files) - example: "file_6lbss42ezvoufcb2beo76rvwly" - action: - type: string - description: The action to be performed against the batch - enum: - - payment - example: "payment" - reference: - type: string - description: Your reference for the batch. If provided, this will be validated against the batch file's header. - example: payments-20180701 \ No newline at end of file diff --git a/spec/components/schemas/Batches/SubmitBatchResponse.yaml b/spec/components/schemas/Batches/SubmitBatchResponse.yaml deleted file mode 100644 index abe3d37af..000000000 --- a/spec/components/schemas/Batches/SubmitBatchResponse.yaml +++ /dev/null @@ -1,27 +0,0 @@ -type: object -required: - - id - - status - - _links -properties: - id: - type: string - description: Batch identifier - pattern: "^bat_(\\w{26})$" - example: bat_cyukd74c4xoezfuarvuwdcpzou - status: - type: string - description: The batch status - example: Processing - _links: - type: object - required: - - self - properties: - self: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: The URI of the batch - example: - href: "https://api.checkout.com/batches/bat_fa72f568492b4d3eb6d81e0645e320f6" \ No newline at end of file diff --git a/spec/components/schemas/Error.yaml b/spec/components/schemas/Error.yaml deleted file mode 100644 index 7d562d73a..000000000 --- a/spec/components/schemas/Error.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -properties: - request_id: - type: string - example: 0HL80RJLS76I7 - error_type: - type: string - example: request_malformed \ No newline at end of file diff --git a/spec/components/schemas/Events/BillingDetails.yaml b/spec/components/schemas/Events/BillingDetails.yaml deleted file mode 100644 index 3a7905c3e..000000000 --- a/spec/components/schemas/Events/BillingDetails.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: object -properties: - address_line_1: - type: string - example: 372 Weimann Lane - address_line_2: - type: string - example: Rolfson Alley - post_code: - type: string - example: ew1 7zb - country: - type: string - example: SJ - city: - type: string - example: North Benedicthaven - state: - type: string - example: Georgia - phone: - $ref: '#/components/schemas/Phone' \ No newline at end of file diff --git a/spec/components/schemas/Events/Card.yaml b/spec/components/schemas/Events/Card.yaml deleted file mode 100644 index 3d914f062..000000000 --- a/spec/components/schemas/Events/Card.yaml +++ /dev/null @@ -1,34 +0,0 @@ -type: object -properties: - customer_id: - type: string - example: cust_7508EA38E86A4569AF12E483519E332D - expiry_month: - type: string - example: '06' - expiry_year: - type: string - example: 2018 - billing_details: - $ref: '#/components/schemas/BillingDetails' - id: - type: string - example: card_D44D7F4CCC6348698717CD80072808B0 - last4: - type: string - example: 424242******4242 - payment_method: - type: string - example: VISA - fingerprint: - type: string - example: f639cab2745bee4140bf86df6b6d6e255c5945aac3788d923fa047ea4c208622 - name: - type: string - example: Test Customer - cvv_check: - type: string - example: 'Y' - avs_check: - type: string - example: S \ No newline at end of file diff --git a/spec/components/schemas/Events/CustomerPaymentPlan.yaml b/spec/components/schemas/Events/CustomerPaymentPlan.yaml deleted file mode 100644 index 6337d3076..000000000 --- a/spec/components/schemas/Events/CustomerPaymentPlan.yaml +++ /dev/null @@ -1,38 +0,0 @@ -type: object -properties: - id: - type: string - customer_plan_id: - type: string - card_id: - type: string - customer_id: - type: string - name: - type: string - plan_track_id: - type: string - auto_cap_time: - type: string - value: - type: integer - currency: - type: string - cycle: - type: string - recurring_count: - type: integer - recurring_count_left: - type: integer - total_collected_value: - type: integer - total_collected_count: - type: integer - current_recurring_status: - type: integer - start_date: - type: string - previous_recurring_date: - type: string - next_recurring_date: - type: string \ No newline at end of file diff --git a/spec/components/schemas/Events/Data.yaml b/spec/components/schemas/Events/Data.yaml deleted file mode 100644 index 77481c732..000000000 --- a/spec/components/schemas/Events/Data.yaml +++ /dev/null @@ -1,88 +0,0 @@ -type: object -description: Event Data -properties: - id: - description: Payment unique identifier - allOf: - - $ref: '#/components/schemas/PaymentId' - action_id: - description: The unique identifier for the action performed against this payment - allOf: - - $ref: '#/components/schemas/ActionId' - amount: - type: integer - description: The payment amount - example: 6540 - currency: - type: string - description: The three-letter ISO currency code of the payment - example: USD - maxLength: 3 - minLength: 3 - approved: - type: boolean - description: Whether the payment request was approved - example: true - status: - type: string - description: The status of the payment - enum: - - Pending - - Authorized - - Voided - - Partially Captured - - Captured - - Partially Refunded - - Refunded - - Declined - - Cancelled - example: Authorized - auth_code: - type: string - description: The acquirer authorization code if the payment was Authorized - example: "643381" - response_code: - type: string - description: Gateway response code - example: "10000" - response_summary: - type: string - description: The Gateway response summary - example: "Approved" - 3ds: - type: object - description: Provides 3-D Secure enrollment status if the payment was downgraded to non-3D Secure - allOf: - - $ref: '#/components/schemas/3dsEnrollmentData' - example: - downgraded: true - enrolled: N - flagged: - type: boolean - description: Whether the payment was flagged by a risk check - default: false - example: true - source: - description: The source of the payment - type: object - allOf: - - $ref: '#/components/schemas/PaymentResponseSource' - customer: - type: object - description: The customer to which this payment is linked - allOf: - - $ref: '#/components/schemas/PaymentResponseCustomer' - processed_on: - description: The date/time the payment was processed - allOf: - - $ref: '#/components/schemas/ServerTimestamp' - reference: - type: string - description: Your reference for the payment - example: ORD-5023-4E89 - metadata: - type: object - description: Set of key/value pairs that you can attach to a payment. It can be useful for storing additional information in a structured format - example: - coupon_code: "NY2018" - partner_id: 123989 \ No newline at end of file diff --git a/spec/components/schemas/Events/EventId.yaml b/spec/components/schemas/Events/EventId.yaml deleted file mode 100644 index 0497e11e4..000000000 --- a/spec/components/schemas/Events/EventId.yaml +++ /dev/null @@ -1,5 +0,0 @@ -type: string -description: The unique event identifier -maxLength: 30 -minLength: 30 -example: "evt_az5sblvku4ge3dwpztvyizgcau" \ No newline at end of file diff --git a/spec/components/schemas/Events/EventLinks.yaml b/spec/components/schemas/Events/EventLinks.yaml deleted file mode 100644 index c01ead668..000000000 --- a/spec/components/schemas/Events/EventLinks.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -description: The links related to the event -properties: - self: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: The URI of the event - example: - href: "https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau" - webhooks-retry: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: A link to retry all of the webhooks configured for the event - example: - href: "https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/webhooks/retry" \ No newline at end of file diff --git a/spec/components/schemas/Events/EventObject.yaml b/spec/components/schemas/Events/EventObject.yaml deleted file mode 100644 index 351e13718..000000000 --- a/spec/components/schemas/Events/EventObject.yaml +++ /dev/null @@ -1,25 +0,0 @@ -type: object -properties: - id: - $ref: '#/components/schemas/EventId' - type: - type: string - description: The event type - example: payment_approved - version: - type: string - description: Determines the version of the event sent - example: "2.0" - created_on: - description: The date/time the event occurred - allOf: - - $ref: '#/components/schemas/ServerTimestamp' - data: - $ref: '#/components/schemas/Data' - notifications: - type: array - description: The notifications (e.g. webhooks) that have been sent for the event - items: - $ref: '#/components/schemas/NotificationSummary' - _links: - $ref: '#/components/schemas/EventLinks' \ No newline at end of file diff --git a/spec/components/schemas/Events/EventResult.yaml b/spec/components/schemas/Events/EventResult.yaml deleted file mode 100644 index 442a601ce..000000000 --- a/spec/components/schemas/Events/EventResult.yaml +++ /dev/null @@ -1,28 +0,0 @@ -type: object -properties: - total_count: - type: integer - example: 100 - description: The total number of events - limit: - type: integer - description: The `limit` query parameter - example: 10 - skip: - type: integer - example: 10 - description: The `skip` query parameter - from: - type: string - format: date-time - description: The `from` query parameter - example: "2018-01-01T00:00:00Z" - to: - type: string - format: date-time - example: "2018-01-15T12:00:00Z" - description: The `to` query parameter - data: - type: array - items: - $ref: '#/components/schemas/EventSummary' \ No newline at end of file diff --git a/spec/components/schemas/Events/EventTypesObject.yaml b/spec/components/schemas/Events/EventTypesObject.yaml deleted file mode 100644 index b5f49acb0..000000000 --- a/spec/components/schemas/Events/EventTypesObject.yaml +++ /dev/null @@ -1,26 +0,0 @@ -type: object -properties: - version: - type: string - example: "2.0" - event_types: - type: array - items: - type: string - example: - - payment_approved - - payment_risk_matched - - payment_pending - - payment_declined - - payment_expired - - payment_cancelled - - payment_voided - - payment_void_declined - - payment_captured - - payment_capture_declined - - payment_capture_pending - - payment_refunded - - payment_refund_declined - - payment_refund_pending - - payment_chargeback - - payment_retrieval diff --git a/spec/components/schemas/Events/Notification.yaml b/spec/components/schemas/Events/Notification.yaml deleted file mode 100644 index 38dc6aa75..000000000 --- a/spec/components/schemas/Events/Notification.yaml +++ /dev/null @@ -1,39 +0,0 @@ -type: object -properties: - id: - $ref: '#/components/schemas/NotificationId' - url: - type: string - description: The notification endpoint - example: https://example.com/webhooks - success: - type: boolean - description: Whether the notification eventually succeeded - example: false - content_type: - type: string - description: The content type of the data sent to the endpoint - example: json - attempts: - type: array - description: The notification events ordered by timestamp in descending order (latest first) - items: - $ref: '#/components/schemas/NotificationAttempt' - _links: - type: object - description: The links related to the notification - properties: - self: - type: object - description: The URI of the notification - allOf: - - $ref: '#/components/schemas/Link' - example: - href: https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/notifications/ntf_az5sblvku4ge3dwpztvyizgcau - retry: - type: object - description: A link to retry the notification to the configured webhook - allOf: - - $ref: '#/components/schemas/Link' - example: - href: https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/webhooks/wh_5nuzkt62ddxuho5rwsvt6pyesi/retry \ No newline at end of file diff --git a/spec/components/schemas/Events/NotificationAttempt.yaml b/spec/components/schemas/Events/NotificationAttempt.yaml deleted file mode 100644 index cda00d4da..000000000 --- a/spec/components/schemas/Events/NotificationAttempt.yaml +++ /dev/null @@ -1,21 +0,0 @@ -type: object -properties: - status_code: - type: integer - description: The HTTP status code returned from the target server - example: 400 - response_body: - type: string - description: The response body returned from the target server - example: Bad Request - retry_mode: - type: string - description: Whether the notification was sent automatically or requested manually - enum: - - Automatic - - Manual - timestamp: - type: string - description: The date/time the attempt was made - allOf: - - $ref: '#/components/schemas/ServerTimestamp' \ No newline at end of file diff --git a/spec/components/schemas/Events/NotificationId.yaml b/spec/components/schemas/Events/NotificationId.yaml deleted file mode 100644 index 245fc3c6b..000000000 --- a/spec/components/schemas/Events/NotificationId.yaml +++ /dev/null @@ -1,5 +0,0 @@ -type: string -description: The unique notification identifier -maxLength: 30 -minLength: 30 -example: "ntf_az5sblvku4ge3dwpztvyizgcau" \ No newline at end of file diff --git a/spec/components/schemas/Events/NotificationSummary.yaml b/spec/components/schemas/Events/NotificationSummary.yaml deleted file mode 100644 index 912f9ecee..000000000 --- a/spec/components/schemas/Events/NotificationSummary.yaml +++ /dev/null @@ -1,20 +0,0 @@ -type: object -properties: - id: - $ref: '#/components/schemas/NotificationId' - url: - type: string - description: The notification endpoint - example: https://example.com/webhooks - success: - type: boolean - description: Whether the notification eventually succeeded - example: false - _links: - type: object - description: The links related to the notification - properties: - self: - type: string - example: - href: https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/notifications/ntf_az5sblvku4ge3dwpztvyizgcau \ No newline at end of file diff --git a/spec/components/schemas/Events/Phone.yaml b/spec/components/schemas/Events/Phone.yaml deleted file mode 100644 index d024474f8..000000000 --- a/spec/components/schemas/Events/Phone.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -properties: - country_code: - type: string - example: '975' - number: - type: string - example: '174217187' \ No newline at end of file diff --git a/spec/components/schemas/Events/Product.yaml b/spec/components/schemas/Events/Product.yaml deleted file mode 100644 index 91f21c3bc..000000000 --- a/spec/components/schemas/Events/Product.yaml +++ /dev/null @@ -1,26 +0,0 @@ -type: object -properties: - name: - type: string - example: Tablet 1 gold limited - description: - type: string - example: Nokia Lumia - sku: - type: string - example: 1aab2aa - price: - type: integer - example: 100 - quantity: - type: integer - example: 1 - image: - type: string - example: 'http://www.test_Jabari.com/' - shipping_cost: - type: integer - example: 10 - tracking_url: - type: string - example: 'https://www.tracker.com' \ No newline at end of file diff --git a/spec/components/schemas/Events/ShippingDetails.yaml b/spec/components/schemas/Events/ShippingDetails.yaml deleted file mode 100644 index 929373a46..000000000 --- a/spec/components/schemas/Events/ShippingDetails.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: object -properties: - address_line_1: - type: string - example: 333 Cormier Bypass - address_line_2: - type: string - example: Rolfson Alley - post_code: - type: string - example: BR3 6TK - country: - type: string - example: GB - city: - type: string - example: Bromley - state: - type: string - example: Greater London - phone: - $ref: '#/components/schemas/Phone' \ No newline at end of file diff --git a/spec/components/schemas/IPAddress.yaml b/spec/components/schemas/IPAddress.yaml deleted file mode 100644 index 9ec51559b..000000000 --- a/spec/components/schemas/IPAddress.yaml +++ /dev/null @@ -1,3 +0,0 @@ -type: string -format: ipv4 -example: "90.197.169.245" \ No newline at end of file diff --git a/spec/components/schemas/InvalidError.yaml b/spec/components/schemas/InvalidError.yaml deleted file mode 100644 index fe5977818..000000000 --- a/spec/components/schemas/InvalidError.yaml +++ /dev/null @@ -1,8 +0,0 @@ -allOf: - - $ref: "#/components/schemas/Error" - - type: object - properties: - details: - type: array - items: - type: string \ No newline at end of file diff --git a/spec/components/schemas/Links/Link.yaml b/spec/components/schemas/Links/Link.yaml deleted file mode 100644 index 4c8618234..000000000 --- a/spec/components/schemas/Links/Link.yaml +++ /dev/null @@ -1,7 +0,0 @@ -type: object -properties: - href: - description: The link URL - type: string -required: - - href \ No newline at end of file diff --git a/spec/components/schemas/Links/SelfLink.yaml b/spec/components/schemas/Links/SelfLink.yaml deleted file mode 100644 index 66b99576f..000000000 --- a/spec/components/schemas/Links/SelfLink.yaml +++ /dev/null @@ -1,11 +0,0 @@ -type: object -allOf: - - $ref: "#/components/schemas/Link" -properties: - rel: - description: The link type - type: string - enum: - - self -required: - - rel \ No newline at end of file diff --git a/spec/components/schemas/Payments/3dsData.yaml b/spec/components/schemas/Payments/3dsData.yaml deleted file mode 100644 index 1111a47e8..000000000 --- a/spec/components/schemas/Payments/3dsData.yaml +++ /dev/null @@ -1,39 +0,0 @@ -type: object -properties: - downgraded: - type: boolean - description: Inidicates whether this was a 3-D Secure payment downgraded to non-3-D Secure (when `attempt_n3d` is specified) - example: false - enrolled: - type: string - description: > - Indicates the 3-D Secure enrollment status of the issuer - * `Y` - Issuer enrolled - * `N` - Customer not enrolled - * `U` - Unknown - example: Y - signature_valid: - type: string - description: Verification to ensure the integrity of the response. - example: Y - authentication_response: - type: string - description: > - Indicates whether or not the cardholder was authenticated - * `Y` - Customer authenticated - * `N` - Customer not authenticated - * `A` - An authentication attempt occurred but could not be completed - * `U` - Unable to perform authentication - example: Y - cryptogram: - type: string - description: Base64 encoded cryptographic identifier (CAVV) used by the card schemes to validate the integrity of the 3-D secure payment data - example: hv8mUFzPzRZoCAAAAAEQBDMAAAA= - xid: - type: string - description: Unique identifier for the transaction assigned by the MPI - example: MDAwMDAwMDAwMDAwMDAwMzIyNzY= - version: - type: string - description: Indicates the version of 3-D Secure that was used for authentication - example: "2.1.0" \ No newline at end of file diff --git a/spec/components/schemas/Payments/3dsEnrollmentData.yaml b/spec/components/schemas/Payments/3dsEnrollmentData.yaml deleted file mode 100644 index 5c9275ef1..000000000 --- a/spec/components/schemas/Payments/3dsEnrollmentData.yaml +++ /dev/null @@ -1,14 +0,0 @@ -type: object -properties: - downgraded: - type: boolean - description: Inidicates whether this was a 3-D Secure payment downgraded to non-3D-Secure (when `attempt_n3d` is specified) - example: false - enrolled: - type: string - description: > - Indicates the 3-D Secure enrollment status of the issuer - * `Y` - Issuer enrolled - * `N` - Customer not enrolled - * `U` - Unknown - example: Y \ No newline at end of file diff --git a/spec/components/schemas/Payments/3dsRequest.yaml b/spec/components/schemas/Payments/3dsRequest.yaml deleted file mode 100644 index f8745f021..000000000 --- a/spec/components/schemas/Payments/3dsRequest.yaml +++ /dev/null @@ -1,28 +0,0 @@ -type: object -description: Information required for 3-D Secure payments -properties: - enabled: - type: boolean - description: Whether to process this payment as a 3-D Secure - default: false - example: true - attempt_n3d: - type: boolean - description: | - Determines whether to attempt a 3-D Secure payment as non-3-D Secure - should the card issuer not be enrolled. - [Read more](https://docs.checkout.com/docs/3-d-secure-payments#section-handle-non-enrolled-cards). - default: false - example: true - eci: - type: string - description: The Electronic Commerce Indicator security level associated with the 3-D Secure enrollment result. Required if using a third party MPI. - example: "05" - cryptogram: - type: string - description: Base64 encoded cryptographic identifier (CAVV) used by the card schemes to validate the cardholder authentication result (3-D Secure). Required if using an external MPI. - example: AgAAAAAAAIR8CQrXcIhbQAAAAAA= - xid: - type: string - description: The 3-D Secure transaction identifier. Required if using an external MPI. - example: MDAwMDAwMDAwMDAwMDAwMzIyNzY= \ No newline at end of file diff --git a/spec/components/schemas/Payments/ActionId.yaml b/spec/components/schemas/Payments/ActionId.yaml deleted file mode 100644 index 6dd012d4e..000000000 --- a/spec/components/schemas/Payments/ActionId.yaml +++ /dev/null @@ -1,5 +0,0 @@ -type: string -description: The action identifier -maxLength: 30 -minLength: 30 -example: "act_y3oqhf46pyzuxjbcn2giaqnb44" \ No newline at end of file diff --git a/spec/components/schemas/Payments/BillingDescriptor.yaml b/spec/components/schemas/Payments/BillingDescriptor.yaml deleted file mode 100644 index b69095b26..000000000 --- a/spec/components/schemas/Payments/BillingDescriptor.yaml +++ /dev/null @@ -1,18 +0,0 @@ -type: object -description: | - An optional dynamic billing descriptor displayed on the account owner's statement. -properties: - name: - type: string - description: Dynamic description of the charge - example: "SUPERHEROES.COM" - maxLength: 25 - city: - type: string - description: City where the charge originated - minimum: 1 - example: "GOTHAM" - maxLength: 13 -required: - - name - - city \ No newline at end of file diff --git a/spec/components/schemas/Payments/CaptureAcceptedResponse.yaml b/spec/components/schemas/Payments/CaptureAcceptedResponse.yaml deleted file mode 100644 index 2d32a331f..000000000 --- a/spec/components/schemas/Payments/CaptureAcceptedResponse.yaml +++ /dev/null @@ -1,36 +0,0 @@ -type: object -description: Capture response -required: - - action_id -properties: - action_id: - description: The unique identifier for the capture action - allOf: - - $ref: '#/components/schemas/ActionId' - reference: - type: string - description: Your reference for the capture request - example: ORD-5023-4E89 - _links: - type: object - description: Capture links - readOnly: true - minItems: 2 - properties: - payment: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: The URI of the payment to be captured. Use this to check the status of the payment - example: - href: "https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44" - redirect: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: For some alternative payments, the URI that the customer should be redirected to, to complete the capture - example: - href: "https://api.checkout.com/redirect/act_y3oqhf46pyzuxjbcn2giaqnb44" - required: - - payment - diff --git a/spec/components/schemas/Payments/CaptureRequest.yaml b/spec/components/schemas/Payments/CaptureRequest.yaml deleted file mode 100644 index 19fa6f617..000000000 --- a/spec/components/schemas/Payments/CaptureRequest.yaml +++ /dev/null @@ -1,18 +0,0 @@ -type: object -properties: - amount: - type: integer - description: | - The amount to capture in the major currency. If not specified, the full payment amount will be captured - minimum: 0 - example: 6540 - reference: - type: string - description: A reference you can later use to identify this capture request - example: ORD-5023-4E89 - metadata: - type: object - description: Set of key/value pairs that you can attach to the capture request. It can be useful for storing additional information in a structured format - example: - coupon_code: "NY2018" - partner_id: 123989 \ No newline at end of file diff --git a/spec/components/schemas/Payments/Item.yaml b/spec/components/schemas/Payments/Item.yaml deleted file mode 100644 index 67f1bc822..000000000 --- a/spec/components/schemas/Payments/Item.yaml +++ /dev/null @@ -1,37 +0,0 @@ -type: object -description: The order line item or product that is being purchased -properties: - sku: - type: string - description: The stock-keeping unit identifier of the item - example: 858818ac - name: - type: string - description: The name of the item or product - example: Kevlar batterang - description: - type: string - description: A description of the item or product - example: The fastest, hardest batterang known to man - image_url: - type: string - format: uri - description: The URL of an image of the item or product - example: http://example.com/batterang.jpg - price: - type: number - description: The unit price of the item or product in the minor currency unit - example: 34.50 - quantity: - type: number - description: The number of the items purchased - example: 2 - shipping_cost: - type: number - description: The shipping cost of the item - example: 2.99 - shipping_tracking_url: - type: string - format: uri - description: A URL to track the shipping status of the item - example: http://www.dhl.co.uk/en/express/tracking.html?AWB=41f280bbe12cd787b47c&brand=DHL \ No newline at end of file diff --git a/spec/components/schemas/Payments/Payment.yaml b/spec/components/schemas/Payments/Payment.yaml deleted file mode 100644 index 356912b79..000000000 --- a/spec/components/schemas/Payments/Payment.yaml +++ /dev/null @@ -1,186 +0,0 @@ -type: object -description: Payment response -required: - - id - - requested_on - - amount - - currency - - status - - approved - - _links -properties: - id: - description: Payment unique identifier - allOf: - - $ref: '#/components/schemas/PaymentId' - requested_on: - description: The date/time the payment was requested - allOf: - - $ref: '#/components/schemas/ServerTimestamp' - source: - description: The source of the payment - type: object - allOf: - - $ref: '#/components/schemas/PaymentResponseSource' - amount: - type: integer - description: The original payment amount - example: 6540 - currency: - type: string - description: The three-letter ISO currency code of the payment - example: USD - maxLength: 3 - minLength: 3 - payment_type: - type: string - description: Must be specified for card payments where the cardholder is not present (recurring or Merchant Offline Telephone Order) - enum: - - Regular - - Recurring - - MOTO - default: Regular - example: Recurring - reference: - type: string - description: Your reference for the payment - example: ORD-5023-4E89 - description: - type: string - description: A description of the payment - example: Set of 3 masks - approved: - type: boolean - description: Whether the authorization or capture was successful - example: true - status: - type: string - description: The status of the payment - enum: - - Pending - - Authorized - - Card Verified - - Voided - - Partially Captured - - Captured - - Partially Refunded - - Refunded - - Declined - - Cancelled - example: Authorized - 3ds: - type: object - description: Provides information relating to the processing of 3-D Secure payments - allOf: - - $ref: '#/components/schemas/3dsData' - risk: - type: object - description: Returns the payments risk assessment results - properties: - flagged: - type: boolean - description: Whether the payment was flagged by a risk check - default: false - example: true - customer: - type: object - description: The customer to which this payment is linked - properties: - id: - type: string - description: The unique identifier of the customer. This can be passed as a source when making a payment - example: cus_y3oqhf46pyzuxjbcn2giaqnb44 - email: - type: string - description: The customer email address - example: jokershere@gmail.com - name: - type: string - description: The customer name - example: Jack Napier - required: - - id - billing_descriptor: - $ref: '#/components/schemas/BillingDescriptor' - shipping: - type: object - description: The payment shipping details - properties: - address: - description: The shipping address - allOf: - - $ref: '#/components/schemas/Address' - phone: - description: The phone number associated with the shipping address - allOf: - - $ref: '#/components/schemas/PhoneNumber' - payment_ip: - description: The IP address used to make the payment - allOf: - - $ref: '#/components/schemas/IPAddress' - recipient: - $ref: '#/components/schemas/PaymentRecipient' - metadata: - type: object - description: Set of key/value pairs that you can attach to a payment. It can be useful for storing additional information in a structured format - example: - coupon_code: "NY2018" - partner_id: 123989 - eci: - type: string - description: | - The final Electronic Commerce Indicator security level used to authorize the payment. - Applicable for 3-D Secure, digital wallets and network token payments. - example: "06" - scheme_id: - type: string - description: | - The scheme transaction identifier - example: "488341541494658" - actions: - type: array - items: - $ref: '#/components/schemas/PaymentActionSummary' - description: | - A summary of the payment's actions, - returned when a session ID is used to get the payment details - _links: - type: object - description: The links related to the payment - minItems: 2 - required: - - self - - actions - properties: - self: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: The URI of the payment - actions: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: A link to the payment's associated actions - void: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: A link to void the payment, where applicable - capture: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: A link to capture the payment, where applicable - refund: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: A link to refund the payment, where applicable - example: - self: - href: "https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44" - actions: - href: "https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/actions" - refund: - href: "https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/refund" diff --git a/spec/components/schemas/Payments/PaymentAcceptedResponse.yaml b/spec/components/schemas/Payments/PaymentAcceptedResponse.yaml deleted file mode 100644 index f9b1d1abb..000000000 --- a/spec/components/schemas/Payments/PaymentAcceptedResponse.yaml +++ /dev/null @@ -1,53 +0,0 @@ -type: object -description: Payment response -required: - - id - - status -properties: - id: - description: Payment unique identifier - readOnly: true - allOf: - - $ref: '#/components/schemas/PaymentId' - status: - type: string - description: The status of the payment - enum: - - Pending - reference: - type: string - description: Your reference for the payment request - example: ORD-5023-4E89 - customer: - type: object - description: The customer associated with the payment if provided in the request - allOf: - - $ref: '#/components/schemas/PaymentResponseCustomer' - 3ds: - type: object - description: Provides 3-D Secure enrollment status - allOf: - - $ref: '#/components/schemas/3dsEnrollmentData' - _links: - type: object - description: Payment links - readOnly: true - minItems: 2 - properties: - self: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: The URI of the payment - example: - href: "https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44" - redirect: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: The URI that the customer should be redirected to, to complete the payment - example: - href: "https://api.checkout.com/3ds/pay_y3oqhf46pyzuxjbcn2giaqnb44" - required: - - self - diff --git a/spec/components/schemas/Payments/PaymentAction.yaml b/spec/components/schemas/Payments/PaymentAction.yaml deleted file mode 100644 index 91a527c62..000000000 --- a/spec/components/schemas/Payments/PaymentAction.yaml +++ /dev/null @@ -1,54 +0,0 @@ -type: object -required: - - id - - type - - amount - - response_code - - processed_on -properties: - id: - description: The unique identifier of the payment action - allOf: - - $ref: '#/components/schemas/ActionId' - type: - type: string - description: The type of action - enum: - - Authorization - - Card Verification - - Void - - Capture - - Refund - processed_on: - description: The date/time the action was processed - allOf: - - $ref: '#/components/schemas/ServerTimestamp' - amount: - type: integer - description: The action amount - example: 6540 - approved: - type: boolean - description: Whether the action was successful - example: true - auth_code: - type: string - description: The acquirer authorization code for cards - example: "643381" - response_code: - type: string - description: Gateway response code - example: "10000" - response_summary: - type: string - description: The Gateway response summary - example: "Approved" - reference: - type: string - description: Your reference for the action - example: ORD-5023-4E89 - metadata: - type: object - description: Set of key/value pairs that you can attach to an action - - diff --git a/spec/components/schemas/Payments/PaymentActionSummary.yaml b/spec/components/schemas/Payments/PaymentActionSummary.yaml deleted file mode 100644 index f07a1de81..000000000 --- a/spec/components/schemas/Payments/PaymentActionSummary.yaml +++ /dev/null @@ -1,28 +0,0 @@ -type: object -required: - - id - - type - - response_code -properties: - id: - description: The unique identifier of the payment action - allOf: - - $ref: '#/components/schemas/ActionId' - type: - type: string - description: The type of action - enum: - - Authorization - - Card Verification - - Void - - Capture - - Refund - response_code: - type: string - description: Gateway response code - example: "10000" - response_summary: - type: string - description: The Gateway response summary - example: "Approved" - diff --git a/spec/components/schemas/Payments/PaymentActionsResponse.yaml b/spec/components/schemas/Payments/PaymentActionsResponse.yaml deleted file mode 100644 index 322656665..000000000 --- a/spec/components/schemas/Payments/PaymentActionsResponse.yaml +++ /dev/null @@ -1,32 +0,0 @@ -type: array -items: - $ref: '#/components/schemas/PaymentAction' -minItems: 1 -description: | - The payment actions -example: - - "id": "act_fd3h6evhpn3uxdoqbuu3lqnqbm" - "type": "Refund" - "processed_on": "2018-01-20T10:30:48Z" - "amount": 1000 - "approved": true - "response_code": "10000" - "response_summary": "Approved" - - "id": "act_gefycn3jcvuupboxfmqrhk2aym" - "type": "Capture" - "processed_on": "2018-01-17T10:30:48Z" - "amount": 6540 - "approved": true - "response_code": "10000" - "response_summary": "Approved" - "metadata": - "shipping_ref": "MQIBN2" - - "id": "act_y3oqhf46pyzuxjbcn2giaqnb44" - "type": "Authorization" - "processed_on": "2018-01-17T09:30:48Z" - "amount": 6540 - "approved": true - "auth_code": "643381" - "response_code": "10000" - "response_summary": "Approved" - "reference": "ORD-5023-4E89" \ No newline at end of file diff --git a/spec/components/schemas/Payments/PaymentDestination.yaml b/spec/components/schemas/Payments/PaymentDestination.yaml deleted file mode 100644 index 0634cb125..000000000 --- a/spec/components/schemas/Payments/PaymentDestination.yaml +++ /dev/null @@ -1,15 +0,0 @@ -type: object -description: | - A destination for OpenPay payments -properties: - id: - type: string - description: The OpenPay account identifier - example: "vendor-123456" - amount: - type: integer - description: The amount to be credited to the destination in the major currency unit - example: 10.50 -required: - - id - - amount \ No newline at end of file diff --git a/spec/components/schemas/Payments/PaymentId.yaml b/spec/components/schemas/Payments/PaymentId.yaml deleted file mode 100644 index 6770e5531..000000000 --- a/spec/components/schemas/Payments/PaymentId.yaml +++ /dev/null @@ -1,5 +0,0 @@ -type: string -description: The payment identifier -maxLength: 30 -minLength: 30 -example: "pay_y3oqhf46pyzuxjbcn2giaqnb44" \ No newline at end of file diff --git a/spec/components/schemas/Payments/PaymentRecipient.yaml b/spec/components/schemas/Payments/PaymentRecipient.yaml deleted file mode 100644 index 46004d624..000000000 --- a/spec/components/schemas/Payments/PaymentRecipient.yaml +++ /dev/null @@ -1,27 +0,0 @@ -type: object -description: Required by VISA and MasterCard for domestic UK transactions processed by Financial Institutions. [Read more](https://docs.checkout.com/docs/requirements-for-financial-institutions) -properties: - dob: - type: string - format: date - description: The recipient's date of birth in yyyy-mm-dd format - example: "1985-05-15" - account_number: - type: string - description: The first six digits and the last four digits of the primary recipient's card, without spaces, or, up to ten characters of the primary recipient's account number - minLength: 10 - maxLength: 10 - example: "5555554444" - zip: - type: string - description: The first part of the UK postcode for example W1T 4TJ would be W1T - example: W1T - last_name: - type: string - description: The last name of the recipient - example: Jones -required: - - dob - - account_number - - zip - - last_name diff --git a/spec/components/schemas/Payments/PaymentRequest.yaml b/spec/components/schemas/Payments/PaymentRequest.yaml deleted file mode 100644 index a93fefbb9..000000000 --- a/spec/components/schemas/Payments/PaymentRequest.yaml +++ /dev/null @@ -1,123 +0,0 @@ -type: object -required: - - currency - - source -properties: - source: - $ref: '#/components/schemas/PaymentRequestSource' - amount: - type: integer - description: | - The payment amount in the major currency. - Omitting the amount or providing 0 will perform a card verification. - minimum: 0 - example: 6540 - currency: - type: string - description: | - The three-letter ISO currency code - example: USD - maxLength: 3 - minLength: 3 - payment_type: - type: string - description: Must be specified for card payments where the cardholder is not present (recurring or Merchant Offline Telephone Order) - enum: - - Regular - - Recurring - - MOTO - default: Regular - example: Recurring - reference: - type: string - description: A reference you can later use to identify this payment such as an order number - example: ORD-5023-4E89 - description: - type: string - description: A description of the payment - example: Set of 3 masks - capture: - type: boolean - description: Whether to capture the payment (if applicable) - default: true - example: true - capture_on: - description: | - An ISO 8601 timestamp that determines when the payment should be captured. - Providing this field will automatically set `capture` to true. - - allOf: - - $ref: '#/components/schemas/Timestamp' - customer: - type: object - description: Details of the customer associated with the payment - properties: - id: - type: string - description: | - The identifier of an existing customer. If neither customer `id` or `email` is provided - a new customer will be registered - example: cus_y3oqhf46pyzuxjbcn2giaqnb44 - email: - type: string - format: email - description: An optional email address to associate with the customer - example: jokershere@gmail.com - name: - type: string - description: The customer's name. This will only set the name for *new* customers - example: Jack Napier - billing_descriptor: - $ref: '#/components/schemas/BillingDescriptor' - shipping: - type: object - description: The payment shipping details - properties: - address: - description: The shipping address - allOf: - - $ref: '#/components/schemas/Address' - phone: - description: The phone number associated with the shipping address - allOf: - - $ref: '#/components/schemas/PhoneNumber' - 3ds: - $ref: '#/components/schemas/3dsRequest' - previous_payment_id: - type: string - description: | - For payments that use stored card details such as recurring payments, - an existing payment identifier from the recurring series or the Scheme Transaction Id. [Read more](https://docs.checkout.com/docs/stored-card-details). - example: "pay_fun26akvvjjerahhctaq2uzhu4" - risk: - $ref: '#/components/schemas/RiskRequest' - success_url: - type: string - format: uri - description: For redirect payment methods, overrides the default success redirect URL configured on your account - example: "http://example.com/payments/success" - failure_url: - type: string - format: uri - description: For redirect payment methods, overrides the default failure redirect URL configured on your account - example: "http://example.com/payments/fail" - payment_ip: - description: The IP address used to make the payment. Required for some risk checks. - allOf: - - $ref: '#/components/schemas/IPAddress' - recipient: - $ref: '#/components/schemas/PaymentRecipient' - processing: - type: object - description: Use the processing object to influence or override the data sent during card processing - properties: - mid: - type: string - description: Overrides the default Merchant/Acceptor identifier (MID) configured on your account - example: "1234567" - metadata: - type: object - description: Set of key/value pairs that you can attach to a payment. It can be useful for storing additional information in a structured format - example: - coupon_code: "NY2018" - partner_id: 123989 \ No newline at end of file diff --git a/spec/components/schemas/Payments/PaymentRequestSource.yaml b/spec/components/schemas/Payments/PaymentRequestSource.yaml deleted file mode 100644 index 4dae6d48d..000000000 --- a/spec/components/schemas/Payments/PaymentRequestSource.yaml +++ /dev/null @@ -1,30 +0,0 @@ -type: object -description: The source of the payment -discriminator: - propertyName: type - mapping: - token: '#/components/schemas/01_PaymentRequestTokenSource' - id: '#/components/schemas/02_PaymentRequestIdSource' - card: '#/components/schemas/03_PaymentRequestCardSource' - customer: '#/components/schemas/04_PaymentRequestCustomerSource' - network_token: '#/components/schemas/05_PaymentRequestNetworkTokenSource' - alipay: '#/components/schemas/PaymentRequestAlipaySource' - boleto: '#/components/schemas/PaymentRequestBoletoSource' - eps: '#/components/schemas/PaymentRequestEpsSource' - giropay: '#/components/schemas/PaymentRequestGiropaySource' - ideal: '#/components/schemas/PaymentRequestIdealSource' - klarna: '#/components/schemas/PaymentRequestKlarnaSource' - knet: '#/components/schemas/PaymentRequestKnetSource' - poli: '#/components/schemas/PaymentRequestPoliSource' - qiwi: '#/components/schemas/PaymentRequestQiwiSource' - safetypay: '#/components/schemas/PaymentRequestSafetyPaySource' - sofort: '#/components/schemas/PaymentRequestSofortSource' - bancontact: '#/components/schemas/PaymentRequestBancontactSource' - fawry: '#/components/schemas/PaymentRequestFawrySource' -required: - - type -properties: - type: - type: string - description: The payment source type - example: "card" \ No newline at end of file diff --git a/spec/components/schemas/Payments/PaymentResponse.yaml b/spec/components/schemas/Payments/PaymentResponse.yaml deleted file mode 100644 index 702163cfd..000000000 --- a/spec/components/schemas/Payments/PaymentResponse.yaml +++ /dev/null @@ -1,146 +0,0 @@ -type: object -description: Payment Response -required: - - id - - action_id - - amount - - currency - - approved - - status - - response_code - - processed_on - - source - - _links -properties: - id: - description: Payment unique identifier - allOf: - - $ref: '#/components/schemas/PaymentId' - action_id: - description: The unique identifier for the action performed against this payment - allOf: - - $ref: '#/components/schemas/ActionId' - amount: - type: integer - description: The payment amount - example: 6540 - currency: - type: string - description: The three-letter ISO currency code of the payment - example: USD - maxLength: 3 - minLength: 3 - approved: - type: boolean - description: Whether the authorization or capture was successful - example: true - status: - type: string - description: The status of the payment - enum: - - Authorized - - Pending - - Card Verified - - Captured - - Declined - example: Authorized - auth_code: - type: string - description: The acquirer authorization code if the payment was Authorized - example: "643381" - response_code: - type: string - description: Gateway response code - example: "10000" - response_summary: - type: string - description: The Gateway response summary - example: "Approved" - 3ds: - type: object - description: Provides 3-D Secure enrollment status if the payment was downgraded to non-3-D Secure - allOf: - - $ref: '#/components/schemas/3dsEnrollmentData' - example: - downgraded: true - enrolled: N - risk: - type: object - description: Returns the payments risk assessment results - properties: - flagged: - type: boolean - description: Whether the payment was flagged by a risk check - default: false - example: true - source: - description: The source of the payment - type: object - allOf: - - $ref: '#/components/schemas/PaymentResponseSource' - customer: - type: object - description: The customer associated with the payment if provided in the request - allOf: - - $ref: '#/components/schemas/PaymentResponseCustomer' - processed_on: - description: The date/time the payment was processed - allOf: - - $ref: '#/components/schemas/ServerTimestamp' - reference: - type: string - description: Your reference for the payment - example: ORD-5023-4E89 - eci: - type: string - description: | - The final Electronic Commerce Indicator security level used to authorize the payment. - Applicable for 3-D Secure, digital wallets and network token payments. - example: "06" - scheme_id: - type: string - description: | - The scheme transaction identifier - example: "489341065491658" - _links: - type: object - description: The links related to the payment - minItems: 2 - required: - - self - - actions - properties: - self: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: The URI of the payment - actions: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: A link to the payment's associated actions - void: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: A link to void the payment, where applicable - capture: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: A link to capture the payment, where applicable - refund: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: A link to refund the payment, where applicable - example: - self: - href: "https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44" - actions: - href: "https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/actions" - void: - href: "https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/voids" - capture: - href: "https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/capture" diff --git a/spec/components/schemas/Payments/PaymentResponseCustomer.yaml b/spec/components/schemas/Payments/PaymentResponseCustomer.yaml deleted file mode 100644 index bc7087289..000000000 --- a/spec/components/schemas/Payments/PaymentResponseCustomer.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -description: The customer to which this payment is linked -required: - - id -properties: - id: - type: string - description: The unique identifier of the customer. This can be passed as a source when making a payment - example: cus_y3oqhf46pyzuxjbcn2giaqnb44 - email: - type: string - description: The customer email address - example: jokershere@gmail.com - name: - type: string - description: The customer name - example: Jack Napier \ No newline at end of file diff --git a/spec/components/schemas/Payments/PaymentResponseSource.yaml b/spec/components/schemas/Payments/PaymentResponseSource.yaml deleted file mode 100644 index 8588f3c08..000000000 --- a/spec/components/schemas/Payments/PaymentResponseSource.yaml +++ /dev/null @@ -1,44 +0,0 @@ -type: object -description: Payment source - -discriminator: - propertyName: type - mapping: - card: '#/components/schemas/01_PaymentResponseCardSource' - alipay: '#/components/schemas/PaymentResponseAlipaySource' - boleto: '#/components/schemas/PaymentResponseBoletoSource' - eps: '#/components/schemas/PaymentResponseEpsSource' - giropay: '#/components/schemas/PaymentResponseGiropaySource' - ideal: '#/components/schemas/PaymentResponseIdealSource' - klarna: '#/components/schemas/PaymentResponseKlarnaSource' - knet: '#/components/schemas/PaymentResponseKnetSource' - poli: '#/components/schemas/PaymentResponsePoliSource' - qiwi: '#/components/schemas/PaymentResponseQiwiSource' - safetypay: '#/components/schemas/PaymentResponseSafetyPaySource' - sofort: '#/components/schemas/PaymentResponseSofortSource' - bancontact: '#/components/schemas/PaymentResponseBancontactSource' - fawry: '#/components/schemas/PaymentResponseFawrySource' -required: - - type - -properties: - type: - type: string - description: | - The payment source type. For any payment request sources that result in a card token (token, source ID etc.) - this will be `card` otherwise the name of the alternative payment method. - example: "card" - id: - type: string - description: | - The payment source identifier that can be used for subsequent payments. - For new sources, this will only be returned if the payment was approved. - example: src_wmlfc3zyhqzehihu7giusaaawu - billing_address: - description: The payment source owner's billing address - allOf: - - $ref: '#/components/schemas/Address' - phone: - description: The payment source owner's phone number - allOf: - - $ref: '#/components/schemas/PhoneNumber' \ No newline at end of file diff --git a/spec/components/schemas/Payments/RefundAcceptedResponse.yaml b/spec/components/schemas/Payments/RefundAcceptedResponse.yaml deleted file mode 100644 index 236ef358c..000000000 --- a/spec/components/schemas/Payments/RefundAcceptedResponse.yaml +++ /dev/null @@ -1,29 +0,0 @@ -type: object -description: Refund response -required: - - action_id -properties: - action_id: - description: The unique identifier for the refund action - allOf: - - $ref: '#/components/schemas/ActionId' - reference: - type: string - description: Your reference for the refund request - example: ORD-5023-4E89 - _links: - type: object - description: Refund links - readOnly: true - minItems: 2 - properties: - payment: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: The URI of the payment to be refund. Use this to check the status of the payment - example: - href: "https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44" - required: - - payment - diff --git a/spec/components/schemas/Payments/RefundRequest.yaml b/spec/components/schemas/Payments/RefundRequest.yaml deleted file mode 100644 index d443e06c0..000000000 --- a/spec/components/schemas/Payments/RefundRequest.yaml +++ /dev/null @@ -1,18 +0,0 @@ -type: object -properties: - amount: - type: integer - description: | - The amount to refund in the major currency. If not specified, the full payment amount will be refunded - minimum: 0 - example: 6540 - reference: - type: string - description: A reference you can later use to identify this refund request - example: ORD-5023-4E89 - metadata: - type: object - description: Set of key/value pairs that you can attach to the refund request. It can be useful for storing additional information in a structured format - example: - coupon_code: "NY2018" - partner_id: 123989 \ No newline at end of file diff --git a/spec/components/schemas/Payments/RequestSources/01_PaymentRequestTokenSource.yaml b/spec/components/schemas/Payments/RequestSources/01_PaymentRequestTokenSource.yaml deleted file mode 100644 index fbf223c85..000000000 --- a/spec/components/schemas/Payments/RequestSources/01_PaymentRequestTokenSource.yaml +++ /dev/null @@ -1,21 +0,0 @@ -type: object -description: A token payment source -required: - - token -allOf: - - $ref: "#/components/schemas/PaymentRequestSource" - - type: object - properties: - token: - type: string - description: The Checkout.com token for example a card or wallet or token - example: tok_ubfj2q76miwundwlk72vxt2i7q - billing_address: - description: The payment source owner's billing address. This will override the billing address specified during tokenisation - allOf: - - $ref: '#/components/schemas/Address' - phone: - description: The payment source owner's phone number. This will override the phone number specified during tokenisation - allOf: - - $ref: '#/components/schemas/PhoneNumber' - diff --git a/spec/components/schemas/Payments/RequestSources/02_PaymentRequestIdSource.yaml b/spec/components/schemas/Payments/RequestSources/02_PaymentRequestIdSource.yaml deleted file mode 100644 index 0388578f9..000000000 --- a/spec/components/schemas/Payments/RequestSources/02_PaymentRequestIdSource.yaml +++ /dev/null @@ -1,18 +0,0 @@ -type: object -description: An existing payment source -required: - - id -allOf: - - $ref: "#/components/schemas/PaymentRequestSource" - - type: object - properties: - id: - type: string - description: The payment source identifer for example, a card source identifier - example: src_wmlfc3zyhqzehihu7giusaaawu - cvv: - type: string - description: The card verification value/code (for card sources). 3 digits, except for Amex (4 digits). - example: "956" - minLength: 3 - maxLength: 4 \ No newline at end of file diff --git a/spec/components/schemas/Payments/RequestSources/03_PaymentRequestCardSource.yaml b/spec/components/schemas/Payments/RequestSources/03_PaymentRequestCardSource.yaml deleted file mode 100644 index 6ffb29fb5..000000000 --- a/spec/components/schemas/Payments/RequestSources/03_PaymentRequestCardSource.yaml +++ /dev/null @@ -1,47 +0,0 @@ -type: object -description: A card payment source -allOf: - - $ref: "#/components/schemas/PaymentRequestSource" - - type: object - required: - - type - - number - - expiry_month - - expiry_year - properties: - number: - type: string - description: The card number - example: "4543474002249996" - expiry_month: - type: integer - description: The two-digit expiry month of the card - minimum: 1 - example: 6 - expiry_year: - type: integer - description: The four-digit expiry year of the card - example: 2025 - name: - type: string - description: The card-holder name - example: "Bruce Wayne" - cvv: - type: string - description: The card verification value/code. 3 digits, except for Amex (4 digits). - example: "956" - minLength: 3 - maxLength: 4 - stored: - type: boolean - description: Must be set to `true` for payments that use stored card details. [Read more](https://docs.checkout.com/v2/docs/stored-card-details). - default: false - example: true - billing_address: - description: The payment source owner's billing address - allOf: - - $ref: '#/components/schemas/Address' - phone: - description: The payment source owner's phone number - allOf: - - $ref: '#/components/schemas/PhoneNumber' \ No newline at end of file diff --git a/spec/components/schemas/Payments/RequestSources/04_PaymentRequestCustomerSource.yaml b/spec/components/schemas/Payments/RequestSources/04_PaymentRequestCustomerSource.yaml deleted file mode 100644 index 55bcb3c8e..000000000 --- a/spec/components/schemas/Payments/RequestSources/04_PaymentRequestCustomerSource.yaml +++ /dev/null @@ -1,16 +0,0 @@ -type: object -description: A customer source -allOf: - - $ref: "#/components/schemas/PaymentRequestSource" - - type: object - properties: - id: - type: string - description: The customer identifier, required if `email` is not provided - example: cus_y3oqhf46pyzuxjbcn2giaqnb44 - email: - type: string - format: email - description: The customer email address, required if `id` is not provided - example: jokershere@gmail.com - diff --git a/spec/components/schemas/Payments/RequestSources/05_PaymentRequestNetworkTokenSource.yaml b/spec/components/schemas/Payments/RequestSources/05_PaymentRequestNetworkTokenSource.yaml deleted file mode 100644 index 3ff1ce5a0..000000000 --- a/spec/components/schemas/Payments/RequestSources/05_PaymentRequestNetworkTokenSource.yaml +++ /dev/null @@ -1,67 +0,0 @@ -type: object -description: A network token payment source -allOf: - - $ref: "#/components/schemas/PaymentRequestSource" - - type: object - required: - - type - - token - - expiry_month - - expiry_year - - token_type - - cryptogram - - eci - properties: - token: - type: string - description: The network token PAN - example: "4543474002249996" - expiry_month: - type: integer - description: The two-digit expiry month of the token - minimum: 1 - example: 6 - expiry_year: - type: integer - description: The four-digit expiry year of the token - example: 2025 - token_type: - type: string - description: The type of token - enum: - - vts - - mdes - - applepay - - googlepay - cryptogram: - type: string - description: Base64 encoded cryptographic identifier (TAVV) used by card schemes to validate the token verification result. Optional if `previous_payment_id` is specified and `3ds.enabled` is false. - example: hv8mUFzPzRZoCAAAAAEQBDMAAAA= - eci: - type: string - description: | - The Electronic Commerce Indicator security level associated with the token. Optional if `previous_payment_id` is specified and `3ds.enabled` is false. - example: "05" - stored: - type: boolean - description: Must be set to `true` for payments that use stored card details. [Read more](https://docs.checkout.com/v2/docs/stored-card-details). - default: false - example: true - name: - type: string - description: The cardholder name - example: "Bruce Wayne" - cvv: - type: string - description: The card verification value/code. 3 digits, except for Amex (4 digits). - example: "956" - minLength: 3 - maxLength: 4 - billing_address: - description: The cardholder's billing address - allOf: - - $ref: '#/components/schemas/Address' - phone: - description: The cardholder's phone number - allOf: - - $ref: '#/components/schemas/PhoneNumber' diff --git a/spec/components/schemas/Payments/RequestSources/PaymentRequestAlipaySource.yaml b/spec/components/schemas/Payments/RequestSources/PaymentRequestAlipaySource.yaml deleted file mode 100644 index 33c8b7bc1..000000000 --- a/spec/components/schemas/Payments/RequestSources/PaymentRequestAlipaySource.yaml +++ /dev/null @@ -1,4 +0,0 @@ -type: object -description: Alipay Source -allOf: - - $ref: "#/components/schemas/PaymentRequestSource" \ No newline at end of file diff --git a/spec/components/schemas/Payments/RequestSources/PaymentRequestBancontactSource.yaml b/spec/components/schemas/Payments/RequestSources/PaymentRequestBancontactSource.yaml deleted file mode 100644 index 1b6fa3ae0..000000000 --- a/spec/components/schemas/Payments/RequestSources/PaymentRequestBancontactSource.yaml +++ /dev/null @@ -1,28 +0,0 @@ -### -# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. -### -type: object -description: 'Bancontact Source' -allOf: - - - $ref: '#/components/schemas/PaymentRequestSource' - - - type: object - required: - - payment_country - - account_holder_name - properties: - payment_country: - maxLength: 2 - minLength: 2 - type: string - description: 'The 2-letter ISO country code of the country in which the payment instrument is issued/operated.' - account_holder_name: - maxLength: 100 - minLength: 3 - type: string - description: 'The account holder.' - billing_descriptor: - maxLength: 65534 - type: string - description: 'Payment billing descriptor.' diff --git a/spec/components/schemas/Payments/RequestSources/PaymentRequestBoletoSource.yaml b/spec/components/schemas/Payments/RequestSources/PaymentRequestBoletoSource.yaml deleted file mode 100644 index 4688c24ae..000000000 --- a/spec/components/schemas/Payments/RequestSources/PaymentRequestBoletoSource.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: object -description: AstroPay Boleto Source -required: - - birthDate - - cpf - - customerName -allOf: - - $ref: "#/components/schemas/PaymentRequestSource" - - type: object - properties: - birthDate: - type: string - description: The date of birth (YYYY-MM-DD) - example: 1977-04-28 - cpf: - type: string - description: The Brazilian personal tax identifier (Cadastro de Pessoas Físicas) - example: 123.456.789-00 - customerName: - type: string - description: The customer's name - example: Igor Toupee \ No newline at end of file diff --git a/spec/components/schemas/Payments/RequestSources/PaymentRequestEpsSource.yaml b/spec/components/schemas/Payments/RequestSources/PaymentRequestEpsSource.yaml deleted file mode 100644 index 619a0af0e..000000000 --- a/spec/components/schemas/Payments/RequestSources/PaymentRequestEpsSource.yaml +++ /dev/null @@ -1,21 +0,0 @@ -### -# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. -### -type: object -description: 'Eps Source' -allOf: - - - $ref: '#/components/schemas/PaymentRequestSource' - - - type: object - required: - - purpose - properties: - purpose: - maxLength: 27 - type: string - description: 'Purpose of the payment as appearing on customer''s bank statement.' - bic: - maxLength: 11 - type: string - description: 'BIC (8 or 11-digits)' diff --git a/spec/components/schemas/Payments/RequestSources/PaymentRequestFawrySource.yaml b/spec/components/schemas/Payments/RequestSources/PaymentRequestFawrySource.yaml deleted file mode 100644 index 566bd72bc..000000000 --- a/spec/components/schemas/Payments/RequestSources/PaymentRequestFawrySource.yaml +++ /dev/null @@ -1,58 +0,0 @@ -### -# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. -### -type: object -description: 'Fawry Source' -allOf: - - - $ref: '#/components/schemas/PaymentRequestSource' - - - type: object - required: - - description - - products - - customer_email - - customer_mobile - properties: - description: - maxLength: 265 - type: string - description: 'The payment description.' - customer_profile_id: - type: string - description: 'The customer''s id within merchant''s system.' - customer_email: - type: string - description: 'The customer''s email address.' - customer_mobile: - type: string - description: 'The customer''s mobile phone number.' - expires_on: - type: string - description: 'The date on which the payment expires.' - format: 'ISO 8601 date and time' - products: - type: array - items: - required: - - product_id - - quantity - - price - - description - type: object - properties: - product_id: - maxLength: 265 - type: string - description: 'The id of the product.' - quantity: - type: integer - description: 'The quantity of the product.' - price: - type: integer - description: 'The price of the item. Expressed using Checkout.com''s standard rules for calculating payment values.' - description: - maxLength: 265 - type: string - description: 'The description of the product.' - description: 'List of Products' diff --git a/spec/components/schemas/Payments/RequestSources/PaymentRequestGiropaySource.yaml b/spec/components/schemas/Payments/RequestSources/PaymentRequestGiropaySource.yaml deleted file mode 100644 index caf1203ca..000000000 --- a/spec/components/schemas/Payments/RequestSources/PaymentRequestGiropaySource.yaml +++ /dev/null @@ -1,36 +0,0 @@ -### -# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. -### -type: object -description: 'Giropay Source' -allOf: - - - $ref: '#/components/schemas/PaymentRequestSource' - - - type: object - required: - - purpose - properties: - purpose: - maxLength: 27 - type: string - description: 'Purpose of the payment as appearing on customer''s bank statement.' - bic: - maxLength: 11 - type: string - description: 'BIC (8 or 11-digits)' - info_fields: - maxItems: 5 - type: array - items: - type: object - properties: - label: - maxLength: 30 - type: string - description: 'Additional information field which is shown on the payment form (label)' - text: - maxLength: 80 - type: string - description: 'Additional information field which is shown on the payment form (text)' - additionalProperties: false diff --git a/spec/components/schemas/Payments/RequestSources/PaymentRequestIdealSource.yaml b/spec/components/schemas/Payments/RequestSources/PaymentRequestIdealSource.yaml deleted file mode 100644 index 74b2f36a6..000000000 --- a/spec/components/schemas/Payments/RequestSources/PaymentRequestIdealSource.yaml +++ /dev/null @@ -1,26 +0,0 @@ -### -# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. -### -type: object -description: 'Ideal Source' -allOf: - - - $ref: '#/components/schemas/PaymentRequestSource' - - - type: object - required: - - description - - bic - properties: - description: - maxLength: 35 - type: string - description: "Description of the product(s) or services being paid for. This field must not contain characters that can lead to problems (for example those occurring in HTML editing codes). To prevent any possible errors most iDEAL systems will reject any description that contains HTML-tags and such other code.\n" - bic: - maxLength: 11 - type: string - description: 'BIC (8 or 11-digits). In iDEAL-lingo this is also called issuerID' - language: - maxLength: 2 - type: string - description: "This field enables the Issuer's site to select the Consumer's preferred language (e.g. the language selected on the Merchant's site), if the Issuer's site supports this. Code list in accordance with ISO 639-1. (Dutch = 'nl', English = 'en'). If a non-supported or non-existing language is entered the standard language of the Issuer is used. It is recommended to use 'nl' by default since not all Issuers support other languages.\n" diff --git a/spec/components/schemas/Payments/RequestSources/PaymentRequestKlarnaSource.yaml b/spec/components/schemas/Payments/RequestSources/PaymentRequestKlarnaSource.yaml deleted file mode 100644 index bb304c758..000000000 --- a/spec/components/schemas/Payments/RequestSources/PaymentRequestKlarnaSource.yaml +++ /dev/null @@ -1,76 +0,0 @@ -### -# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. -### -type: object -description: 'Klarna Source' -allOf: - - - $ref: '#/components/schemas/PaymentRequestSource' - - - type: object - required: - - authorization_token - - locale - - purchase_country - - billing_address - - tax_amount - - products - properties: - authorization_token: - type: string - description: 'Klarna authentication token, obtained by the merchant during client transaction authorization.' - locale: - type: string - description: 'RFC 1766 customer''s locale. Optional, default taken from business settings.' - x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__locale' - purchase_country: - type: string - description: 'ISO 3166 alpha-2 purchase country. Optional, default taken from business settings.' - x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__purchase_country' - auto_capture: - type: boolean - description: 'Allow merchant to trigger auto capturing.' - x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__auto_capture' - billing_address: - type: object - description: "Customer's billing address. \nThis object is passed directly to Klarna as `billing_address`, \nso for the object definition use the [Klarna documentation](https://developers.klarna.com/api/#payments-api__create-a-new-order__billing_address)." - x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__billing_address' - x-cko-passthrough: true - shipping_address: - type: object - description: "Customer's shipping address. \nThis object is passed directly to Klarna as `shipping_address`, \nso for the object definition use the [Klarna documentation](https://developers.klarna.com/api/#payments-api__create-a-new-order__shipping_address)." - x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__shipping_address' - x-cko-passthrough: true - tax_amount: - type: integer - description: 'Total tax amount of the order.' - x-klarna-name: order_tax_amount - x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__order_tax_amount' - products: - type: array - description: "The applicable order lines. \nThis object is passed directly to Klarna as `order_lines`, \nso for the object definition use the [Klarna documentation](https://developers.klarna.com/api/#payments-api__create-a-new-order__order_lines)." - x-klarna-name: order_lines - x-cko-passthrough: true - x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__order_lines' - customer: - type: object - description: "Information about the liable customer of the order. \nThis object is passed directly to Klarna as `customer`, \nso for the object definition use the [Klarna documentation](https://developers.klarna.com/api/#payments-api__create-a-new-order__customer)." - x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__customer' - x-cko-passthrough: true - merchant_reference1: - type: string - description: 'Used for storing merchant''s internal order number or other reference. If set, will be shown on the confirmation page as "order number" (max 255 characters).' - x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__merchant_reference1' - merchant_reference2: - type: string - description: 'Used for storing merchant''s internal order number or other reference (max 255 characters).' - x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__merchant_reference2' - merchant_data: - type: string - description: 'Pass through field (max 1024 characters).' - x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__merchant_data' - attachment: - type: object - description: "Additional purchase information required for some industries. \nThis object is passed directly to Klarna as `attachment`, \nso for the object definition use the [Klarna documentation](https://developers.klarna.com/api/#payments-api__create-a-new-order__attachment)." - x-cko-passthrough: true - x-klarna-docs: 'https://developers.klarna.com/api/#payments-api__create-a-new-order__attachment' diff --git a/spec/components/schemas/Payments/RequestSources/PaymentRequestKnetSource.yaml b/spec/components/schemas/Payments/RequestSources/PaymentRequestKnetSource.yaml deleted file mode 100644 index b40830a25..000000000 --- a/spec/components/schemas/Payments/RequestSources/PaymentRequestKnetSource.yaml +++ /dev/null @@ -1,80 +0,0 @@ -type: object -description: 'KNet Source' -allOf: - - - $ref: '#/components/schemas/PaymentRequestSource' - - - type: object - required: - - language - properties: - language: - maxLength: 2 - enum: - - ar - - en - type: string - description: >- - This field enables the Issuer's site to select the Consumer's preferred language - (e.g. the language selected on the Merchant's site), if the Issuer's site supports this. - Code list in accordance with ISO 639-1. (Arabic = 'ar', English = 'en'). - NOTE: 'ar' corresponds to 'ARA' and 'en' - to 'USA' values accepted by KNet Gateway. - user_defined_field1: - maxLength: 255 - type: string - description: >- - User defined field can be used to pass and store any additional transaction data - required to be archived with the transaction and available as a searching criteria. - Only alphanumeric characters and spaces are allowed. - user_defined_field2: - maxLength: 255 - type: string - description: >- - User defined field can be used to pass and store any additional transaction data - required to be archived with the transaction and available as a searching criteria. - Only alphanumeric characters and spaces are allowed. - user_defined_field3: - maxLength: 255 - type: string - description: >- - User defined field can be used to pass and store any additional transaction data - required to be archived with the transaction and available as a searching criteria. - Only alphanumeric characters and spaces are allowed. - Note that this field must be omitted when the card_token field is not empty. This restriction - exists because a card token is passed to KNet Gateway as user defined field 3. - user_defined_field4: - maxLength: 255 - type: string - description: >- - User defined field can be used to pass and store any additional transaction data - required to be archived with the transaction and available as a searching criteria. - Only alphanumeric characters and spaces are allowed. - user_defined_field5: - maxLength: 255 - type: string - description: >- - User defined field can be used to pass and store any additional transaction data - required to be archived with the transaction and available as a searching criteria. - Only alphanumeric characters and spaces are allowed. - Note that this field must be omitted when the ptlf field is not empty. This restriction - exists because a PTLF value is passed to KNet Gateway as user defined field 5. - card_token: - type: string - pattern: '^[0-9]{8}$' - description: >- - This token allows re-usage of card details for multiple payments. - This 8-digit token should be generated by a merchant. When a subsequent payment - is initialized with the same card token, a customer is presented with two options. - The customer can choose to pay with KFast (doesn't need to enter card details again), - or with KNet as usual. The payment flow stays the same i.e. a merchant should redirect - a customer to the redirect URL which is provided in the payment creation response. - Note that user_defined_field3 must be omitted when the card_token field is not empty. This restriction - exists because a card token is passed to KNet Gateway as user defined field 3. - ptlf: - maxLength: 45 - type: string - description: >- - This is an ID for merchant PTLF functionality tracking. - Only alphanumeric characters are allowed. - Note that user_defined_field5 must be omitted when the ptlf field is not empty. This restriction - exists because a PTLF value is passed to KNet Gateway as user defined field 5. diff --git a/spec/components/schemas/Payments/RequestSources/PaymentRequestPoliSource.yaml b/spec/components/schemas/Payments/RequestSources/PaymentRequestPoliSource.yaml deleted file mode 100644 index 3a442c07c..000000000 --- a/spec/components/schemas/Payments/RequestSources/PaymentRequestPoliSource.yaml +++ /dev/null @@ -1,4 +0,0 @@ -type: object -description: POLi Source -allOf: - - $ref: "#/components/schemas/PaymentRequestSource" \ No newline at end of file diff --git a/spec/components/schemas/Payments/RequestSources/PaymentRequestQiwiSource.yaml b/spec/components/schemas/Payments/RequestSources/PaymentRequestQiwiSource.yaml deleted file mode 100644 index 0670f9c77..000000000 --- a/spec/components/schemas/Payments/RequestSources/PaymentRequestQiwiSource.yaml +++ /dev/null @@ -1,12 +0,0 @@ -type: object -description: QIWI Source -required: - - walletId -allOf: - - $ref: "#/components/schemas/PaymentRequestSource" - - type: object - properties: - walletId: - type: string - description: The QIWI wallet ID - example: +78000001234 \ No newline at end of file diff --git a/spec/components/schemas/Payments/RequestSources/PaymentRequestSafetyPaySource.yaml b/spec/components/schemas/Payments/RequestSources/PaymentRequestSafetyPaySource.yaml deleted file mode 100644 index ac1f12a9f..000000000 --- a/spec/components/schemas/Payments/RequestSources/PaymentRequestSafetyPaySource.yaml +++ /dev/null @@ -1,4 +0,0 @@ -type: object -description: SafetyPay Source -allOf: - - $ref: "#/components/schemas/PaymentRequestSource" \ No newline at end of file diff --git a/spec/components/schemas/Payments/RequestSources/PaymentRequestSofortSource.yaml b/spec/components/schemas/Payments/RequestSources/PaymentRequestSofortSource.yaml deleted file mode 100644 index d741752d7..000000000 --- a/spec/components/schemas/Payments/RequestSources/PaymentRequestSofortSource.yaml +++ /dev/null @@ -1,4 +0,0 @@ -type: object -description: Sofort Source -allOf: - - $ref: "#/components/schemas/PaymentRequestSource" \ No newline at end of file diff --git a/spec/components/schemas/Payments/ResponseSources/01_PaymentResponseCardSource.yaml b/spec/components/schemas/Payments/ResponseSources/01_PaymentResponseCardSource.yaml deleted file mode 100644 index 001ba086f..000000000 --- a/spec/components/schemas/Payments/ResponseSources/01_PaymentResponseCardSource.yaml +++ /dev/null @@ -1,86 +0,0 @@ -type: object -description: A card payment source -allOf: - - $ref: "#/components/schemas/PaymentResponseSource" - - type: object - required: - - expiry_month - - expiry_year - - last4 - - fingerprint - - bin - properties: - expiry_month: - type: integer - description: The two-digit expiry month - minimum: 1 - example: 6 - expiry_year: - type: integer - description: The four-digit expiry year - example: 2025 - name: - type: string - description: The card-holder name - example: "Bruce Wayne" - scheme: - type: string - description: The card scheme - example: "VISA" - last4: - type: string - description: The last four digits of the card number - example: "9996" - fingerprint: - type: string - description: Uniquely identifies this particular card number. You can use this to compare cards across customers - example: "F639CAB2745BEE4140BF86DF6B6D6" - bin: - type: string - description: The card issuer BIN - example: "454347" - card_type: - type: string - description: The card type - enum: - - Credit - - Debit - - Prepaid - example: Credit - card_category: - type: string - description: The card category - enum: - - Consumer - - Commercial - example: Consumer - issuer: - type: string - description: The name of the card issuer - example: "GOTHAM STATE BANK" - issuer_country: - type: string - maxLength: 2 - minLength: 2 - description: The card issuer country ISO-2 code - example: "US" - product_id: - type: string - description: The issuer/card scheme product identifier - example: "F" - product_type: - type: string - description: The issuer/card scheme product type - example: CLASSIC - avs_check: - type: string - description: The Address Verification System check result - example: S - cvv_check: - type: string - description: The CVV check result - example: Y - payment_account_reference: - type: string - description: A unique reference to the underlying card for network tokens e.g. Apple Pay/Google Pay - example: "EUNIX9AX7THOOJIEJ2AP6OOFAHGH4" \ No newline at end of file diff --git a/spec/components/schemas/Payments/ResponseSources/PaymentResponseAlipaySource.yaml b/spec/components/schemas/Payments/ResponseSources/PaymentResponseAlipaySource.yaml deleted file mode 100644 index 8a8411ad8..000000000 --- a/spec/components/schemas/Payments/ResponseSources/PaymentResponseAlipaySource.yaml +++ /dev/null @@ -1,4 +0,0 @@ -type: object -description: An Alipay payment source -allOf: - - $ref: "#/components/schemas/PaymentResponseSource" \ No newline at end of file diff --git a/spec/components/schemas/Payments/ResponseSources/PaymentResponseBancontactSource.yaml b/spec/components/schemas/Payments/ResponseSources/PaymentResponseBancontactSource.yaml deleted file mode 100644 index 1b0b63db0..000000000 --- a/spec/components/schemas/Payments/ResponseSources/PaymentResponseBancontactSource.yaml +++ /dev/null @@ -1,15 +0,0 @@ -### -# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. -### -type: object -description: 'Bancontact Source' -allOf: - - - $ref: '#/components/schemas/PaymentResponseSource' - - - type: object - properties: - description: - maxLength: 65534 - type: string - description: 'Payment description' diff --git a/spec/components/schemas/Payments/ResponseSources/PaymentResponseBoletoSource.yaml b/spec/components/schemas/Payments/ResponseSources/PaymentResponseBoletoSource.yaml deleted file mode 100644 index 977e8648c..000000000 --- a/spec/components/schemas/Payments/ResponseSources/PaymentResponseBoletoSource.yaml +++ /dev/null @@ -1,4 +0,0 @@ -type: object -description: An AstroPay Boleto payment source -allOf: - - $ref: "#/components/schemas/PaymentResponseSource" \ No newline at end of file diff --git a/spec/components/schemas/Payments/ResponseSources/PaymentResponseEpsSource.yaml b/spec/components/schemas/Payments/ResponseSources/PaymentResponseEpsSource.yaml deleted file mode 100644 index d09f4cf42..000000000 --- a/spec/components/schemas/Payments/ResponseSources/PaymentResponseEpsSource.yaml +++ /dev/null @@ -1,26 +0,0 @@ -### -# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. -### -type: object -description: 'Eps Source' -allOf: - - - $ref: '#/components/schemas/PaymentResponseSource' - - - type: object - properties: - purpose: - maxLength: 27 - type: string - description: 'Purpose of the payment as appearing on customer''s bank statement.' - bic: - maxLength: 11 - type: string - description: 'Bank Identifier Code (BIC). It can be exactly 8 characters or 11 characters long.' - iban: - maxLength: 34 - type: string - description: 'International Bank Account Number (IBAN) without whitespaces.' - account_holder: - type: string - description: 'Account holder information.' diff --git a/spec/components/schemas/Payments/ResponseSources/PaymentResponseFawrySource.yaml b/spec/components/schemas/Payments/ResponseSources/PaymentResponseFawrySource.yaml deleted file mode 100644 index 0b6d339b2..000000000 --- a/spec/components/schemas/Payments/ResponseSources/PaymentResponseFawrySource.yaml +++ /dev/null @@ -1,18 +0,0 @@ -### -# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. -### -type: object -description: 'Fawry Source' -allOf: - - - $ref: '#/components/schemas/PaymentResponseSource' - - - type: object - properties: - description: - maxLength: 65534 - type: string - description: 'Payment description' - reference_number: - type: string - description: 'The customer pays using this number at Fawry''s outlets' diff --git a/spec/components/schemas/Payments/ResponseSources/PaymentResponseGiropaySource.yaml b/spec/components/schemas/Payments/ResponseSources/PaymentResponseGiropaySource.yaml deleted file mode 100644 index d493512db..000000000 --- a/spec/components/schemas/Payments/ResponseSources/PaymentResponseGiropaySource.yaml +++ /dev/null @@ -1,26 +0,0 @@ -### -# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. -### -type: object -description: 'Giropay Source' -allOf: - - - $ref: '#/components/schemas/PaymentResponseSource' - - - type: object - properties: - purpose: - maxLength: 27 - type: string - description: 'Purpose of the payment as appearing on customer''s bank statement.' - bic: - maxLength: 11 - type: string - description: 'Bank Identifier Code (BIC). It can be exactly 8 characters or 11 characters long.' - iban: - maxLength: 34 - type: string - description: 'International Bank Account Number (IBAN) without whitespaces.' - account_holder: - type: string - description: 'Account holder information.' diff --git a/spec/components/schemas/Payments/ResponseSources/PaymentResponseIdealSource.yaml b/spec/components/schemas/Payments/ResponseSources/PaymentResponseIdealSource.yaml deleted file mode 100644 index 3512b3edc..000000000 --- a/spec/components/schemas/Payments/ResponseSources/PaymentResponseIdealSource.yaml +++ /dev/null @@ -1,26 +0,0 @@ -### -# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. -### -type: object -description: 'Ideal Source' -allOf: - - - $ref: '#/components/schemas/PaymentResponseSource' - - - type: object - properties: - description: - maxLength: 27 - type: string - description: description - bic: - maxLength: 11 - type: string - description: "BIC (8 or 11-digits) BIC of the bank where the Consumer account is held. If governing law prevents Issuers outside the Netherlands from disclosing this information, field may be omitted.\n" - iban: - maxLength: 34 - type: string - description: "The IBAN of the Consumer Bank account used for payment. If governing law prevents Issuers outside the Netherlands from disclosing this information, field may be omitted.\n" - account_holder: - type: string - description: "Name of the Consumer according to the name of the account used for payment. In the exceptional case that the consumerName cannot be retrieved by the Issuer, this is filled with 'N/A'. If governing law prevents Issuers outside the Netherlands from disclosing this information, field may be omitted.\n" diff --git a/spec/components/schemas/Payments/ResponseSources/PaymentResponseKlarnaSource.yaml b/spec/components/schemas/Payments/ResponseSources/PaymentResponseKlarnaSource.yaml deleted file mode 100644 index 52d78862b..000000000 --- a/spec/components/schemas/Payments/ResponseSources/PaymentResponseKlarnaSource.yaml +++ /dev/null @@ -1,14 +0,0 @@ -### -# Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit. -### -type: object -description: 'Klarna Source' -allOf: - - - $ref: '#/components/schemas/PaymentResponseSource' - - - type: object - properties: - order_id: - type: string - description: 'Klarna order identifier' diff --git a/spec/components/schemas/Payments/ResponseSources/PaymentResponseKnetSource.yaml b/spec/components/schemas/Payments/ResponseSources/PaymentResponseKnetSource.yaml deleted file mode 100644 index 2ab4856c1..000000000 --- a/spec/components/schemas/Payments/ResponseSources/PaymentResponseKnetSource.yaml +++ /dev/null @@ -1,125 +0,0 @@ -type: object -description: 'KNet Source' -allOf: - - - $ref: '#/components/schemas/PaymentResponseSource' - - - type: object - properties: - language: - enum: - - ar - - en - type: string - description: >- - This field enables the Issuer's site to select the Consumer's preferred language - (e.g. the language selected on the Merchant's site), if the Issuer's site supports this. - Code list in accordance with ISO 639-1. (Arabic = 'ar', English = 'en'). - NOTE: 'ar' corresponds to 'ARA' and 'en' - to 'USA' values accepted by KNet Gateway. - user_defined_field1: - type: string - description: >- - User defined field can be used to pass and store any additional transaction data - required to be archived with the transaction and available as a searching criteria. - Only alphanumeric characters and spaces are allowed. - user_defined_field2: - type: string - description: >- - User defined field can be used to pass and store any additional transaction data - required to be archived with the transaction and available as a searching criteria. - Only alphanumeric characters and spaces are allowed. - user_defined_field3: - type: string - description: >- - User defined field can be used to pass and store any additional transaction data - required to be archived with the transaction and available as a searching criteria. - Only alphanumeric characters and spaces are allowed. - Note that this field must be omitted when the card_token field is not empty. This restriction - exists because a card token is passed to KNet Gateway as user defined field 3. - user_defined_field4: - type: string - description: >- - User defined field can be used to pass and store any additional transaction data - required to be archived with the transaction and available as a searching criteria. - Only alphanumeric characters and spaces are allowed. - user_defined_field5: - type: string - description: >- - User defined field can be used to pass and store any additional transaction data - required to be archived with the transaction and available as a searching criteria. - Only alphanumeric characters and spaces are allowed. - Note that this field must be omitted when the ptlf field is not empty. This restriction - exists because a PTLF value is passed to KNet Gateway as user defined field 5. - card_token: - type: string - pattern: '^[0-9]{8}$' - description: >- - This token allows re-usage of card details for multiple payments. - This 8-digit token should be generated by a merchant. When a subsequent payment - is initialized with the same card token, a customer is presented with two options. - The customer can choose to pay with KFast (doesn't need to enter card details again), - or with KNet as usual. The payment flow stays the same i.e. a merchant should redirect - a customer to the redirect URL which is provided in the payment creation response. - Note that user_defined_field3 must be omitted when the card_token field is not empty. This restriction - exists because a card token is passed to KNet Gateway as user defined field 3. - ptlf: - type: string - maxLength: 45 - description: >- - This is an ID for merchant PTLF functionality tracking. - Only alphanumeric characters are allowed. - Note that user_defined_field5 must be omitted when the ptlf field is not empty. This restriction - exists because a PTLF value is passed to KNet Gateway as user defined field 5. - knet_payment_id: - type: string - description: The payment identifier assigned by KNet Gateway. - knet_result: - type: string - description: >- - The state of the payment, returned by KNet Gateway after the customer is redirected from - the payment page. - inquiry_result: - type: string - description: >- - The state of the payment, retunrned by KNet Gateway in the response from the payment inquiry. - This field is populated in rare cases when the redirection from the payment page did not occur - properly. - bank_reference: - type: string - example: 123456789012 - description: 'The result transaction reference, given by some banks/institutions.' - knet_transaction_id: - type: string - example: 1234567890123456 - description: The transaction identifier assigned by KNet Gateway. - auth_code: - type: string - example: 999554 - description: The resulting authorization code from the issuing bank. - auth_response_code: - type: string - example: 5 - description: >- - The auth response code / reason code relating to the issuing bank - authorization code. - post_date: - type: string - example: 1127 - description: >- - The transaction date in the authorization system format, with the - value defined by the issuing bank, so may not match the actual - transaction date. The format is `MMDD`. - avr: - type: string - example: A - description: >- - The Address Verification Response returned from the address - verification service. - error: - type: string - example: IPAY0100044 - description: The KNET error code for transaction processing. - error_text: - type: string - example: IPAY0100044-Problem occured while loading payment page. - description: 'The KNET text detail for the error, including an error code.' diff --git a/spec/components/schemas/Payments/ResponseSources/PaymentResponsePoliSource.yaml b/spec/components/schemas/Payments/ResponseSources/PaymentResponsePoliSource.yaml deleted file mode 100644 index 9f83a50f1..000000000 --- a/spec/components/schemas/Payments/ResponseSources/PaymentResponsePoliSource.yaml +++ /dev/null @@ -1,4 +0,0 @@ -type: object -description: A POLi payment source -allOf: - - $ref: "#/components/schemas/PaymentResponseSource" \ No newline at end of file diff --git a/spec/components/schemas/Payments/ResponseSources/PaymentResponseQiwiSource.yaml b/spec/components/schemas/Payments/ResponseSources/PaymentResponseQiwiSource.yaml deleted file mode 100644 index 13239e38a..000000000 --- a/spec/components/schemas/Payments/ResponseSources/PaymentResponseQiwiSource.yaml +++ /dev/null @@ -1,4 +0,0 @@ -type: object -description: A QIWI payment source -allOf: - - $ref: "#/components/schemas/PaymentResponseSource" \ No newline at end of file diff --git a/spec/components/schemas/Payments/ResponseSources/PaymentResponseSafetyPaySource.yaml b/spec/components/schemas/Payments/ResponseSources/PaymentResponseSafetyPaySource.yaml deleted file mode 100644 index 6c9f9c434..000000000 --- a/spec/components/schemas/Payments/ResponseSources/PaymentResponseSafetyPaySource.yaml +++ /dev/null @@ -1,4 +0,0 @@ -type: object -description: A SafetyPay payment source -allOf: - - $ref: "#/components/schemas/PaymentResponseSource" \ No newline at end of file diff --git a/spec/components/schemas/Payments/ResponseSources/PaymentResponseSofortSource.yaml b/spec/components/schemas/Payments/ResponseSources/PaymentResponseSofortSource.yaml deleted file mode 100644 index e3504e517..000000000 --- a/spec/components/schemas/Payments/ResponseSources/PaymentResponseSofortSource.yaml +++ /dev/null @@ -1,4 +0,0 @@ -type: object -description: A Sofort payment source -allOf: - - $ref: "#/components/schemas/PaymentResponseSource" \ No newline at end of file diff --git a/spec/components/schemas/Payments/RiskRequest.yaml b/spec/components/schemas/Payments/RiskRequest.yaml deleted file mode 100644 index d89f88a8c..000000000 --- a/spec/components/schemas/Payments/RiskRequest.yaml +++ /dev/null @@ -1,10 +0,0 @@ -type: object -description: Configures the risk assessment performed during the processing of the payment -required: - - enabled -properties: - enabled: - type: boolean - description: Whether a risk assessment should be performed - default: true - example: false diff --git a/spec/components/schemas/Payments/VoidAcceptedResponse.yaml b/spec/components/schemas/Payments/VoidAcceptedResponse.yaml deleted file mode 100644 index 93f312722..000000000 --- a/spec/components/schemas/Payments/VoidAcceptedResponse.yaml +++ /dev/null @@ -1,29 +0,0 @@ -type: object -description: Void response -required: - - action_id -properties: - action_id: - description: The unique identifier for the void action - allOf: - - $ref: '#/components/schemas/ActionId' - reference: - type: string - description: Your reference for the void request - example: ORD-5023-4E89 - _links: - type: object - description: Void links - readOnly: true - minItems: 2 - properties: - payment: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: The URI of the payment to be refund. Use this to check the status of the payment - example: - href: "https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44" - required: - - payment - diff --git a/spec/components/schemas/Payments/VoidRequest.yaml b/spec/components/schemas/Payments/VoidRequest.yaml deleted file mode 100644 index c2c3209ff..000000000 --- a/spec/components/schemas/Payments/VoidRequest.yaml +++ /dev/null @@ -1,12 +0,0 @@ -type: object -properties: - reference: - type: string - description: A reference you can later use to identify this void request - example: ORD-5023-4E89 - metadata: - type: object - description: Set of key/value pairs that you can attach to the void request. It can be useful for storing additional information in a structured format - example: - coupon_code: "NY2018" - partner_id: 123989 \ No newline at end of file diff --git a/spec/components/schemas/Payments/VoidResponse.yaml b/spec/components/schemas/Payments/VoidResponse.yaml deleted file mode 100644 index 1dc7aa5c8..000000000 --- a/spec/components/schemas/Payments/VoidResponse.yaml +++ /dev/null @@ -1,66 +0,0 @@ -type: object -description: Payment response -required: - - id - - action_id - - amount - - currency - - status - - response_code - - processed_on - - _links -properties: - id: - description: Payment unique identifier - allOf: - - $ref: '#/components/schemas/PaymentId' - action_id: - description: The unique identifier for the void action - allOf: - - $ref: '#/components/schemas/ActionId' - amount: - type: integer - description: The void amount - example: 6540 - currency: - type: string - description: The three-letter ISO currency code of the payment - example: USD - maxLength: 3 - minLength: 3 - status: - type: string - description: The status of the payment - example: "Voided" - response_code: - type: string - description: Gateway response code - example: "10000" - response_summary: - type: string - description: The Gateway response summary - example: "Approved" - processed_on: - description: The date/time the void was processed - allOf: - - $ref: '#/components/schemas/ServerTimestamp' - reference: - type: string - description: Your reference for the void request - example: ORD-5023-4E89 - _links: - type: object - description: The links related to the payment - minItems: 1 - properties: - payment: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: The URI of the payment - example: - href: "https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44" - required: - - payment - - diff --git a/spec/components/schemas/PhoneNumber.yaml b/spec/components/schemas/PhoneNumber.yaml deleted file mode 100644 index d0d112a7a..000000000 --- a/spec/components/schemas/PhoneNumber.yaml +++ /dev/null @@ -1,15 +0,0 @@ -type: object -description: A phone number -properties: - country_code: - type: string - description: The international country calling code. Required for some risk checks. - minLength: 1 - maxLength: 7 - example: "+1" - number: - type: string - description: The phone number - minLength: 6 - maxLength: 25 - example: 415 555 2671 \ No newline at end of file diff --git a/spec/components/schemas/README.md b/spec/components/schemas/README.md deleted file mode 100644 index 411c5bbad..000000000 --- a/spec/components/schemas/README.md +++ /dev/null @@ -1,5 +0,0 @@ -Definitions -=========== - -* Write each definition in separate file -* File name repeat the resource name, i.e. `Customer.yaml` diff --git a/spec/components/schemas/ResourceId.yaml b/spec/components/schemas/ResourceId.yaml deleted file mode 100644 index 01e08066a..000000000 --- a/spec/components/schemas/ResourceId.yaml +++ /dev/null @@ -1,4 +0,0 @@ -type: string -description: The resource ID. Defaults to UUID v4 -maxLength: 50 -example: "4f6cf35x-2c4y-483z-a0a9-158621f77a21" \ No newline at end of file diff --git a/spec/components/schemas/ServerTimestamp.yaml b/spec/components/schemas/ServerTimestamp.yaml deleted file mode 100644 index d39cf9e8e..000000000 --- a/spec/components/schemas/ServerTimestamp.yaml +++ /dev/null @@ -1,4 +0,0 @@ -type: string -description: Read-only UTC timestamp, automatically assigned by us. -format: date-time -readOnly: true \ No newline at end of file diff --git a/spec/components/schemas/Sources/01_SepaSource.yaml b/spec/components/schemas/Sources/01_SepaSource.yaml deleted file mode 100644 index 50fd1e193..000000000 --- a/spec/components/schemas/Sources/01_SepaSource.yaml +++ /dev/null @@ -1,47 +0,0 @@ -type: object -description: A SEPA payment source -required: - - billing_address - - source_data -allOf: - - $ref: '#/components/schemas/SourceRequest' - - type: object - properties: - source_data: - type: object - description: Additional data required to create SEPA payment sources - required: - - first_name - - last_name - - account_iban - - bic - - billing_descriptor - - mandate_type - properties: - first_name: - type: string - description: The account holder's first name - example: "Marcus" - last_name: - type: string - description: The account holder's last name - example: "Barrilius Maximus" - account_iban: - type: string - description: The account IBAN - example: "DE25100100101234567893" - bic: - type: string - description: The account BIC - example: "PBNKDEFFXXX" - billing_descriptor: - type: string - description: The billing descriptor - example: "ExampleCompany.com" - mandate_type: - type: string - description: The type of the mandate - enum: - - "single" - - "recurring" - example: "recurring" \ No newline at end of file diff --git a/spec/components/schemas/Sources/01_SepaSourceResponse.yaml b/spec/components/schemas/Sources/01_SepaSourceResponse.yaml deleted file mode 100644 index a704f41e7..000000000 --- a/spec/components/schemas/Sources/01_SepaSourceResponse.yaml +++ /dev/null @@ -1,30 +0,0 @@ -type: object -description: The SEPA mandate details -allOf: - - $ref: '#/components/schemas/AddSourceResponse' - - type: object - properties: - response_data: - type: object - description: SEPA direct debit details - properties: - mandate_reference: - type: string - description: The direct debit mandate reference - example: "MANDXI9809809" - _links: - type: object - description: The links related to the SEPA payment source - readOnly: true - minItems: 1 - properties: - self: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: The URI of the payment source - cancel: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: A link to Cancel the SEPA direct debit mandate diff --git a/spec/components/schemas/Sources/AddSourceResponse.yaml b/spec/components/schemas/Sources/AddSourceResponse.yaml deleted file mode 100644 index a995835b1..000000000 --- a/spec/components/schemas/Sources/AddSourceResponse.yaml +++ /dev/null @@ -1,26 +0,0 @@ -type: object -discriminator: - propertyName: type - mapping: - sepa: '#/components/schemas/01_SepaSourceResponse' -required: - - type - - response_code -properties: - id: - type: string - description: The unique identifier of the payment source that can be used later for payments - example: src_y3oqhf46pyzuxjbcn2giaqnb44 - type: - type: string - description: The payment source type - example: "sepa" - response_code: - type: string - description: Gateway response code - example: "10000" - customer: - type: object - description: The customer associated with the payment source if provided in the request - allOf: - - $ref: '#/components/schemas/SourceResponseCustomer' \ No newline at end of file diff --git a/spec/components/schemas/Sources/Source.yaml b/spec/components/schemas/Sources/Source.yaml deleted file mode 100644 index a77449ea7..000000000 --- a/spec/components/schemas/Sources/Source.yaml +++ /dev/null @@ -1,32 +0,0 @@ -type: object -required: - - type -properties: - id: - type: string - description: The unique identifier of the payment source that can be later used for payments - example: src_y3oqhf46pyzuxjbcn2giaqnb44 - type: - type: string - description: The payment source type - example: "sepa" - _links: - type: object - description: The links related to the payment source - readOnly: true - minItems: 1 - required: - - self - properties: - self: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: The URI of the payment source - example: - href: https://api.checkout.com/sources/src_y3oqhf46pyzuxjbcn2giaqnb44 - example: - self: - href: https://api.checkout.com/sources/src_y3oqhf46pyzuxjbcn2giaqnb44 - "sepa:mandate": - href: https://api.checkout.com/sepa/mandates/src_y3oqhf46pyzuxjbcn2giaqnb44 \ No newline at end of file diff --git a/spec/components/schemas/Sources/SourceRequest.yaml b/spec/components/schemas/Sources/SourceRequest.yaml deleted file mode 100644 index 9effb4903..000000000 --- a/spec/components/schemas/Sources/SourceRequest.yaml +++ /dev/null @@ -1,43 +0,0 @@ -type: object -required: - - type -discriminator: - propertyName: type - mapping: - sepa: '#/components/schemas/01_SepaSource' -properties: - type: - type: string - description: The payment source type - example: sepa - reference: - type: string - description: A reference you can later use to identify the source - example: "X-080957-N34" - billing_address: - description: The payment source owner's billing address - allOf: - - $ref: '#/components/schemas/Address' - phone: - description: The payment source owner's phone number - allOf: - - $ref: '#/components/schemas/PhoneNumber' - customer: - type: object - description: Details of the customer to associate with the source - properties: - id: - type: string - description: | - The identifier of an existing customer. If neither customer `id` or `email` is provided - a new customer will be registered - example: cus_y3oqhf46pyzuxjbcn2giaqnb44 - email: - type: string - format: email - description: An optional email address to associate with the customer - example: jokershere@gmail.com - name: - type: string - description: The customer's name. This will only set the name for *new* customers - example: Jack Napier \ No newline at end of file diff --git a/spec/components/schemas/Sources/SourceResponseCustomer.yaml b/spec/components/schemas/Sources/SourceResponseCustomer.yaml deleted file mode 100644 index 0cfebee20..000000000 --- a/spec/components/schemas/Sources/SourceResponseCustomer.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -description: The customer to which the payment source is linked -required: - - id -properties: - id: - type: string - description: The unique identifier of the customer - example: cus_y3oqhf46pyzuxjbcn2giaqnb44 - email: - type: string - description: The customer email address - example: jokershere@gmail.com - name: - type: string - description: The customer name - example: Jack Napier \ No newline at end of file diff --git a/spec/components/schemas/Timestamp.yaml b/spec/components/schemas/Timestamp.yaml deleted file mode 100644 index a3a60fc7c..000000000 --- a/spec/components/schemas/Timestamp.yaml +++ /dev/null @@ -1,3 +0,0 @@ -type: string -description: ISO 8601 timestamp -format: date-time \ No newline at end of file diff --git a/spec/components/schemas/Tokens/01_CardTokenRequest.yaml b/spec/components/schemas/Tokens/01_CardTokenRequest.yaml deleted file mode 100644 index 42b9f2cb2..000000000 --- a/spec/components/schemas/Tokens/01_CardTokenRequest.yaml +++ /dev/null @@ -1,41 +0,0 @@ -type: object -description: Card Token Request -allOf: - - $ref: '#/components/schemas/TokenRequest' - - type: object - required: - - number - - expiry_month - - expiry_year - properties: - number: - type: string - description: The card number - example: "4543474002249996" - expiry_month: - type: integer - description: The two-digit expiry month of the card - minimum: 1 - example: 6 - expiry_year: - type: integer - description: The four-digit expiry year of the card - example: 2025 - name: - type: string - description: The card-holder name - example: "Bruce Wayne" - cvv: - type: string - description: The card verification value/code. 3 digits, except for Amex (4 digits). - example: "956" - minLength: 3 - maxLength: 4 - billing_address: - description: The payment source owner's billing address - allOf: - - $ref: '#/components/schemas/Address' - phone: - description: The payment source owner's phone number - allOf: - - $ref: '#/components/schemas/PhoneNumber' \ No newline at end of file diff --git a/spec/components/schemas/Tokens/01_CardTokenResponse.yaml b/spec/components/schemas/Tokens/01_CardTokenResponse.yaml deleted file mode 100644 index 7c818b986..000000000 --- a/spec/components/schemas/Tokens/01_CardTokenResponse.yaml +++ /dev/null @@ -1,77 +0,0 @@ -type: object -description: Card Token Response -required: - - expiry_month - - expiry_year - - last4 - - bin -allOf: - - $ref: '#/components/schemas/TokenResponse' - - type: object - properties: - billing_address: - description: The payment source owner's billing address - allOf: - - $ref: '#/components/schemas/Address' - phone: - description: The payment source owner's phone number - allOf: - - $ref: '#/components/schemas/PhoneNumber' - expiry_month: - type: integer - description: The two-digit expiry month - minimum: 1 - example: 6 - expiry_year: - type: integer - description: The four-digit expiry year - example: 2025 - name: - type: string - description: The card-holder name - example: "Bruce Wayne" - scheme: - type: string - description: The card scheme - example: "VISA" - last4: - type: string - description: The last four digits of the card number - example: "9996" - bin: - type: string - description: The card issuer BIN - example: "454347" - card_type: - type: string - description: The card type - enum: - - Credit - - Debit - - Prepaid - example: Credit - card_category: - type: string - description: The card category - enum: - - Consumer - - Commercial - example: Consumer - issuer: - type: string - description: The name of the card issuer - example: "GOTHAM STATE BANK" - issuer_country: - type: string - maxLength: 2 - minLength: 2 - description: The card issuer country ISO-2 code - example: "US" - product_id: - type: string - description: The issuer/card scheme product identifier - example: "F" - product_type: - type: string - description: The issuer/card scheme product type - example: CLASSIC \ No newline at end of file diff --git a/spec/components/schemas/Tokens/02_ApplePayTokenRequest.yaml b/spec/components/schemas/Tokens/02_ApplePayTokenRequest.yaml deleted file mode 100644 index ec18448b9..000000000 --- a/spec/components/schemas/Tokens/02_ApplePayTokenRequest.yaml +++ /dev/null @@ -1,33 +0,0 @@ -type: object -description: Apple Pay Token Request -allOf: - - $ref: '#/components/schemas/TokenRequest' - - type: object - properties: - token_data: - type: object - description: The Apple Pay Payment Token - properties: - version: - type: string - description: Version information about the payment token. The token uses `EC_v1` for ECC-encrypted data, and `RSA_v1` for RSA-encrypted data. - data: - type: string - description: Encrypted payment data. Base64 encoded as a string - signature: - type: string - description: Signature of the payment and header data. The signature includes the signing certificate, its intermediate CA certificate, and information about the signing algorithm. - header: - type: object - description: Additional version-dependent information used to decrypt and verify the payment. - example: - { - "version":"EC_v1", - "data":"t7GeajLB9skXB6QSWfEpPA4WPhDqB7ekdd+F7588arLzvebKp3P0TekUslSQ8nkuacUgLdks2IKyCm7U3OL/PEYLXE7w60VkQ8WE6FXs/cqHkwtSW9vkzZNDxSLDg9slgLYxAH2/iztdipPpyIYKl0Kb6Rn9rboF+lwgRxM1B3n84miApwF5Pxl8ZOOXGY6F+3DsDo7sMCUTaJK74DUJJcjIXrigtINWKW6RFa/4qmPEC/Y+syg04x7B99mbLQQzWFm7z6HfRmynPM9/GA0kbsqd/Kn5Mkqssfhn/m6LuNKsqEmbKi85FF6kip+F17LRawG48bF/lT8wj/QEuDY0G7t/ryOnGLtKteXmAf0oJnwkelIyfyj2KI8GChBuTJonGlXKr5klPE89/ycmkgDl+T6Ms7PhiNZpuGEE2QE=", - "signature":"MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCAMIID5jCCA4ugAwIBAgIIaGD2mdnMpw8wCgYIKoZIzj0EAwIwejEuMCwGA1UEAwwlQXBwbGUgQXBwbGljYXRpb24gSW50ZWdyYXRpb24gQ0EgLSBHMzEmMCQGA1UECwwdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTMB4XDTE2MDYwMzE4MTY0MFoXDTIxMDYwMjE4MTY0MFowYjEoMCYGA1UEAwwfZWNjLXNtcC1icm9rZXItc2lnbl9VQzQtU0FOREJPWDEUMBIGA1UECwwLaU9TIFN5c3RlbXMxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEgjD9q8Oc914gLFDZm0US5jfiqQHdbLPgsc1LUmeY+M9OvegaJajCHkwz3c6OKpbC9q+hkwNFxOh6RCbOlRsSlaOCAhEwggINMEUGCCsGAQUFBwEBBDkwNzA1BggrBgEFBQcwAYYpaHR0cDovL29jc3AuYXBwbGUuY29tL29jc3AwNC1hcHBsZWFpY2EzMDIwHQYDVR0OBBYEFAIkMAua7u1GMZekplopnkJxghxFMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUI/JJxE+T5O8n5sT2KGw/orv9LkswggEdBgNVHSAEggEUMIIBEDCCAQwGCSqGSIb3Y2QFATCB/jCBwwYIKwYBBQUHAgIwgbYMgbNSZWxpYW5jZSBvbiB0aGlzIGNlcnRpZmljYXRlIGJ5IGFueSBwYXJ0eSBhc3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJsZSBzdGFuZGFyZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRlIHBvbGljeSBhbmQgY2VydGlmaWNhdGlvbiBwcmFjdGljZSBzdGF0ZW1lbnRzLjA2BggrBgEFBQcCARYqaHR0cDovL3d3dy5hcHBsZS5jb20vY2VydGlmaWNhdGVhdXRob3JpdHkvMDQGA1UdHwQtMCswKaAnoCWGI2h0dHA6Ly9jcmwuYXBwbGUuY29tL2FwcGxlYWljYTMuY3JsMA4GA1UdDwEB/wQEAwIHgDAPBgkqhkiG92NkBh0EAgUAMAoGCCqGSM49BAMCA0kAMEYCIQDaHGOui+X2T44R6GVpN7m2nEcr6T6sMjOhZ5NuSo1egwIhAL1a+/hp88DKJ0sv3eT3FxWcs71xmbLKD/QJ3mWagrJNMIIC7jCCAnWgAwIBAgIISW0vvzqY2pcwCgYIKoZIzj0EAwIwZzEbMBkGA1UEAwwSQXBwbGUgUm9vdCBDQSAtIEczMSYwJAYDVQQLDB1BcHBsZSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTETMBEGA1UECgwKQXBwbGUgSW5jLjELMAkGA1UEBhMCVVMwHhcNMTQwNTA2MjM0NjMwWhcNMjkwNTA2MjM0NjMwWjB6MS4wLAYDVQQDDCVBcHBsZSBBcHBsaWNhdGlvbiBJbnRlZ3JhdGlvbiBDQSAtIEczMSYwJAYDVQQLDB1BcHBsZSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTETMBEGA1UECgwKQXBwbGUgSW5jLjELMAkGA1UEBhMCVVMwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATwFxGEGddkhdUaXiWBB3bogKLv3nuuTeCN/EuT4TNW1WZbNa4i0Jd2DSJOe7oI/XYXzojLdrtmcL7I6CmE/1RFo4H3MIH0MEYGCCsGAQUFBwEBBDowODA2BggrBgEFBQcwAYYqaHR0cDovL29jc3AuYXBwbGUuY29tL29jc3AwNC1hcHBsZXJvb3RjYWczMB0GA1UdDgQWBBQj8knET5Pk7yfmxPYobD+iu/0uSzAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFLuw3qFYM4iapIqZ3r6966/ayySrMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly9jcmwuYXBwbGUuY29tL2FwcGxlcm9vdGNhZzMuY3JsMA4GA1UdDwEB/wQEAwIBBjAQBgoqhkiG92NkBgIOBAIFADAKBggqhkjOPQQDAgNnADBkAjA6z3KDURaZsYb7NcNWymK/9Bft2Q91TaKOvvGcgV5Ct4n4mPebWZ+Y1UENj53pwv4CMDIt1UQhsKMFd2xd8zg7kGf9F3wsIW2WT8ZyaYISb1T4en0bmcubCYkhYQaZDwmSHQAAMYIBjTCCAYkCAQEwgYYwejEuMCwGA1UEAwwlQXBwbGUgQXBwbGljYXRpb24gSW50ZWdyYXRpb24gQ0EgLSBHMzEmMCQGA1UECwwdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTAghoYPaZ2cynDzANBglghkgBZQMEAgEFAKCBlTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xNzA4MDIxNjA5NDZaMCoGCSqGSIb3DQEJNDEdMBswDQYJYIZIAWUDBAIBBQChCgYIKoZIzj0EAwIwLwYJKoZIhvcNAQkEMSIEIGEfVr+4x9RQXyfF8IYA0kraoK0pcZEaBlINo6EGrOReMAoGCCqGSM49BAMCBEgwRgIhAKunK47QEr/ZjxPlVl+etzVzbKA41xPLWtO01oUOlulmAiEAiaFH9F9LK6uqTFAUW/WIDkHWiFuSm5a3NVox7DlyIf0AAAAAAAA=", - "header":{ - "ephemeralPublicKey":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEX1ievoT8DRB8T5zGkhHZHeDr0oBmYEgsDSxyT0MD0IZ2Mpfjz2LdWq6LUwSH9EmxdPEzMunsZKWMyOr3K/zlsw==", - "publicKeyHash":"tqYV+tmG9aMh+l/K6cicUnPqkb1gUiLjSTM9gEz6Nl0=", - "transactionId":"3cee89679130a4b2617c76118a1c62fd400cd45b49dc0916d5b951b560cd17b4" - } - } \ No newline at end of file diff --git a/spec/components/schemas/Tokens/02_ApplePayTokenResponse.yaml b/spec/components/schemas/Tokens/02_ApplePayTokenResponse.yaml deleted file mode 100644 index d0c3e60ce..000000000 --- a/spec/components/schemas/Tokens/02_ApplePayTokenResponse.yaml +++ /dev/null @@ -1,4 +0,0 @@ -type: object -description: Apple Pay Token Response -allOf: - - $ref: '#/components/schemas/TokenResponse' \ No newline at end of file diff --git a/spec/components/schemas/Tokens/03_GooglePayTokenRequest.yaml b/spec/components/schemas/Tokens/03_GooglePayTokenRequest.yaml deleted file mode 100644 index d7e46945a..000000000 --- a/spec/components/schemas/Tokens/03_GooglePayTokenRequest.yaml +++ /dev/null @@ -1,28 +0,0 @@ -type: object -description: Google Pay Token Request -allOf: - - $ref: '#/components/schemas/TokenRequest' - - type: object - properties: - token_data: - type: object - description: The Google Pay Payment Token - properties: - signature: - type: string - description: Verifies the message came from Google. The signature is created using ECDSA. - protocolVersion: - type: string - description: Identifies which encryption/signing scheme this message has been created. In this way, the protocol can evolve over time if needed. If it is not set, assume ECv0. - signedMessage: - type: string - description: A serialized JSON string containing the encryptedMessage, ephemeralPublicKey and tag. To simplify the signature verification process, this value is serialized. - example: - { - "protocolVersion": "ECv1", - "signature": "TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ", - "signedMessage": "{\"encryptedMessage\": - \"ZW5jcnlwdGVkTWVzc2FnZQ==\", - \"ephemeralPublicKey\": \"ZXBoZW1lcmFsUHVibGljS2V5\", - \"tag\": \"c2lnbmF0dXJl\"}" - } \ No newline at end of file diff --git a/spec/components/schemas/Tokens/03_GooglePayTokenResponse.yaml b/spec/components/schemas/Tokens/03_GooglePayTokenResponse.yaml deleted file mode 100644 index 36ef69ef6..000000000 --- a/spec/components/schemas/Tokens/03_GooglePayTokenResponse.yaml +++ /dev/null @@ -1,4 +0,0 @@ -type: object -description: Google Pay Token Response -allOf: - - $ref: '#/components/schemas/TokenResponse' \ No newline at end of file diff --git a/spec/components/schemas/Tokens/TokenRequest.yaml b/spec/components/schemas/Tokens/TokenRequest.yaml deleted file mode 100644 index c8f18a8b9..000000000 --- a/spec/components/schemas/Tokens/TokenRequest.yaml +++ /dev/null @@ -1,15 +0,0 @@ -type: object -description: The source of the payment -discriminator: - propertyName: type - mapping: - card: '#/components/schemas/01_CardTokenRequest' - applepay: '#/components/schemas/02_ApplePayTokenRequest' - googlepay: '#/components/schemas/03_GooglePayTokenRequest' -required: - - type -properties: - type: - type: string - description: The type of card details to be tokenized - example: "card" \ No newline at end of file diff --git a/spec/components/schemas/Tokens/TokenResponse.yaml b/spec/components/schemas/Tokens/TokenResponse.yaml deleted file mode 100644 index c7316a8c0..000000000 --- a/spec/components/schemas/Tokens/TokenResponse.yaml +++ /dev/null @@ -1,25 +0,0 @@ -type: object -description: The source of the payment -discriminator: - propertyName: type - mapping: - card: '#/components/schemas/01_CardTokenResponse' - applepay: '#/components/schemas/02_ApplePayTokenResponse' - googlepay: '#/components/schemas/03_GooglePayTokenResponse' -required: - - type - - token - - expires_on -properties: - type: - type: string - description: The type of card details to be tokenized - example: "card" - token: - type: string - description: The reference token - example: tok_ubfj2q76miwundwlk72vxt2i7q - expires_on: - description: The date/time the token will expire - allOf: - - $ref: '#/components/schemas/ServerTimestamp' \ No newline at end of file diff --git a/spec/components/schemas/ValidationError.yaml b/spec/components/schemas/ValidationError.yaml deleted file mode 100644 index c942dd157..000000000 --- a/spec/components/schemas/ValidationError.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: object -properties: - request_id: - type: string - example: 0HL80RJLS76I7 - error_type: - type: string - example: request_invalid - error_codes: - type: array - items: - type: string - example: payment_source_required \ No newline at end of file diff --git a/spec/components/securitySchemes/ApiKey.yaml b/spec/components/securitySchemes/ApiKey.yaml deleted file mode 100644 index e94794ecf..000000000 --- a/spec/components/securitySchemes/ApiKey.yaml +++ /dev/null @@ -1,8 +0,0 @@ -description: > - Unless explicitly stated, all endpoints require authentication using your secret key. - Public keys should only be used in JavaScript or native applications. - - You can generate new API keys within the [Checkout.com Hub](https://hub.checkout.com/v2). -name: Authorization -type: apiKey -in: Header \ No newline at end of file diff --git a/spec/future/components/schemas/Files/File.yaml b/spec/future/components/schemas/Files/File.yaml deleted file mode 100644 index 69b8ff76b..000000000 --- a/spec/future/components/schemas/Files/File.yaml +++ /dev/null @@ -1,50 +0,0 @@ -type: object -required: - - id - - filename - - purpose - - size - - uploaded_on - - _links -properties: - id: - type: string - description: The file identifier - example: file_6lbss42ezvoufcb2beo76rvwly - filename: - type: string - description: The file name - example: receipt.jpg - purpose: - type: string - description: The purpose of the uploaded file - example: dispute_evidence - size: - type: number - description: The size in bytes of the file upload object - example: 1024 - uploaded_on: - type: string - format: ISO-8601 - description: File upload date and time in UTC - example: '2016-05-17T16:48:52.000Z' - _links: - type: object - required: - - self - - download - properties: - self: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: The file information retrieval URL - example: - href: https://api.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly - download: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: The temporary file download URL. The URL expires after a certain time period - example: - href: https://checkout-file-upload.s3.eu-west-2.amazonaws.com/ucdac/ucdac/6lbss42ezvoufcb2beo76rvwly?X-Amz-Expires=3600&x-amz-security-token=FQoDYXdzENL%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEa diff --git a/spec/future/components/schemas/Files/FileUploadResponse.yaml b/spec/future/components/schemas/Files/FileUploadResponse.yaml deleted file mode 100644 index 67c78e0d8..000000000 --- a/spec/future/components/schemas/Files/FileUploadResponse.yaml +++ /dev/null @@ -1,24 +0,0 @@ -type: object -required: - - id - - _links -properties: - id: - type: string - description: The unique identifier of the file uploaded - example: file_6lbss42ezvoufcb2beo76rvwly - _links: - type: object - description: The links related to the file - readOnly: true - minItems: 1 - properties: - self: - type: object - allOf: - - $ref: '#/components/schemas/Link' - description: The URI of the file uploaded. Use this to retrieve detailed file information - example: - href: https://api.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly - required: - - self \ No newline at end of file diff --git a/spec/future/paths/files@{id}.yaml b/spec/future/paths/files@{id}.yaml deleted file mode 100644 index 7489c2a93..000000000 --- a/spec/future/paths/files@{id}.yaml +++ /dev/null @@ -1,31 +0,0 @@ -get: - tags: - - Files - summary: Get file information - description: Gets the information of file with the specified file identifier. - parameters: - - in: path - name: id - schema: - type: string - pattern: "^file_(\\w{26})$" - required: true - description: The file identifier - responses: - '200': - description: File was retrieved successfully - content: - application/json: - schema: - $ref: '#/components/schemas/File' - headers: - Cko-Request-Id: - schema: - $ref: '#/components/headers/Cko-Request-Id' - Cko-Version: - schema: - $ref: '#/components/headers/Cko-Version' - '401': - description: Unauthorized - '404': - description: File not found \ No newline at end of file diff --git a/spec/paths/README.md b/spec/paths/README.md deleted file mode 100644 index b73ffd8a9..000000000 --- a/spec/paths/README.md +++ /dev/null @@ -1,5 +0,0 @@ -Paths -===== - -* Write each path specification in separate file -* File name repeat the path, the slash replaced with `@` sign, i.e. `user@{username}.yaml` matches to `user/{username}` diff --git a/spec/paths/event-types.yaml b/spec/paths/event-types.yaml deleted file mode 100644 index 0498dd02b..000000000 --- a/spec/paths/event-types.yaml +++ /dev/null @@ -1,28 +0,0 @@ -get: - tags: - - Events - summary: Retrieve event types - description: Retrieve a list of event types grouped by their respective version that you can configure on your webhooks - parameters: - - in: query - name: version - schema: - type: string - description: The events version - required: true - responses: - '200': - description: Event types retrieved successfully - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/EventTypesObject' - headers: - Cko-Request-Id: - $ref: "#/components/headers/Cko-Request-Id" - Cko-Version: - $ref: "#/components/headers/Cko-Version" - '401': - description: Unauthorized \ No newline at end of file diff --git a/spec/paths/events.yaml b/spec/paths/events.yaml deleted file mode 100644 index b6f0ff8f9..000000000 --- a/spec/paths/events.yaml +++ /dev/null @@ -1,65 +0,0 @@ -get: - tags: - - Events - summary: Retrieve events - description: Retrieves events ordered by the event date in descending order (latest first). Results can be paged by specifying the `skip` and `limit` query parameters. - parameters: - - name: from - in: query - schema: - type: string - format: date-time - description: An ISO8601 formatted date and time to search from (default = last 6 months) - - name: to - in: query - schema: - type: string - format: date-time - description: An ISO8601 formatted date and time to search to (default = now) - - name: limit - in: query - description: The number of events to return per page - schema: - type: integer - default: 10 - minimum: 1 - maximum: 100 - - name: skip - in: query - description: The number of events to skip - schema: - type: integer - default: 0 - minimum: 0 - - name: payment_id - in: query - description: Search for an event by Payment ID - schema: - type: string - - name: reference - in: query - description: Search for an event by Reference - schema: - type: string - responses: - '200': - description: Events retrieved successfully - content: - application/json: - schema: - $ref: '#/components/schemas/EventResult' - headers: - Cko-Request-Id: - $ref: "#/components/headers/Cko-Request-Id" - Cko-Version: - $ref: "#/components/headers/Cko-Version" - '204': - description: No events found - '401': - description: Unauthorized - '422': - description: Invalid data was sent - content: - application/json: - schema: - $ref: '#/components/schemas/ValidationError' \ No newline at end of file diff --git a/spec/paths/events@{eventId}@webhooks@retry.yaml b/spec/paths/events@{eventId}@webhooks@retry.yaml deleted file mode 100644 index 7b361ba6d..000000000 --- a/spec/paths/events@{eventId}@webhooks@retry.yaml +++ /dev/null @@ -1,25 +0,0 @@ -post: - tags: - - Events - summary: Retry all webhooks - description: Retries all webhook notifications configured for the specified event - parameters: - - in: path - name: eventId - schema: - type: string - pattern: "^(evt)_(\\w{26})$" - required: true - description: The event identifier - responses: - '202': - description: Retry accepted - headers: - Cko-Request-Id: - $ref: "#/components/headers/Cko-Request-Id" - Cko-Version: - $ref: "#/components/headers/Cko-Version" - '401': - description: Unauthorized - '404': - description: Event or webhook not found \ No newline at end of file diff --git a/spec/paths/events@{eventId}@webhooks@{webhookId}@retry.yaml b/spec/paths/events@{eventId}@webhooks@{webhookId}@retry.yaml deleted file mode 100644 index 524f2c514..000000000 --- a/spec/paths/events@{eventId}@webhooks@{webhookId}@retry.yaml +++ /dev/null @@ -1,32 +0,0 @@ -post: - tags: - - Events - summary: Retry webhook - description: Retries a specific webhook notification for the given event - parameters: - - in: path - name: eventId - schema: - type: string - pattern: "^(evt)_(\\w{26})$" - required: true - description: The event identifier - - in: path - name: webhookId - schema: - type: string - pattern: "^(wh)_(\\w{26})$" - required: true - description: The webhook identifier - responses: - '202': - description: Retry accepted - headers: - Cko-Request-Id: - $ref: "#/components/headers/Cko-Request-Id" - Cko-Version: - $ref: "#/components/headers/Cko-Version" - '401': - description: Unauthorized - '404': - description: Event or webhook not found \ No newline at end of file diff --git a/spec/paths/payments.yaml b/spec/paths/payments.yaml deleted file mode 100644 index 5509d284c..000000000 --- a/spec/paths/payments.yaml +++ /dev/null @@ -1,62 +0,0 @@ -post: - tags: - - Payments - summary: Request a payment - description: | - Checkout.com supports payments from a variety of sources, from cards to - SEPA direct debits. The source of payment must be specified using the `source.type` field along with any source specific data. - - To verify the success of the payment, check the `approved` field in the response. - - parameters: - - in: header - name: Cko-Idempotency-Key - schema: - type: string - required: false - description: Optional idempotency key for safely retrying payment requests - - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentRequest' - responses: - '201': - description: Payment processed successfully - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentResponse' - headers: - Cko-Request-Id: - $ref: "#/components/headers/Cko-Request-Id" - Cko-Version: - $ref: "#/components/headers/Cko-Version" - '202': - description: Payment asynchronous or further action required - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentAcceptedResponse' - headers: - Cko-Request-Id: - $ref: "#/components/headers/Cko-Request-Id" - Cko-Version: - $ref: "#/components/headers/Cko-Version" - '401': - description: Unauthorized - '429': - description: Too many requests or duplicate request detected - content: - application/json: - schema: - $ref: '#/components/schemas/ValidationError' - '422': - description: Invalid data was sent - content: - application/json: - schema: - $ref: '#/components/schemas/ValidationError' - '502': - description: Bad gateway diff --git a/spec/paths/payments@{id}.yaml b/spec/paths/payments@{id}.yaml deleted file mode 100644 index 91c54ce76..000000000 --- a/spec/paths/payments@{id}.yaml +++ /dev/null @@ -1,36 +0,0 @@ -get: - tags: - - Payments - summary: Get payment details - description: | - Returns the details of the payment with the specified identifier string. - - If the payment method requires a redirection to a third party (e.g. 3-D Secure), - the redirect URL back to your site will include a `cko-session-id` query parameter - containing a payment session ID that can be used to obtain the details of the payment, for example: - - http://example.com/success?cko-session-id=sid_ubfj2q76miwundwlk72vxt2i7q. - parameters: - - in: path - name: id - schema: - type: string - pattern: "^(pay|sid)_(\\w{26})$" - required: true - description: The payment or payment session identifier - responses: - '200': - description: Payment retrieved successfully - content: - application/json: - schema: - $ref: '#/components/schemas/Payment' - headers: - Cko-Request-Id: - $ref: "#/components/headers/Cko-Request-Id" - Cko-Version: - $ref: "#/components/headers/Cko-Version" - '401': - description: Unauthorized - '404': - description: Payment not found diff --git a/spec/paths/payments@{id}@actions.yaml b/spec/paths/payments@{id}@actions.yaml deleted file mode 100644 index 641859e62..000000000 --- a/spec/paths/payments@{id}@actions.yaml +++ /dev/null @@ -1,30 +0,0 @@ -get: - tags: - - Payments - summary: Get payment actions - description: | - Returns all the actions associated with a payment ordered by processing date in descending order (latest first). - parameters: - - in: path - name: id - schema: - type: string - pattern: "^(pay)_(\\w{26})$" - required: true - description: The payment identifier - responses: - '200': - description: Payment actions retrieved successfully - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentActionsResponse' - headers: - Cko-Request-Id: - $ref: "#/components/headers/Cko-Request-Id" - Cko-Version: - $ref: "#/components/headers/Cko-Version" - '401': - description: Unauthorized - '404': - description: Payment not found diff --git a/spec/paths/payments@{id}@captures.yaml b/spec/paths/payments@{id}@captures.yaml deleted file mode 100644 index faafc263b..000000000 --- a/spec/paths/payments@{id}@captures.yaml +++ /dev/null @@ -1,47 +0,0 @@ -post: - tags: - - Payments - summary: Capture a payment - description: | - Captures a payment if supported by the payment method. - - For card payments, capture requests are processed asynchronously. You can use [webhooks](#tag/Webhooks) to be notified if the capture is successful. - parameters: - - in: path - name: id - schema: - type: string - pattern: "^(pay)_(\\w{26})$" - required: true - description: The payment identifier - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CaptureRequest' - responses: - '202': - description: Capture accepted - content: - application/json: - schema: - $ref: '#/components/schemas/CaptureAcceptedResponse' - headers: - Cko-Request-Id: - $ref: "#/components/headers/Cko-Request-Id" - Cko-Version: - $ref: "#/components/headers/Cko-Version" - '401': - description: Unauthorized - '403': - description: Capture not allowed - '422': - description: Invalid data was sent - content: - application/json: - schema: - $ref: '#/components/schemas/ValidationError' - '404': - description: Payment not found - '502': - description: Bad gateway \ No newline at end of file diff --git a/spec/paths/payments@{id}@refunds.yaml b/spec/paths/payments@{id}@refunds.yaml deleted file mode 100644 index acff9d051..000000000 --- a/spec/paths/payments@{id}@refunds.yaml +++ /dev/null @@ -1,47 +0,0 @@ -post: - tags: - - Payments - summary: Refund a payment - description: | - Refunds a payment if supported by the payment method. - - For card payments, refund requests are processed asynchronously. You can use [webhooks](#tag/Webhooks) to be notified if the refund is successful. - parameters: - - in: path - name: id - schema: - type: string - pattern: "^(pay)_(\\w{26})$" - required: true - description: The payment identifier - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RefundRequest' - responses: - '202': - description: Refund accepted - content: - application/json: - schema: - $ref: '#/components/schemas/RefundAcceptedResponse' - headers: - Cko-Request-Id: - $ref: "#/components/headers/Cko-Request-Id" - Cko-Version: - $ref: "#/components/headers/Cko-Version" - '401': - description: Unauthorized - '422': - description: Invalid data was sent - content: - application/json: - schema: - $ref: '#/components/schemas/ValidationError' - '403': - description: Refund not allowed - '404': - description: Payment not found - '502': - description: Bad gateway \ No newline at end of file diff --git a/spec/paths/payments@{id}@voids.yaml b/spec/paths/payments@{id}@voids.yaml deleted file mode 100644 index d97442f8d..000000000 --- a/spec/paths/payments@{id}@voids.yaml +++ /dev/null @@ -1,47 +0,0 @@ -post: - tags: - - Payments - summary: Void a payment - description: | - Voids a payment if supported by the payment method. - - For card payments, void requests are processed asynchronously. You can use [webhooks](#tag/Webhooks) to be notified if the void is successful. - parameters: - - in: path - name: id - schema: - type: string - pattern: "^(pay)_(\\w{26})$" - required: true - description: The payment identifier - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/VoidRequest' - responses: - '202': - description: Void accepted - content: - application/json: - schema: - $ref: '#/components/schemas/VoidAcceptedResponse' - headers: - Cko-Request-Id: - $ref: "#/components/headers/Cko-Request-Id" - Cko-Version: - $ref: "#/components/headers/Cko-Version" - '401': - description: Unauthorized - '422': - description: Invalid data was sent - content: - application/json: - schema: - $ref: '#/components/schemas/ValidationError' - '403': - description: Void not allowed - '404': - description: Payment not found - '502': - description: Bad gateway \ No newline at end of file diff --git a/spec/paths/sources.yaml b/spec/paths/sources.yaml deleted file mode 100644 index 2216fa87c..000000000 --- a/spec/paths/sources.yaml +++ /dev/null @@ -1,35 +0,0 @@ -post: - tags: - - Sources - summary: Add a payment source - description: | - Add a reusable payment source that can be used later to make one or more payments. - Payment sources are linked to a specific customer and cannot be shared between customers. - - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SourceRequest' - responses: - '201': - description: Payment source added successfully - content: - application/json: - schema: - $ref: '#/components/schemas/AddSourceResponse' - headers: - Cko-Request-Id: - $ref: "#/components/headers/Cko-Request-Id" - Cko-Version: - $ref: "#/components/headers/Cko-Version" - '401': - description: Unauthorized - '422': - description: Invalid data was sent - content: - application/json: - schema: - $ref: '#/components/schemas/ValidationError' - '502': - description: Bad gateway \ No newline at end of file diff --git a/spec/paths/tokens.yaml b/spec/paths/tokens.yaml deleted file mode 100644 index 5f7255d1b..000000000 --- a/spec/paths/tokens.yaml +++ /dev/null @@ -1,33 +0,0 @@ -post: - tags: - - Tokens - summary: Request a token - description: | - Exchange card details or a digital wallet payment token for a reference token that can be used later to request a card payment. - - **To create tokens please authenticate using your public key** - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TokenRequest' - responses: - '201': - description: Reference token created successfully - content: - application/json: - schema: - $ref: '#/components/schemas/TokenResponse' - headers: - Cko-Request-Id: - $ref: "#/components/headers/Cko-Request-Id" - Cko-Version: - $ref: "#/components/headers/Cko-Version" - '401': - description: Unauthorized - '422': - description: Invalid data was sent - content: - application/json: - schema: - $ref: '#/components/schemas/ValidationError' \ No newline at end of file diff --git a/spec/paths/webhooks.yaml b/spec/paths/webhooks.yaml deleted file mode 100644 index 7985c79e3..000000000 --- a/spec/paths/webhooks.yaml +++ /dev/null @@ -1,58 +0,0 @@ -get: - tags: - - Webhooks - summary: Retrieve webhooks - description: | - Retrieves the webhooks configured for the channel identified by your API key - parameters: [] - responses: - '200': - description: Configured webhooks - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Webhook' - headers: - Cko-Request-Id: - $ref: "#/components/headers/Cko-Request-Id" - Cko-Version: - $ref: "#/components/headers/Cko-Version" - '204': - description: No webhooks configured - '401': - description: Unauthorized -post: - tags: - - Webhooks - summary: Register webhook - description: | - Register a new webhook endpoint that Checkout.com will POST all or selected events to - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookRequest' - responses: - '201': - description: Webhook registered successfully - content: - application/json: - schema: - $ref: '#/components/schemas/Webhook' - headers: - Cko-Request-Id: - $ref: "#/components/headers/Cko-Request-Id" - Cko-Version: - $ref: "#/components/headers/Cko-Version" - '401': - description: Unauthorized - '422': - description: Invalid data was sent - content: - application/json: - schema: - $ref: '#/components/schemas/ValidationError' - '409': - description: Url already registered for another webhook \ No newline at end of file diff --git a/spec/paths/webhooks@{id}.yaml b/spec/paths/webhooks@{id}.yaml deleted file mode 100644 index ea6d3a67a..000000000 --- a/spec/paths/webhooks@{id}.yaml +++ /dev/null @@ -1,129 +0,0 @@ -get: - tags: - - Webhooks - summary: Retrieve webhook - description: | - Retrieves the webhook with the specified identifier string - parameters: - - name: id - required: true - schema: - type: string - in: path - description: | - The webhook identifier, for example `wh_387ac7a83a054e37ae140105429d76b5` - responses: - '200': - description: Webhook was retrieved successfully - content: - application/json: - schema: - type: object - allOf: - - $ref: '#/components/schemas/WebhookRequest' - required: - - url - '401': - description: Unauthorized - '404': - description: Webhook not found -put: - tags: - - Webhooks - summary: Update webhook - description: | - Updates an existing webhook - parameters: - - name: id - required: true - schema: - type: string - in: path - description: | - The webhook identifier, for example `wh_387ac7a83a054e37ae140105429d76b5` - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookRequest' - responses: - '200': - description: Updated webhook - content: - application/json: - schema: - $ref: '#/components/schemas/Webhook' - '401': - description: Unauthorized - '422': - description: Invalid data was sent - content: - application/json: - schema: - $ref: '#/components/schemas/ValidationError' - '404': - description: Webhook not found - '409': - description: Url already registered for another webhook -patch: - tags: - - Webhooks - summary: Partially update webhook - description: Updates all or some of the registered webhook details - parameters: - - name: id - required: true - schema: - type: string - in: path - description: | - The webhook identifier, for example `wh_387ac7a83a054e37ae140105429d76b5` - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookRequest' - responses: - '200': - description: Updated webhook - content: - application/json: - schema: - $ref: '#/components/schemas/Webhook' - headers: - Cko-Request-Id: - $ref: "#/components/headers/Cko-Request-Id" - Cko-Version: - $ref: "#/components/headers/Cko-Version" - '401': - description: Unauthorized - '422': - description: Invalid data was sent - content: - application/json: - schema: - $ref: '#/components/schemas/ValidationError' - '404': - description: Webhook not found - '409': - description: Url already exists in another webhook configuration -delete: - tags: - - Webhooks - summary: Remove webhook - description: Removes an existing webhook - parameters: - - name: id - required: true - schema: - type: string - in: path - description: | - The webhook identifier, for example `wh_387ac7a83a054e37ae140105429d76b5` - responses: - '204': - description: Webhook removed successfully - '401': - description: Unauthorized - '404': - description: Webhook not found \ No newline at end of file diff --git a/spec/swagger.yaml b/spec/swagger.yaml deleted file mode 100644 index eb274fb92..000000000 --- a/spec/swagger.yaml +++ /dev/null @@ -1,63 +0,0 @@ -openapi: '3.0.1' -info: - version: '1.0.0' - title: Checkout.com API Reference - contact: - name: Checkout.com Support - url: 'https://checkout.com' - email: support@checkout.com - license: - name: Checkout.com - url: 'https://checkout.com/api/license/' - termsOfService: 'https://checkout.com/terms/' - description: > - # Introduction - - Checkout.com provide a collection of APIs that enable you to process and manage payments. - - - Our APIs accept and return JSON in the HTTP body and return HTTP response codes to indicate errors. You can consume the APIs directly using your favorite HTTP/REST library or make use of one of our SDKs (currently available in - [.NET](https://github.com/checkout/checkout-sdk-net) and [Python](https://github.com/checkout/checkout-sdk-python/tree/unified-payments)). - - - Our Gateway API includes features such as - AutoCapture, 3-D Secure payments, smart routing to acquirers, and much more. - - - Broadcast is our webhook notification system informing you of events in near real-time, enabling you to take action and keep your business running smoothly. - Webhooks provide a definitive confirmation of a status update and are used for a variety of purposes, such as fulfilling orders, - sending automated status updates to customers, or even integrating with third-party application services. - - # Authentication - - When you sign up for an account, you are given a secret and public API key - pair. You authenticate with the Checkout.com API by providing the appropriate key in - the request Authorization header. - - - Never share your secret keys. Keep them guarded and secure. -servers: - - url: https://api.checkout.com - description: Live API - - url: https://api.sandbox.checkout.com - description: Sandbox API -tags: - - name: Payments - - name: Sources - - name: Tokens - - name: Webhooks - - name: Events - # - name: Files - # description: | - # Upload files to be used as input to other APIs -# x-tagGroups: -# - name: Gateway -# tags: -# - Payments -# - Tokens -# - Sources -# - Files -# - name: Broadcast -# tags: -# - Events -# - Webhooks diff --git a/src/OpenApiGenerator/OpenApiGenerator.csproj b/src/OpenApiGenerator/OpenApiGenerator.csproj index 2268e91b5..39310a2c8 100644 --- a/src/OpenApiGenerator/OpenApiGenerator.csproj +++ b/src/OpenApiGenerator/OpenApiGenerator.csproj @@ -2,12 +2,12 @@ Exe - netcoreapp2.0 + netcoreapp3.1 - - + + diff --git a/src/OpenApiGenerator/Program.cs b/src/OpenApiGenerator/Program.cs index fc7ce0809..f3c368406 100644 --- a/src/OpenApiGenerator/Program.cs +++ b/src/OpenApiGenerator/Program.cs @@ -4,212 +4,217 @@ using System.Linq; using Microsoft.OpenApi.Readers; using Microsoft.OpenApi.Writers; -using System.Net.Http; using System.Text; +using System.Text.RegularExpressions; namespace OpenApiGenerator { - class Program + class Program + { + static string _outputDirectory = "output"; + static string _specDirectory = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") == "abc" ? "abc_spec" : "nas_spec"; + static string _yamlOutputFile = "output/swagger.yaml"; + static string _jsonOutputFile = "output/swagger.json"; + static List _codeSamples = new List(); + static string[] httpVerbs = new[] { "get", "put", "post", "delete", "options", "head", "patch", "trace" }; + + static void Main(string[] args) { - static string _outputDirectory = "output"; - static string _specDirectory = "spec"; - static string _yamlOutputFile = "output/swagger.yaml"; - static string _jsonOutputFile = "output/swagger.json"; - static List _codeSamples = new List(); - static string[] httpVerbs = new[] { "get", "put", "post", "delete", "options", "head", "patch", "trace" }; - - static void Main(string[] args) + try + { + RefreshOutputDirectory(); + + // start building up the yaml file + using (StreamReader sr = File.OpenText($"{_specDirectory}/swagger.yaml")) { - try - { - RefreshOutputDirectory(); - - // start building up the yaml file - using (StreamReader sr = File.OpenText($"{_specDirectory}/swagger.yaml")) - { - using (TextWriter writer = File.CreateText(_yamlOutputFile)) - { - var s = ""; - while ((s = sr.ReadLine()) != null) - { - writer.WriteLine(s); - } - } - } - - // append paths and components to yaml file - AddPaths(); - AddAllComponents(); - - // use openapi.net to read yaml file - var str = File.ReadAllText(_yamlOutputFile); - var openApiDocument = new OpenApiStringReader().Read(str, out var diagnostic); - - // log any errors - foreach (var error in diagnostic.Errors) - { - Console.WriteLine(error.Message); - Console.WriteLine(error.Pointer); - } - - // convert yaml file to json - using (TextWriter writer = File.CreateText(_jsonOutputFile)) - { - openApiDocument.SerializeAsV3(new OpenApiJsonWriter(writer)); - } - } - catch (Exception e) + using (TextWriter writer = File.CreateText(_yamlOutputFile)) + { + var s = ""; + while ((s = sr.ReadLine()) != null) { - Console.WriteLine(e); - throw; + writer.WriteLine(s); } + } } - static void RefreshOutputDirectory() - { - ClearOutputDirectory(); - Directory.CreateDirectory(_outputDirectory); - } + // append paths and components to yaml file + AddPaths(); + AddAllComponents(); - static void ClearOutputDirectory() - { - if (Directory.Exists(_outputDirectory)) - { - foreach (var file in Directory.GetFiles(_outputDirectory)) - { - File.Delete(file); - } + // use openapi.net to read yaml file + var str = File.ReadAllText(_yamlOutputFile); + var openApiDocument = new OpenApiStringReader().Read(str, out var diagnostic); - Directory.Delete(_outputDirectory); - } + // log any errors + foreach (var error in diagnostic.Errors) + { + Console.WriteLine(error.Message); + Console.WriteLine(error.Pointer); } - static void AddAllComponents() + // convert yaml file to json + using (TextWriter writer = File.CreateText(_jsonOutputFile)) { - File.AppendAllText(_yamlOutputFile, "components:\n", Encoding.UTF8); - - foreach (var component in new List { "schemas", "headers", "parameters", "responses", "securitySchemes" }) - { - AddComponent(component); - } + openApiDocument.SerializeAsV3(new OpenApiJsonWriter(writer)); } + } + catch (Exception e) + { + Console.WriteLine(e); + throw; + } + } - static void AddComponent(string component) - { - if (!Directory.Exists($"{_specDirectory}/components/{component}")) - return; + static void RefreshOutputDirectory() + { + ClearOutputDirectory(); + Directory.CreateDirectory(_outputDirectory); + } - var yamlSchemaFiles = GetSpecFiles($"/components/{component}/", "*.yaml"); - var text = $" {component}:\n"; - text += GetComponentsText(yamlSchemaFiles); - File.AppendAllText(_yamlOutputFile, text, Encoding.UTF8); + static void ClearOutputDirectory() + { + if (Directory.Exists(_outputDirectory)) + { + foreach (var file in Directory.GetFiles(_outputDirectory)) + { + File.Delete(file); } - static string GetComponentsText(IEnumerable yamlFiles) - { - var text = ""; + Directory.Delete(_outputDirectory); + } + } - foreach (var file in yamlFiles) - { - var fileInfo = new FileInfo(file); - - using (StreamReader sr = new StreamReader(file)) - { - var path = fileInfo.Name.Substring(0, fileInfo.Name.IndexOf(".")); - text += ($" {path}:\n"); - var s = ""; - while ((s = sr.ReadLine()) != null) - { - text += $" {s}\n"; - } - } - } + static void AddAllComponents() + { + File.AppendAllText(_yamlOutputFile, "components:\n", Encoding.UTF8); - return text; - } + foreach (var component in new List { "schemas", "headers", "parameters", "responses", "securitySchemes" }) + { + AddComponent(component); + } + } - static void AddPaths() - { - LoadCodeSamples(); + static void AddComponent(string component) + { + if (!Directory.Exists($"{_specDirectory}/components/{component}")) + return; - var yamlPathFiles = GetSpecFiles("paths", "*.yaml"); - var text = "paths:\n"; + var yamlSchemaFiles = GetSpecFiles($"/components/{component}/", "*.yaml"); + var text = $" {component}:\n"; + text += GetComponentsText(yamlSchemaFiles); + File.AppendAllText(_yamlOutputFile, text, Encoding.UTF8); + } - foreach (var file in yamlPathFiles) - { - var fileInfo = new FileInfo(file); - var path = ""; - - using (StreamReader sr = new StreamReader(file)) - { - path = fileInfo.Name.Substring(0, fileInfo.Name.IndexOf(".")).Replace("@", "/"); - text += ($" /{path}:\n"); - - var s = ""; - var currentVerb = ""; - while ((s = sr.ReadLine()) != null) - { - if (httpVerbs.Contains($"{s.TrimEnd(':')}")) - { - if (!string.IsNullOrEmpty(currentVerb)) - { - text += GetCodeSampleText(path, currentVerb); - } - currentVerb = s.Trim(':'); - } - text += $" {s}\n"; - } - text += GetCodeSampleText(path, currentVerb); - } - } + static string GetComponentsText(IEnumerable yamlFiles) + { + var text = ""; - File.AppendAllText(_yamlOutputFile, text, Encoding.UTF8); - } + foreach (var file in yamlFiles) + { + var fileInfo = new FileInfo(file); - static string GetCodeSampleText(string path, string verb) + using (StreamReader sr = new StreamReader(file)) { - var text = ""; - var codeSample = GetCodeSample(path, verb); + var path = fileInfo.Name.Substring(0, fileInfo.Name.IndexOf(".")); + text += ($" {path}:\n"); + var s = ""; + while ((s = sr.ReadLine()) != null) + { + text += $" {s}\n"; + } + } + } - if (codeSample == null) - return text; + return text; + } - text += $" x-code-samples:\n"; - text += $" - lang: {codeSample.Language}\n"; - text += $" source: {codeSample.SampleString}\n"; - return text; - } + static void AddPaths() + { + LoadCodeSamples(); - static CodeSample GetCodeSample(string path, string verb) - { - return _codeSamples.FirstOrDefault(x => string.Equals(x.Path, path, StringComparison.InvariantCultureIgnoreCase) && string.Equals(x.HttpVerb, verb, StringComparison.InvariantCultureIgnoreCase)); - } + var yamlPathFiles = GetSpecFiles("paths", "*.yaml"); + var text = "paths:\n"; - static void LoadCodeSamples() + foreach (var file in yamlPathFiles) + { + var fileInfo = new FileInfo(file); + var path = ""; + + using (StreamReader sr = new StreamReader(file)) { - var codeSampleFiles = GetSpecFiles("code_samples", "*.*"); - - foreach (var file in codeSampleFiles) + path = fileInfo.Name.Substring(0, fileInfo.Name.IndexOf(".")).Replace("@", "/"); + path = new Regex(@"^_.+").Replace(path, ""); + + text += ($" /{path}:\n"); + + var s = ""; + var currentVerb = ""; + while ((s = sr.ReadLine()) != null) + { + if (httpVerbs.Contains($"{s.TrimEnd(':')}")) { - var fileInfo = new FileInfo(file); - var filename = fileInfo.Name.Substring(0, fileInfo.Name.IndexOf(".")); - if (filename.ToLowerInvariant() == "readme") - continue; - - _codeSamples.Add(new CodeSample - { - Language = new DirectoryInfo(fileInfo.FullName).Parent.Parent.Name, - SampleString = $"\"{string.Join("\\n", File.ReadAllLines(fileInfo.FullName).Select(x => x.Replace("\"", "\\\"")))}\"", - Path = new DirectoryInfo(fileInfo.FullName).Parent.Name.Replace("@", "/"), - HttpVerb = filename - }); + if (!string.IsNullOrEmpty(currentVerb)) + { + text += GetCodeSampleText(path, currentVerb); + } + currentVerb = s.Trim(':'); } + text += $" {s}\n"; + } + text += GetCodeSampleText(path, currentVerb); } - - private static IEnumerable GetSpecFiles(string relativePath, string searchPattern) + } + + File.AppendAllText(_yamlOutputFile, text, Encoding.UTF8); + } + + static string GetCodeSampleText(string path, string verb) + { + var text = ""; + var codeSamples = GetCodeSample(path, verb); + + if (!codeSamples.Any()) return text; + + text += $" x-code-samples:\n"; + foreach (var sample in codeSamples) + { + text += $" - lang: {sample.Language}\n"; + text += $" source: {sample.SampleString}\n"; + } + + return text; + } + + static IEnumerable GetCodeSample(string path, string verb) + { + return _codeSamples.Where(x => string.Equals(x.Path, path, StringComparison.InvariantCultureIgnoreCase) && string.Equals(x.HttpVerb, verb, StringComparison.InvariantCultureIgnoreCase)); + } + + static void LoadCodeSamples() + { + var codeSampleFiles = GetSpecFiles("code_samples", "*.*"); + + foreach (var file in codeSampleFiles) + { + var fileInfo = new FileInfo(file); + var filename = fileInfo.Name.Substring(0, fileInfo.Name.IndexOf(".")); + if (filename.ToLowerInvariant() == "readme") + continue; + + _codeSamples.Add(new CodeSample { - return Directory.GetFiles($"{_specDirectory}/{relativePath}", searchPattern, SearchOption.AllDirectories) - .OrderBy(fileName => fileName); - } + Language = new DirectoryInfo(fileInfo.FullName).Parent.Parent.Name, + SampleString = $"\"{string.Join("\\n", File.ReadAllLines(fileInfo.FullName).Select(x => x.Replace("\"", "\\\"")))}\"", + Path = new DirectoryInfo(fileInfo.FullName).Parent.Name.Replace("@", "/"), + HttpVerb = filename + }); + } + } + + private static IEnumerable GetSpecFiles(string relativePath, string searchPattern) + { + return Directory.GetFiles($"{_specDirectory}/{relativePath}", searchPattern, SearchOption.AllDirectories) + .OrderBy(fileName => fileName); } -} \ No newline at end of file + } +} diff --git a/vercel.json b/vercel.json new file mode 100644 index 000000000..6ab517e9c --- /dev/null +++ b/vercel.json @@ -0,0 +1,10 @@ +{ + "trailingSlash": true, + "redirects": [ + { + "source": "/preview/crusoe/", + "destination": "/", + "statusCode": 301 + } + ] +} \ No newline at end of file diff --git a/web/favicon.ico b/web/favicon.ico deleted file mode 100644 index d8a36006f..000000000 Binary files a/web/favicon.ico and /dev/null differ diff --git a/web/favicons/apple-touch-icon-180x180.png b/web/favicons/apple-touch-icon-180x180.png new file mode 100644 index 000000000..a5729e3d5 Binary files /dev/null and b/web/favicons/apple-touch-icon-180x180.png differ diff --git a/web/favicons/apple-touch-icon-180x180v2.png b/web/favicons/apple-touch-icon-180x180v2.png new file mode 100644 index 000000000..7f1d5e7cd Binary files /dev/null and b/web/favicons/apple-touch-icon-180x180v2.png differ diff --git a/web/favicons/browserconfig.xml b/web/favicons/browserconfig.xml new file mode 100644 index 000000000..3c7c296c4 --- /dev/null +++ b/web/favicons/browserconfig.xml @@ -0,0 +1,9 @@ + + + + + + #00122C + + + diff --git a/web/favicons/dark-logo.svg b/web/favicons/dark-logo.svg new file mode 100644 index 000000000..dfb8e20e2 --- /dev/null +++ b/web/favicons/dark-logo.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/favicons/favicon-16x16.png b/web/favicons/favicon-16x16.png new file mode 100644 index 000000000..a4a5c3517 Binary files /dev/null and b/web/favicons/favicon-16x16.png differ diff --git a/web/favicons/favicon-32x32-safari.svg b/web/favicons/favicon-32x32-safari.svg new file mode 100644 index 000000000..c847ad165 --- /dev/null +++ b/web/favicons/favicon-32x32-safari.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/web/favicons/favicon-32x32.ico b/web/favicons/favicon-32x32.ico new file mode 100644 index 000000000..f25c9728b Binary files /dev/null and b/web/favicons/favicon-32x32.ico differ diff --git a/web/favicons/favicon-32x32.png b/web/favicons/favicon-32x32.png new file mode 100644 index 000000000..93ff5844a Binary files /dev/null and b/web/favicons/favicon-32x32.png differ diff --git a/web/favicons/favicon-32x32.svg b/web/favicons/favicon-32x32.svg new file mode 100644 index 000000000..703f84113 --- /dev/null +++ b/web/favicons/favicon-32x32.svg @@ -0,0 +1,4 @@ + + + + diff --git a/web/favicons/favicon-48x48.png b/web/favicons/favicon-48x48.png new file mode 100644 index 000000000..a2fec72a5 Binary files /dev/null and b/web/favicons/favicon-48x48.png differ diff --git a/web/favicons/favicon.32.safari.svg b/web/favicons/favicon.32.safari.svg new file mode 100644 index 000000000..c2694e568 --- /dev/null +++ b/web/favicons/favicon.32.safari.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/web/favicons/favicon.ico b/web/favicons/favicon.ico new file mode 100644 index 000000000..746783264 Binary files /dev/null and b/web/favicons/favicon.ico differ diff --git a/web/favicons/link-blue.svg b/web/favicons/link-blue.svg new file mode 100644 index 000000000..e6ff46e0b --- /dev/null +++ b/web/favicons/link-blue.svg @@ -0,0 +1,3 @@ + + + diff --git a/web/favicons/link-gray.svg b/web/favicons/link-gray.svg new file mode 100644 index 000000000..d64420311 --- /dev/null +++ b/web/favicons/link-gray.svg @@ -0,0 +1,3 @@ + + + diff --git a/web/favicons/search-dark.svg b/web/favicons/search-dark.svg new file mode 100644 index 000000000..2996cdf31 --- /dev/null +++ b/web/favicons/search-dark.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/web/favicons/white-logo.svg b/web/favicons/white-logo.svg new file mode 100644 index 000000000..747e09058 --- /dev/null +++ b/web/favicons/white-logo.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/fonts/Graphik-Black-Cy-Gr-Web.woff b/web/fonts/Graphik-Black-Cy-Gr-Web.woff new file mode 100644 index 000000000..726829fef Binary files /dev/null and b/web/fonts/Graphik-Black-Cy-Gr-Web.woff differ diff --git a/web/fonts/Graphik-Black-Cy-Gr-Web.woff2 b/web/fonts/Graphik-Black-Cy-Gr-Web.woff2 new file mode 100644 index 000000000..c70bc7c74 Binary files /dev/null and b/web/fonts/Graphik-Black-Cy-Gr-Web.woff2 differ diff --git a/web/fonts/Graphik-BlackItalic-Cy-Gr-Web.woff b/web/fonts/Graphik-BlackItalic-Cy-Gr-Web.woff new file mode 100644 index 000000000..cc33585ab Binary files /dev/null and b/web/fonts/Graphik-BlackItalic-Cy-Gr-Web.woff differ diff --git a/web/fonts/Graphik-BlackItalic-Cy-Gr-Web.woff2 b/web/fonts/Graphik-BlackItalic-Cy-Gr-Web.woff2 new file mode 100644 index 000000000..96167e906 Binary files /dev/null and b/web/fonts/Graphik-BlackItalic-Cy-Gr-Web.woff2 differ diff --git a/web/fonts/Graphik-Bold-Cy-Gr-Web.woff b/web/fonts/Graphik-Bold-Cy-Gr-Web.woff new file mode 100644 index 000000000..770897de6 Binary files /dev/null and b/web/fonts/Graphik-Bold-Cy-Gr-Web.woff differ diff --git a/web/fonts/Graphik-Bold-Cy-Gr-Web.woff2 b/web/fonts/Graphik-Bold-Cy-Gr-Web.woff2 new file mode 100644 index 000000000..19b15125f Binary files /dev/null and b/web/fonts/Graphik-Bold-Cy-Gr-Web.woff2 differ diff --git a/web/fonts/Graphik-Bold-Web.eot b/web/fonts/Graphik-Bold-Web.eot new file mode 100644 index 000000000..1a26e6002 Binary files /dev/null and b/web/fonts/Graphik-Bold-Web.eot differ diff --git a/web/fonts/Graphik-Bold-Web.ttf b/web/fonts/Graphik-Bold-Web.ttf new file mode 100644 index 000000000..a8c5ac8b4 Binary files /dev/null and b/web/fonts/Graphik-Bold-Web.ttf differ diff --git a/web/fonts/Graphik-Bold-Web.woff b/web/fonts/Graphik-Bold-Web.woff new file mode 100644 index 000000000..e473123e9 Binary files /dev/null and b/web/fonts/Graphik-Bold-Web.woff differ diff --git a/web/fonts/Graphik-Bold-Web.woff2 b/web/fonts/Graphik-Bold-Web.woff2 new file mode 100644 index 000000000..559f34cf0 Binary files /dev/null and b/web/fonts/Graphik-Bold-Web.woff2 differ diff --git a/web/fonts/Graphik-BoldItalic-Cy-Gr-Web.woff b/web/fonts/Graphik-BoldItalic-Cy-Gr-Web.woff new file mode 100644 index 000000000..6b6a176a4 Binary files /dev/null and b/web/fonts/Graphik-BoldItalic-Cy-Gr-Web.woff differ diff --git a/web/fonts/Graphik-BoldItalic-Cy-Gr-Web.woff2 b/web/fonts/Graphik-BoldItalic-Cy-Gr-Web.woff2 new file mode 100644 index 000000000..3d7ede3f6 Binary files /dev/null and b/web/fonts/Graphik-BoldItalic-Cy-Gr-Web.woff2 differ diff --git a/web/fonts/Graphik-Extralight-Cy-Gr-Web.woff b/web/fonts/Graphik-Extralight-Cy-Gr-Web.woff new file mode 100644 index 000000000..b8db2fad6 Binary files /dev/null and b/web/fonts/Graphik-Extralight-Cy-Gr-Web.woff differ diff --git a/web/fonts/Graphik-Extralight-Cy-Gr-Web.woff2 b/web/fonts/Graphik-Extralight-Cy-Gr-Web.woff2 new file mode 100644 index 000000000..28586cd93 Binary files /dev/null and b/web/fonts/Graphik-Extralight-Cy-Gr-Web.woff2 differ diff --git a/web/fonts/Graphik-ExtralightItalic-Cy-Gr-Web.woff b/web/fonts/Graphik-ExtralightItalic-Cy-Gr-Web.woff new file mode 100644 index 000000000..d6005ba73 Binary files /dev/null and b/web/fonts/Graphik-ExtralightItalic-Cy-Gr-Web.woff differ diff --git a/web/fonts/Graphik-ExtralightItalic-Cy-Gr-Web.woff2 b/web/fonts/Graphik-ExtralightItalic-Cy-Gr-Web.woff2 new file mode 100644 index 000000000..f21ac3c1f Binary files /dev/null and b/web/fonts/Graphik-ExtralightItalic-Cy-Gr-Web.woff2 differ diff --git a/web/fonts/Graphik-Light-Cy-Gr-Web.woff b/web/fonts/Graphik-Light-Cy-Gr-Web.woff new file mode 100644 index 000000000..57f29875d Binary files /dev/null and b/web/fonts/Graphik-Light-Cy-Gr-Web.woff differ diff --git a/web/fonts/Graphik-Light-Cy-Gr-Web.woff2 b/web/fonts/Graphik-Light-Cy-Gr-Web.woff2 new file mode 100644 index 000000000..86758ea1f Binary files /dev/null and b/web/fonts/Graphik-Light-Cy-Gr-Web.woff2 differ diff --git a/web/fonts/Graphik-LightItalic-Cy-Gr-Web.woff b/web/fonts/Graphik-LightItalic-Cy-Gr-Web.woff new file mode 100644 index 000000000..daaacf9d4 Binary files /dev/null and b/web/fonts/Graphik-LightItalic-Cy-Gr-Web.woff differ diff --git a/web/fonts/Graphik-LightItalic-Cy-Gr-Web.woff2 b/web/fonts/Graphik-LightItalic-Cy-Gr-Web.woff2 new file mode 100644 index 000000000..0b692fd27 Binary files /dev/null and b/web/fonts/Graphik-LightItalic-Cy-Gr-Web.woff2 differ diff --git a/web/fonts/Graphik-Medium-Cy-Gr-Web.woff b/web/fonts/Graphik-Medium-Cy-Gr-Web.woff new file mode 100644 index 000000000..b2209e384 Binary files /dev/null and b/web/fonts/Graphik-Medium-Cy-Gr-Web.woff differ diff --git a/web/fonts/Graphik-Medium-Cy-Gr-Web.woff2 b/web/fonts/Graphik-Medium-Cy-Gr-Web.woff2 new file mode 100644 index 000000000..06ec743d9 Binary files /dev/null and b/web/fonts/Graphik-Medium-Cy-Gr-Web.woff2 differ diff --git a/web/fonts/Graphik-Medium-Web.eot b/web/fonts/Graphik-Medium-Web.eot new file mode 100644 index 000000000..29bf62a60 Binary files /dev/null and b/web/fonts/Graphik-Medium-Web.eot differ diff --git a/web/fonts/Graphik-Medium-Web.ttf b/web/fonts/Graphik-Medium-Web.ttf new file mode 100644 index 000000000..7e057973a Binary files /dev/null and b/web/fonts/Graphik-Medium-Web.ttf differ diff --git a/web/fonts/Graphik-Medium-Web.woff b/web/fonts/Graphik-Medium-Web.woff new file mode 100644 index 000000000..2ee23f9bd Binary files /dev/null and b/web/fonts/Graphik-Medium-Web.woff differ diff --git a/web/fonts/Graphik-Medium-Web.woff2 b/web/fonts/Graphik-Medium-Web.woff2 new file mode 100644 index 000000000..ac27848c8 Binary files /dev/null and b/web/fonts/Graphik-Medium-Web.woff2 differ diff --git a/web/fonts/Graphik-MediumItalic-Cy-Gr-Web.woff b/web/fonts/Graphik-MediumItalic-Cy-Gr-Web.woff new file mode 100644 index 000000000..5b6b96b5e Binary files /dev/null and b/web/fonts/Graphik-MediumItalic-Cy-Gr-Web.woff differ diff --git a/web/fonts/Graphik-MediumItalic-Cy-Gr-Web.woff2 b/web/fonts/Graphik-MediumItalic-Cy-Gr-Web.woff2 new file mode 100644 index 000000000..c7fda3bf1 Binary files /dev/null and b/web/fonts/Graphik-MediumItalic-Cy-Gr-Web.woff2 differ diff --git a/web/fonts/Graphik-Regular-Cy-Gr-Web.woff b/web/fonts/Graphik-Regular-Cy-Gr-Web.woff new file mode 100644 index 000000000..63fe3dc95 Binary files /dev/null and b/web/fonts/Graphik-Regular-Cy-Gr-Web.woff differ diff --git a/web/fonts/Graphik-Regular-Cy-Gr-Web.woff2 b/web/fonts/Graphik-Regular-Cy-Gr-Web.woff2 new file mode 100644 index 000000000..e0dfed031 Binary files /dev/null and b/web/fonts/Graphik-Regular-Cy-Gr-Web.woff2 differ diff --git a/web/fonts/Graphik-Regular-Web.eot b/web/fonts/Graphik-Regular-Web.eot new file mode 100644 index 000000000..38b722ca9 Binary files /dev/null and b/web/fonts/Graphik-Regular-Web.eot differ diff --git a/web/fonts/Graphik-Regular-Web.ttf b/web/fonts/Graphik-Regular-Web.ttf new file mode 100644 index 000000000..36f5a1360 Binary files /dev/null and b/web/fonts/Graphik-Regular-Web.ttf differ diff --git a/web/fonts/Graphik-Regular-Web.woff b/web/fonts/Graphik-Regular-Web.woff new file mode 100644 index 000000000..8920bb7cb Binary files /dev/null and b/web/fonts/Graphik-Regular-Web.woff differ diff --git a/web/fonts/Graphik-Regular-Web.woff2 b/web/fonts/Graphik-Regular-Web.woff2 new file mode 100644 index 000000000..94c56b182 Binary files /dev/null and b/web/fonts/Graphik-Regular-Web.woff2 differ diff --git a/web/fonts/Graphik-RegularItalic-Cy-Gr-Web.woff b/web/fonts/Graphik-RegularItalic-Cy-Gr-Web.woff new file mode 100644 index 000000000..b605f4767 Binary files /dev/null and b/web/fonts/Graphik-RegularItalic-Cy-Gr-Web.woff differ diff --git a/web/fonts/Graphik-RegularItalic-Cy-Gr-Web.woff2 b/web/fonts/Graphik-RegularItalic-Cy-Gr-Web.woff2 new file mode 100644 index 000000000..b4fb6096a Binary files /dev/null and b/web/fonts/Graphik-RegularItalic-Cy-Gr-Web.woff2 differ diff --git a/web/fonts/Graphik-RegularItalic-Web.eot b/web/fonts/Graphik-RegularItalic-Web.eot new file mode 100644 index 000000000..ab19f0098 Binary files /dev/null and b/web/fonts/Graphik-RegularItalic-Web.eot differ diff --git a/web/fonts/Graphik-RegularItalic-Web.ttf b/web/fonts/Graphik-RegularItalic-Web.ttf new file mode 100644 index 000000000..7ab16c0a0 Binary files /dev/null and b/web/fonts/Graphik-RegularItalic-Web.ttf differ diff --git a/web/fonts/Graphik-RegularItalic-Web.woff b/web/fonts/Graphik-RegularItalic-Web.woff new file mode 100644 index 000000000..1f4b84d33 Binary files /dev/null and b/web/fonts/Graphik-RegularItalic-Web.woff differ diff --git a/web/fonts/Graphik-RegularItalic-Web.woff2 b/web/fonts/Graphik-RegularItalic-Web.woff2 new file mode 100644 index 000000000..63412038a Binary files /dev/null and b/web/fonts/Graphik-RegularItalic-Web.woff2 differ diff --git a/web/fonts/Graphik-Semibold-Cy-Gr-Web.woff b/web/fonts/Graphik-Semibold-Cy-Gr-Web.woff new file mode 100644 index 000000000..26d0ea73f Binary files /dev/null and b/web/fonts/Graphik-Semibold-Cy-Gr-Web.woff differ diff --git a/web/fonts/Graphik-Semibold-Cy-Gr-Web.woff2 b/web/fonts/Graphik-Semibold-Cy-Gr-Web.woff2 new file mode 100644 index 000000000..05ee30b07 Binary files /dev/null and b/web/fonts/Graphik-Semibold-Cy-Gr-Web.woff2 differ diff --git a/web/fonts/Graphik-SemiboldItalic-Cy-Gr-Web.woff b/web/fonts/Graphik-SemiboldItalic-Cy-Gr-Web.woff new file mode 100644 index 000000000..9efb5170d Binary files /dev/null and b/web/fonts/Graphik-SemiboldItalic-Cy-Gr-Web.woff differ diff --git a/web/fonts/Graphik-SemiboldItalic-Cy-Gr-Web.woff2 b/web/fonts/Graphik-SemiboldItalic-Cy-Gr-Web.woff2 new file mode 100644 index 000000000..c2d93dcb3 Binary files /dev/null and b/web/fonts/Graphik-SemiboldItalic-Cy-Gr-Web.woff2 differ diff --git a/web/fonts/Graphik-Super-Cy-Gr-Web.woff b/web/fonts/Graphik-Super-Cy-Gr-Web.woff new file mode 100644 index 000000000..08aa7740c Binary files /dev/null and b/web/fonts/Graphik-Super-Cy-Gr-Web.woff differ diff --git a/web/fonts/Graphik-Super-Cy-Gr-Web.woff2 b/web/fonts/Graphik-Super-Cy-Gr-Web.woff2 new file mode 100644 index 000000000..c3e3b0f71 Binary files /dev/null and b/web/fonts/Graphik-Super-Cy-Gr-Web.woff2 differ diff --git a/web/fonts/Graphik-SuperItalic-Cy-Gr-Web.woff b/web/fonts/Graphik-SuperItalic-Cy-Gr-Web.woff new file mode 100644 index 000000000..61ee55f5b Binary files /dev/null and b/web/fonts/Graphik-SuperItalic-Cy-Gr-Web.woff differ diff --git a/web/fonts/Graphik-SuperItalic-Cy-Gr-Web.woff2 b/web/fonts/Graphik-SuperItalic-Cy-Gr-Web.woff2 new file mode 100644 index 000000000..627b56735 Binary files /dev/null and b/web/fonts/Graphik-SuperItalic-Cy-Gr-Web.woff2 differ diff --git a/web/fonts/Graphik-Thin-Cy-Gr-Web.woff b/web/fonts/Graphik-Thin-Cy-Gr-Web.woff new file mode 100644 index 000000000..24d2c14c2 Binary files /dev/null and b/web/fonts/Graphik-Thin-Cy-Gr-Web.woff differ diff --git a/web/fonts/Graphik-Thin-Cy-Gr-Web.woff2 b/web/fonts/Graphik-Thin-Cy-Gr-Web.woff2 new file mode 100644 index 000000000..9a53e6a6c Binary files /dev/null and b/web/fonts/Graphik-Thin-Cy-Gr-Web.woff2 differ diff --git a/web/index.css b/web/index.css new file mode 100644 index 000000000..44dfaa700 --- /dev/null +++ b/web/index.css @@ -0,0 +1,8 @@ +@import './styles/colours.css'; +@import './styles/fonts.css'; +@import './styles/codeMirror.css'; +@import './styles/banner.css'; +@import './styles/footer.css'; +@import './styles/rightPanel.css'; +@import './styles/sidebar.css'; +@import './styles/general.css'; \ No newline at end of file diff --git a/web/index.html b/web/index.html index 65bee6a99..ac473611f 100644 --- a/web/index.html +++ b/web/index.html @@ -2,69 +2,244 @@ - Checkout.com API Reference - - + + + + + + + + Checkout.com API Reference - - + - - - - + - \ No newline at end of file + diff --git a/web/js/datadog.js b/web/js/datadog.js new file mode 100644 index 000000000..41f48809d --- /dev/null +++ b/web/js/datadog.js @@ -0,0 +1,14 @@ +(function(h,o,u,n,d) { + h=h[d]=h[d]||{q:[],onReady:function(c){h.q.push(c)}} + d=o.createElement(u);d.async=1;d.src=n + n=o.getElementsByTagName(u)[0];n.parentNode.insertBefore(d,n) +})(window,document,'script','https://www.datadoghq-browser-agent.com/datadog-logs-v3.js','DD_LOGS') +DD_LOGS.onReady(function() { + DD_LOGS.init({ + clientToken: 'pub1378db53f51e4131b668bec6d3a4c946', + site: 'datadoghq.com', + service: 'api-reference', + forwardErrorsToLogs: true, + sampleRate: 100, + }) + }) diff --git a/web/js/ddRum.js b/web/js/ddRum.js new file mode 100644 index 000000000..0482cb806 --- /dev/null +++ b/web/js/ddRum.js @@ -0,0 +1,19 @@ +(function(h,o,u,n,d) { + h=h[d]=h[d]||{q:[],onReady:function(c){h.q.push(c)}} + d=o.createElement(u);d.async=1;d.src=n + n=o.getElementsByTagName(u)[0];n.parentNode.insertBefore(d,n) + })(window,document,'script','https://www.datadoghq-browser-agent.com/datadog-rum-v3.js','DD_RUM') + DD_RUM.onReady(function() { + DD_RUM.init({ + clientToken: 'pub1378db53f51e4131b668bec6d3a4c946', + applicationId: '37fe93ec-a46f-4ea2-8ee1-b3a124982306', + site: 'datadoghq.com', + service:'api-reference', + version: '1.0.0', + sampleRate: 100, + trackInteractions: true, + defaultPrivacyLevel: 'mask-user-input' + }); + + DD_RUM.startSessionReplayRecording(); + }) diff --git a/web/js/gcdc.js b/web/js/gcdc.js new file mode 100644 index 000000000..25de037e0 --- /dev/null +++ b/web/js/gcdc.js @@ -0,0 +1,8 @@ +(function(g,a,t,e,d,c,o){ + if (!g[d]) {g.GatedContentObject=d; + g[d]=g[d]||function(){(g[d].q=g[d].q||[]).push(arguments)}; + c=a.createElement(t),o=a.getElementsByTagName(t)[0]; + c.async=1;c.src=e;o.parentNode.insertBefore(c, o)} +})(window, document, 'script', 'https://app.gatedcontent.com/scripts/29853457/app.js', 'gcdc'); +gcdc('loadGates'); + diff --git a/web/js/gtm.js b/web/js/gtm.js new file mode 100644 index 000000000..aa49828a4 --- /dev/null +++ b/web/js/gtm.js @@ -0,0 +1,24 @@ +window.dataLayer = window.dataLayer || []; +function gtag() { + dataLayer.push(arguments); +} +gtag('js', new Date()); + +gtag('config', 'UA-83886670-8'); + + +(function (w, d, s, l, i) { + w[l] = w[l] || []; + w[l].push({'gtm.start': new Date().getTime(), event: 'gtm.js'}); + var f = d.getElementsByTagName(s)[0], + j = d.createElement(s), + dl = l != 'dataLayer' + ? '&l=' + l + : ''; + j.async = true; + j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; + f + .parentNode + .insertBefore(j, f); +})(window, document, 'script', 'dataLayer', 'GTM-MG7959V'); + diff --git a/web/js/heapio.js b/web/js/heapio.js new file mode 100644 index 000000000..8ae9b2c4d --- /dev/null +++ b/web/js/heapio.js @@ -0,0 +1,5 @@ +window.heap=window.heap||[],heap.load=function(e,t){window.heap.appid=e,window.heap.config=t=t||{};var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src="https://cdn.heapanalytics.com/js/heap-"+e+".js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(r,a);for(var n=function(e){return function(){heap.push([e].concat(Array.prototype.slice.call(arguments,0)))}},p=["addEventProperties","addUserProperties","clearEventProperties","identify","resetIdentity","removeEventProperty","setEventProperties","track","unsetEventProperty"],o=0;o { + document.getElementsByClassName('footerParent')[0].classList += ' showFooter'; +}, 2000) diff --git a/web/js/theme.js b/web/js/theme.js new file mode 100644 index 000000000..8cf11b847 --- /dev/null +++ b/web/js/theme.js @@ -0,0 +1,26 @@ +// Set theme based on local storage +var toggle = document.querySelector('.toggle-track'); +var theme = localStorage.getItem('theme'); +if (theme) { + document.body.className = ''; + document.body.classList.add(theme); + if (theme === 'dark') { + toggle.classList.add('toggled'); + } +} else { + localStorage.setItem('theme', 'light'); +} + +toggle.addEventListener('click', function () { + if (toggle.classList.contains('toggled')) { + toggle.classList.remove('toggled'); + localStorage.setItem('theme', 'light'); + document.body.className = ''; + document.body.classList.add('light'); + } else { + toggle.classList.add('toggled'); + localStorage.setItem('theme', 'dark'); + document.body.className = ''; + document.body.classList.add('dark'); + } +}); diff --git a/web/previous/index.css b/web/previous/index.css new file mode 100644 index 000000000..fc5da750b --- /dev/null +++ b/web/previous/index.css @@ -0,0 +1,7 @@ +@import '../styles/colours.css'; +@import '../styles/fonts.css'; +@import '../styles/codeMirror.css'; +@import '../styles/footer.css'; +@import '../styles/rightPanel.css'; +@import '../styles/sidebar.css'; +@import '../styles/general.css'; \ No newline at end of file diff --git a/web/previous/index.html b/web/previous/index.html new file mode 100644 index 000000000..6ec4b73fb --- /dev/null +++ b/web/previous/index.html @@ -0,0 +1,234 @@ + + + + + + + + + + + + Checkout.com API Reference + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + diff --git a/web/styles/banner.css b/web/styles/banner.css new file mode 100644 index 000000000..2fecc7e26 --- /dev/null +++ b/web/styles/banner.css @@ -0,0 +1,80 @@ +/* banner styles */ +.banner { + position: fixed; + top: 0; + left: 0; + right: 0; + max-width: 100vw; + padding: 20px 64px; + background-color: var(--primary-dark-blue); + color: var(--cko-white); + z-index: 111; + text-align: center; + font-size: 14px; + line-height: 24px; +} + +@media screen and (max-width: 600px) { + .banner { + font-size: 12px; + line-height: 20px; + padding: 12px 24px; + } +} + +.banner-text { + display: inline-block; +} + +.banner-link { + display: inline-block; + color: var(--cko-white) !important; + font-weight: 400 !important; +} + +.banner-link:hover { + color: var(--cko-white) !important; +} + +.menu-content { + top: 64px !important; + height: calc(100vh - 64px) !important; +} + +.redoc-wrap { + top: 64px; +} + +@media screen and (max-width: 1163px) { + .redoc-wrap { + top: 88px; + } + + .menu-content { + top: 88px !important; + height: calc(100vh - 88px) !important; + } +} + +@media screen and (max-width: 655px) { + .redoc-wrap { + top: 112px; + } + + .menu-content { + top: 80px !important; + padding-top: 0 !important; + } +} + +@media screen and (max-width: 600px) { + .redoc-wrap { + top: 84px; + } +} + +@media screen and (max-width: 359px) { + .redoc-wrap { + top: 104px; + } +} \ No newline at end of file diff --git a/web/styles/codeMirror.css b/web/styles/codeMirror.css new file mode 100644 index 000000000..3dadd439c --- /dev/null +++ b/web/styles/codeMirror.css @@ -0,0 +1,77 @@ +.react-codemirror2 { + flex: initial !important; + height: 100%; + justify-content: flex-start !important; +} + +.CodeMirror pre.CodeMirror-line, +.CodeMirror pre.CodeMirror-line-like { + background: var(--code-background) !important; + color: var(--primary-text) !important; +} + +.cm-s-material div.CodeMirror-selected { + background: rgba(78, 205, 255, 0.4) !important; +} + +.cm-s-material.CodeMirror-focused div.CodeMirror-selected { + background: rgba(78, 205, 255, 0.4) !important; +} + +.cm-s-material .CodeMirror-line::selection, +.cm-s-material .CodeMirror-line > span::selection, +.cm-s-material .CodeMirror-line > span > span::selection { + background: rgba(78, 205, 255, 0.4) !important; +} + +.cm-s-material .CodeMirror-line::-moz-selection, +.cm-s-material .CodeMirror-line > span::-moz-selection, +.cm-s-material .CodeMirror-line > span > span::-moz-selection { + background: rgba(78, 205, 255, 0.4) !important; +} + +.CodeMirror-lines > div > div:not(.CodeMirror-measure) { + z-index: 10 !important; +} + +.cm-s-material .CodeMirror-cursor { + border-color: var(--primary-text) !important; +} + +.CodeMirror-scroll { + background-color: var(--sidebar-background) !important; +} + +.CodeMirror-line::selection { + background-color: red; +} + +.react-codemirror2 { + height: 100%; + justify-content: flex-start !important; +} + +.CodeMirror-scroll { + background-color: var(--sidebar-background) !important; +} + +.CodeMirror-line::selection { + background-color: red; +} + +.cm-s-material .cm-string { + color: var(--token-string) !important; +} + +.cm-s-material .cm-property, +div.CodeMirror span.CodeMirror-matchingbracket, +.cm-s-material .CodeMirror-matchingbracket { + color: var(--primary-text) !important; +} +.cm-s-material .cm-atom { + color: var(--code-value-bool) !important; +} + +.cm-s-material .cm-number { + color: var(--token-number) !important; +} \ No newline at end of file diff --git a/web/styles/colours.css b/web/styles/colours.css new file mode 100644 index 000000000..5e5d7ef68 --- /dev/null +++ b/web/styles/colours.css @@ -0,0 +1,125 @@ +:root { + --S00: #ffffff; + --S05: #e6e7ec; + --S10: #f0f3f7; + --S20: #b6b8c6; + --S90: #9ea0b4; + --S100: #8688a0; + --S300: #6d708e; + --S500: #55587b; + --S700: #3d4168; + --S800: #242955; + --S1000: #0c1142; + --Y10: #141407; + --Y20: #ffffee; + --Y30: #ffffe9; + --Y40: #ffffe3; + --Y50: #ffffde; + --Y60: #ffffd8; + --Y70: #ffffd3; + --Y80: #ffffce; + --Y500: #f3c25d; + --T10: #d5f6f8; + --T20: #c0f2f4; + --T40: #aaeef1; + --T60: #95eaed; + --T80: #80e5e9; + --T100: #6be1e6; + --T200: #55dde2; + --T300: #40d8df; + --T500: #3ab9f4; + --B500: #0082d9; + --P10: #f5f5fc; + --P600: #6964b3; + --R10: #fff8f7; + --R500: #ee6d5f; + --R800: #cc4b3d; + --G20: #e4f4f0; + --G500: #00b48f; + --G700: #009e7e; + + --primary-dark-blue: var(--S1000); + --secondary-dark-blue: var(--S800); + --cko-dark-blue: #090c30; + --cko-dark-contrast-blue: var(--S800); + --cko-green: #02b48f; + --cko-light-green: rgb(45, 179, 136, 0.5); + --cko-light-green: rgb(45, 179, 136, 0.5); + --cko-bright-blue: #2ad4db; + --cko-light-blue: #d5f6f9; + --cko-grey-tint-blue: var(--S05); + --cko-contrast-gray: #cecfd9; + --cko-yellow: var(--Y80); + --cko-white: #fff; + --cko-light-grey: #b7b8c6; + --cko-code-yellow: #d4d5a5; + --cko-code-blue: #74a2f3; + --cko-code-green: #b9ea80; + --cko-code-purple: #ce8aec; + --cko-code-gray: #81849e; + --cko-code-light-blue: #1d76b3; + --cko-code-light-purple: #75438a; + --cko-code-orange: #bc753f; + --cko-red: #ec644b; + --cko-light-red: rgb(253, 117, 95, 0.5); + --cko-http-get-color: #2db388; + --cko-http-post-color: #00aeef; + --cko-http-put-color: #b77ba1; + --cko-http-patch-color: #fab82b; + --cko-http-del-color: #fd755f; + + --token-string: var(--P600); + --token-number: var(--R800); + --token-property: var(--S1000); + --token-keyword: var(--S700); + --token-class: var(--G700); + --token-operator: var(--S90); + --token-comment: var(--S700); +} + +.light { + --background: var(--cko-white); + --sidebar-background: var(--cko-grey-tint-blue); + --secondary-background: white; + --table-background: var(--cko-white); + --toggle-bg: var(--S1000); + --primary-text: var(--primary-dark-blue); + --secondary-text: var(--secondary-dark-blue); + --logo: url('../favicons/dark-logo.svg'); + --header-link: url('../favicons/link-blue.svg'); + --endpoint-dropdown: var(--S05); + --link-color: var(--cko-green); + --link-hover: var(--cko-dark-blue); + --active: var(--cko-dark-blue); + --background-contrast: var(--cko-white); + --background-contrast-focus: var(--S10); + --subtitle: var(--cko-dark-blue); + --required: var(--cko-red); + --border: var(--S05); + --field-params: var(--cko-code-blue); + --param-rule: var(--cko-green); + --primary-button: var(--cko-bright-blue); + --secondary-button: var(--cko-yellow); + --code-background: var(--sidebar-background); + --code-bracket: var(--cko-code-gray); + --code-param: var(--cko-code-light-blue); + --code-string: var(--primary-dark-blue); + --code-value-link: var(--cko-green); + --code-value-bool: var(--cko-green); + --code-value-number: var(--cko-red); + --code-label-background: var(--P10); + --code-type: var(--S800); + --primary-button-color: var(--cko-dark-blue); + --example-area-background: var(--cko-white); + --request-body-content-background: var(--cko-white); + --title-color: var(--primary-dark-blue); + --icon-color: var(--cko-light-grey); + --sidebar-option-hover: var(--cko-contrast-gray); + --url-area: var(--primary-dark-blue); + + --btn-primary-bg: var(--S1000); + --btn-primary-hover-bg: rgb(61, 65, 104); + --btn-primary-font: #ffffc8; + + --endpoint-label: var(--S1000); +} \ No newline at end of file diff --git a/web/styles/fonts.css b/web/styles/fonts.css new file mode 100644 index 000000000..8409c8bd8 --- /dev/null +++ b/web/styles/fonts.css @@ -0,0 +1,88 @@ +/*=========================================== + = Fonts = +============================================*/ + +@font-face { + font-family: 'Graphik LCG Web'; + src: url('../fonts/Graphik-Super-Cy-Gr-Web.woff2') format('woff2'), + url('../fonts/Graphik-Super-Cy-Gr-Web.woff') format('woff'); + font-weight: 900; + font-style: normal; + font-stretch: normal; +} + +@font-face { + font-family: 'Graphik LCG Web'; + src: url('../fonts/Graphik-Black-Cy-Gr-Web.woff2') format('woff2'), + url('../fonts/Graphik-Black-Cy-Gr-Web.woff') format('woff'); + font-weight: 800; + font-style: normal; + font-stretch: normal; +} + +@font-face { + font-family: 'Graphik LCG Web'; + src: url('../fonts/Graphik-Bold-Cy-Gr-Web.woff2') format('woff2'), + url('../fonts/Graphik-Bold-Cy-Gr-Web.woff') format('woff'); + font-weight: 700; + font-style: normal; + font-stretch: normal; +} + +@font-face { + font-family: 'Graphik LCG Web'; + src: url('../fonts/Graphik-Semibold-Cy-Gr-Web.woff2') format('woff2'), + url('../fonts/Graphik-Semibold-Cy-Gr-Web.woff') format('woff'); + font-weight: 600; + font-style: normal; + font-stretch: normal; +} + +@font-face { + font-family: 'Graphik LCG Web'; + src: url('../fonts/Graphik-Medium-Cy-Gr-Web.woff2') format('woff2'), + url('../fonts/Graphik-Medium-Cy-Gr-Web.woff') format('woff'); + font-weight: 500; + font-style: normal; + font-stretch: normal; +} + +@font-face { + font-family: 'Graphik LCG Web'; + src: url('../fonts/Graphik-Regular-Cy-Gr-Web.woff2') format('woff2'), + url('../fonts/Graphik-Regular-Cy-Gr-Web.woff') format('woff'); + font-weight: 400; + font-style: normal; + font-stretch: normal; +} + +@font-face { + font-family: 'Graphik LCG Web'; + src: url('../fonts/Graphik-Light-Cy-Gr-Web.woff2') format('woff2'), + url('../fonts/Graphik-Light-Cy-Gr-Web.woff') format('woff'); + font-weight: 300; + font-style: normal; + font-stretch: normal; +} + +@font-face { + font-family: 'Graphik LCG Web'; + src: url('../fonts/Graphik-Extralight-Cy-Gr-Web.woff2') format('woff2'), + url('../fonts/Graphik-Extralight-Cy-Gr-Web.woff') format('woff'); + font-weight: 200; + font-style: normal; + font-stretch: normal; +} + +@font-face { + font-family: 'Graphik LCG Web'; + src: url('../fonts/Graphik-Thin-Cy-Gr-Web.woff2') format('woff2'), + url('../fonts/Graphik-Thin-Cy-Gr-Web.woff') format('woff'); + font-weight: 100; + font-style: normal; + font-stretch: normal; +} + +* { + font-family: 'Graphik LCG Web', Arial, sans-serif !important; +} \ No newline at end of file diff --git a/web/styles/footer.css b/web/styles/footer.css new file mode 100644 index 000000000..4951fb50a --- /dev/null +++ b/web/styles/footer.css @@ -0,0 +1,83 @@ +/* Footer */ +.showFooter { + display: flex !important; +} + +.footerParent { + display: none; +} + +.footer-main { + margin-top: 64px; +} + +@media only screen and (max-width: 1350px) { + .footer-main { + margin-top: 96px; + padding-bottom: 24px; + } +} + +.footer-wrapper { + display: flex; + width: 100%; + justify-content: space-between; + padding: 24px 40px; + align-items: center; + left: 0; + z-index: 109; +} + +.footer-link { + font-size: 11px; + font-weight: normal; + text-decoration: none; + color: var(--primary-text) !important; +} + +.footer-link:hover { + text-decoration: underline; +} + +.footer-link-list { + display: flex; + flex-wrap: wrap; + gap: 40px; +} + +@media only screen and (max-width: 1350px) { + .footer-link-list { + gap: 8px; + width: 100%; + justify-content: space-between; + } +} + +@media only screen and (max-width: 800px) { + .footer-wrapper { + flex-direction: column; + align-items: flex-start; + margin: 24px; + padding: 0; + } + + .footer-link-list { + justify-content: start; + } +} + +.footer-item-cko { + font-weight: 500; + font-size: 14px; + color: var(--primary-text) !important; + margin-bottom: 16px; +} + +.onetrust-button { + background: none !important; + border: none !important; + padding: 0 0 4px 0 !important; + margin: 0 !important; + font-size: 11px !important; + color: var(--primary-text) !important; +} \ No newline at end of file diff --git a/web/styles/general.css b/web/styles/general.css new file mode 100644 index 000000000..248fed4e2 --- /dev/null +++ b/web/styles/general.css @@ -0,0 +1,19 @@ +body { + margin: 0; + background-color: var(--background); + height: 100vh; +} + +.dark { + --logo-crusoe: url('./favicons/white-logo.svg'); + --header-link-crusoe: url('./favicons/link-gray.svg'); +} + +.light { + --logo-crusoe: url('./favicons/dark-logo.svg'); + --header-link-crusoe: url('./favicons/link-blue.svg'); +} + +a { + font-weight: 600; +} \ No newline at end of file diff --git a/web/styles/rightPanel.css b/web/styles/rightPanel.css new file mode 100644 index 000000000..322a35319 --- /dev/null +++ b/web/styles/rightPanel.css @@ -0,0 +1,113 @@ +/* Right hand side panel */ + +/* text colour */ +[data-cy="samples-block"] :not(button):not(span) { + color: var(--primary-dark-blue)!important; +} + +/* Try it Request Panel */ +div[data-cy="console-request-body"] label { + color: #f5f7fa!important; +} + +/* BRITTLE SELECTOR dropdown background colour */ +[data-cy="console-request-body"] .sc-gGLxEB { + background-color: var(--S100)!important; +} + +div[data-cy="console-request-body"] [data-cy="console-target-server"] label { + color: var(--primary-dark-blue)!important; +} + +/* Request Panel body and chevron colour */ +[data-cy="console-request-body"] [data-cy$="-trigger"] div span { + color: var(--primary-dark-blue)!important; +} + +[data-cy="console-request-body"] [data-cy$="-trigger"] div path { + fill: var(--primary-dark-blue)!important; +} + +/* Request Panel input placholder colour */ +[data-cy="console-request-body"] input::placeholder { + opacity: 1; + color: var(--cko-code-gray); +} + +[data-cy="console-request-body"] input::-ms-input-placeholder { + opacity: 1; + color: var(--cko-code-gray); +} + +[data-cy="console-request-body"] input::-webkit-input-placeholder { + opacity: 1; + color: var(--cko-code-gray); +} + +[data-cy="console-request-body"] select.dropdown-select + +/* Try it panel footer */ +[data-cy="console"] > div:last-child { + background-color: var(--primary-dark-blue)!important; +} + +/* Try it send button */ +button[data-cy="send-button"] { + color: #f5f7fa!important; +} + +/* headers */ +/* endpoint header */ +[data-cy="samples-block"] > div:first-child > div:first-child { + background-color: var(--primary-dark-blue)!important; + color: var(--P10)!important; +} + +/* request and response samples headers */ +[data-cy="request-samples"], [data-cy="response-samples"] { + background-color: var(--primary-dark-blue)!important; + color: var(--P10)!important; +} + +/* Request samples tabs */ +.react-tabs [role="tablist"] { + gap: 4px; + border-bottom: none!important; +} + +.react-tabs [role="tablist"] [role="tab"][class*="--selected"] { + border-radius: 4px; + background-color: var(--primary-dark-blue)!important; + color: var(--S00)!important; +} + +.react-tabs [role="tablist"] [role="tab"]:not([class*="--selected"]), .react-tabs [role="tablist"] .dropdown-wrapper { + border-radius: 4px; + background-color: var(--Y80); + color: var(--primary-dark-blue)!important; +} + +.react-tabs [role="tablist"] .dropdown-wrapper label { + background-color: var(--Y80); +} + + +/* action buttons */ +[data-cy="samples-block"] button { + background-color: #727b83; +} + +[data-cy="samples-block"] button:hover, [data-cy="samples-block"] button:focus { + background-color: #3c4c5a; +} + +/* collapser +/- button in RHS code sample */ +code button.collapser { + color: var(--primary-dark-blue) !important; +} + +code button.collapser:focus, code button.collapser:hover { + outline: none!important; + background-color: transparent!important; +} + diff --git a/web/styles/sidebar.css b/web/styles/sidebar.css new file mode 100644 index 000000000..ca9a842a5 --- /dev/null +++ b/web/styles/sidebar.css @@ -0,0 +1,35 @@ +/* Checkout logo */ +.menu-content > div:first-child { + margin-top: 24px; +} + +/* search button */ +button.button-field-search { + display: flex; + justify-content: space-between; + align-items: center; + background-color: var(--S00); + color: var(--S300); + margin: 20px; + padding: 10px 24px 10px 16px; + border-radius: 8px; + cursor: pointer; +} + +button.button-field-search span { + background-color: var(--S00); +} + +button.button-field-search .search-icon { + top: 0px; +} + +button.button-field-search .search-icon path { + fill: var(--icon-color); +} + +/* Side bar Operation tags e.g POST, GET */ + +div.operation-type { + align-items: normal; +} \ No newline at end of file