diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 00000000..7680bc0e --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@2.2.0/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "fixed": [["redoc"]], + "linked": [], + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch" +} diff --git a/.dockerignore b/.dockerignore index 9f8029b3..76f94e9f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,12 +1,8 @@ * !src/ -!config -!demo/favicon.png - -!custom.d.ts -!typings/styled-patch.d.ts -!tsconfig.json -!webpack.config.ts - +!scripts/ !package.json !package-lock.json +!vite.config.ts +!tsconfig.json +!config/ diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 42c2e0b1..00000000 --- a/.editorconfig +++ /dev/null @@ -1,10 +0,0 @@ -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 -trim_trailing_whitespace = true diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 94d167b8..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,54 +0,0 @@ -module.exports = { - env: { - browser: true, - }, - parser: '@typescript-eslint/parser', - extends: ['plugin:react/recommended', 'plugin:@typescript-eslint/recommended'], - parserOptions: { - project: 'tsconfig.json', - sourceType: 'module', - createDefaultProgram: true, - ecmaFeatures: { - jsx: true, - }, - }, - settings: { - react: { - version: 'detect', - }, - }, - plugins: ['react', 'react-hooks', '@typescript-eslint', 'import'], - rules: { - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-use-before-define': 'off', - '@typescript-eslint/interface-name-prefix': 'off', - '@typescript-eslint/no-inferrable-types': 'off', - '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/ban-ts-ignore': 'off', - '@typescript-eslint/ban-types': ['error', { types: { object: false }, extendDefaults: true }], - '@typescript-eslint/no-var-requires': 'off', - - 'react/prop-types': 'off', - 'react-hooks/rules-of-hooks': 'error', - 'react-hooks/exhaustive-deps': 'warn', - - 'import/no-extraneous-dependencies': 'error', - 'import/no-internal-modules': [ - 'error', - { - allow: [ - 'prismjs/**', - 'perfect-scrollbar/**', - 'react-dom/*', - 'core-js/**', - 'memoize-one/**', - 'unfetch/**', - 'raf/polyfill', - '**/fixtures/**', // for tests - ], - }, - ], - }, -}; diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index bfeb0d2c..7a8de1a5 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1 @@ -* @Redocly/keyboard-warriors -/docs/ @Redocly/technical-writers \ No newline at end of file +* @Redocly/keyboard-warriors \ No newline at end of file diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index ea300447..28431a80 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -20,11 +20,11 @@ Before submitting a pull request, please make sure the following is done: 2. Run `npm install` in the repository root. 3. If you’ve fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`npm test`). Tip: `npm test -- --watch TestName` is helpful in development. -5. Format your code with prettier (`npm run prettier`). +5. Lint your code with eslint (`npm run lint`). ## Development Setup -You need [Node.js](http://nodejs.org) at `v12.0.0+`. +You need [Node.js](http://nodejs.org) at `Node LTS+`. After cloning the repo, run: @@ -38,14 +38,11 @@ $ npm install # or npm # dev-server, watch and auto reload playground $ npm start -# start playground app in production environment -$ npm run start:prod - -# runt tslint +# run tslint $ npm run lint # try autofix tslint issues -$ npm run lint -- --fix +$ npm run lint:fix # run unit tests $ npm run unit @@ -53,46 +50,37 @@ $ npm run unit # run e2e tests $ npm run e2e # Make sure you have created bundle before running e2e test -# E.g. run `npm run bundle` and wait for the finishing process. +# E.g. run `npm run build` and wait for the finishing process. -# open cypress UI to debug e2e test -$ npm run cy:open +# open Playwright UI to debug e2e test +$ npm run e2e:ui # run the unit tests (includes linting and license checks) $ npm test # prepare bundles -$ npm run bundle +$ npm run build -# format the code using prettier -$ npm run prettier - -# auto-generate changelog -$ npm run changelog ``` There are some other scripts available in the `scripts` section of the `package.json` file. ## Project Structure -- **`benchmark`**: contains basic perf benchmark. Not fully ready yet +- **`examples`**: contains project demos -- **`demo`**: contains project demo with demo specs and HMR playground used in development - - - `demo/playground`: HMR Playground used in development +- **`playground`**: HMR Playground used in development - **`docs`**: contains extra docs (linked from README.md) -- **`e2e`**: contains e2e tests. The e2e tests are written and run with [Cypress](https://www.cypress.io/). +- **`playwright`**: contains e2e tests. The e2e tests are written and run with [Playwright](https://playwright.dev/). +- **`src`**: contains the source code. The codebase is written in Typescript. CSS styles are managed with [Styled components](https://www.styled-components.com/). State is managed by [Jotai](https://github.com/pmndrs/jotai) -- **`src`**: contains the source code. The codebase is written in Typescript. CSS styles are managed with [Styled components](https://www.styled-components.com/). State is managed by [MobX](https://github.com/mobxjs/mobx) - - - **`src/common-elements`**: contains common Styled elements or components used in multiple places - **`src/components`**: contains main visual components - - **`src/services`**: contains different services used by Redoc including MobX stores - - **`src/services/models`**: contains classes for OpenAPI entities (e.g. Response, Operations, etc) + - **`src/services`**: contains different services used by Redoc including Jotai stores + - **`src/models`**: contains classes for OpenAPI entities (e.g. Response, Operations, etc) - **`src/types`**: contains extra typescript typings including OpenAPI doc typings - **`src/utils`**: utility functions - - **`src/styled-components.ts`**: - reexports styled-components with proper typescript annotations using theme - - **`src/theme.ts`**: - default theme (colors, fonts, etc) used by all the components + - **`src/jotai`**: - contains Jotai store files + - **`src/hooks`**: - contains global react hooks for application \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 5443302c..da4b7991 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -15,8 +15,12 @@ A clear and concise description of what you expected to happen. **Minimal reproducible OpenAPI snippet(if possible)** + +**Version (of Redoc, Node, OS, Browser)** + + **Screenshots** If applicable, add screenshots to help explain your problem. **Additional context** -Add any other context about the problem here. +Add any other context about the problem here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 76cde648..c6f63f3e 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -17,4 +17,4 @@ A clear and concise description of what you want to happen. A clear and concise description of any alternative solutions or features you've considered. **Additional context** -Add any other context or screenshots about the feature request here. +Add any other context or screenshots about the feature request here. \ No newline at end of file diff --git a/.github/actions/get-package-version/action.yml b/.github/actions/get-package-version/action.yml new file mode 100644 index 00000000..ff3f49f0 --- /dev/null +++ b/.github/actions/get-package-version/action.yml @@ -0,0 +1,14 @@ +name: Get version from package.json +description: Get version from package.json +outputs: + value: + description: "Version from package.json" + value: ${{ steps.package_version.outputs.value }} +runs: + using: composite + steps: + - name: Get version + shell: bash + id: package_version + run: | + echo "value=$(jq -r .version package.json)" >> "$GITHUB_OUTPUT" diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml new file mode 100644 index 00000000..ccb09dc0 --- /dev/null +++ b/.github/actions/setup-node/action.yml @@ -0,0 +1,21 @@ +name: Node setup +description: Setup Node +runs: + using: composite + steps: + - name: 🚀 Starting Node setup + shell: bash + run: | + echo -e "\033[32m----- setup Node started -----\033[0m" + echo "START_TIME=$(date +%s)" >> $GITHUB_ENV + - name: 📦 Install Node + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version: 22.17.1 + cache: npm + - name: ✅ Finished Node setup + shell: bash + run: | + END_TIME=$(date +%s) + DURATION=$((END_TIME - START_TIME)) + echo -e "\033[32m----- setup Node finished in ${DURATION}s -----\033[0m" diff --git a/.github/actions/setup-playwright/action.yml b/.github/actions/setup-playwright/action.yml new file mode 100644 index 00000000..33078401 --- /dev/null +++ b/.github/actions/setup-playwright/action.yml @@ -0,0 +1,36 @@ +name: Playwright setup +description: Setup Playwright + +runs: + using: composite + steps: + - name: 🚀 Starting Playwright setup + shell: bash + run: | + echo -e "\033[32m----- setup Playwright started -----\033[0m" + echo "START_TIME=$(date +%s)" >> $GITHUB_ENV + - name: Get Playwright version + id: playwright-version + shell: bash + run: | + echo "PLAYWRIGHT_VERSION=$(jq -r '.devDependencies["@playwright/test"]' package.json)" >> $GITHUB_OUTPUT + - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 + name: Check if Playwright browser is cached + id: playwright-cache + with: + path: ${{ runner.os == 'Windows' && 'C:\Users\runneradmin\AppData\Local\ms-playwright' || runner.os == 'Linux' && '~/.cache/ms-playwright' || runner.os == 'macOS' && '~/Library/Caches/ms-playwright' || '' }} + key: ${{ runner.os }}-Playwright-${{steps.playwright-version.outputs.PLAYWRIGHT_VERSION}} + - name: 📦 Install Playwright browser if not cached + if: steps.playwright-cache.outputs.cache-hit != 'true' + shell: bash + run: | + echo "Installing Playwright in root" + echo "Installing @playwright/test@${{ steps.playwright-version.outputs.PLAYWRIGHT_VERSION }} (no-save)" + npm install -D @playwright/test@${{ steps.playwright-version.outputs.PLAYWRIGHT_VERSION }} --no-save + npx playwright install --with-deps + - name: ✅ Finished Playwright setup + shell: bash + run: | + END_TIME=$(date +%s) + DURATION=$((END_TIME - START_TIME)) + echo -e "\033[32m----- setup Playwright finished in ${DURATION}s -----\033[0m" diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f4486fd0..f77fc834 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -10,4 +10,4 @@ - [ ] Code is linted - [ ] Tested -- [ ] All new/updated code is covered with tests +- [ ] All new/updated code is covered with tests \ No newline at end of file diff --git a/.github/styles/Rules/BritishEnglish.yml b/.github/styles/Rules/BritishEnglish.yml deleted file mode 100644 index 6c33445f..00000000 --- a/.github/styles/Rules/BritishEnglish.yml +++ /dev/null @@ -1,110 +0,0 @@ -extends: substitution -message: 'Use the US spelling "%s" instead of British "%s".' -link: https://docs.microsoft.com/en-us/style-guide/word-choice/use-us-spelling-avoid-non-english-words -level: error -ignorecase: true -swap: - aeon: eon - aeroplane: airplane - ageing: aging - aluminium: aluminum - anaemia: anemia - anaesthesia: anesthesia - analyse: analyze - annexe: annex - apologise: apologize - behaviour: behavior - busses: buses - calibre: caliber - cancelled: canceled - cancellation: cancelation - catalogue: catalog - categorise: categorize - categorised: categorized - categorises: categorizes - categorising: categorizing - centre: center - cheque: check - civilisation: civilization - civilise: civilize - colour: color - cosy: cozy - cypher: cipher - dependant: dependent - defence: defense - distil: distill - draught: draft - encyclopaedia: encyclopedia - enquiry: inquiry - enrol: enroll - enrolment: enrollment - enthral: enthrall - expiry: expiration - favourite: favorite - fibre: fiber - fillet: filet - flavour: flavor - furore: furor - fulfil: fulfill - gaol: jail - grey: gray - humour: humor - honour: honor - initialled: initialed - initialling: initialing - instil: instill - jewellery: jewelry - labelling: labeling - labelled: labeled - labour: labor - libellous: libelous - licence: license - likeable: likable - liveable: livable - lustre: luster - manoeuvre: maneuver - marvellous: marvelous - matt: matte - meagre: meager - metre: meter - modelling: modeling - moustache: mustache - neighbour: neighbor - normalise: normalize - offence: offense - organise: organize - organisation: organization - orientated: oriented - paralyse: paralyze - plough: plow - pretence: pretense - programme: program - pyjamas: pajamas - rateable: ratable - realise: realize - recognise: recognize - reconnoitre: reconnoiter - rumour: rumor - sabre: saber - saleable: salable - saltpetre: saltpeter - sceptic: skeptic - sepulchre: sepulcher - signalling: signaling - sizeable: sizable - skilful: skillful - sombre: somber - smoulder: smolder - speciality: specialty - spectre: specter - splendour: splendor - standardise: standardize - standardised: standardized - sulphur: sulfur - theatre: theater - travelled: traveled - traveller: traveler - travelling: traveling - unshakeable: unshakable - wilful: willful - yoghurt: yogurt diff --git a/.github/styles/Rules/FutureTense.yml b/.github/styles/Rules/FutureTense.yml deleted file mode 100644 index 1836c0e8..00000000 --- a/.github/styles/Rules/FutureTense.yml +++ /dev/null @@ -1,10 +0,0 @@ -extends: existence -message: 'Avoid using future tense: "%s". Use present tense instead.' -link: https://intranet.redoc.ly/contributing/documentation-style-guide/#tone-and-audience -ignorecase: true -level: error -raw: - - "(going to( |\n|[[:punct:]])[a-zA-Z]*|" - - "will( |\n|[[:punct:]])[a-zA-Z]*|" - - "won't( |\n|[[:punct:]])[a-zA-Z]*|" - - "[a-zA-Z]*'ll( |\n|[[:punct:]])[a-zA-Z]*)" diff --git a/.github/styles/Rules/HeaderGerunds.yml b/.github/styles/Rules/HeaderGerunds.yml deleted file mode 100644 index ae3650ba..00000000 --- a/.github/styles/Rules/HeaderGerunds.yml +++ /dev/null @@ -1,11 +0,0 @@ -extends: existence -message: 'Do not start headings with with a gerund (ing word). Use an imperative verb instead.' -link: https://intranet.redoc.ly/contributing/documentation-style-guide/#content-organization -level: error -scope: heading -tokens: - - '^\w*ing.*' -exceptions: - - expandSingleSchemaField - - hideLoading - - hideSingleRequestSampleTab diff --git a/.github/styles/Rules/InclusionGenderCulture.yml b/.github/styles/Rules/InclusionGenderCulture.yml deleted file mode 100644 index ea1b653e..00000000 --- a/.github/styles/Rules/InclusionGenderCulture.yml +++ /dev/null @@ -1,16 +0,0 @@ -extends: substitution -message: 'Use inclusive language. Consider "%s" instead of "%s".' -link: https://intranet.redoc.ly/contributing/documentation-style-guide/#grammar-and-syntax -level: error -ignorecase: true -swap: - he: they - his: their - she: they - hers: their - blacklist(?:ed|ing|s)?: blocklist - whitelist(?:ed|ing|s)?: allowlist - master: primary, main - slave: replica - he/she: they - s/he: they diff --git a/.github/styles/Rules/OxfordComma.yml b/.github/styles/Rules/OxfordComma.yml deleted file mode 100644 index 163a5954..00000000 --- a/.github/styles/Rules/OxfordComma.yml +++ /dev/null @@ -1,8 +0,0 @@ -extends: existence -message: "Use the Oxford comma in '%s'." -link: https://docs.microsoft.com/en-us/style-guide/punctuation/commas -scope: sentence -level: error -nonword: true -tokens: - - '(?:[^\s,]+,){1,} \w+ (?:and|or) \w+[.?!]' diff --git a/.github/styles/config/vocabularies/Rules/accept.txt b/.github/styles/config/vocabularies/Rules/accept.txt deleted file mode 100644 index 039d46ed..00000000 --- a/.github/styles/config/vocabularies/Rules/accept.txt +++ /dev/null @@ -1,150 +0,0 @@ -[Aa]nsible -[Aa]utostart -[Bb]locklist -[Bb]locklists -[Bb]oolean -[Bb]reakpoint -[B]reakpoints -[Cc]ancelation -[Cc]lassloading -[Cc]hargeback -[Cc]hargebacks -[Cc]he -[Cc]rypto -[Cc]ryptocurrency -[Dd]evfile|[Dd]evfiles -[Dd]ownstream -[Dd]ownstreaming -[Ff]actories|[Ff]actory -[Gg]it -[Gg]rafana -[Hh]eatmap -[Hh]elm -[Hh]ostname -[Ii]tem -[Jj]etbrains -[Kk]eycloak -[Ll]iveness -[Ll]ombok -[Ll]oopback -[Mm]aven -[Mm]inikube -[Mm]inishift -[Mm]ixin|[Mm]ixins -[Mm]odularization -[Mm]ulticluster -[Mm]ultihost -[Mm]ultinode -[Mm]ultitenant -[Mm]ultiuser -[Mm]ultizone -[Nn]amespace|[Nn]amespaces -[Nn]etcoredebug[Oo]utput -[Nn]ginx -[Oo]nboarding -[Pp]podman -[Pp]reconfigured -[Rr]eadonly -[Rr]epresentment -[Rr]ollout|[Rr]ollouts -[Rr]untime|[Rr]untimes -[Ss]erializer -[Ss]erverless -[Ss]ubnetwork -[Ss]ubpath|[Ss]ubpaths -[Tt]heia -[Tt]olerations -[Tt]ruststore -[Uu]ninstallation -[Uu]nstaged -[Uu]ntrusted -[Ww]orkspace|[Ww]orkspaces -[Yy]eoman -\.NET -adoc -Antora -API -Apigee -AsciiDoc -AWS|aws -Azure -Bierner -Bitbucket -btn -Btrfs -CentOS -Ceph -Che-Theia -CLI -ConfigMap|ConfigMaps -Ctrl -DaemonSet -Dev Workspace -Developer Perspective -DNS -Docker -Dockerfile -Dotnet -Endevor -endif -GitHub|github -GitLab -Gluster -Gradle -Grafana -GUI -HTTPS|https -I/O -IDE|ide|IDEs -Intelephense -IntelliJ IDEA -Java -Java Lombok -JSON|json -JVM|jvm -kbd -Kubespray -Laravel -Let\'s Encrypt -Mattermost -mebibytes -Microsoft Azure -millicores -Mulesoft -MySQL -Netlify -Node.js -npm -NuGet -OAuth -ocp -OmniSharp -OpenShift -OpenTracing -Operator -OperatorHub -OpenAPI -osd -PHP -PostgreSQL -Quarkus -Rebilly -Redoc -Redocly -Redocly-cli -SCM -Sharding -SonarLint -Spring Boot -SVG -Uber -URI|URIs -URL|url|URLs -Velero -Vercel -Visual Studio Code -vsix -Webview|Webviews -Woopra -YAML|yaml -Zowe diff --git a/.github/styles/config/vocabularies/Rules/reject.txt b/.github/styles/config/vocabularies/Rules/reject.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 00000000..c621f301 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,48 @@ +name: Build and Publish Docker container on Dockerhub +on: + workflow_call: + secrets: + DOCKERHUB_USERNAME: + description: 'DockerHub username' + required: true + DOCKERHUB_TOKEN: + description: 'DockerHub token' + required: true +permissions: + contents: read +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Get package version + id: get_version + uses: ./.github/actions/get-package-version + - name: Docker meta + id: docker_meta + uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0 + with: + images: | + redocly/redoc + tags: | + ${{ steps.get_version.outputs.value }} + latest + - name: Set up QEMU + uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 + - name: Login to DockerHub + uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 + with: + context: . + file: ./config/docker/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ steps.docker_meta.outputs.tags }} + labels: ${{ steps.docker_meta.outputs.labels }} diff --git a/.github/workflows/docs-tests.yaml b/.github/workflows/docs-tests.yaml deleted file mode 100644 index 66729455..00000000 --- a/.github/workflows/docs-tests.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: Documentation tests -on: - pull_request: - types: [opened, synchronize, reopened] - -jobs: - markdownlint: - name: markdownlint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: DavidAnson/markdownlint-cli2-action@v15 - with: - config: .markdownlint.yaml - globs: | - docs/**/*.md - README.md - - vale: - name: vale action - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: errata-ai/vale-action@reviewdog - with: - files: '["README.md", "docs"]' - filter_mode: file - - linkcheck: - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - name: Markup Link Checker (mlc) - uses: becheran/mlc@v0.16.1 - with: - args: ./docs diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml deleted file mode 100644 index 40a678fc..00000000 --- a/.github/workflows/e2e-tests.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Tests e2e - -on: [push] - -jobs: - build-and-e2e: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - run: npm ci - - run: npm run bundle - - run: npm run e2e diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 00000000..178fffb2 --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,29 @@ +name: Tests e2e + +permissions: + contents: read + +on: + pull_request: + branches: + - main + +jobs: + build-and-e2e: + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - name: Setup Node.js + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version: 22.17 + cache: 'npm' + - name: Install Dependencies + run: npm ci --ignore-scripts --no-fund + - name: Bundle + run: npm run build:standalone + - name: Prepare Playwright + uses: ./.github/actions/setup-playwright + - name: Run e2e tests + run: npm run e2e:prepare && npm run e2e diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 54796508..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Publish Docker image -on: - release: - types: [published] -jobs: - dockerhub: - name: Publish redoc image to DockerHub - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Docker meta - id: docker_meta - uses: crazy-max/ghaction-docker-meta@v1 - with: - images: redocly/redoc - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v3 - with: - context: . - file: ./config/docker/Dockerfile - platforms: linux/amd64,linux/arm64 - push: true - tags: ${{ steps.docker_meta.outputs.tags }} - labels: ${{ steps.docker_meta.outputs.labels }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index e4bc75f0..00000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,132 +0,0 @@ -name: Publish - -on: - push: - branches: [main] - -jobs: - bundle: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - - name: Cache node modules - uses: actions/cache@v3 - with: - path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS - key: npm-${{ hashFiles('package-lock.json') }} - restore-keys: | - npm-${{ hashFiles('package-lock.json') }} - npm- - - run: npm ci - - run: npm run bundle - - name: Store bundle artifact - uses: actions/upload-artifact@v4 - with: - name: bundles - path: bundles - retention-days: 1 - unit-tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - run: npm ci - - run: npm test - e2e-tests: - needs: [bundle] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - run: npm ci - - name: Download bundled artifact - uses: actions/download-artifact@v4 - with: - name: bundles - path: bundles - - run: npm run e2e - check-version: - name: Check Version - runs-on: ubuntu-latest - needs: [bundle, unit-tests, e2e-tests] - outputs: - changed: ${{ steps.check.outputs.changed }} - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Set up Node.js - uses: actions/setup-node@v3 - - name: Check if version has been updated - id: check - uses: EndBug/version-check@v2.0.1 - with: - file-url: https://cdn.jsdelivr.net/npm/redoc/package.json - static-checking: localIsNew - publish: - name: Publish to NPM - needs: [check-version] - if: needs.check-version.outputs.changed == 'true' - runs-on: ubuntu-latest - steps: - - uses: actions/setup-node@v3 - with: - node-version: '14.x' - registry-url: 'https://registry.npmjs.org' - - uses: actions/checkout@v3 - - name: Download bundled artifacts - uses: actions/download-artifact@v4 - with: - name: bundles - path: bundles - - name: Cache node modules - uses: actions/cache@v3 - with: - path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS - key: npm-${{ hashFiles('package-lock.json') }} - restore-keys: | - npm-${{ hashFiles('package-lock.json') }} - npm- - - name: Before deploy - run: npm ci && npm run declarations - - name: Publish to NPM - run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - publish-cdn: - name: Publish to CDN - needs: [check-version] - if: needs.check-version.outputs.changed == 'true' - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Configure AWS - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-1 - - name: Download all artifact - uses: actions/download-artifact@v4 - - name: Publish to S3 - run: npm run publish-cdn - - invalidate-cache: - name: Clear cache - runs-on: ubuntu-latest - needs: [check-version, publish, publish-cdn] - if: needs.check-version.outputs.changed == 'true' - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Configure AWS - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-1 - - name: Invalidate cache - run: ./scripts/invalidate-cache.sh - shell: bash - env: - DISTRIBUTION: ${{ secrets.DISTRIBUTION }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..20945176 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,90 @@ +name: Release + +# permissions: +# id-token: write +# contents: read + +on: + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + release: + name: Release + runs-on: ubuntu-latest + outputs: + published: ${{ steps.changesets.outputs.published }} + publishedPackages: ${{ steps.changesets.outputs.publishedPackages }} + steps: + - name: Checkout Repo + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - name: Setup Node.js + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version: 22.17 + cache: 'npm' + - name: Install Dependencies + run: npm ci + + - name: Create Release Pull Request or Publish to npm + id: changesets + uses: RomanHotsiy/changesets-action@v1 + with: + publish: npm run release + commit: 'chore: 🔖 release new versions' + title: 'chore: 🔖 release new versions' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + dockerhub: + needs: [release] + if: needs.release.outputs.published == 'true' + uses: ./.github/workflows/docker.yml + secrets: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} + + publish-cdn: + name: Publish to CDN + needs: [release] + if: needs.release.outputs.published == 'true' + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Configure AWS + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + - name: Download all artifact + uses: actions/download-artifact@v4 + - name: Publish to S3 + run: npm run publish-cdn + + invalidate-cache: + name: Clear cache + runs-on: ubuntu-latest + needs: [release, publish-cdn] + if: needs.release.outputs.published == 'true' + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Configure AWS + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + - name: Invalidate cache + run: ./scripts/clear-cache.sh + shell: bash + env: + DISTRIBUTION: ${{ secrets.DISTRIBUTION }} \ No newline at end of file diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 6ee20cbc..4ac6d0f6 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -1,12 +1,24 @@ name: Unit Tests -on: [push] +on: + pull_request: + branches: + - main +permissions: + contents: read jobs: build-and-unit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - run: npm ci - - run: npm run bundle - - run: npm test + - name: Checkout Repo + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - name: Setup Node.js + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version: 22.17 + cache: 'npm' + - name: Install Dependencies + run: npm ci --ignore-scripts --no-fund + - name: Run unit tests + run: npm run unit diff --git a/.gitignore b/.gitignore index e7f639c0..852dc23a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,39 +1,16 @@ -### Linux ### -*~ - -# KDE directory preferences -.directory -# OS X folder attributes +node_modules +bin +stats.json +scripts/*.pem +scripts/*.pem.pub +lib/ +bundle/ +coverage/ .DS_Store -# Linux trash folder which might appear on any partition or disk -.Trash-* - -demo/dist/ - -### Node ### -# Logs -logs -*.log -npm-debug.log* - -# Dependency directory -# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git -node_modules - -lib/ -stats.json -cypress/ -bundles/ -typings/* -!typings/styled-patch.d.ts - -/benchmark/revisions - -/coverage -.ghpages-tmp -stats.json -yarn.lock -.idea -.vscode -.eslintcache +licenses-list.json +cli-zip +/test-results/ +/playwright-report/ +/blob-report/ +/playwright/.cache/ diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100755 index d0612ad3..00000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -npm run pre-commit diff --git a/.markdownlint.yaml b/.markdownlint.yaml deleted file mode 100644 index ab1a86e5..00000000 --- a/.markdownlint.yaml +++ /dev/null @@ -1,54 +0,0 @@ ---- -# Default rules: https://github.com/github/super-linter/blob/master/TEMPLATES/.markdown-lint.yml - -# Rules by id - -# Unordered list style -MD004: false - -# Unordered list indentation -MD007: - indent: 2 - -MD013: - # TODO: Consider to decrease allowed line length - line_length: 800 - tables: false - -## Allow same headers in siblings -MD024: - siblings_only: true - -# Multiple top level headings in the same document -MD025: - front_matter_title: '' - -# Trailing punctuation in heading -MD026: - punctuation: '.,;:。,;:' - -# Ordered list item prefix -MD029: false - -# Unordered lists inside of ordered lists -MD030: false - -# Inline HTML -MD033: false - -# No bare urls -MD034: false - -# Emphasis used instead of a heading -MD036: false - -# Disable "First line in file should be a top level heading" -# We use uncommon format to add metadata. -# TODO: Consider to use "YAML front matter". -MD041: false - -# Rules by tags -blank_lines: false - -MD046: false -# code-block-style diff --git a/.mlc.toml b/.mlc.toml deleted file mode 100644 index 46b37072..00000000 --- a/.mlc.toml +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore these links, we can't check them from this subproject -ignore-links=["../*", "/docs/*"] -# Path to the root folder used to resolve all relative paths -root-dir="./docs" diff --git a/.npmignore b/.npmignore index 56abd88f..130e7519 100644 --- a/.npmignore +++ b/.npmignore @@ -1,6 +1,3 @@ * -!bundles/* -!typings/**/* !package.json -!README.md -!LICENSE \ No newline at end of file +!bundle/**/*.{js,d.ts} diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index dd449725..00000000 --- a/.prettierignore +++ /dev/null @@ -1 +0,0 @@ -*.md diff --git a/.vale.ini b/.vale.ini deleted file mode 100644 index 5f29d079..00000000 --- a/.vale.ini +++ /dev/null @@ -1,48 +0,0 @@ -# Vale configuration file. -# See: https://docs.errata.ai/vale/config - -# The relative path to the folder containing linting rules (styles). -StylesPath = .github/styles - -# Vocab define the exceptions to use in *all* `BasedOnStyles`. -# spelling-exceptions.txt triggers `Vale.Terms` -# reject.txt triggers `Vale.Avoid` -# See: https://docs.errata.ai/vale/vocab -Vocab = Rules - -# Minimum alert level -# ------------------- -# The minimum alert level in the output (suggestion, warning, or error). -# If integrated into CI, builds fail by default on error-level alerts, unless you run Vale with the --no-exit flag -MinAlertLevel = suggestion - -# IgnoredScopes specifies inline-level HTML tags to ignore. -# These tags may occur in an active scope (unlike SkippedScopes, skipped entirely) but their content still won't raise any alerts. -# Default: ignore `code` and `tt`. -IgnoredScopes = code, tt, img, url, a, body.id -# SkippedScopes specifies block-level HTML tags to ignore. Ignore any content in these scopes. -# Default: ignore `script`, `style`, `pre`, and `figure`. -# For AsciiDoc: by default, listingblock, and literalblock. -SkippedScopes = script, style, pre, figure, code, tt, listingblock, literalblock - -# Rules for matching file types. See: https://docs.errata.ai/vale/scoping - -[formats] -properties = md -mdx = md - -# Rules for .MD, .MDX -[*.{md,mdx}] - -BasedOnStyles = Rules -# Ignore code surrounded by backticks or plus sign, parameters defaults, URLs. -TokenIgnores = (\x60[^\n\x60]+\x60), ([^\n]+=[^\n]*), (\+[^\n]+\+), (http[^\n]+\[) -Vale.Repetition = NO -Vale.SentenceSpacing = NO -Vale.Spelling = NO - -# /End of rules for .MD, .MDX - - -# Process .ini files -[*.ini] diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 54c119f3..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,2354 +0,0 @@ -# [2.5.2](https://github.com/Redocly/redoc/compare/v2.5.1...v2.5.2) (2025-10-15) - - -### Bug Fixes - -* Bumped `openapi-sampler` dependency to include the fix for `readOnly`/`writeOnly` handling in allOf. - - -# [2.5.1](https://github.com/Redocly/redoc/compare/v2.4.0...v2.5.1) (2025-09-26) - - -### Bug Fixes - -* Bumped `mobx-react` dependency to address a security vulnerability. - -# [2.5.0](https://github.com/Redocly/redoc/compare/v2.4.0...v2.5.0) (2025-04-14) - - -### Bug Fixes - -* enhance accessibility for menu items with keyboard support ([#2655](https://github.com/Redocly/redoc/issues/2655)) ([2db293b](https://github.com/Redocly/redoc/commit/2db293bfb2973497dd33f31dc99e97f5bb90bbe8)) - - -### Features - -* add keyboard navigation support to JsonViewer component ([#2654](https://github.com/Redocly/redoc/issues/2654)) ([1b4126f](https://github.com/Redocly/redoc/commit/1b4126fde4531387f49c90f52efbd0c0e5f7b6ea)) - - - -# [2.4.0](https://github.com/Redocly/redoc/compare/v2.3.0...v2.4.0) (2025-02-07) - - -### Bug Fixes - -* Prototype Pollution Vulnerability Affecting redoc <=2.2.0 ([#2638](https://github.com/Redocly/redoc/issues/2638)) ([153ec7a](https://github.com/Redocly/redoc/commit/153ec7a0b7245639f404c0b038b612ae7377c7db)) -* unify redoc config ([#2647](https://github.com/Redocly/redoc/issues/2647)) ([53a6afc](https://github.com/Redocly/redoc/commit/53a6afc59624fe4591b0a0f1f20f41c0fbb5f1cf)) - - -### Features - -* add supporting react 19 in package.json ([#2652](https://github.com/Redocly/redoc/issues/2652)) ([3a74802](https://github.com/Redocly/redoc/commit/3a748022be3a7dc7f98669e1645dd5cda72f1abc)) - - - -# [2.3.0](https://github.com/Redocly/redoc/compare/v2.2.0...v2.3.0) (2025-01-16) - - -### Bug Fixes - -* displaying json example when showObjectSchemaExamples enabled ([#2635](https://github.com/Redocly/redoc/issues/2635)) ([59ee73f](https://github.com/Redocly/redoc/commit/59ee73fefa8e8edb398940076bdd721fc284caa3)) -* displaying nested items with type string ([#2634](https://github.com/Redocly/redoc/issues/2634)) ([85b622f](https://github.com/Redocly/redoc/commit/85b622fc581eb96303aeb85056aef36c74ea9f9d)) -* passing inline parameters after support react 18 for response title ([#2640](https://github.com/Redocly/redoc/issues/2640)) ([d614d2d](https://github.com/Redocly/redoc/commit/d614d2d022df8bd1989cb0eaf76d087b52120d36)) - - -### Features - -* update pattern styling ([#2196](https://github.com/Redocly/redoc/issues/2196)) ([#2600](https://github.com/Redocly/redoc/issues/2600)) ([aa0879c](https://github.com/Redocly/redoc/commit/aa0879ca0235112918428fdff8f4c48d2c6c4adf)) - - - -# [2.2.0](https://github.com/Redocly/redoc/compare/v2.1.5...v2.2.0) (2024-10-16) - - -### Bug Fixes - -* show siblings schema with oneOf ([#2576](https://github.com/Redocly/redoc/issues/2576)) ([60d131b](https://github.com/Redocly/redoc/commit/60d131b0a9dab4710e900323c9ba81160cecf7d8)) - - -### Features - -* add support x-badges ([#2605](https://github.com/Redocly/redoc/issues/2605)) ([64f1877](https://github.com/Redocly/redoc/commit/64f18779e5fe7e03f25862463cbc5062e85c867c)) - - - -## [2.1.5](https://github.com/Redocly/redoc/compare/v2.1.4...v2.1.5) (2024-06-10) - - -### Bug Fixes - -* update react to 18 and react-tabs to 6 ([#2547](https://github.com/Redocly/redoc/issues/2547)) ([c664dd0](https://github.com/Redocly/redoc/commit/c664dd0d56571ce799b8eadd081d86a6b2cdefae)) - - - -## [2.1.4](https://github.com/Redocly/redoc/compare/v2.1.3...v2.1.4) (2024-04-25) - - -### Bug Fixes - -* add deprecated css to clickable property name ([#2526](https://github.com/Redocly/redoc/issues/2526)) ([b0d03d0](https://github.com/Redocly/redoc/commit/b0d03d02069c1508447ddebc2f8a3fffa9b03ce5)) -* use h2/h3 for headings instead of h1/h2 for better seo ([#2514](https://github.com/Redocly/redoc/issues/2514)) ([2b72dc0](https://github.com/Redocly/redoc/commit/2b72dc0e90f759a8ee2e47691c844e7f05928a24)) -* security vulnerability ([#2445](https://github.com/Redocly/redoc/pull/2445)) ([1f11f5](https://github.com/Redocly/redoc/commit/1f11f597c4f10ddd601db247f5034052b6ca689f)) - - - -## [2.1.3](https://github.com/Redocly/redoc/compare/v2.1.2...v2.1.3) (2023-10-24) - - -### Bug Fixes - -* default value as object in request body ([#2437](https://github.com/Redocly/redoc/issues/2437)) ([b36a6e2](https://github.com/Redocly/redoc/commit/b36a6e27bb3e03d39ee74c3e71f18a504539d91b)) -* display string pattern in array items ([#2438](https://github.com/Redocly/redoc/issues/2438)) ([8ddeb6d](https://github.com/Redocly/redoc/commit/8ddeb6dfda686ec8a6948eb2d96efb99bf422429)) -* hideRequestPayloadSample ([#2436](https://github.com/Redocly/redoc/issues/2436)) ([bf96061](https://github.com/Redocly/redoc/commit/bf960612a47bfe10ff205b9d78f3040515a5467d)) -* more cases for react18 and cli integration ([#2416](https://github.com/Redocly/redoc/issues/2416)) ([26674e7](https://github.com/Redocly/redoc/commit/26674e70c66b686d0f0baa569b186292c41e5726)) - - - -## [2.1.2](https://github.com/Redocly/redoc/compare/v2.1.1...v2.1.2) (2023-09-11) - - -### Bug Fixes - -* react18 cli integration ([#2404](https://github.com/Redocly/redoc/issues/2404)) ([76edc15](https://github.com/Redocly/redoc/commit/76edc159399150778b384be87ee958a93e5c491c)) -* style RefreshToken URL as in the authorization section ([1d61001](https://github.com/Redocly/redoc/commit/1d6100111a0f3b609dadbd706354ce6125947df2)) - - - -## [2.1.1](https://github.com/Redocly/redoc/compare/v2.1.0...v2.1.1) (2023-08-17) - - -### Bug Fixes - -* hotfix, crash after 2.1 release ([0ab3428](https://github.com/Redocly/redoc/commit/0ab3428664f857ea07381686a2b4beb4c22b17c3)) - - - -# [2.1.0](https://github.com/Redocly/redoc/compare/v2.0.0...v2.1.0) (2023-08-10) - - -### Bug Fixes - -* call onLoaded if specs are not found ([#2182](https://github.com/Redocly/redoc/issues/2182)) ([0753bbe](https://github.com/Redocly/redoc/commit/0753bbea4b1425bdb09225fca45effae8003dce8)) -* default value for array query parameter ([#2186](https://github.com/Redocly/redoc/issues/2186)) ([3d410b6](https://github.com/Redocly/redoc/commit/3d410b6002c656efa780254c9c45c6249f90bce1)) -* **demo:** Get CORS proxy to work in Chrome on Windows ([#2220](https://github.com/Redocly/redoc/issues/2220)) ([1597bae](https://github.com/Redocly/redoc/commit/1597bae4032b65a94211e80aad51867e5af1ceb3)) -* error with immutable object spec ([#2179](https://github.com/Redocly/redoc/issues/2179)) ([53c4f36](https://github.com/Redocly/redoc/commit/53c4f36fad3e4453a72c1d136e37929de47cd35e)) -* improve accessible label by using the property name ([#2224](https://github.com/Redocly/redoc/issues/2224)) ([12be1bc](https://github.com/Redocly/redoc/commit/12be1bc5ffa11f9092c2faacd69d787f4e899960)) -* move role to list item to meet ARIA spec ([#2228](https://github.com/Redocly/redoc/issues/2228)) ([b8f7da6](https://github.com/Redocly/redoc/commit/b8f7da6b003ca12c1e2f0f4d42f3dd6d6f86ccac)) -* remove GenericObject shim ([#2177](https://github.com/Redocly/redoc/issues/2177)) ([127ef26](https://github.com/Redocly/redoc/commit/127ef260b961e07c5f82a7494b51dd3f04294e87)) -* renames 'FieldContstraints' to 'FieldConstraints' ([#2352](https://github.com/Redocly/redoc/issues/2352)) ([7e05202](https://github.com/Redocly/redoc/commit/7e052028d965624feb72d5f4b74fdb3c2d5df21f)) -* schema oneOf title with const ([#2350](https://github.com/Redocly/redoc/issues/2350)) ([4386867](https://github.com/Redocly/redoc/commit/4386867d908eae2aed2b9fd86e9f5476aadce52b)) -* **types/open-api:** import type ([#2213](https://github.com/Redocly/redoc/issues/2213)) ([33be51a](https://github.com/Redocly/redoc/commit/33be51a7a4068f44fd914314002c058a204ba0c2)) - - -### Features - -* add deprecation label to redoc-cli ([#2172](https://github.com/Redocly/redoc/issues/2172)) ([2ae7e08](https://github.com/Redocly/redoc/commit/2ae7e08af49321cea9bf2078f309b48bacf76ad6)) -* add option to hide the example code when using the `SchemaDefinition` component ([#2157](https://github.com/Redocly/redoc/issues/2157)) ([168189b](https://github.com/Redocly/redoc/commit/168189b2fdcf3667422ce3940ace3eedd0bdf284)) -* add support of react 18 ([#2369](https://github.com/Redocly/redoc/issues/2369)) ([054f604](https://github.com/Redocly/redoc/commit/054f604195629197aa8bd0fc46e91383ca5a05af)) -* add x-tags ([#2355](https://github.com/Redocly/redoc/issues/2355)) ([0bb21c8](https://github.com/Redocly/redoc/commit/0bb21c812840999d2dd2d96da42124746440b035)) -* enable keyboard navigation ([#2361](https://github.com/Redocly/redoc/issues/2361)) ([d21af58](https://github.com/Redocly/redoc/commit/d21af5841455901f0572ab475b7dc661acb86a71)) -* indicate whether request body is required or optional ([#2175](https://github.com/Redocly/redoc/issues/2175)) ([d3ad792](https://github.com/Redocly/redoc/commit/d3ad7925cfbd90b59b502b5ef53228fcd34b8a1e)) - - - -# [2.0.0](https://github.com/Redocly/redoc/compare/v2.0.0-rc.77...v2.0.0) (2022-09-12) - - - -# [2.0.0-rc.77](https://github.com/Redocly/redoc/compare/v2.0.0-rc.76...v2.0.0-rc.77) (2022-09-06) - - -### Bug Fixes - -* add hard limit on deref depth to prevent crashes ([ddde105](https://github.com/Redocly/redoc/commit/ddde105acaf0a77b0bb5d13df5fd6180bc8169e9)) -* do not use discriminator when specific schema was referenced in oneOf or anyOf ([#2153](https://github.com/Redocly/redoc/issues/2153)) ([6ac1e1e](https://github.com/Redocly/redoc/commit/6ac1e1eb183e97e2cd67ad14d8a39fac8289ebcc)) -* hoistOneOf missing refs stack and improve allOf for same $ref ([bb325d0](https://github.com/Redocly/redoc/commit/bb325d0d285c4cf4ee7c6d70878d2dd0dc9c6ed7)) -* latest docker cli tag ([#2140](https://github.com/Redocly/redoc/issues/2140)) ([8dc03eb](https://github.com/Redocly/redoc/commit/8dc03eb7ed262d6b1d460425ce43990710470845)) -* markdown parent name ([#2062](https://github.com/Redocly/redoc/issues/2062)) ([da9ed0b](https://github.com/Redocly/redoc/commit/da9ed0b4d1a4070d326ecb472459f0ff916c6036)) - -### Features - -* feet: search feature to support path ([#2145](https://github.com/Redocly/redoc/issues/2145)) ([c52ee83f](https://github.com/Redocly/redoc/commit/c52ee83f77ccfc79137c85deafe8d93e68465d45)) - - -# [2.0.0-rc.76](https://github.com/Redocly/redoc/compare/v2.0.0-rc.75...v2.0.0-rc.76) (2022-08-18) - - -### Bug Fixes - -* "API Docs By Redocly" overlapping last element in sidebar ([#2132](https://github.com/Redocly/redoc/issues/2132)) ([c60c6f5](https://github.com/Redocly/redoc/commit/c60c6f58917563d57c0eef650b9dfcece2e15049)) -* encoding issue in CDN responses ([#2130](https://github.com/Redocly/redoc/issues/2130)) ([7816902](https://github.com/Redocly/redoc/commit/781690284a45b2b8af9eb525757632d0d19ef453)) -* Optional authentication not rendered properly ([#2117](https://github.com/Redocly/redoc/issues/2117)) ([#2134](https://github.com/Redocly/redoc/issues/2134)) ([efd5e09](https://github.com/Redocly/redoc/commit/efd5e09c907b36a3999f4c9c3165b6b2bdc1d536)) - - -### Features - -* add clear cache for publish action ([#2129](https://github.com/Redocly/redoc/issues/2129)) ([d8093e3](https://github.com/Redocly/redoc/commit/d8093e3e2086874242eac82ddd202f35d5b8d558)) - - - -# [2.0.0-rc.75](https://github.com/Redocly/redoc/compare/v2.0.0-rc.74...v2.0.0-rc.75) (2022-08-10) - - -### Bug Fixes - -* duplication of title ([#2119](https://github.com/Redocly/redoc/issues/2119)) ([40ebfd2](https://github.com/Redocly/redoc/commit/40ebfd2d63758b37665e2e4447732f671811e2a5)) -* handle error if security scopes is invalid ([#2113](https://github.com/Redocly/redoc/issues/2113)) ([428fd69](https://github.com/Redocly/redoc/commit/428fd6983dc257f524121d98aeb1c58b39cf81f7)) -* publishing docker image to github packages ([#2115](https://github.com/Redocly/redoc/issues/2115)) ([250f6d1](https://github.com/Redocly/redoc/commit/250f6d12b2d31d2166990bd9cb83ca1c63509686)) -* Redocly logo ([#2109](https://github.com/Redocly/redoc/issues/2109)) ([a35bb3f](https://github.com/Redocly/redoc/commit/a35bb3ff26bf10b0e54383222df283800d6ee2c8)) -* search and navigate error ([cfd810f](https://github.com/Redocly/redoc/commit/cfd810fdf9d37862e07458fa1c3c04046e22f315)) -* sibling for openapi 3.1 ([#2112](https://github.com/Redocly/redoc/issues/2112)) ([0b1a790](https://github.com/Redocly/redoc/commit/0b1a79009010f0640a3030093b7c0dcf8caa49e4)) - - -### Features - -* add notification about new version available ([#2100](https://github.com/Redocly/redoc/issues/2100)) ([d6ca8cc](https://github.com/Redocly/redoc/commit/d6ca8cc53b9667f09ce8fef88dfac1039c562b78)) - - - -# [2.0.0-rc.74](https://github.com/Redocly/redoc/compare/v2.0.0-rc.73...v2.0.0-rc.74) (2022-07-28) - - -### Bug Fixes - -* invalid url when href is empty ([#2105](https://github.com/Redocly/redoc/issues/2105)) ([e5f0235](https://github.com/Redocly/redoc/commit/e5f02359851a3797283ee513d734ab8e27266b92)) - - - -# [2.0.0-rc.73](https://github.com/Redocly/redoc/compare/v2.0.0-rc.72...v2.0.0-rc.73) (2022-07-28) - - -### Bug Fixes - -* add label API docs by Redocly ([#2099](https://github.com/Redocly/redoc/issues/2099)) ([dcdab83](https://github.com/Redocly/redoc/commit/dcdab838903a5d923c5e327d07d7743214769a61)) -* add the latest tag for the CLI docker image ([#2087](https://github.com/Redocly/redoc/issues/2087)) ([80ecd0f](https://github.com/Redocly/redoc/commit/80ecd0f19746379b056bfb1b11950693f3dc3724)) -* correct URLs of OperationModel servers for static site generation ([#2081](https://github.com/Redocly/redoc/issues/2081)) ([b1afd08](https://github.com/Redocly/redoc/commit/b1afd08bcf83770b537ed1eb9c90341de0162a1c)) -* enum duplication values when schema uses a specific combination of oneOf and allOf([#2088](https://github.com/Redocly/redoc/issues/2088)) ([e411847](https://github.com/Redocly/redoc/commit/e4118479f69209c5dd09a2be0e978834dcd9eb8f)) -* highlight text syntax ([#2069](https://github.com/Redocly/redoc/issues/2069)) ([4fc6aa0](https://github.com/Redocly/redoc/commit/4fc6aa0859c94e25fd30c4a4250455e44cc76488)) -* merge reference for openapi 3.1 ([#2063](https://github.com/Redocly/redoc/issues/2063)) ([87541e4](https://github.com/Redocly/redoc/commit/87541e45dc2526696deb32a6350a14a44a709b54)) -* nested patternProperties ([#2073](https://github.com/Redocly/redoc/issues/2073)) ([9920991](https://github.com/Redocly/redoc/commit/99209910806b85289a89fb3131049ed79118bc72)) -* operation url in static page ([#2093](https://github.com/Redocly/redoc/issues/2093)) ([98eec19](https://github.com/Redocly/redoc/commit/98eec19647b63f3598ec30fdeb428f614cf93ad4)) -* property with nested allOf ([#2083](https://github.com/Redocly/redoc/issues/2083)) ([7cc0500](https://github.com/Redocly/redoc/commit/7cc0500f3c1ddd1da17ee31278468207093f9281)) -* recursion for boolean items ([#2097](https://github.com/Redocly/redoc/issues/2097)) ([a5804db](https://github.com/Redocly/redoc/commit/a5804db1ce60ee6d90db8a3b54138eb1ca420c6f)) -* resolve dependency conflict in installing ([#2060](https://github.com/Redocly/redoc/issues/2060)) ([e26c8b2](https://github.com/Redocly/redoc/commit/e26c8b23d9b36abd5572bd0fe350d74a5cf65afb)) -* restore old variant security injections ([#2075](https://github.com/Redocly/redoc/issues/2075)) ([1a1bc26](https://github.com/Redocly/redoc/commit/1a1bc26503c06b6a7022289e5b9353bd59e48a9a)) -* rewrite recursive checks ([#2072](https://github.com/Redocly/redoc/issues/2072)) ([2970f95](https://github.com/Redocly/redoc/commit/2970f959cfa31cb4d5288ca23ca05cd34357dcec)) -* Scrolling keeps rewriting url after a Redoc element was removed [#2051](https://github.com/Redocly/redoc/issues/2051) ([#2085](https://github.com/Redocly/redoc/issues/2085)) ([0045be0](https://github.com/Redocly/redoc/commit/0045be0b753b8fb7d8d58a4e511783a6ba858444)) -* mis-nesting of aria roles on sidebar navigation ([#2050](https://github.com/Redocly/redoc/issues/2050)) ([7ca10da](https://github.com/Redocly/redoc/commit/7ca10daf12f2cac9fecf559b11f0f0c8bd21ae43)) -* 404 on the documentation page ([#2092](https://github.com/Redocly/redoc/issues/2050)) ([17bb08](https://github.com/Redocly/redoc/commit/17bb08909a1734e6e59c83ce29f31ae7cf6fc784)) - - - - -# [2.0.0-rc.72](https://github.com/Redocly/redoc/compare/v2.0.0-rc.71...v2.0.0-rc.72) (2022-06-02) - - -### Bug Fixes - -* handled style change in ServerUrl and ServersOverlay dynamically ([#1989](https://github.com/Redocly/redoc/issues/1989)) ([a366de4](https://github.com/Redocly/redoc/commit/a366de4cf67fb94baa33b7b5c311cc1f54a63e53)) -* nested items with refs ([#2035](https://github.com/Redocly/redoc/issues/2035)) ([51127aa](https://github.com/Redocly/redoc/commit/51127aadc3e6b0f8e4066afb1c3b2ea6db453da2)) - - - -# [2.0.0-rc.71](https://github.com/Redocly/redoc/compare/v2.0.0-rc.70...v2.0.0-rc.71) (2022-05-31) - - -### Bug Fixes - -* constraints label details ([eb0917d](https://github.com/Redocly/redoc/commit/eb0917d002e57353027fee9c8f07605de8f1ff6f)) -* merge allOf in correct order ([#2020](https://github.com/Redocly/redoc/issues/2020)) ([1e4ea03](https://github.com/Redocly/redoc/commit/1e4ea03d4a9b7eddf3e4cc7cbdbd4d913583e837)) - - -### Features - -* add hideSecuritySection option allowing to disable the Security panel ([#2027](https://github.com/Redocly/redoc/issues/2027)) ([49cc11d](https://github.com/Redocly/redoc/commit/49cc11d91795653ca870e9276a1e0cd617964e25)) -* add Redoc to Redocly CDN ([#2026](https://github.com/Redocly/redoc/issues/2026)) ([77104d6](https://github.com/Redocly/redoc/commit/77104d6c0d6f457aa08a158e93b52a45877be84e)) -* add support prefix items ([27a9dba](https://github.com/Redocly/redoc/commit/27a9dbaf46aded01a6512645dab27870a85cc73b)) -* remove auth section ([#2022](https://github.com/Redocly/redoc/issues/2022)) ([a863302](https://github.com/Redocly/redoc/commit/a863302cc803bdf27187c613157ba90af1040fc4)) -* show minProperties maxProperties ([#2015](https://github.com/Redocly/redoc/issues/2015)) ([82712c5](https://github.com/Redocly/redoc/commit/82712c5b408dc6bc142307d45fb962de2a43ffba)) - - - -# [2.0.0-rc.70](https://github.com/Redocly/redoc/compare/2.0.0-rc.69...2.0.0-rc.70) (2022-05-17) - - -### Features - -* display patternProperties ([#2008](https://github.com/Redocly/redoc/issues/2008)) ([660cc85](https://github.com/Redocly/redoc/commit/660cc857bc86787e16237b407fe5f5d7a493bb48)) -* support conditional operators ([#1939](https://github.com/Redocly/redoc/issues/1939)) ([291b62a](https://github.com/Redocly/redoc/commit/291b62a206b68f8b4d98e4b74b71c0cad20a8b9b)) -* theme add links textDecoration options ([#1599](https://github.com/Redocly/redoc/issues/1599)) ([ba06485](https://github.com/Redocly/redoc/commit/ba06485ece27acbb6b846500817f4bff3e4997ba)) - - - -# [2.0.0-rc.69](https://github.com/Redocly/redoc/compare/v2.0.0-rc.68.1...v2.0.0-rc.69) (2022-05-12) - - -### Bug Fixes - -* wrong base url format causing error when constructing new URL ([#1996](https://github.com/Redocly/redoc/issues/1996)) ([d2cdaa1](https://github.com/Redocly/redoc/commit/d2cdaa1221b6a5e7b5da2418414bce1586069deb)) - - -### Features - -* add download file option ([#1699](https://github.com/Redocly/redoc/issues/1699)) ([b601c9a](https://github.com/Redocly/redoc/commit/b601c9ae9e3288286f28e06854bd93cb3507706e)) -* add option to display verb in webhooks ([#1994](https://github.com/Redocly/redoc/issues/1994)) ([311d2ce](https://github.com/Redocly/redoc/commit/311d2ce64dcf1e68c2563a276b34dda0e08b709c)) -* support .redocly.yaml for options for redoc-cli ([#1981](https://github.com/Redocly/redoc/issues/1981)) ([1f417d6](https://github.com/Redocly/redoc/commit/1f417d67c6b2e0b49e41c713958c100d8e1ad19d)) - - - -# [2.0.0-rc.68](https://github.com/Redocly/redoc/compare/v2.0.0-rc.67...v2.0.0-rc.68) (2022-05-10) - - -### Bug Fixes - -* examples in json schema object([5b9aa27](https://github.com/Redocly/redoc/commit/5b9aa27af03a1c4616f7e0195afeba47d1deeaa0)) -* handle error when definition load fails ([#1979](https://github.com/Redocly/redoc/issues/1979)) ([508ebd5](https://github.com/Redocly/redoc/commit/508ebd58a3d66f2337e9641852322458a1bd9e6b)) -* large text in examples value ([#1974](https://github.com/Redocly/redoc/issues/1974)) ([60bc603](https://github.com/Redocly/redoc/commit/60bc603e9bb85a0c9c7ac38f7014876d397f0191)) -* not show scopes if keys empty or not exist ([#1975](https://github.com/Redocly/redoc/issues/1975)) ([4e793f0](https://github.com/Redocly/redoc/commit/4e793f07a81fa8bcd4ad384d1f87b3e6c290edb7)) -* remove dropdown-aria and use native select ([#1954](https://github.com/Redocly/redoc/issues/1954)) ([186f5a9](https://github.com/Redocly/redoc/commit/186f5a98bd466b1820121aadb865291bef8c6755)) -* make Redoc lib compatible with Webpack 5 ([#1982](https://github.com/Redocly/redoc/issues/1982)) ([867861](https://github.com/Redocly/redoc/commit/8678615a0e19c9484b4cd495d70293b542d196a5)) - -### Features - -* implement configurable minimum characer length to init search ([#1402](https://github.com/Redocly/redoc/issues/1402)) ([0fa08fa](https://github.com/Redocly/redoc/commit/0fa08faab1c176a4bfc5a553e8e8f8b07aca659f)) -* support OAS 3.1 unevaluatedProperties ([#1978](https://github.com/Redocly/redoc/issues/1978)) ([0755ac6](https://github.com/Redocly/redoc/commit/0755ac6f04514eb0c08f90afceeda7858206b435)) -* publish dockerhub ([#1971](https://github.com/Redocly/redoc/issues/1971)) ([7e01a0](https://github.com/Redocly/redoc/commit/7e01a0cfe2ad8d06075bfc66ef3860edbef033f8)) - - -# [2.0.0-rc.67](https://github.com/Redocly/redoc/compare/v2.0.0-rc.66...v2.0.0-rc.67) (2022-04-28) - - -### Bug Fixes - -* Expand/Collapse all buttons disappears for flat structures ([#1424](https://github.com/Redocly/redoc/issues/1424)) ([2ca8e08](https://github.com/Redocly/redoc/commit/2ca8e081baea6996eb01b5df27b8cd88331d5c96)) -* improve markdown render with CRLF ([#1953](https://github.com/Redocly/redoc/issues/1953)) ([aba2d1a](https://github.com/Redocly/redoc/commit/aba2d1ad2d8dda9f52055c36ebde1323457dfd3e)) -* issue with navigation when operationId contains backslash or quotes ([#1513](https://github.com/Redocly/redoc/issues/1513)) ([8f7e56c](https://github.com/Redocly/redoc/commit/8f7e56c747d88be5c5eb5c4bbaee0ff69e9cb2ec)) -* prefix operation ids with parent id ([#1245](https://github.com/Redocly/redoc/issues/1245)) ([fd8917e](https://github.com/Redocly/redoc/commit/fd8917e5c109840c1bfa4c2c0902b6dcec200286)) - - -### Features - -* add optional BASE_PATH to Docker config ([#1378](https://github.com/Redocly/redoc/issues/1378)) ([90f71c0](https://github.com/Redocly/redoc/commit/90f71c0d77719871910cfba883a32ad131bef059)) -* theme add sidebar activeBackgroundColor and activeTextColor ([#1600](https://github.com/Redocly/redoc/issues/1600)) ([6716b08](https://github.com/Redocly/redoc/commit/6716b08e8871d95880e9f5a6c5491038002754e8)) - - - -# [2.0.0-rc.66](https://github.com/Redocly/redoc/compare/v2.0.0-rc.65...v2.0.0-rc.66) (2022-03-30) - - -### Bug Fixes - -* add handle local files for serve command ([#1810](https://github.com/Redocly/redoc/issues/1810)) ([117071e](https://github.com/Redocly/redoc/commit/117071ee83a32d9b3350d8afe2bdb6365a44e2ec)) -* move comma out of code block in SecurityRequirement.tsx ([#1924](https://github.com/Redocly/redoc/issues/1924)) ([ab3e8a8](https://github.com/Redocly/redoc/commit/ab3e8a8f80f453066c5495e73ac932a8fef0830a)) -* rename bandle command and add deprecate notice ([#1935](https://github.com/Redocly/redoc/issues/1935)) ([eb096b6](https://github.com/Redocly/redoc/commit/eb096b69be52568fc581027161c7d0c4b26c56c1)) - - -### Features - -* add support for displaying operationId in the sidebar ([#1927](https://github.com/Redocly/redoc/issues/1927)) ([09786f2](https://github.com/Redocly/redoc/commit/09786f2a5ade6303ea00512483b172347721ca70)) -* add nonce support ([#1566](https://github.com/Redocly/redoc/issues/1566)) ([c75ac9c](https://github.com/Redocly/redoc/commit/c75ac9cf70012e2d539b379aab2f0974d088db07)) -* h2 set color form theme.colors.text.primary ([#1491](https://github.com/Redocly/redoc/pull/1491)) ([25be93](https://github.com/Redocly/redoc/commit/25be934bb184d7b2b6b47d004b3c83ce4d16a2c6)) - - - -# [2.0.0-rc.65](https://github.com/Redocly/redoc/compare/v2.0.0-rc.64...v2.0.0-rc.65) (2022-03-15) - - -### Bug Fixes - -* auth link scroll for Firerox ([#1922](https://github.com/Redocly/redoc/issues/1922)) ([fe67e9c](https://github.com/Redocly/redoc/commit/fe67e9c332fee716582a00d60fdf34767bff22d4)) -* improve customization fab ([#1891](https://github.com/Redocly/redoc/issues/1891)) ([635f379](https://github.com/Redocly/redoc/commit/635f379eb086268c91eef715148eca8f080cfb86)) -* sanitize array of items ([#1920](https://github.com/Redocly/redoc/issues/1920)) ([059bd80](https://github.com/Redocly/redoc/commit/059bd8000e5fd65753d5ca9e0c47940394e0c79b)) -* use x-displayName in securityDefinitions ([#1444](https://github.com/Redocly/redoc/pull/1444)) ([ac6fb4](https://github.com/Redocly/redoc/commit/ac6fb458a4eee8d0da4b63f9bafc7669adc8af03)) -* deprecated badge on one of any of buttons ([#1930](https://github.com/Redocly/redoc/pull/1930)) ([f60b47](https://github.com/Redocly/redoc/commit/f60b4758330dd756d670309827da60d3465b672a)) - - - -# [2.0.0-rc.64](https://github.com/Redocly/redoc/compare/v2.0.0-rc.63...v2.0.0-rc.64) (2022-02-24) - - -### Bug Fixes - -* bump json-pointer version to avoid CVE-2021-23820 ([#1910](https://github.com/Redocly/redoc/issues/1910)) ([777efdd](https://github.com/Redocly/redoc/commit/777efdde35c1c8dc79dd714e1666279e9192dddb)) -* external ref in schema definition ([#1894](https://github.com/Redocly/redoc/issues/1894)) ([57cdd9f](https://github.com/Redocly/redoc/commit/57cdd9f6da38418d6214ac3c6480c5847ecd0228)) - - - -# [2.0.0-rc.63](https://github.com/Redocly/redoc/compare/v2.0.0-rc.61...v2.0.0-rc.63) (2022-01-27) - - -### Bug Fixes - -* scroll in sidebar ([b5b0d61](https://github.com/Redocly/redoc/commit/b5b0d61b3568ac2a8aaceafa96ffa6d2f86ed323)) - - -# [2.0.0-rc.62](https://github.com/Redocly/redoc/compare/v2.0.0-rc.61...v2.0.0-rc.62) (2022-01-26) - - -### Bug Fixes - -* fix field expand does not work ([#1875](https://github.com/Redocly/redoc/issues/1875)) - - -# [2.0.0-rc.61](https://github.com/Redocly/redoc/compare/v2.0.0-rc.60...v2.0.0-rc.61) (2022-01-26) - - -### Bug Fixes - -* fix crash in redoc-cli after migrating to esbuild ([#1872](https://github.com/Redocly/redoc/issues/1872)) - -# [2.0.0-rc.60](https://github.com/Redocly/redoc/compare/v2.0.0-rc.59...v2.0.0-rc.60) (2022-01-25) - - -### Bug Fixes - -* add schema expansion level ([#1868](https://github.com/Redocly/redoc/issues/1868)) ([250d53a](https://github.com/Redocly/redoc/commit/250d53a59fb4bf881875ba466c5a7f3b55d80007)) -* attachHeadingsDescriptions match headings incorrectly ([#1845](https://github.com/Redocly/redoc/issues/1845)) ([ea8573d](https://github.com/Redocly/redoc/commit/ea8573dbd78439be50aa2b38f1c83658c16783e3)) -* definition name util ([#1865](https://github.com/Redocly/redoc/issues/1865)) ([95a7347](https://github.com/Redocly/redoc/commit/95a734793158d4749e98ee4a7e90e70713a04ced)) -* No maxLength label is displayed for arrays of items [#1701](https://github.com/Redocly/redoc/issues/1701) ([#1765](https://github.com/Redocly/redoc/issues/1765)) ([6c7685e](https://github.com/Redocly/redoc/commit/6c7685e5fa04314328a445d7077600692c49489c)) -* Response objects couldn't open ([#1867](https://github.com/Redocly/redoc/issues/1867)) ([18f943d](https://github.com/Redocly/redoc/commit/18f943d2b5668f1552d212dee1c3a2ed59054095)) -* writeOnly params displaying in webhook ([#1866](https://github.com/Redocly/redoc/issues/1866)) ([5694913](https://github.com/Redocly/redoc/commit/5694913e71f0e8c3a5d9393f1b4ae92534127841)) - - -### Features - -* **#1251:** Add file selector to demo application ([#1859](https://github.com/Redocly/redoc/issues/1859)) ([b74dcde](https://github.com/Redocly/redoc/commit/b74dcde42b45ebe5ae617f1ec3cfea2ea1aff922)), closes [#1251](https://github.com/Redocly/redoc/issues/1251) [#1251](https://github.com/Redocly/redoc/issues/1251) [#1251](https://github.com/Redocly/redoc/issues/1251) -* redoc-cli add host option ([#1598](https://github.com/Redocly/redoc/issues/1598)) ([fb104e6](https://github.com/Redocly/redoc/commit/fb104e696618b0b81439da134887830a0f2439ea)) -* support examples in object schema ([#1832](https://github.com/Redocly/redoc/issues/1832)) ([c986f0e](https://github.com/Redocly/redoc/commit/c986f0ef1a38bc1e61cae70830d84de03b684b89)) - - - -# [2.0.0-rc.59](https://github.com/Redocly/redoc/compare/v2.0.0-rc.58...v2.0.0-rc.59) (2021-12-09) - - -### Bug Fixes - -* fix scroll in example dropdown ([#1803](https://github.com/Redocly/redoc/issues/1803)) ([bc2d9a7](https://github.com/Redocly/redoc/commit/bc2d9a7d9cd530274483fecd136db290a5b46ff7)) -* x-examples for request body param does not display [#1743](https://github.com/Redocly/redoc/issues/1743) ([#1826](https://github.com/Redocly/redoc/issues/1826)) ([aaa3b32](https://github.com/Redocly/redoc/commit/aaa3b3280c8422d450e8849ae02135dde199d6d5)) - -### Features - -* add option sideNavStyle ([#1805](https://github.com/Redocly/redoc/pull/1805)) ([2e4663b](https://github.com/Redocly/redoc/commit/2e4663b3b7022f25d3dc808afbcb3b3ad9483c41)) - - -# [2.0.0-rc.58](https://github.com/Redocly/redoc/compare/v2.0.0-rc.57...v2.0.0-rc.58) (2021-11-29) - - -### Bug Fixes - -* add browser build for webpack 5 ([#1796](https://github.com/Redocly/redoc/issues/1796)) ([0e43ad3](https://github.com/Redocly/redoc/commit/0e43ad3102cfba8c4b30e59500ad4efc53f01c2d)) -* Default boolean property value not rendered [#1779](https://github.com/Redocly/redoc/issues/1779) ([#1781](https://github.com/Redocly/redoc/issues/1781)) ([734080c](https://github.com/Redocly/redoc/commit/734080c35471d16f87004f7f9a51dcdeee1278a6)) -* exclusiveMin/Max shows incorect range ([#1799](https://github.com/Redocly/redoc/issues/1799)) ([b604bd8](https://github.com/Redocly/redoc/commit/b604bd8da874f07e9e9f8b193ad10117a5f5059c)) -* mobile view in docker image ([#1795](https://github.com/Redocly/redoc/issues/1795)) ([ad652b9](https://github.com/Redocly/redoc/commit/ad652b9c7fbcd84a6e83397272de64e57213fe9a)) - - - -# [2.0.0-rc.57](https://github.com/Redocly/redoc/compare/v2.0.0-rc.56...v2.0.0-rc.57) (2021-10-11) - - -### Bug Fixes - -* fix deref logic for oas3.1 ([#1767](https://github.com/Redocly/redoc/issues/1767)) ([4fb9c83](https://github.com/Redocly/redoc/commit/4fb9c835256b9e44bcecabde7baf0f0f3e5beb3f)) -* improve publish action scripts ([#1729](https://github.com/Redocly/redoc/issues/1729)) ([952c05c](https://github.com/Redocly/redoc/commit/952c05c6b4b95fe6082611fed9e2f0913272b904)) -* No match scenario in search ([#1667](https://github.com/Redocly/redoc/issues/1667)) ([352a851](https://github.com/Redocly/redoc/commit/352a8518576dfb6b240ec41212a64f1c7312ab67)) -* OpenAPI 3.1: Missing description when $ref used [#1727](https://github.com/Redocly/redoc/issues/1727) ([fe6909e](https://github.com/Redocly/redoc/commit/fe6909ed80dd6053b48c30f63a2460614bf957a9)) -* OpenAPI 3.1: Missing description when $ref used [#1727](https://github.com/Redocly/redoc/issues/1727) ([35f7787](https://github.com/Redocly/redoc/commit/35f77878de7d1dd250040771f17757a5a6ce85f9)) -* Redoc spelling ([c87600d](https://github.com/Redocly/redoc/commit/c87600d520f037d291169b44b5803a35af16b5a5)) -* Schema for events incorrectly omits readOnly and includes writeOnly ([#1720](https://github.com/Redocly/redoc/issues/1720) [#1540](https://github.com/Redocly/redoc/issues/1540)) ([a8e0c29](https://github.com/Redocly/redoc/commit/a8e0c296852661dec1dcad2388d7589f9e0d3609)) -* scrolling to the first item ([#1753](https://github.com/Redocly/redoc/issues/1753)) ([bccd213](https://github.com/Redocly/redoc/commit/bccd21394ef79940c2efbe24a0d866c7af103d94)) -* The number of items in the array in the array is incorrect [#1762](https://github.com/Redocly/redoc/issues/1762) ([#1763](https://github.com/Redocly/redoc/issues/1763)) ([3b8d644](https://github.com/Redocly/redoc/commit/3b8d6441bd9978b849a53021d40fd4fe150272ea)) - - -### Features - -* add q/kdb+ syntax highlighting ([#1605](https://github.com/Redocly/redoc/issues/1605)) ([43451ba](https://github.com/Redocly/redoc/commit/43451ba4cd24270b8629a967d3fd2ce2eed8912e)) -* new option generatedPayloadSamplesMaxDepth ([#1642](https://github.com/Redocly/redoc/issues/1642)) ([bd9390a](https://github.com/Redocly/redoc/commit/bd9390a5bfc5458c06121110db33968a20fcebe4)) - - - -# [2.0.0-rc.56](https://github.com/Redocly/redoc/compare/v2.0.0-rc.53...v2.0.0-rc.56) (2021-08-11) - - -### Bug Fixes - -* handle empty object in security array ([#1678](https://github.com/Redocly/redoc/issues/1678)) ([9e1ea70](https://github.com/Redocly/redoc/commit/9e1ea703e56a71567b13d0d22e2d69945a22de4d)) -* hideLoading options in redoc standalone ([#1709](https://github.com/Redocly/redoc/issues/1709)) ([6a52a16](https://github.com/Redocly/redoc/commit/6a52a16d5b75a2955da7217c4a264f0fa8e98c89)) -* improve openapi 3.1 ([#1700](https://github.com/Redocly/redoc/issues/1700)) ([cd2d6f7](https://github.com/Redocly/redoc/commit/cd2d6f76e87c8385786a9c8e51c0d11c79d9707c)) - - show contentEncoding on fields - - crash with OpenAPI 3.1 type as array of strings in requestBody - - nullable label not shown -* nullable object's fields were missing ([#1721](https://github.com/Redocly/redoc/issues/1721)) ([ddf297b](https://github.com/Redocly/redoc/commit/ddf297b11269ef515bd62771912a5609721d5e39)) - - -### Features - -* add github action to build docker images and push to ghcr.io on release ([#1614](https://github.com/Redocly/redoc/issues/1614)) ([919a5f0](https://github.com/Redocly/redoc/commit/919a5f02fb94ca869011d5eaf63ee71b61b60150)) -* add yaml highlight ([#1684](https://github.com/Redocly/redoc/issues/1684)) ([d724440](https://github.com/Redocly/redoc/commit/d72444008533623c87f238fe8758b1dd518b89eb)) -* added localization for some labels ([#1675](https://github.com/Redocly/redoc/issues/1675)) ([ec50858](https://github.com/Redocly/redoc/commit/ec50858ec47af08c5fe553266fe3c209fba97eae)) - - -# [2.0.0-rc.55](https://github.com/Redocly/redoc/compare/v2.0.0-rc.54...v2.0.0-rc.55) (2021-07-01) - - -### Bug Fixes - -* broken linkify ([3df72fb](https://github.com/Redocly/redoc/commit/3df72fb99ff24fb9a551565b7568d96f8614ed6f)), closes [#1655](https://github.com/Redocly/redoc/issues/1655) -* fix accidentally removed onLoaded ([b41a8b4](https://github.com/Redocly/redoc/commit/b41a8b4ac714084dc25de7914fa1f99386e907e2)), closes [#1656](https://github.com/Redocly/redoc/issues/1656) - - -### Features - -* added git folder sync config ([a69f0fb](https://github.com/Redocly/redoc/commit/a69f0fb00986a04c812ab273711e8f3501b98139)) - - - -# [2.0.0-rc.54](https://github.com/Redocly/redoc/compare/v2.0.0-rc.53...v2.0.0-rc.54) (2021-06-09) - - -### Bug Fixes - -* added missing semicolon to styling ([#1578](https://github.com/Redocly/redoc/issues/1578)) ([dfc4cf1](https://github.com/Redocly/redoc/commit/dfc4cf1caa131aa7bc6da6d489e3a8425d800326)) -* parse json theme string for standalone tag ([#1492](https://github.com/Redocly/redoc/issues/1492)) ([d7a0a4d](https://github.com/Redocly/redoc/commit/d7a0a4da17241dd9c089202dba76a8312248616e)) -* right absolute path for load and bundle definition ([#1579](https://github.com/Redocly/redoc/issues/1579)) ([ab2d57a](https://github.com/Redocly/redoc/commit/ab2d57a5a2ac5df007d76be0d664f3fb5f909566)) -* use operation path if operation summary/description is not provided ([#1596](https://github.com/Redocly/redoc/issues/1596)) ([4b072be](https://github.com/Redocly/redoc/commit/4b072be8d1c0dc4f1fa627168eebaed0a0213e08)), closes [#1270](https://github.com/Redocly/redoc/issues/1270) - - -### Features - -* add basic support OpenAPI 3.1 ([#1622](https://github.com/Redocly/redoc/issues/1622)) ([823be24](https://github.com/Redocly/redoc/commit/823be24b313c3a2445df7e0801a0cc79c20bacd1)) -* merge refs oas 3.1 ([#1640](https://github.com/Redocly/redoc/issues/1640)) ([f4ea368](https://github.com/Redocly/redoc/commit/f4ea368f78a693fd70d48b5e0e5ffce3560432f4)) - - - -# [2.0.0-rc.51](https://github.com/Redocly/redoc/compare/v2.0.0-rc.50...v2.0.0-rc.51) (2021-04-08) - -### Bug Fixes - -* use openapi-core to bundle definition instead of json-schema-ref-parser ([5033946](https://github.com/Redocly/redoc/commit/503394655da2aac544e278796098cba93d9194b9)), -closes: [#1506](https://github.com/Redocly/redoc/issues/1506), [#1478](https://github.com/Redocly/redoc/issues/1478) -* add disable-google-font parameter to serve command in cli ([c7bbef5](https://github.com/Redocly/redoc/commit/c7bbef515524095e957729eac35a5b7a97619b55)), closes [#1501](https://github.com/Redocly/redoc/issues/1501) - - - -# [2.0.0-rc.50](https://github.com/Redocly/redoc/compare/v2.0.0-rc.49...v2.0.0-rc.50) (2021-02-15) - - -### Bug Fixes - -* add includes polyfill ([3ba622f](https://github.com/Redocly/redoc/commit/3ba622f3ab9e28c954fe05f42e7b90862fc3d544)), closes [#1530](https://github.com/Redocly/redoc/issues/1530) -* background-color in search results ([#1531](https://github.com/Redocly/redoc/issues/1531)) ([d288165](https://github.com/Redocly/redoc/commit/d288165a4ea04aedc23dba12020a73e86f20755b)) -* false-positive recursive tag case when using oneOf + allOf ([#1534](https://github.com/Redocly/redoc/issues/1534)) ([8270481](https://github.com/Redocly/redoc/commit/8270481e9f0f381b392f7921d21cb06e0e673b6d)) - - - -# [2.0.0-rc.49](https://github.com/Redocly/redoc/compare/v2.0.0-rc.48...v2.0.0-rc.49) (2021-01-30) - - -### Bug Fixes - -* crash on multiple examples on parameter object ([0dce880](https://github.com/Redocly/redoc/commit/0dce880dce1e489c7e8963e352d97603262f4b86)), closes [#1485](https://github.com/Redocly/redoc/issues/1485) -* fix SourceCodeWithCopy component to be non-pure ([040ce72](https://github.com/Redocly/redoc/commit/040ce72a8ae0c1ca7504e10e44d0b2ac7ba04977)) -* pass boolean and number values as a string in highlight function ([#1512](https://github.com/Redocly/redoc/issues/1512)) ([c874a59](https://github.com/Redocly/redoc/commit/c874a5942c3bf9f6a2dc5909e31d57925d40aa86)) - - - -# [2.0.0-rc.48](https://github.com/Redocly/redoc/compare/v2.0.0-rc.47...v2.0.0-rc.48) (2020-11-30) - - -### Bug Fixes - -* add missed labels to elements ([#1445](https://github.com/Redocly/redoc/issues/1445)) ([8c559bc](https://github.com/Redocly/redoc/commit/8c559bcbcde39efee7f1570b88840468bfdfb17c)) - - -### Features - -* add new option hideSchemaPattern ([#1475](https://github.com/Redocly/redoc/issues/1475)) ([bb4594e](https://github.com/Redocly/redoc/commit/bb4594ee58d89819c975bdb575083c0667e3d940)) -* support multiple examples for parameters ([#1470](https://github.com/Redocly/redoc/issues/1470)) ([d12e410](https://github.com/Redocly/redoc/commit/d12e410d99a988948b359093159df79572bc78ab)) - - - -# [2.0.0-rc.46](https://github.com/Redocly/redoc/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2020-11-05) - - -### Bug Fixes - -* fix arrow color in responses ([#1452](https://github.com/Redocly/redoc/issues/1452)) ([6bedcf9](https://github.com/Redocly/redoc/commit/6bedcf94b26d820101ab510b28d2b76a38999eea)) -* remove duplicated slash if hideHostname option enabled ([#1448](https://github.com/Redocly/redoc/issues/1448)) ([4729fc3](https://github.com/Redocly/redoc/commit/4729fc3d8fc83f4af087cd7932adf500b45bab4e)) -* use shrinkwrap for cli package ([#1446](https://github.com/Redocly/redoc/issues/1446)) ([4567534](https://github.com/Redocly/redoc/commit/4567534cbb26f13a72a64d49faca64fc992d6dd8)) - - -### Features - -* add tabTextColor option for responses ([#1451](https://github.com/Redocly/redoc/issues/1451)) ([702fea0](https://github.com/Redocly/redoc/commit/702fea0f410499101efc554983c6db58acc84889)) - - - -# [2.0.0-rc.45](https://github.com/Redocly/redoc/compare/v2.0.0-rc.43...v2.0.0-rc.45) (2020-10-27) - - -### Bug Fixes - -* fix the name of OpenID Connect security scheme ([#1425](https://github.com/Redocly/redoc/issues/1425)) ([c11f679](https://github.com/Redocly/redoc/commit/c11f679f82586a96225488c8a96d0c908bfd2e09)) -* increase colors contrast to make them more accessible ([#1433](https://github.com/Redocly/redoc/issues/1433)) ([e2de5b0](https://github.com/Redocly/redoc/commit/e2de5b065eabd00d301ea61106ddafc65bd83afa)) - - -### Features - -* add field constraint indicator for uniqueItems ([#1423](https://github.com/Redocly/redoc/issues/1423)) ([c0ae9de](https://github.com/Redocly/redoc/commit/c0ae9de60758aa7561ce8a04b6e0060d0bc4a258)), closes [#1353](https://github.com/Redocly/redoc/issues/1353) -* new extensions hook PropertyDetailsCell + wrap property name into span ([0703f73](https://github.com/Redocly/redoc/commit/0703f73f79a1cabafdc1a908ebb0c5ab142ca825)) - - - -# [2.0.0-rc.44](https://github.com/Redocly/redoc/compare/v2.0.0-rc.43...v2.0.0-rc.44) (2020-10-16) - - -### Features - -* new extensions hook PropertyDetailsCell + wrap property name into span ([0fae030](https://github.com/Redocly/redoc/commit/0fae03099645bd9d3795709175640583b08dfc3d)) - - - -# [2.0.0-rc.43](https://github.com/Redocly/redoc/compare/v2.0.0-rc.42...v2.0.0-rc.43) (2020-10-13) - - -### Bug Fixes - -* fix broken observable after mobx upgrade ([#1415](https://github.com/Redocly/redoc/issues/1415)) ([26c407b](https://github.com/Redocly/redoc/commit/26c407bd0f2bc1ec9881e0a3668e09e645fc0cc0)) - - - -# [2.0.0-rc.42](https://github.com/Redocly/redoc/compare/v2.0.0-rc.41...v2.0.0-rc.42) (2020-10-13) - - -### Bug Fixes - -* hide dropdown input on IE 11 ([#1403](https://github.com/Redocly/redoc/issues/1403)) ([6632d84](https://github.com/Redocly/redoc/commit/6632d844536532227cb92290f9fc2b6b2f913270)) -* make samples accessible by keyboard ([#1401](https://github.com/Redocly/redoc/issues/1401)) ([146b38c](https://github.com/Redocly/redoc/commit/146b38c9d0b926765d8e00dd37204c30bf3ac4e0)) -* make schema layout more responsive on small screen ([#1411](https://github.com/Redocly/redoc/issues/1411)) ([84ab95d](https://github.com/Redocly/redoc/commit/84ab95ddc7b5dc159098aecf82ad922ffd4a3093)) - - - -# [2.0.0-rc.41](https://github.com/Redocly/redoc/compare/v2.0.0-rc.40...v2.0.0-rc.41) (2020-09-24) - - -### Bug Fixes - -* display response code at the top after adding a line break ([#1374](https://github.com/Redocly/redoc/issues/1374)) ([c801b87](https://github.com/Redocly/redoc/commit/c801b87d2aea5e17d35093e2548e1f51f42b1ee3)) -* fix displaying response title ([#1376](https://github.com/Redocly/redoc/issues/1376)) ([f3e8ab4](https://github.com/Redocly/redoc/commit/f3e8ab4f8e5522c9ea1ddedb143e23c7d62f5807)) -* fix displaying top-level object without any properties ([a5468fb](https://github.com/Redocly/redoc/commit/a5468fb7bb99fcfe33724af939b1a589c1219052)) -* show long pattern and add toggle button ([#1375](https://github.com/Redocly/redoc/issues/1375)) ([a6b41aa](https://github.com/Redocly/redoc/commit/a6b41aa00b7592512fdaa7532d9f5d85238db29b)) - - -### Features - -* load external search index ([346b10f](https://github.com/Redocly/redoc/commit/346b10f1739d6b44066bdf1f6aac39d5ee3567d2)) -* support for ignoring specified named schemas ([9730c4e](https://github.com/Redocly/redoc/commit/9730c4ee1c274c5775966959b69c209c40034b11)) - - - -# [2.0.0-rc.40](https://github.com/Redocly/redoc/compare/v2.0.0-rc.39...v2.0.0-rc.40) (2020-08-24) - - -### Bug Fixes - -* invalid discriminator dropdown behavior with enum ([be07197](https://github.com/Redocly/redoc/commit/be07197e6d1e85a3fd3e61189a36b288751c077d)) - - - -# [2.0.0-rc.39](https://github.com/Redocly/redoc/compare/v2.0.0-rc.38...v2.0.0-rc.39) (2020-08-22) - - -### Bug Fixes - -* fix broken dropdowns with SSR by using forked react-dropdown-aria ([c322639](https://github.com/Redocly/redoc/commit/c322639f7c3e7efbbd623ae83afb88faa91d9e67)) -* make callbacks expandable by keyboard ([#1354](https://github.com/Redocly/redoc/issues/1354)) ([46eee7b](https://github.com/Redocly/redoc/commit/46eee7b70c8ee9da0d8857a823c4df39a5f18b53)) - - - -# [2.0.0-rc.38](https://github.com/Redocly/redoc/compare/v2.0.0-rc.37...v2.0.0-rc.38) (2020-08-20) - - -### Bug Fixes - -* do not crash for invalid parameter.in value ([addf895](https://github.com/Redocly/redoc/commit/addf8956e33654a1586a8ac6ed7325519cd99da8)), closes [#1340](https://github.com/Redocly/redoc/issues/1340) -* scale sideMenu labels according to computed font size ([#1356](https://github.com/Redocly/redoc/issues/1356)) ([fed9a06](https://github.com/Redocly/redoc/commit/fed9a061d59592ec17cedbe4fd392e1f74c21527)) - - - -# [2.0.0-rc.37](https://github.com/Redocly/redoc/compare/v2.0.0-rc.36...v2.0.0-rc.37) (2020-08-14) - - -### Features - -* add webhooks support ([#1304](https://github.com/Redocly/redoc/issues/1304)) ([41f81b4](https://github.com/Redocly/redoc/commit/41f81b4d96648fec6bf0c39799c0aa2dded48749)) - - - -# [2.0.0-rc.36](https://github.com/Redocly/redoc/compare/v2.0.0-rc.35...v2.0.0-rc.36) (2020-08-04) - - -### Bug Fixes - -* highlight json keys using different color ([#1287](https://github.com/Redocly/redoc/issues/1287)) ([c9596d4](https://github.com/Redocly/redoc/commit/c9596d4b6cd9dced9fdee77525e0da90960c562a)) -* make elements accessible by keyboard navigation tools ([#1339](https://github.com/Redocly/redoc/issues/1339)) ([2ce7189](https://github.com/Redocly/redoc/commit/2ce71895bc14f9189b4e6cbdb6d838898717823f)) - - -### Features - -* new option simpleOneOfTypeLabel ([7af2efe](https://github.com/Redocly/redoc/commit/7af2efe731cdb16ebe5de6cb3e96f80cceb7d98d)) - - - -# [2.0.0-rc.35](https://github.com/Redocly/redoc/compare/v2.0.0-rc.34...v2.0.0-rc.35) (2020-07-24) - -### Bug Fixes - -* update EnumValues component ([#1324](https://github.com/Redocly/redoc/issues/1324)) ([de27ac0](https://github.com/Redocly/redoc/commit/de27ac03081d55967f5a479fb1352a83b8ceb8b2)) - - - -# [2.0.0-rc.34](https://github.com/Redocly/redoc/compare/v2.0.0-rc.33...v2.0.0-rc.34) (2020-07-24) - -Same as rc.33 by mistake - - - -# [2.0.0-rc.33](https://github.com/Redocly/redoc/compare/v2.0.0-rc.31...v2.0.0-rc.33) (2020-07-21) - - -### Bug Fixes - -* default style and explode for params ([633d712](https://github.com/Redocly/redoc/commit/633d71293fa9af2bda3bf456a9258625ee2b94a1)), closes [#1016](https://github.com/Redocly/redoc/issues/1016) -* fix contrast ratio for response titles ([47c6319](https://github.com/Redocly/redoc/commit/47c63192062d87b2b3205b915472930eaff6cc03)) -* fix expand variable for vars with hyphens or dots ([0904b3f](https://github.com/Redocly/redoc/commit/0904b3fec24edc56c4a4951501fe02ae22fd852b)), closes [#926](https://github.com/Redocly/redoc/issues/926) -* make dropdowns accessible by keyboard ([e8a0d10](https://github.com/Redocly/redoc/commit/e8a0d105ca52204b0d6fd61f5e909d9dbbe6f147)) -* make endpoint dropdown accessible ([3d25005](https://github.com/Redocly/redoc/commit/3d25005f084f06ac01b8fa13eb1d69092e99fd27)) -* make properties focusable ([05fd754](https://github.com/Redocly/redoc/commit/05fd7543a29e0aeb364c1ba3f2d736656de7b3b7)) -* make response sections focusable ([442014c](https://github.com/Redocly/redoc/commit/442014c06d6a7d2260adf7bc5798dd29869f10c9)) -* make sample controls focusable ([006031c](https://github.com/Redocly/redoc/commit/006031c51787b617f2b0aed80a4b8486c5d2d3ca)) -* update focus styling ([30a27c1](https://github.com/Redocly/redoc/commit/30a27c116b366428570d0b5516b5b2b4bcd0c5fc)) - - -### Features - -* add maxDisplayedEnumValues config and buttons for show/hide enums ([#1322](https://github.com/Redocly/redoc/issues/1322)) ([a2b018d](https://github.com/Redocly/redoc/commit/a2b018d393ee25fb8e9233f8123c29d14ab054c7)) -* array size info based on min max Items properties ([#1308](https://github.com/Redocly/redoc/issues/1308)) ([644e96a](https://github.com/Redocly/redoc/commit/644e96ae457047ce09f55aa1f14a42c41dbc1dc8)) -* new option sortEnumValuesAlphabetically ([#1321](https://github.com/Redocly/redoc/issues/1321)) ([a96a11a](https://github.com/Redocly/redoc/commit/a96a11a4dc8a509c6c3fba67dc4e065b66624e18)) - - - -# [2.0.0-rc.32](https://github.com/Redocly/redoc/compare/v2.0.0-rc.31...v2.0.0-rc.32) (2020-07-21) - -Same as rc.31 by mistake - - - -# [2.0.0-rc.31](https://github.com/Redocly/redoc/compare/v2.0.0-rc.30...v2.0.0-rc.31) (2020-06-25) - - -### Bug Fixes - -* do not display long regexps ([#1295](https://github.com/Redocly/redoc/issues/1295)) ([2ede22c](https://github.com/Redocly/redoc/commit/2ede22c45cc970ea1ac296adbae1f6032744f823)) -* prevent body scrolling when user scrolls side menu ([#1300](https://github.com/Redocly/redoc/issues/1300)) ([865a56a](https://github.com/Redocly/redoc/commit/865a56a2a9a105ef7b3b9150767399ca7339195a)) - - - -# [2.0.0-rc.30](https://github.com/Redocly/redoc/compare/v2.0.0-rc.29...v2.0.0-rc.30) (2020-05-25) - - -### Bug Fixes - -* add security headers to Docker nginx config ([#1244](https://github.com/Redocly/redoc/issues/1244)) ([4512436](https://github.com/Redocly/redoc/commit/4512436f1d88bd99558fe5f8384b37aa62562480)) -* keep 3-column layout on 13-inch mbp ([8d1d4c8](https://github.com/Redocly/redoc/commit/8d1d4c82e1377aecf936985ac13fa9bf5257562a)) -* proper search-index dispose ([9dd129d](https://github.com/Redocly/redoc/commit/9dd129d90b87f24ad20f084c44d48be50d750c94)) - - - -# [2.0.0-rc.29](https://github.com/Redocly/redoc/compare/v2.0.0-rc.28...v2.0.0-rc.29) (2020-05-10) - - -### Bug Fixes - -* depreacate x-code-samples, rename to x-codeSamples for consistency ([becc2f5](https://github.com/Redocly/redoc/commit/becc2f58568388b6500e6476874f27f62ff58ba9)) -* do not crash on incompatible allOf, console.warn instead ([6e607b9](https://github.com/Redocly/redoc/commit/6e607b9a2928b062c7705087432c0f0d88e74f5d)), closes [#1156](https://github.com/Redocly/redoc/issues/1156) -* download button opens in new tab instead of downloading ([b59faad](https://github.com/Redocly/redoc/commit/b59faada8210a4c8f61fa0e850b7d844574a46d1)), closes [#1247](https://github.com/Redocly/redoc/issues/1247) -* fix broken md headings with ampersand ([8460659](https://github.com/Redocly/redoc/commit/846065916d58cf628f0bc93c74be429ecdea12e7)), closes [#1173](https://github.com/Redocly/redoc/issues/1173) - - -### Features - -* **cli:** add the --title option to the serve subcommand ([#1160](https://github.com/Redocly/redoc/issues/1160)) ([10414fc](https://github.com/Redocly/redoc/commit/10414fc6d5c0f91b5e93b1ed2326e4e508611324)) - - - -# [2.0.0-rc.28](https://github.com/Redocly/redoc/compare/v2.0.0-rc.27...v2.0.0-rc.28) (2020-04-27) - - -### Bug Fixes - -* encode URLs in json samples linkify (xss) ([62c01da](https://github.com/Redocly/redoc/commit/62c01da420fca2137674ae562d4ecba54db97da9)), thanks to @masatokinugawa - - - -# [2.0.0-rc.27](https://github.com/Redocly/redoc/compare/v2.0.0-rc.26...v2.0.0-rc.27) (2020-04-20) - - -### Features - -* add callbacks support ([#1224](https://github.com/Redocly/redoc/issues/1224)) ([57e93ec](https://github.com/Redocly/redoc/commit/57e93ec4355de2659fcb5449b14b7ed738c6c276)) - - - -# [2.0.0-rc.26](https://github.com/Redocly/redoc/compare/v2.0.0-rc.25...v2.0.0-rc.26) (2020-03-29) - - -### Bug Fixes - -* crash to wrong spelling in localeCompare ([3908a7c](https://github.com/Redocly/redoc/commit/3908a7c46448d277b82318659cdea65db52f9e70)), closes [#1218](https://github.com/Redocly/redoc/issues/1218) - - - -# [2.0.0-rc.25](https://github.com/Redocly/redoc/compare/v2.0.0-rc.24...v2.0.0-rc.25) (2020-03-27) - - -### Bug Fixes - -* do not collapse top level on Collapse All in json samples ([#1209](https://github.com/Redocly/redoc/issues/1209)) ([830371b](https://github.com/Redocly/redoc/commit/830371b5d1edf4ba7a138b3b3d78148d020e0349)) -* fix passing boolean value to showExtensions options ([#1211](https://github.com/Redocly/redoc/issues/1211)) ([c6eaa02](https://github.com/Redocly/redoc/commit/c6eaa0281bb0f62b019c865e4aefb863ce84d628)) -* improve names for some theme settings ([a0bd27c](https://github.com/Redocly/redoc/commit/a0bd27c75427a39abc9c753b0654678eed2f3851)) -* sort discriminator entries by mapping order ([#1216](https://github.com/Redocly/redoc/issues/1216)) ([ac4f915](https://github.com/Redocly/redoc/commit/ac4f915494f289d1c97ffdfe3af59efd94734f8c)) - - -### Features - -* add x-explicitMappingOnly extension ([#1215](https://github.com/Redocly/redoc/issues/1215)) ([ea5b0aa](https://github.com/Redocly/redoc/commit/ea5b0aabf9133d11d3a8fcb79f9515d21e0d7ac0)) - - - -# [2.0.0-rc.24](https://github.com/Redocly/redoc/compare/v2.0.0-rc.23...v2.0.0-rc.24) (2020-03-17) - - -### Bug Fixes - -* Add debounce for 300 ms when searching ([#1089](https://github.com/Redocly/redoc/issues/1089)) ([373f018](https://github.com/Redocly/redoc/commit/373f018d0c183f83d07a4dbad4a4e2c9ab159f69)) -* do not load SearchWorker if disableSearch is `true` ([#1191](https://github.com/Redocly/redoc/issues/1191)) ([af415e8](https://github.com/Redocly/redoc/commit/af415e89e8c074a3f7c84f76f24020a7bd545483)), closes [#764](https://github.com/Redocly/redoc/issues/764) -* fix major search performance due to wrong marker element ([8c053cc](https://github.com/Redocly/redoc/commit/8c053cc474e88befc3338307317c0702d212d4c3)), closes [#1109](https://github.com/Redocly/redoc/issues/1109) - - -### Features - -* new option expandSingleSchemaField ([7608800](https://github.com/Redocly/redoc/commit/7608800d0acaa2fa0099dc840e17cd5aa90b54ca)) - - - -# [2.0.0-rc.23](https://github.com/Redocly/redoc/compare/v2.0.0-rc.22...v2.0.0-rc.23) (2020-02-09) - - -### Bug Fixes - -* fix broken sticky sidebar in Chrome 80 ([1a2a7dd](https://github.com/Redocly/redoc/commit/1a2a7dd8331cedd6ced4c18accf0b417549b3ff3)), closes [#1167](https://github.com/Redocly/redoc/issues/1167) - - - -# [2.0.0-rc.22](https://github.com/Redocly/redoc/compare/v2.0.0-rc.21...v2.0.0-rc.22) (2020-01-15) - - -### Bug Fixes - -* do not process oneOf if inherited from parent with discriminator ([5248415](https://github.com/Redocly/redoc/commit/52484157912d908daea8255d0b7d684b33258d7a)) - - -### Features - -* add HTTP syntax highlighting ([#1157](https://github.com/Redocly/redoc/issues/1157)) ([27a4af7](https://github.com/Redocly/redoc/commit/27a4af707686d56280753473b4294ee4af096534)) - - - -# [2.0.0-rc.21](https://github.com/Redocly/redoc/compare/v2.0.0-rc.20...v2.0.0-rc.21) (2020-01-10) - - -### Bug Fixes - -* empty servers behavior per OAS spec ([ed1db0c](https://github.com/Redocly/redoc/commit/ed1db0c9027087ae0ae923e390e3e1d638a647ae)), closes [#1151](https://github.com/Redocly/redoc/issues/1151) -* fix duplicated content in tags when using md headings ([a260c84](https://github.com/Redocly/redoc/commit/a260c8414c34a259a70a20ebcd20ecbb06c3d250)), closes [#1150](https://github.com/Redocly/redoc/issues/1150) [#1152](https://github.com/Redocly/redoc/issues/1152) -* use mobile menu background color value from theme ([#1144](https://github.com/Redocly/redoc/issues/1144)) ([41a9b3c](https://github.com/Redocly/redoc/commit/41a9b3c18228d236d182d3c15c9abc35ae72a0d5)) - - - -# [2.0.0-rc.20](https://github.com/Redocly/redoc/compare/v2.0.0-rc.19...v2.0.0-rc.20) (2019-12-13) - - -### Bug Fixes - -* fix missing parameters ([942d782](https://github.com/Redocly/redoc/commit/942d782b5a8d08767a7538741b75587cf1e67f44)), closes [#1142](https://github.com/Redocly/redoc/issues/1142) - - - -# [2.0.0-rc.19](https://github.com/Redocly/redoc/compare/v2.0.0-rc.18...v2.0.0-rc.19) (2019-12-13) - - -### Bug Fixes - -* change the title of "Security Scheme Type" to match "HTTP Authorization Scheme" ([#1126](https://github.com/Redocly/redoc/issues/1126)) ([289c8e6](https://github.com/Redocly/redoc/commit/289c8e6ae1ff00371f86d3f2646607c64bc30050)) -* do not URI-encode parameter values for better readability ([6aeb0bf](https://github.com/Redocly/redoc/commit/6aeb0bf68df3f03f2ca1317f8b5787545bd363f1)), closes [#1138](https://github.com/Redocly/redoc/issues/1138) -* fix sortByRequired (stabilise sort) ([#1136](https://github.com/Redocly/redoc/issues/1136)) ([d92434d](https://github.com/Redocly/redoc/commit/d92434d11b08e8b0f6be5453ec69aa1d0e0df79f)), closes [#1104](https://github.com/Redocly/redoc/issues/1104) [#1121](https://github.com/Redocly/redoc/issues/1121) [#1061](https://github.com/Redocly/redoc/issues/1061) -* h2 padding on mobile ([7ed1a7e](https://github.com/Redocly/redoc/commit/7ed1a7ef0e7978a0dfb40afcc72c3362466f9624)), closes [#1118](https://github.com/Redocly/redoc/issues/1118) -* python comment stripped in headings ([4a25aae](https://github.com/Redocly/redoc/commit/4a25aaef69fad814836392ea7e41eb32c182a261)), closes [#1116](https://github.com/Redocly/redoc/issues/1116) -* remove hardcoded fontFamily for oneOf labels ([094ce91](https://github.com/Redocly/redoc/commit/094ce914e3f9cfe567b39db4ea88208014d8b686)), closes [#1120](https://github.com/Redocly/redoc/issues/1120) -* search-box use theme ([1bf490c](https://github.com/Redocly/redoc/commit/1bf490c05b343d262f8819bf1ddc433e070be1b9)) -* support discriminator mapping 1-n ([6e390f9](https://github.com/Redocly/redoc/commit/6e390f9c7909da0b5d1d6fc571ab4ad92e715d6e)), closes [#1111](https://github.com/Redocly/redoc/issues/1111) -* wrap json examples in code tag ([#1064](https://github.com/Redocly/redoc/issues/1064)) ([dc5430e](https://github.com/Redocly/redoc/commit/dc5430e53def780a81612d269cc3aea3f8785eea)) - - -### Features - -* display `multipleOf` constrains ([#1065](https://github.com/Redocly/redoc/issues/1065)) ([3e90133](https://github.com/Redocly/redoc/commit/3e901336643b988ae45ae86c485005b8865e6e04)) -* enable menuToggle by default ([5d81abe](https://github.com/Redocly/redoc/commit/5d81abeb28c1e4f2826e41424c10163834c37e45)) -* new option hideSchemaTitles ([11cc4c4](https://github.com/Redocly/redoc/commit/11cc4c4c3e04a7e5bf3a9ebba20d10fa882a49e5)) -* new option payloadSampleIdx ([eaaa99d](https://github.com/Redocly/redoc/commit/eaaa99d68e2392273e8d9c0173db3b546e035d5f)) -* **cli:** Fallback on the spec's title before falling back on… ([#1073](https://github.com/Redocly/redoc/issues/1073)) ([e01eea4](https://github.com/Redocly/redoc/commit/e01eea445c93d74b66533c860d76bb3aff4d6df2)) - - - -# [2.0.0-rc.18](https://github.com/Redocly/redoc/compare/v2.0.0-rc.17...v2.0.0-rc.18) (2019-10-16) - - -### Bug Fixes - -* add oneOf buttons vertical space when wrapped to new line ([cd9fd61](https://github.com/Redocly/redoc/commit/cd9fd61)) -* improve mime-type dropdown font ([ce885f8](https://github.com/Redocly/redoc/commit/ce885f8)) - - - -# [2.0.0-rc.17](https://github.com/Redocly/redoc/compare/v2.0.0-rc.16...v2.0.0-rc.17) (2019-10-16) - - -### Bug Fixes - -* active menu item scroll into view ([0a01e9a](https://github.com/Redocly/redoc/commit/0a01e9a)) -* changed several components style font-family to monospace ([#1063](https://github.com/Redocly/redoc/issues/1063)) ([0c20e64](https://github.com/Redocly/redoc/commit/0c20e64)), closes [#909](https://github.com/Redocly/redoc/issues/909) -* no quotes for default values in header fields. ([#1059](https://github.com/Redocly/redoc/issues/1059)) ([b5af71d](https://github.com/Redocly/redoc/commit/b5af71d)) -* types over-pluralization ([#1057](https://github.com/Redocly/redoc/issues/1057)) ([4494f80](https://github.com/Redocly/redoc/commit/4494f80)), closes [#1053](https://github.com/Redocly/redoc/issues/1053) - - -### Features - -* added support for file paths as --options cli argument ([#1049](https://github.com/Redocly/redoc/issues/1049)) ([4adb927](https://github.com/Redocly/redoc/commit/4adb927)) - - - -# [2.0.0-rc.16](https://github.com/Redocly/redoc/compare/v2.0.0-rc.15...v2.0.0-rc.16) (2019-09-30) - - -### Bug Fixes - -* fix scrollYOffset when SSR ([d09c1c1](https://github.com/Redocly/redoc/commit/d09c1c1)) - - - -# [2.0.0-rc.15](https://github.com/Redocly/redoc/compare/v2.0.0-rc.14...v2.0.0-rc.15) (2019-09-30) - - -### Bug Fixes - -* auth section appears twice ([5aa7784](https://github.com/Redocly/redoc/commit/5aa7784)), closes [#818](https://github.com/Redocly/redoc/issues/818) -* clicking on group title breaks first tag ([4649683](https://github.com/Redocly/redoc/commit/4649683)), closes [#1034](https://github.com/Redocly/redoc/issues/1034) -* do not crash on empty scopes ([e787d9e](https://github.com/Redocly/redoc/commit/e787d9e)), closes [#1044](https://github.com/Redocly/redoc/issues/1044) -* false-positive recursive detection with allOf at the same level ([faa74d6](https://github.com/Redocly/redoc/commit/faa74d6)) -* fix scrollYOffset when SSR ([21258a5](https://github.com/Redocly/redoc/commit/21258a5)) -* left menu item before group is not highlighted ([67e2a8f](https://github.com/Redocly/redoc/commit/67e2a8f)), closes [#1033](https://github.com/Redocly/redoc/issues/1033) -* remove excessive whitespace between md sections on small screens ([e318fb3](https://github.com/Redocly/redoc/commit/e318fb3)), closes [#874](https://github.com/Redocly/redoc/issues/874) -* use url-template dependency ([#1008](https://github.com/Redocly/redoc/issues/1008)) ([32a464a](https://github.com/Redocly/redoc/commit/32a464a)), closes [#1007](https://github.com/Redocly/redoc/issues/1007) - - -### Features - -* **cli:** added support for JSON string value for --options CLI argument ([#1047](https://github.com/Redocly/redoc/issues/1047)) ([2a28130](https://github.com/Redocly/redoc/commit/2a28130)), closes [#797](https://github.com/Redocly/redoc/issues/797) -* **cli:** add `disableGoogleFont` parameter to cli ([#1045](https://github.com/Redocly/redoc/issues/1045)) ([aceb343](https://github.com/Redocly/redoc/commit/aceb343)) -* new option expandDefaultServerVariables ([#1014](https://github.com/Redocly/redoc/issues/1014)) ([0360dce](https://github.com/Redocly/redoc/commit/0360dce)) - - - - -# [2.0.0-rc.14](https://github.com/Redocly/redoc/compare/v2.0.0-rc.13...v2.0.0-rc.14) (2019-08-07) - - -### Bug Fixes - -* fix escaping JSON string values ([58cb20d](https://github.com/Redocly/redoc/commit/58cb20d)), closes [#999](https://github.com/Redocly/redoc/issues/999) -* revert expanding default server variables ([7849f7f](https://github.com/Redocly/redoc/commit/7849f7f)) - - - -# [2.0.0-rc.13](https://github.com/Redocly/redoc/compare/v2.0.0-rc.12...v2.0.0-rc.13) (2019-08-01) - - -### Bug Fixes - -* enum list doesn't wrap ([bfbb0c1](https://github.com/Redocly/redoc/commit/bfbb0c1)), closes [#993](https://github.com/Redocly/redoc/issues/993) -* incorrect serialization of some parameter samples ([aba45db](https://github.com/Redocly/redoc/commit/aba45db)), closes [#992](https://github.com/Redocly/redoc/issues/992) -* support json serialization for parameter examples ([1367380](https://github.com/Redocly/redoc/commit/1367380)), closes [#934](https://github.com/Redocly/redoc/issues/934) -* unify accordion icons for responses section ([2afc2e4](https://github.com/Redocly/redoc/commit/2afc2e4)), closes [#975](https://github.com/Redocly/redoc/issues/975) -* update to core.js 3 ([9e3375d](https://github.com/Redocly/redoc/commit/9e3375d)), closes [#997](https://github.com/Redocly/redoc/issues/997) - - - -# [2.0.0-rc.12](https://github.com/Redocly/redoc/compare/v2.0.0-rc.11...v2.0.0-rc.12) (2019-07-30) - - -### Bug Fixes - -* rename ObjectDescription to SchemaDefinition as discussed ([4496622](https://github.com/Redocly/redoc/commit/4496622)) - - - -# [2.0.0-rc.11](https://github.com/Redocly/redoc/compare/v2.0.0-rc.10...v2.0.0-rc.11) (2019-07-30) - - -### Bug Fixes - -* do not add extra slashes to pattern ([70d1ee9](https://github.com/Redocly/redoc/commit/70d1ee9)), closes [#983](https://github.com/Redocly/redoc/issues/983) -* dropdown fixes related to object description ([0504ad4](https://github.com/Redocly/redoc/commit/0504ad4)) -* incorrect serialization of parameter sample with hyphen ([f7dd658](https://github.com/Redocly/redoc/commit/f7dd658)) -* redoc-cli: Add missing content type header on compressed responses of `/` path - - -### Features - -* menu items from tags + md extension for Schema Definition ([#681](https://github.com/Redocly/redoc/pull/681)) -* new option `menuToggle` - fold active MenuItem if clicked ([#963](https://github.com/Redocly/redoc/issues/963)) -* Add option for skipping quotes in enums `enumSkipQuotes` ([#968](https://github.com/Redocly/redoc/issues/968)) ([afc7e36](https://github.com/Redocly/redoc/commit/afc7e36)) -* add `sampleCollapseLevel` option ([#937](https://github.com/Redocly/redoc/issues/937)) ([d3f1c16](https://github.com/Redocly/redoc/commit/d3f1c16)) - -# [2.0.0-rc.10](https://github.com/Redocly/redoc/compare/v2.0.0-rc.9...v2.0.0-rc.10) (2019-07-08) - - -### Bug Fixes - -* broken headings with single quote ([51d3b9b](https://github.com/Redocly/redoc/commit/51d3b9b)), closes [#955](https://github.com/Redocly/redoc/issues/955) -* fix fields table overflow if deeply nested with long title ([12b7057](https://github.com/Redocly/redoc/commit/12b7057)) -* hide empty example when it is not defined ([4bd499f](https://github.com/Redocly/redoc/commit/4bd499f)) -* markdown in examples descriptions + minor ui tweaks ([f52d9e8](https://github.com/Redocly/redoc/commit/f52d9e8)) -* organize response examples in dropdown and display description ([995e557](https://github.com/Redocly/redoc/commit/995e557)) - - - -# [2.0.0-rc.9](https://github.com/Redocly/redoc/compare/v2.0.0-rc.8-1...v2.0.0-rc.9) (2019-06-27) - - -### Bug Fixes - -* fix regression double slashes added to full URL display ([f29a4fe](https://github.com/Redocly/redoc/commit/f29a4fe)) -* IE11, add missing Object.assign polyfill ([888f04e](https://github.com/Redocly/redoc/commit/888f04e)) -* serialize parameter example values according to the spec ([#917](https://github.com/Redocly/redoc/issues/917)) ([3939286](https://github.com/Redocly/redoc/commit/3939286)) -* styled-component style error in tabs ([#946](https://github.com/Redocly/redoc/issues/946)) ([c488bbf](https://github.com/Redocly/redoc/commit/c488bbf)) - - -### Features - -* add x-additionalPropertiesName ([#622](https://github.com/Redocly/redoc/issues/622)) ([#944](https://github.com/Redocly/redoc/issues/944)) ([0eb1e66](https://github.com/Redocly/redoc/commit/0eb1e66)) - - - -# [2.0.0-rc.8-1](https://github.com/Rebilly/ReDoc/compare/v2.0.0-rc.8...v2.0.0-rc.8-1) (2019-05-13) - - -### Bug Fixes - -* crash with empty servers with redoc-cli ([3d52b39](https://github.com/Rebilly/ReDoc/commit/3d52b39)) - - - -# [2.0.0-rc.8](https://github.com/Rebilly/ReDoc/compare/v2.0.0-rc.7...v2.0.0-rc.8) (2019-05-13) - - -### Bug Fixes - -* fix broken CLI again ([4e12b5d](https://github.com/Rebilly/ReDoc/commit/4e12b5d)) -* fix logo gutter bg ([81896d3](https://github.com/Rebilly/ReDoc/commit/81896d3)) - - - -# [2.0.0-rc.7](https://github.com/Rebilly/ReDoc/compare/v2.0.0-rc.6...v2.0.0-rc.7) (2019-05-13) - - -### Bug Fixes - -* crash in node due to broken URL parsing ([8df2b97](https://github.com/Rebilly/ReDoc/commit/8df2b97)) - - - -# [2.0.0-rc.6](https://github.com/Rebilly/ReDoc/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2019-05-13) - - -### Bug Fixes - -* broken schema tables with long enums ([3a74b74](https://github.com/Rebilly/ReDoc/commit/3a74b74)) -* deep linking sometimes not working when sent over messengers ([2491d97](https://github.com/Rebilly/ReDoc/commit/2491d97)) - - - -# [2.0.0-rc.5](https://github.com/Rebilly/ReDoc/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2019-05-13) - - -### Bug Fixes - -* change fontFamily for EndpointInfo ([#866](https://github.com/Rebilly/ReDoc/issues/866)) ([851b133](https://github.com/Rebilly/ReDoc/commit/851b133)) -* clean up field values display ([#855](https://github.com/Rebilly/ReDoc/issues/855)) ([5c91590](https://github.com/Rebilly/ReDoc/commit/5c91590)) -* discriminator and oneOf title fix ([a3d7d7a](https://github.com/Rebilly/ReDoc/commit/a3d7d7a)) -* encode x-www-form-urlencoded examples correctly ([65930ad](https://github.com/Rebilly/ReDoc/commit/65930ad)), closes [#870](https://github.com/Rebilly/ReDoc/issues/870) -* fix redoc-cli broken dependencies ([81a7568](https://github.com/Rebilly/ReDoc/commit/81a7568)) -* IE11 add missing fetch and URL polyfills ([d2ce1bd](https://github.com/Rebilly/ReDoc/commit/d2ce1bd)), closes [#875](https://github.com/Rebilly/ReDoc/issues/875) -* ignore empty x-tagGroups array ([#869](https://github.com/Rebilly/ReDoc/issues/869)) ([4366a0d](https://github.com/Rebilly/ReDoc/commit/4366a0d)) -* incorrect detected schema title for deeply inherited schemas ([7d7b4e3](https://github.com/Rebilly/ReDoc/commit/7d7b4e3)) -* pluralize array of types ([fdcac30](https://github.com/Rebilly/ReDoc/commit/fdcac30)) -* remove huge space after Authentication section ([548fae3](https://github.com/Rebilly/ReDoc/commit/548fae3)), closes [#872](https://github.com/Rebilly/ReDoc/issues/872) -* remove query string from server URL ([#895](https://github.com/Rebilly/ReDoc/issues/895)) ([64453ff](https://github.com/Rebilly/ReDoc/commit/64453ff)) -* remove tabs top margin ([5c187f3](https://github.com/Rebilly/ReDoc/commit/5c187f3)) -* right panel code samples bg color ([de2aed2](https://github.com/Rebilly/ReDoc/commit/de2aed2)) -* tidy up non-redoc vendor extension presentation ([#847](https://github.com/Rebilly/ReDoc/issues/847)) ([b21cd3d](https://github.com/Rebilly/ReDoc/commit/b21cd3d)) -* update apiKey in to be titleize ([#902](https://github.com/Rebilly/ReDoc/issues/902)) ([35df477](https://github.com/Rebilly/ReDoc/commit/35df477)) -* **cli:** add node-libs-browser to the deps ([6c79901](https://github.com/Rebilly/ReDoc/commit/6c79901)), closes [#850](https://github.com/Rebilly/ReDoc/issues/850) - - -### Features - -* add hideSingleRequestSampleTab option ([4550e4d](https://github.com/Rebilly/ReDoc/commit/4550e4d)) -* add lineHeight config for headings ([#894](https://github.com/Rebilly/ReDoc/issues/894)) ([5dd5d6d](https://github.com/Rebilly/ReDoc/commit/5dd5d6d)) -* basic UI labels configuration ([b0e660e](https://github.com/Rebilly/ReDoc/commit/b0e660e)). Can be used for translations later. -* add logo gutter to the theme ([82c0cb1a](https://github.com/Rebilly/ReDoc/commit/82c0cb1a)). - -# [2.0.0-rc.4](https://github.com/Rebilly/ReDoc/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2019-03-15) - - -### Bug Fixes - -* move swagger2openapi to deps because of missing transitive deps ([ed9b878](https://github.com/Rebilly/ReDoc/commit/ed9b878)) - - -### Features - -* display requestBody description [#833](https://github.com/Rebilly/ReDoc/issues/833) ([#838](https://github.com/Rebilly/ReDoc/issues/838)) ([56ca371](https://github.com/Rebilly/ReDoc/commit/56ca371)) - - -# [2.0.0-rc.3](https://github.com/Rebilly/ReDoc/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2019-03-15) - - -### Bug Fixes - -* add extra deref step for anyOf/oneOf variants ([d81b631](https://github.com/Rebilly/ReDoc/commit/d81b631)), closes [#810](https://github.com/Rebilly/ReDoc/issues/810) -* duplicate keys in request samples ([3ce5bff](https://github.com/Rebilly/ReDoc/commit/3ce5bff)), closes [#815](https://github.com/Rebilly/ReDoc/issues/815) -* escape backslashes in string literals ([#823](https://github.com/Rebilly/ReDoc/issues/823)) ([70faca1](https://github.com/Rebilly/ReDoc/commit/70faca1)), closes [#822](https://github.com/Rebilly/ReDoc/issues/822) -* escape quotes in string values ([0473165](https://github.com/Rebilly/ReDoc/commit/0473165)), closes [#882](https://github.com/Rebilly/ReDoc/issues/882) -* pin lunr version in ReDoc ([178ff4c](https://github.com/Rebilly/ReDoc/commit/178ff4c)), closes [#844](https://github.com/Rebilly/ReDoc/issues/844) -* set last section min-height ([4dd79cd](https://github.com/Rebilly/ReDoc/commit/4dd79cd)), closes [#820](https://github.com/Rebilly/ReDoc/issues/820) - - -### Features - -* support externalValue for examples ([2cdfcd2](https://github.com/Rebilly/ReDoc/commit/2cdfcd2)), closes [#551](https://github.com/Rebilly/ReDoc/issues/551) [#840](https://github.com/Rebilly/ReDoc/issues/840) -* **cli:** Add templateOptions param to pass additional data to custom template ([#792](https://github.com/Rebilly/ReDoc/issues/792)) ([4e8ee03](https://github.com/Rebilly/ReDoc/commit/4e8ee03)) - - - -# [2.0.0-rc.2](https://github.com/Rebilly/ReDoc/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2019-01-27) - - -### Bug Fixes - -* make padding for md code blocks and code samples consistent ([007752d](https://github.com/Rebilly/ReDoc/commit/007752d)) -* make syntax highlighting for md js code blocks same as for payload samples ([d197c0f](https://github.com/Rebilly/ReDoc/commit/d197c0f)) -* Only display API version if present ([#773](https://github.com/Rebilly/ReDoc/issues/773)) ([fb3cb36](https://github.com/Rebilly/ReDoc/commit/fb3cb36)) - - - -# [2.0.0-rc.1](https://github.com/Rebilly/ReDoc/compare/v2.0.0-rc.0...v2.0.0-rc.1) (2019-01-17) - - -### Bug Fixes - -* allow docker container serving under non-root URLs ([#731](https://github.com/Rebilly/ReDoc/issues/731)) ([cfb6f0f](https://github.com/Rebilly/ReDoc/commit/cfb6f0f)), closes [#730](https://github.com/Rebilly/ReDoc/issues/730) -* make example/defaults badge consistent with code blocks ([fa39ce4](https://github.com/Rebilly/ReDoc/commit/fa39ce4)) -* pattern constrain spacing ([c7436f2](https://github.com/Rebilly/ReDoc/commit/c7436f2)) -* sidebar navigation issues when scrollYOffset is float number ([c04f387](https://github.com/Rebilly/ReDoc/commit/c04f387)), closes [#748](https://github.com/Rebilly/ReDoc/issues/748) - - - -# [2.0.0-rc.0](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.41...v2.0.0-rc.0) (2018-11-27) - - -### Bug Fixes - -* false-positive recursive detection with oneOf ([59eaa8d](https://github.com/Rebilly/ReDoc/commit/59eaa8d)), closes [#723](https://github.com/Rebilly/ReDoc/issues/723) [#585](https://github.com/Rebilly/ReDoc/issues/585) -* fix hideHostname also hiding basePath ([b5f3224](https://github.com/Rebilly/ReDoc/commit/b5f3224)), closes [#677](https://github.com/Rebilly/ReDoc/issues/677) -* fix spacing with nested markdown lists ([f2f6909](https://github.com/Rebilly/ReDoc/commit/f2f6909)), closes [#718](https://github.com/Rebilly/ReDoc/issues/718) -* improve scrolling performance in Chrome with non-wrapped json examples ([a69c402](https://github.com/Rebilly/ReDoc/commit/a69c402)) -* nested oneOf button spacing ([3673720](https://github.com/Rebilly/ReDoc/commit/3673720)), closes [#719](https://github.com/Rebilly/ReDoc/issues/719) -* onLoaded callback not run on spec error ([e77df0c](https://github.com/Rebilly/ReDoc/commit/e77df0c)), closes [#690](https://github.com/Rebilly/ReDoc/issues/690) -* theme improvements by [@stasiukanya](https://github.com/stasiukanya) ([e2d0cd5](https://github.com/Rebilly/ReDoc/commit/e2d0cd5)) -* **cli:** old peer dependency issue with styled-components ([#699](https://github.com/Rebilly/ReDoc/issues/699)) ([9e2853c](https://github.com/Rebilly/ReDoc/commit/9e2853c)) - - -### Features - -* Add feature to specify href for logo explicitly ([#645](https://github.com/Rebilly/ReDoc/issues/645)) ([87fd7d7](https://github.com/Rebilly/ReDoc/commit/87fd7d7)) -* add support for markdown in Server Object ([155d214](https://github.com/Rebilly/ReDoc/commit/155d214)) -* Add support for minLength and maxLength constraint humanization ([#700](https://github.com/Rebilly/ReDoc/issues/700)) ([f40568b](https://github.com/Rebilly/ReDoc/commit/f40568b)), closes [#42](https://github.com/Rebilly/ReDoc/issues/42) [/github.com/Rebilly/ReDoc/issues/42#issuecomment-371883853](https://github.com//github.com/Rebilly/ReDoc/issues/42/issues/issuecomment-371883853) - - - - -# [2.0.0-alpha.41](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.40...v2.0.0-alpha.41) (2018-10-18) - - -### Bug Fixes - -* add null check in dispose method ([#675](https://github.com/Rebilly/ReDoc/issues/675)) ([6b7c5b7](https://github.com/Rebilly/ReDoc/commit/6b7c5b7)) -* extensionHook not being used ([a4a4013](https://github.com/Rebilly/ReDoc/commit/a4a4013)), closes [#665](https://github.com/Rebilly/ReDoc/issues/665) -* fix issue with broken markdown caused by marked bug ([70cf293](https://github.com/Rebilly/ReDoc/commit/70cf293)) - -### Peer dependencies updates - -* ReDoc now requires `styled-components@^4.0.1` to be installed if used as React component - - - - -# [2.0.0-alpha.40](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.39...v2.0.0-alpha.40) (2018-10-05) - - -### Bug Fixes - -* **cli:** add styled-components to dependencies ([2d63fa0](https://github.com/Rebilly/ReDoc/commit/2d63fa0)) -* allOf inside oneOf overwritten and not rendered ([fe3383d](https://github.com/Rebilly/ReDoc/commit/fe3383d)), closes [#660](https://github.com/Rebilly/ReDoc/issues/660) -* fix panel paddings on small screens ([f39fc98](https://github.com/Rebilly/ReDoc/commit/f39fc98)) -* minor media print improvements ([fbcec82](https://github.com/Rebilly/ReDoc/commit/fbcec82)) -* remove extra-padding caused by empty group sections ([974bc7d](https://github.com/Rebilly/ReDoc/commit/974bc7d)) -* server overriding didn't work on Path Item object ([355764d](https://github.com/Rebilly/ReDoc/commit/355764d)), closes [#656](https://github.com/Rebilly/ReDoc/issues/656) - - -### Features - -* new option `onlyRequiredInSamples` ([#646](https://github.com/Rebilly/ReDoc/issues/646)) ([10bca66](https://github.com/Rebilly/ReDoc/commit/10bca66)) -* new option `sortPropsAlphabetically` ([b87cf0d](https://github.com/Rebilly/ReDoc/commit/b87cf0d)) -* new theme options `spacing.sectionHorizontal` and `spacing.sectionVertical` ([505463f](https://github.com/Rebilly/ReDoc/commit/505463f)) -* turn off code-blocks wrapping (enable using `theme.typography.code.wrap: true`) ([393681b](https://github.com/Rebilly/ReDoc/commit/393681b)), closes [#658](https://github.com/Rebilly/ReDoc/issues/658) - - - - -# [2.0.0-alpha.39](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.38...v2.0.0-alpha.39) (2018-09-14) - - -### Bug Fixes - -* Increase badge size slightly so that "PATCH" method fits inside ([#632](https://github.com/Rebilly/ReDoc/issues/632)) ([4b3b5ba](https://github.com/Rebilly/ReDoc/commit/4b3b5ba)) - - -### Features - -* externalDocumentation rendered for tags, operations and schema fields ([#595](https://github.com/Rebilly/ReDoc/issues/595)) ([893c83e](https://github.com/Rebilly/ReDoc/commit/893c83e)), closes [#550](https://github.com/Rebilly/ReDoc/issues/550) - - - - -# [2.0.0-alpha.38](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.37...v2.0.0-alpha.38) (2018-08-24) - - -### Bug Fixes - -* add indent to array schema internals ([865f3ce](https://github.com/Rebilly/ReDoc/commit/865f3ce)) -* fix oneOf/anyOf titles ([39b930d](https://github.com/Rebilly/ReDoc/commit/39b930d)), closes [#618](https://github.com/Rebilly/ReDoc/issues/618) [#621](https://github.com/Rebilly/ReDoc/issues/621) - - - - -# [2.0.0-alpha.37](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.36...v2.0.0-alpha.37) (2018-08-22) - - -### Bug Fixes - -* do not inherit title in allOf ([720e282](https://github.com/Rebilly/ReDoc/commit/720e282)), closes [#601](https://github.com/Rebilly/ReDoc/issues/601) -* fix crash on empty media object ([fb21212](https://github.com/Rebilly/ReDoc/commit/fb21212)), closes [#608](https://github.com/Rebilly/ReDoc/issues/608) -* make http badges font-based instead of inline png ([5d84bd4](https://github.com/Rebilly/ReDoc/commit/5d84bd4)) -* use correct parent section for security definition ([f903406](https://github.com/Rebilly/ReDoc/commit/f903406)) - - - - -# [2.0.0-alpha.36](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.35...v2.0.0-alpha.36) (2018-08-11) - - -### Bug Fixes - -* broken rendering of code blocks with language in markdown ([8218a26](https://github.com/Rebilly/ReDoc/commit/8218a26)) -* broken rendering of headings with regexp characters ([e660517](https://github.com/Rebilly/ReDoc/commit/e660517)) - - - - -# [2.0.0-alpha.35](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.34...v2.0.0-alpha.35) (2018-08-09) - - -### Bug Fixes - -* crash on any backticks code block without lang specified ([58ae668](https://github.com/Rebilly/ReDoc/commit/58ae668)) -* fix auth requirements font size ([d13fe13](https://github.com/Rebilly/ReDoc/commit/d13fe13)) - - - -# [2.0.0-alpha.34](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.33...v2.0.0-alpha.34) (2018-08-08) - - -### Bug Fixes - -* add some spacing between operation description and parameters ([597688e](https://github.com/Rebilly/ReDoc/commit/597688e)) -* description is not rendered if doesn't contain markdown headings ([90ed717](https://github.com/Rebilly/ReDoc/commit/90ed717)), closes [#591](https://github.com/Rebilly/ReDoc/issues/591) -* download button downloads index.html instead of spec with CLI ([334f904](https://github.com/Rebilly/ReDoc/commit/334f904)), closes [#594](https://github.com/Rebilly/ReDoc/issues/594) -* fix Authentication section is not rendered ([2ecc8bc](https://github.com/Rebilly/ReDoc/commit/2ecc8bc)), closes [#590](https://github.com/Rebilly/ReDoc/issues/590) -* fix linebreaks in multiparagraph field descriptions ([8fb9cd6](https://github.com/Rebilly/ReDoc/commit/8fb9cd6)) -* preserve md heading level in description ([23559fb](https://github.com/Rebilly/ReDoc/commit/23559fb)) -* render additionalProperties set to true ([#597](https://github.com/Rebilly/ReDoc/issues/597)) ([f70ac08](https://github.com/Rebilly/ReDoc/commit/f70ac08)), closes [#596](https://github.com/Rebilly/ReDoc/issues/596) -* schemes without type: object are not expandable ([97e1620](https://github.com/Rebilly/ReDoc/commit/97e1620)), closes [#599](https://github.com/Rebilly/ReDoc/issues/599) - - -### Features - -* Add x-logo alt text support ([#584](https://github.com/Rebilly/ReDoc/issues/584)) ([568ce74](https://github.com/Rebilly/ReDoc/commit/568ce74)), closes [#546](https://github.com/Rebilly/ReDoc/issues/546) -* support label for x-code-samples ([00bd966](https://github.com/Rebilly/ReDoc/commit/00bd966)), closes [#586](https://github.com/Rebilly/ReDoc/issues/586) - - - - -# [2.0.0-alpha.33](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.32...v2.0.0-alpha.33) (2018-07-31) - - -### Bug Fixes - -* long endpoint url overflow ([d99e918](https://github.com/Rebilly/ReDoc/commit/d99e918)) -* allow word-break in code strings in md ([15dfe44](https://github.com/Rebilly/ReDoc/commit/15dfe44)) -* show examples for response headers ([ba22b1e](https://github.com/Rebilly/ReDoc/commit/ba22b1e)) - - -# [2.0.0-alpha.32](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.31...v2.0.0-alpha.32) (2018-07-26) - - -### Bug Fixes - -* **cli:** add mobx to dependencies ([75ced44](https://github.com/Rebilly/ReDoc/commit/75ced44)) -* fix resolving issue by upgrading to json-schema-ref-parser@5.1.1 ([0045958](https://github.com/Rebilly/ReDoc/commit/0045958)), closes [#541](https://github.com/Rebilly/ReDoc/issues/541) -* remove break-all from code samples ([d74578d](https://github.com/Rebilly/ReDoc/commit/d74578d)) -* wrong display when combining multiple auth requirements ([f96c481](https://github.com/Rebilly/ReDoc/commit/f96c481)), closes [#577](https://github.com/Rebilly/ReDoc/issues/577) - - - - -# [2.0.0-alpha.31](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.30...v2.0.0-alpha.31) (2018-07-23) - - -### Bug Fixes - -* server url contains spec name if not specified in the spec ([b41b181](https://github.com/Rebilly/ReDoc/commit/b41b181)) - - -### Features - -* simple variable substitution support ([9d6b30c](https://github.com/Rebilly/ReDoc/commit/9d6b30c)), closes [#565](https://github.com/Rebilly/ReDoc/issues/565) - - - - -# [2.0.0-alpha.30](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.29...v2.0.0-alpha.30) (2018-07-19) - - -### Bug Fixes - -* fix usage with CRA by transpiling swagger2openapi deps ([6473e62](https://github.com/Rebilly/ReDoc/commit/6473e62)), closes [#566](https://github.com/Rebilly/ReDoc/issues/566) - - -### Features - -* theme reshape and new options ([58bddc8](https://github.com/Rebilly/ReDoc/commit/58bddc8)) - - - - -# [2.0.0-alpha.29](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.28...v2.0.0-alpha.29) (2018-07-18) - - -### Bug Fixes - -* **cli:** cli output crashes if script closing tag is in the spec ([76906eb](https://github.com/Rebilly/ReDoc/commit/76906eb)), closes [#563](https://github.com/Rebilly/ReDoc/issues/563) -* different output of cli bundle and redoc ([89aa754](https://github.com/Rebilly/ReDoc/commit/89aa754)), closes [#547](https://github.com/Rebilly/ReDoc/issues/547) -* fix broken link in CLI help ([bab3e7d](https://github.com/Rebilly/ReDoc/commit/bab3e7d)), closes [#559](https://github.com/Rebilly/ReDoc/issues/559) -* fix Download button url when spec as object was provided ([c35925a](https://github.com/Rebilly/ReDoc/commit/c35925a)), closes [#462](https://github.com/Rebilly/ReDoc/issues/462) [#540](https://github.com/Rebilly/ReDoc/issues/540) -* fix non-scalar query/path/header params are not expandable ([dcca44a](https://github.com/Rebilly/ReDoc/commit/dcca44a)), closes [#561](https://github.com/Rebilly/ReDoc/issues/561) -* properly host oneOf inside allOf ([7e5b6d9](https://github.com/Rebilly/ReDoc/commit/7e5b6d9)), closes [#507](https://github.com/Rebilly/ReDoc/issues/507) [#528](https://github.com/Rebilly/ReDoc/issues/528) -* regression - broken urls for operations without operationId ([c0c44bc](https://github.com/Rebilly/ReDoc/commit/c0c44bc)) -* use original tag name when slugified one is not valid ([#553](https://github.com/Rebilly/ReDoc/issues/553)) ([8817d9c](https://github.com/Rebilly/ReDoc/commit/8817d9c)) - - -### Features - -* new option disableSearch ([d4ab5ad](https://github.com/Rebilly/ReDoc/commit/d4ab5ad)) - - - - -# [2.0.0-alpha.28](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.27...v2.0.0-alpha.28) (2018-06-29) - - -### Bug Fixes - -* inline markdown regression ([e1c9e19](https://github.com/Rebilly/ReDoc/commit/e1c9e19)) - - - - -# [2.0.0-alpha.27](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.25...v2.0.0-alpha.27) (2018-06-29) - - -### Bug Fixes - -* change default font weight to 400 ([11947ed](https://github.com/Rebilly/ReDoc/commit/11947ed)) -* do not uppercase menu items by default ([0d45cc2](https://github.com/Rebilly/ReDoc/commit/0d45cc2)) -* fix link colors in json samples ([aaaa899](https://github.com/Rebilly/ReDoc/commit/aaaa899)) - - -### Features - -* display Value instead of Enum for one-item enum ([78fa312](https://github.com/Rebilly/ReDoc/commit/78fa312)) -* experimental temporary support for tags in md ([06ef51c](https://github.com/Rebilly/ReDoc/commit/06ef51c)) -* theme hooks experimental hooks ([55bd853](https://github.com/Rebilly/ReDoc/commit/55bd853)) - - - - -# [2.0.0-alpha.26](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.25...v2.0.0-alpha.26) (2018-06-28) - - -### Bug Fixes - -* change default font weight to 400 ([11947ed](https://github.com/Rebilly/ReDoc/commit/11947ed)) -* do not uppercase menu items by default ([0d45cc2](https://github.com/Rebilly/ReDoc/commit/0d45cc2)) -* fix link colors in json samples ([aaaa899](https://github.com/Rebilly/ReDoc/commit/aaaa899)) - - -### Features - -* display Value instead of Enum for one-item enum ([78fa312](https://github.com/Rebilly/ReDoc/commit/78fa312)) -* experimental temporary support for tags in md ([06ef51c](https://github.com/Rebilly/ReDoc/commit/06ef51c)) - - - - -# [2.0.0-alpha.24](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.23...v2.0.0-alpha.24) (2018-06-01) - - -### Bug Fixes - -* temporary downgrade marked as it introduced breaking changes and a few bugs ([902f97a](https://github.com/Rebilly/ReDoc/commit/902f97a)) - - - - -# [2.0.0-alpha.23](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.22...v2.0.0-alpha.23) (2018-05-31) - - -### Bug Fixes - -* **cli:** make positional arguments required and handle errors in serve and bundle manually ([#518](https://github.com/Rebilly/ReDoc/issues/518)) ([370d08a](https://github.com/Rebilly/ReDoc/commit/370d08a)) -* fix typings on npm ([d957ad7](https://github.com/Rebilly/ReDoc/commit/d957ad7)) -* fix vertical line misaligned in firefox ([bde08f1](https://github.com/Rebilly/ReDoc/commit/bde08f1)), closes [#503](https://github.com/Rebilly/ReDoc/issues/503) -* mergeAllOf takes items into account ([#511](https://github.com/Rebilly/ReDoc/issues/511)) ([47b2177](https://github.com/Rebilly/ReDoc/commit/47b2177)) - - - - -# [2.0.0-alpha.22](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.21...v2.0.0-alpha.22) (2018-05-29) - - -### Bug Fixes - -* **cli:** create directories when a path is specified in the --output option ([#513](https://github.com/Rebilly/ReDoc/issues/513)) ([ac7372b](https://github.com/Rebilly/ReDoc/commit/ac7372b)), closes [#512](https://github.com/Rebilly/ReDoc/issues/512) -* **cli:** return 1 as exit code if an error happens in the cli ([#516](https://github.com/Rebilly/ReDoc/issues/516)) ([720c304](https://github.com/Rebilly/ReDoc/commit/720c304)) -* fix font-weight inconsistency ([6ea2b7b](https://github.com/Rebilly/ReDoc/commit/6ea2b7b)), closes [#506](https://github.com/Rebilly/ReDoc/issues/506) -* HEAD http verb support in menu badges ([2eb1952](https://github.com/Rebilly/ReDoc/commit/2eb1952)), closes [#493](https://github.com/Rebilly/ReDoc/issues/493) -* more descriptive message for wrong discriminator use ([3c6de2c](https://github.com/Rebilly/ReDoc/commit/3c6de2c)), closes [#505](https://github.com/Rebilly/ReDoc/issues/505) - - -### Features - -* add new experimental option unstable_ignoreMimeParameters ([d162bab](https://github.com/Rebilly/ReDoc/commit/d162bab)) -* support x-discriminator for OpenAPI 2 ([aaff311](https://github.com/Rebilly/ReDoc/commit/aaff311)), closes [#496](https://github.com/Rebilly/ReDoc/issues/496) - - - - -# [2.0.0-alpha.21](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.20...v2.0.0-alpha.21) (2018-05-28) - - -### Bug Fixes - -* add tslib dependency ([8e1a5cb](https://github.com/Rebilly/ReDoc/commit/8e1a5cb)) -* **cli:** escape \u2029 \u2028 characters ([5018473](https://github.com/Rebilly/ReDoc/commit/5018473)), closes [#475](https://github.com/Rebilly/ReDoc/issues/475) -* reduce search index size ([a1fa4b4](https://github.com/Rebilly/ReDoc/commit/a1fa4b4)) -* replace "oops" with field name 🙈 ([6b1e8e7](https://github.com/Rebilly/ReDoc/commit/6b1e8e7)) -* specify caption-side ([64801b0](https://github.com/Rebilly/ReDoc/commit/64801b0)), closes [#509](https://github.com/Rebilly/ReDoc/issues/509) - - -### Features - -* export TypeScript typings ([9115be8](https://github.com/Rebilly/ReDoc/commit/9115be8)) -* new theme colors: code and codeBg ([f8b793d](https://github.com/Rebilly/ReDoc/commit/f8b793d)) -* new theme option: nestingSpacing ([782ef77](https://github.com/Rebilly/ReDoc/commit/782ef77)) - - - - -# [2.0.0-alpha.20](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.19...v2.0.0-alpha.20) (2018-05-14) - - -### Bug Fixes - -* fix worker is not defined in lib bundle ([6a5513e](https://github.com/Rebilly/ReDoc/commit/6a5513e)) - - - - -# [2.0.0-alpha.19](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.18...v2.0.0-alpha.19) (2018-05-14) - - -### Bug Fixes - -* change look of additionalProperties ([126c6a6](https://github.com/Rebilly/ReDoc/commit/126c6a6)) -* disable chrome tap-highlight on mobile ([09cbe88](https://github.com/Rebilly/ReDoc/commit/09cbe88)) -* fix [@observer](https://github.com/observer) on PureComponent warning ([afb11d6](https://github.com/Rebilly/ReDoc/commit/afb11d6)) -* fix build caused by new babel decorators syntax, fixes [#487](https://github.com/Rebilly/ReDoc/issues/487) ([01f575c](https://github.com/Rebilly/ReDoc/commit/01f575c)) -* fix prism lang dependencies, fixes [#467](https://github.com/Rebilly/ReDoc/issues/467) ([42cf18e](https://github.com/Rebilly/ReDoc/commit/42cf18e)) -* fix spelling in error message ([#455](https://github.com/Rebilly/ReDoc/issues/455)) ([64119c4](https://github.com/Rebilly/ReDoc/commit/64119c4)) -* limit height of discriminator dropdown, fixes [#484](https://github.com/Rebilly/ReDoc/issues/484) ([6d1a9e5](https://github.com/Rebilly/ReDoc/commit/6d1a9e5)) -* path parameters are not correctly override, fixes [#481](https://github.com/Rebilly/ReDoc/issues/481) ([2cf4c3c](https://github.com/Rebilly/ReDoc/commit/2cf4c3c)) - - -### Features - -* display scope description as markdown, fixes [#466](https://github.com/Rebilly/ReDoc/issues/466) ([0d6deff](https://github.com/Rebilly/ReDoc/commit/0d6deff)) - - - - -# [2.0.0-alpha.18](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.17...v2.0.0-alpha.18) (2018-03-23) - - -### Bug Fixes - -* fix logo width ([384c883](https://github.com/Rebilly/ReDoc/commit/384c883)) -* modify the peerDependencies to reflect the need for react 16.3 ([b29c329](https://github.com/Rebilly/ReDoc/commit/b29c329)) -* scroll to section sooner when SSR + simplify item ids ([d1d8042](https://github.com/Rebilly/ReDoc/commit/d1d8042)) -* **cli:** don't wait for content loaded in bundled HTML ([d9ee2d0](https://github.com/Rebilly/ReDoc/commit/d9ee2d0)) - - -# [2.0.0-alpha.17](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.16...v2.0.0-alpha.17) (2018-03-21) - - -### Bug Fixes - -* css fix + update theme ([05403a7](https://github.com/Rebilly/ReDoc/commit/05403a7)) -* **cli:** allow to set url to the spec in SSR mode ([c9c6bc5](https://github.com/Rebilly/ReDoc/commit/c9c6bc5)) -* **cli:** fix crash ([8891f5c](https://github.com/Rebilly/ReDoc/commit/8891f5c)) -* **cli:** fix output option type ([c729c6c](https://github.com/Rebilly/ReDoc/commit/c729c6c)) -* **cli:** rename redoc-cli bin ([06b5a00](https://github.com/Rebilly/ReDoc/commit/06b5a00)) -* fix second-level heading in description ([a084532](https://github.com/Rebilly/ReDoc/commit/a084532)) -* make field type color more dark (closes [#439](https://github.com/Rebilly/ReDoc/issues/439)) ([d27e61a](https://github.com/Rebilly/ReDoc/commit/d27e61a)) - - -### Features - -* **cli:** add --template option ([b7afce9](https://github.com/Rebilly/ReDoc/commit/b7afce9)) -* **cli:** add options to specify redoc options ([2732c89](https://github.com/Rebilly/ReDoc/commit/2732c89)) -* **cli:** add title option to bundle ([bb8a678](https://github.com/Rebilly/ReDoc/commit/bb8a678)) -* add more options to theme ([cbce28a](https://github.com/Rebilly/ReDoc/commit/cbce28a)) - - - - -## [1.21.2](https://github.com/Rebilly/ReDoc/compare/v1.21.1...v1.21.2) (2018-02-26) - - -### Bug Fixes - -* missing properties when using complex allOf (regression) ([6ce9245](https://github.com/Rebilly/ReDoc/commit/6ce9245)), closes [#422](https://github.com/Rebilly/ReDoc/issues/422) - - - - -## [1.21.1](https://github.com/Rebilly/ReDoc/compare/v1.21.0...v1.21.1) (2018-02-23) - - -### Bug Fixes - -* avoid endless recursion in schema-walker in some cases ([309cc23](https://github.com/Rebilly/ReDoc/commit/309cc23)), closes [#418](https://github.com/Rebilly/ReDoc/issues/418) [#395](https://github.com/Rebilly/ReDoc/issues/395) -* fix crash when discriminator is used incorrectly ([b1d928d](https://github.com/Rebilly/ReDoc/commit/b1d928d)) - - - - -# [1.21.0](https://github.com/Rebilly/ReDoc/compare/v1.20.0...v1.21.0) (2018-02-18) - - -### Bug Fixes - -* null example not used in schema samples ([420c51a](https://github.com/Rebilly/ReDoc/commit/420c51a)), closes [#415](https://github.com/Rebilly/ReDoc/issues/415) - - -### Features - -* new option hide-download-button ([454e5bd](https://github.com/Rebilly/ReDoc/commit/454e5bd)), closes [#394](https://github.com/Rebilly/ReDoc/issues/394) - - - - -## [1.20.0](https://github.com/Rebilly/ReDoc/compare/v1.19.3...v1.20.0) (2018-01-21) - - -### Bug Fixes - -* Path parameters are not correctly overridden ([c406dc5](https://github.com/Rebilly/ReDoc/commit/c406dc5)), closes [#400](https://github.com/Rebilly/ReDoc/issues/400) -* Use parentNode instead of parentElement to fix IE11 crash ([e8adb60](https://github.com/Rebilly/ReDoc/commit/e8adb60)), closes [#406](https://github.com/Rebilly/ReDoc/issues/406) - - -### Features - -* align parameters to match up ([#375](https://github.com/Rebilly/ReDoc/issues/375)) ([d083c16](https://github.com/Rebilly/ReDoc/commit/d083c16)) - -### Deprecations -* Dropped bower support. No more dist files on the `releases` branch. - - - - -# [2.0.0-alpha.15](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.14...v2.0.0-alpha.15) (2018-03-16) - - -### Bug Fixes - -* fix broken css after installing polished ([6018042](https://github.com/Rebilly/Redoc/commit/6018042)) - - -### Features - -* more advanced theme engine ([1df690a](https://github.com/Rebilly/Redoc/commit/1df690a)) - - - - -# [2.0.0-alpha.14](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.13...v2.0.0-alpha.14) (2018-03-15) - - -### Bug Fixes - -* fix CLI crash + build it on travis ([7769ba8](https://github.com/Rebilly/Redoc/commit/7769ba8)) - - - - -# [2.0.0-alpha.13](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.12...v2.0.0-alpha.13) (2018-03-15) - - -### Bug Fixes - -* A couple minor bug fixes ([#436](https://github.com/Rebilly/Redoc/issues/436)) ([5dc21af](https://github.com/Rebilly/Redoc/commit/5dc21af)) -* add extra null-check + warning ([8757fa5](https://github.com/Rebilly/Redoc/commit/8757fa5)) -* add logo width to the theme ([28f2391](https://github.com/Rebilly/Redoc/commit/28f2391)) -* align logo by center ([18ec3ac](https://github.com/Rebilly/Redoc/commit/18ec3ac)) -* discriminator dropdown showing incorrect field if sorted ([bcf39dc](https://github.com/Rebilly/Redoc/commit/bcf39dc)) -* fix crash when referencing non-existing security scheme ([1f7fc44](https://github.com/Rebilly/Redoc/commit/1f7fc44)) -* fix overflowing content in JSON samples ([02c2413](https://github.com/Rebilly/Redoc/commit/02c2413)) -* fix right-panel blinking when scrolling + css improvements ([a78f9ab](https://github.com/Rebilly/Redoc/commit/a78f9ab)) -* fix search-indexing for SSR ([1428fb5](https://github.com/Rebilly/Redoc/commit/1428fb5)) -* fix the media queries utils so it gets the values from the current theme ([#420](https://github.com/Rebilly/Redoc/issues/420)) ([3924d3c](https://github.com/Rebilly/Redoc/commit/3924d3c)) -* fix worker import ([4896346](https://github.com/Rebilly/Redoc/commit/4896346)) -* make ReactStandalone react on props changes ([0cb0af2](https://github.com/Rebilly/Redoc/commit/0cb0af2)) -* merge inner properties of allOf ([8926dd4](https://github.com/Rebilly/Redoc/commit/8926dd4)) -* one-of dropdown not switching ([0f1b6a6](https://github.com/Rebilly/Redoc/commit/0f1b6a6)) -* referenced header name is empty ([13165fb](https://github.com/Rebilly/Redoc/commit/13165fb)) -* skipReadOnly/skipWritOnly not passing down to nested array ([6df8127](https://github.com/Rebilly/Redoc/commit/6df8127)) -* skipReadOnly/skipWritOnly not passing down to nested OneOf ([2462639](https://github.com/Rebilly/Redoc/commit/2462639)) -* various search fixes ([b797c96](https://github.com/Rebilly/Redoc/commit/b797c96)) -* writeOnly not respected in response samples ([87abdf7](https://github.com/Rebilly/Redoc/commit/87abdf7)) - - -### Features - -* add clear icon to searchbox ([825162e](https://github.com/Rebilly/Redoc/commit/825162e)) -* add hideDownloadButton option ([8dbe938](https://github.com/Rebilly/Redoc/commit/8dbe938)) -* add marker ([1ff2bd8](https://github.com/Rebilly/Redoc/commit/1ff2bd8)) -* arrow navigation in search results ([fe3245a](https://github.com/Rebilly/Redoc/commit/fe3245a)) -* basis search ([6990cd2](https://github.com/Rebilly/Redoc/commit/6990cd2)) -* ReDoc CLI ✨ ([390f6c1](https://github.com/Rebilly/Redoc/commit/390f6c1)) -* reqired-first sort order for params ([ecf33d2](https://github.com/Rebilly/Redoc/commit/ecf33d2)) -* serialize search-index ([e94f842](https://github.com/Rebilly/Redoc/commit/e94f842)) - - - - -# [2.0.0-alpha.12](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.11...v2.0.0-alpha.12) (2018-02-07) - - -### Bug Fixes - -* basic responsiveness ([a29c3cc](https://github.com/Rebilly/Redoc/commit/a29c3cc)) -* crash in MarkdownRenderer on non-string ([dead161](https://github.com/Rebilly/Redoc/commit/dead161)) -* discriminator fix ([ff3bb24](https://github.com/Rebilly/Redoc/commit/ff3bb24)) -* filter out non-existing security schemas + warn ([ee822f6](https://github.com/Rebilly/Redoc/commit/ee822f6)) -* fix oneOf title for array ([1f3701d](https://github.com/Rebilly/Redoc/commit/1f3701d)) -* fix tbody > tr nesting warning ([a3cbb14](https://github.com/Rebilly/Redoc/commit/a3cbb14)) -* improve copy tooltip perf ([29207cf](https://github.com/Rebilly/Redoc/commit/29207cf)) -* resolve menu synchronization issue (use proper throttle) ([84d1c7b](https://github.com/Rebilly/Redoc/commit/84d1c7b)) - - -### Features - -* responsive side menu ([3aab2d9](https://github.com/Rebilly/Redoc/commit/3aab2d9)) - - - - -# [2.0.0-alpha.11](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.10...v2.0.0-alpha.11) (2018-01-29) - - -### Bug Fixes - -* courier misspelling ([#409](https://github.com/Rebilly/Redoc/issues/409)) ([96fb7ce](https://github.com/Rebilly/Redoc/commit/96fb7ce)) -* crash on 2-level md heading at the beginning ([e9f23f7](https://github.com/Rebilly/Redoc/commit/e9f23f7)) -* make active tab more clear ([4b5df22](https://github.com/Rebilly/Redoc/commit/4b5df22)) -* perfect scroll not working ([199f240](https://github.com/Rebilly/Redoc/commit/199f240)) -* use array items example ([12f79f0](https://github.com/Rebilly/Redoc/commit/12f79f0)), closes [#408](https://github.com/Rebilly/Redoc/issues/408) -* wrap text in code samples ([6c71a66](https://github.com/Rebilly/Redoc/commit/6c71a66)) - - -### Features - -* port "copy to clipboard" / "expand/collapse all" functionality ([5bb0bdf](https://github.com/Rebilly/Redoc/commit/5bb0bdf)), closes [#410](https://github.com/Rebilly/Redoc/issues/410) - - - - -# [2.0.0-alpha.9](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.8...v2.0.0-alpha.9) (2018-01-11) - - -### Bug Fixes - -* handle scrollYOffset in ScrollService ([dcab770](https://github.com/Rebilly/Redoc/commit/dcab770)) - - - - -# [2.0.0-alpha.8](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.7...v2.0.0-alpha.8) (2018-01-10) - - -### Bug Fixes - -* undo section id + some minor fixes ([0253c5d](https://github.com/Rebilly/Redoc/commit/0253c5d)) - - - - -# [2.0.0-alpha.7](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.6...v2.0.0-alpha.7) (2018-01-10) - - -### Bug Fixes - -* add id attr to headers to work before react is loaded if ssr ([1743453](https://github.com/Rebilly/Redoc/commit/1743453)) -* crate spec as data/base64 link when ssr ([33678e6](https://github.com/Rebilly/Redoc/commit/33678e6)) -* example value is not showed if it is false ([9756364](https://github.com/Rebilly/Redoc/commit/9756364)) - - - - -# [2.0.0-alpha.6](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.5...v2.0.0-alpha.6) (2018-01-10) - - -### Bug Fixes - -* allOf and deref exit not only named refs ([435cccd](https://github.com/Rebilly/Redoc/commit/435cccd)) -* do not ignore path level parameters ([14f8408](https://github.com/Rebilly/Redoc/commit/14f8408)) -* improve rendering of types ([17da7b7](https://github.com/Rebilly/Redoc/commit/17da7b7)) -* move title propagation to the correct place ([0b0bc99](https://github.com/Rebilly/Redoc/commit/0b0bc99)) -* overwrite text-align to left ([bfee3ed](https://github.com/Rebilly/Redoc/commit/bfee3ed)) - - -### Features - -* initial display security requirements ([50e2a58](https://github.com/Rebilly/Redoc/commit/50e2a58)) - - - - -# [2.0.0-alpha.5](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.4...v2.0.0-alpha.5) (2017-12-07) - - -### Bug Fixes - -* correct pointer for the schema ([4ae1574](https://github.com/Rebilly/Redoc/commit/4ae1574)) -* bundle in reftools in lib build (do not crash on prod builds in create-react-app) ([57129d3](https://github.com/Rebilly/Redoc/commit/57129d3)) - - - -# [2.0.0-alpha.4](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.3...v2.0.0-alpha.4) (2017-11-24) - - -### Bug Fixes - -* add ellipsis for menu items with long words ([3421be2](https://github.com/Rebilly/Redoc/commit/3421be2)) -* crashes on some dereferencing/allOf merging cases ([335deb9](https://github.com/Rebilly/Redoc/commit/335deb9)) -* do not auto-append security-definitions if they are not in the spec ([426e5b6](https://github.com/Rebilly/Redoc/commit/426e5b6)) -* don't display operations without tags as tag items in menu ([ca81b6d](https://github.com/Rebilly/Redoc/commit/ca81b6d)) - - - - -# [2.0.0-alpha.3](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) (2017-11-23) - - -### Bug Fixes - -* crash when $ref is url encoded ([bdf6079](https://github.com/Rebilly/Redoc/commit/bdf6079)) -* make oneOf not skip fields defined alongside ([8680775](https://github.com/Rebilly/Redoc/commit/8680775)) - - - - -# 2.0.0-alpha.2 (2017-11-23) - -### Bug Fixes -* Fix crash when using type `file` in OpenAPI 2.0 in some places - - -# 2.0.0-alpha.1 (2017-11-23) - -Complete rewrite of ReDoc using React so here only major changes are listed. -Complete rewrite also means that this rewrite may introduce issues, but they should be resolved before `2.0.0`. - -### Features - -- Basic Support for OpenAPI 3 -- Usage as a React component - -### Deprecations - -- Fonts are not loaded by ReDoc so you should load them. Default fonts can be loaded as below: - -```html - -``` -- no more bower releases -- no more GitHub pages-based CDN. Use [unpkg.com](https://unpkg.com/) to access ReDoc releases - - -### Known Regression (resolved before leaving alpha stage) -- `lazyLoading` option not implemented yet -- Copying to clipboard of samples not implemented yet -- Search not implemented yet - - -## [1.19.3](https://github.com/Rebilly/ReDoc/compare/v1.19.2...v1.19.3) (2017-11-16) - - -### Bug Fixes - -* html characters not escaped in code blocks (fixes [#378](https://github.com/Rebilly/ReDoc/issues/378)) ([fef9ec4](https://github.com/Rebilly/ReDoc/commit/fef9ec4)) - - - -## [1.19.2](https://github.com/Rebilly/ReDoc/compare/v1.19.1...v1.19.2) (2017-11-10) - - -### Bug Fixes - -* response samples doesn't show only text/plain (fixes [#371](https://github.com/Rebilly/ReDoc/issues/371)) ([00aea06](https://github.com/Rebilly/ReDoc/commit/00aea06)) - - - -# [1.19.1](https://github.com/Rebilly/ReDoc/compare/v1.19.0...v1.19.1) (2017-10-02) - -# [2.0.0-alpha.16](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.15...v2.0.0-alpha.16) (2018-03-18) - - -### Bug Fixes - -* move cli to a separate npm package ([95c7585](https://github.com/Rebilly/Redoc/commit/95c7585)) -* prefer `.extend` over `styled()` to make styles more predictable ([ed20ac1](https://github.com/Rebilly/Redoc/commit/ed20ac1)) - - -### Features - -* use new Context API for options ([e022349](https://github.com/Rebilly/Redoc/commit/e022349)) - - - -# [1.19.0](https://github.com/Rebilly/ReDoc/compare/v1.18.1...v1.19.0) (2017-09-21) - - -### Bug Fixes - -* Clearly label version compatibility ([8d849a6](https://github.com/Rebilly/ReDoc/commit/8d849a6)), closes [#338](https://github.com/Rebilly/ReDoc/issues/338) -* HEAD http verb support ([d8b6e02](https://github.com/Rebilly/ReDoc/commit/d8b6e02)), closes [#342](https://github.com/Rebilly/ReDoc/issues/342) - - -### Features - -* add ignoredHeaderParameters option ([56d62e5](https://github.com/Rebilly/ReDoc/commit/56d62e5)) -* add native-scrollbars option to workaround scrolling perf issues ([f2ed92c](https://github.com/Rebilly/ReDoc/commit/f2ed92c)) - - - -## [1.18.1](https://github.com/Rebilly/ReDoc/compare/v1.17.0...v1.18.1) (2017-08-28) - - -### Bug Fixes - -* crash if `contact` is not in the spec ([1b9ba0d](https://github.com/Rebilly/ReDoc/commit/1b9ba0d)), closes [#332](https://github.com/Rebilly/ReDoc/issues/332) - - - -# [1.18.0](https://github.com/Rebilly/ReDoc/compare/v1.16.1...v1.18.0) (2017-08-28) - - -### Bug Fixes - -* increase padding top for `.api-info-wrapper` when left sidebar is hiding to avoid header overlaying by top menu ([514fc29](https://github.com/Rebilly/ReDoc/commit/514fc29)) -* add `display: inline-block` for `.openapi-button` ([86b4db4](https://github.com/Rebilly/ReDoc/commit/86b4db4)), -closes [#321](https://github.com/Rebilly/ReDoc/issues/321) -* add margins around list-items in markdown ([b165785](https://github.com/Rebilly/ReDoc/commit/b165785)) - -### Features - -* generate download link for specs defined by an object ([60e8cb4](https://github.com/Rebilly/ReDoc/commit/60e8cb4)), closes [#289](https://github.com/Rebilly/ReDoc/issues/289) -* support text-plain response sample ([b84177c](https://github.com/Rebilly/ReDoc/commit/b84177c)), closes [#270](https://github.com/Rebilly/ReDoc/issues/270) -* clickable logo that points to specific url ([cb3d318](https://github.com/Rebilly/ReDoc/commit/cb3d318)), closes -[#322](https://github.com/Rebilly/ReDoc/issues/322) -* support x-example for parameters ([f792273](https://github.com/Rebilly/ReDoc/commit/f792273)), closes -[#297](https://github.com/Rebilly/ReDoc/issues/297) - - -# [1.17.0](https://github.com/Rebilly/ReDoc/compare/v1.16.1...v1.17.0) (2017-08-02) - - -### Bug Fixes - -* copy code-samples included \n\r characters ([cd962fa](https://github.com/Rebilly/ReDoc/commit/cd962fa)), closes [#296](https://github.com/Rebilly/ReDoc/issues/296) -* enum with single value not shown in non-body params ([87d9abd](https://github.com/Rebilly/ReDoc/commit/87d9abd)), closes [#284](https://github.com/Rebilly/ReDoc/issues/284) -* handle case where items is array in indexer ([5e5db72](https://github.com/Rebilly/ReDoc/commit/5e5db72)), closes [#304](https://github.com/Rebilly/ReDoc/issues/304) -* output dates as ISO 8601 strings in JSON Formatter ([#313](https://github.com/Rebilly/ReDoc/issues/313)) ([86d8179](https://github.com/Rebilly/ReDoc/commit/86d8179)) -* make padding between h2 sections smaller ([2c89536](https://github.com/Rebilly/ReDoc/commit/2c89536)), closes [#291](https://github.com/Rebilly/ReDoc/issues/291) -* ready-only for nested objects samples ([be41d6d](https://github.com/Rebilly/ReDoc/commit/be41d6d)), closes [#300](https://github.com/Rebilly/ReDoc/issues/300) - - -### Features - -* add `hide-loading` option ([2ebca4b](https://github.com/Rebilly/ReDoc/commit/2ebca4b)), closes [#315](https://github.com/Rebilly/ReDoc/issues/315) -* add special rendering for deprecated operations ([#290](https://github.com/Rebilly/ReDoc/issues/290)) ([2748aac](https://github.com/Rebilly/ReDoc/commit/2748aac)) -* export angular module ** ([ef5101b](https://github.com/Rebilly/ReDoc/commit/ef5101b)) -* support for xml samples in response when there is no schema in response ([eb7089b](https://github.com/Rebilly/ReDoc/commit/eb7089b)), closes [#307](https://github.com/Rebilly/ReDoc/issues/307) - - - - -# [1.16.0](https://github.com/Rebilly/ReDoc/compare/v1.15.0...v1.16.0) (2017-05-12) - - -### Bug Fixes - -* do not show discriminator dropdown if it is empty ([7a5d315](https://github.com/Rebilly/ReDoc/commit/7a5d315)) -* prevent possible XSS using `untrusted-spec` option ([c0698bb](https://github.com/Rebilly/ReDoc/commit/c0698bb)) -* URL changes so fast ([131b437](https://github.com/Rebilly/ReDoc/commit/131b437)), closes [#252](https://github.com/Rebilly/ReDoc/issues/252) - - -### Features - -* display xml examples if present in response examples ([cb106cc](https://github.com/Rebilly/ReDoc/commit/cb106cc)) - - - -# [1.15.0](https://github.com/Rebilly/ReDoc/compare/v1.14.0...v1.15.0) (2017-05-05) - - -### Bug Fixes - -* menu items not full-width on short item names ([ef1b2bd](https://github.com/Rebilly/ReDoc/commit/ef1b2bd)) -* menu service subscription leak ([bb00dc3](https://github.com/Rebilly/ReDoc/commit/bb00dc3)) -* openapi button: add `download` attribute ([583c571](https://github.com/Rebilly/ReDoc/commit/583c571)) -* sample unavailable when no schema in response object ([1eedbfe](https://github.com/Rebilly/ReDoc/commit/1eedbfe)) -* Slugifying non-ascii headers make duplicate permalinks ([#264](https://github.com/Rebilly/ReDoc/issues/264)) ([6edbbe7](https://github.com/Rebilly/ReDoc/commit/6edbbe7)) -* typo in download button classname (thanks [@dwilding](https://github.com/dwilding)) ([6b363a5](https://github.com/Rebilly/ReDoc/commit/6b363a5)) -* firefox and IE scroll sync after deps update ([ad04636](https://github.com/Rebilly/ReDoc/commit/ad04636)) - - - -### Features - -* add triangle icon for expandable menu items ([e7130d2](https://github.com/Rebilly/ReDoc/commit/e7130d2)) -* clear button (x) in search box ([0341db4](https://github.com/Rebilly/ReDoc/commit/0341db4)) - - - -# [1.14.0](https://github.com/Rebilly/ReDoc/compare/v1.13.0...v1.14.0) (2017-04-23) - - -### Bug Fixes - -* don't show download button if initialized with an object ([476d6c4](https://github.com/Rebilly/ReDoc/commit/476d6c4)) -* endpoint link doesn't expand when click on arrow ([9248cc2](https://github.com/Rebilly/ReDoc/commit/9248cc2)) -* markdown block text color 💅 ([0f6f035](https://github.com/Rebilly/ReDoc/commit/0f6f035)), closes [#255](https://github.com/Rebilly/ReDoc/issues/255) -* ReDoc removes path if site is using history API ([c77e1a2](https://github.com/Rebilly/ReDoc/commit/c77e1a2)), closes [#257](https://github.com/Rebilly/ReDoc/issues/257) -* remove trailing slash from url when use `x-servers` ([2760a34](https://github.com/Rebilly/ReDoc/commit/2760a34)) -* subscription leak in side-menu ([838f233](https://github.com/Rebilly/ReDoc/commit/838f233)) - - -### Features - -* add GH-like anchors to h1 and h2 headings in md ([bb3667d](https://github.com/Rebilly/ReDoc/commit/bb3667d)) -* add perfect-scrollbar for side menu ([cdeee67](https://github.com/Rebilly/ReDoc/commit/cdeee67)) -* emphasize path with primary color in servers dropdown ([388b3d4](https://github.com/Rebilly/ReDoc/commit/388b3d4)) -* new option `path-in-middle-panel` ([74a3193](https://github.com/Rebilly/ReDoc/commit/74a3193)) -* SideMenu to support items template as a parameter ([8a49fb3](https://github.com/Rebilly/ReDoc/commit/8a49fb3)) - - - -# 1.13.0 (2017-04-19) - - -### Bug Fixes - -* fix issue with loading https spec ([585b9cf](https://github.com/Rebilly/ReDoc/commit/585b9cf)), closes [#243](https://github.com/Rebilly/ReDoc/issues/243) (by Khoa Tran) -* UL missing css ([303b49e](https://github.com/Rebilly/ReDoc/commit/303b49e)), closes [#248](https://github.com/Rebilly/ReDoc/issues/248) -* don't show contact info if it is empty object ([6077cc6](https://github.com/Rebilly/ReDoc/commit/6077cc6)) -* code block formatting in markdown list ([a9cad19](https://github.com/Rebilly/ReDoc/commit/a9cad19)), closes [#242](https://github.com/Rebilly/ReDoc/issues/242) - -### Features - -* HTTP verbs badges in side menu ([92eec25](https://github.com/Rebilly/ReDoc/commit/92eec25)), closes [#61](https://github.com/Rebilly/ReDoc/issues/61) -* HTTP verbs badges in search results ([61fd426](https://github.com/Rebilly/ReDoc/commit/61fd426)) -* new option [`no-auto-auth`](https://github.com/Rebilly/ReDoc#redoc-tag-attributes) to disable authentication section auto adding ([00b304a](https://github.com/Rebilly/ReDoc/commit/00b304a)) - - -# 1.12.1 (2017-04-19) - - -### Bug Fixes - -* fix: use replace state instead of pushState ([4f4e748](https://github.com/Rebilly/ReDoc/commit/4f4e748)), closes [#244](https://github.com/Rebilly/ReDoc/issues/244) - - -# 1.12.0 (2017-04-19) - - -### Bug Fixes - -* add safeguard for undefined ([aaac434](https://github.com/Rebilly/ReDoc/commit/aaac434)), closes [#236](https://github.com/Rebilly/ReDoc/issues/236) -* view errors were not reported ([6aa3a7d](https://github.com/Rebilly/ReDoc/commit/6aa3a7d)) - -### Features - -* Support x-examples vendor extension for requests (by [@brendo](https://github.com/brendo)) - -### Other - -* Updated to Angular 4, bundle is a bit smaller now - - -# 1.11.0 (2017-03-09) - - -### Bug Fixes - -* do not hang when swagger doesn't contain any paths ([e4f5388](https://github.com/Rebilly/ReDoc/commit/e4f5388)), closes [#216](https://github.com/Rebilly/ReDoc/issues/216) -[#201](https://github.com/Rebilly/ReDoc/issues/201) -* optimize and support inherited discriminator ([64e5741](https://github.com/Rebilly/ReDoc/commit/64e5741)) -* redoc hangs when indexing recursive discriminator-based definitions ([1e96f88](https://github.com/Rebilly/ReDoc/commit/1e96f88)) -* wrong warnings for $ref not single ([193f4bf](https://github.com/Rebilly/ReDoc/commit/193f4bf)), closes [#221](https://github.com/Rebilly/ReDoc/issues/221) -* x-extendedDiscriminator not working ([4899f3e](https://github.com/Rebilly/ReDoc/commit/4899f3e)), closes [#217](https://github.com/Rebilly/ReDoc/issues/217) - - -### Features - -* copy pretty-printed JSON ([e99d66d](https://github.com/Rebilly/ReDoc/commit/e99d66d)), closes [#219](https://github.com/Rebilly/ReDoc/issues/219) -* support for OpenAPI object as a parameter for `init` ([d99f256](https://github.com/Rebilly/ReDoc/commit/d99f256)), closes [#224](https://github.com/Rebilly/ReDoc/issues/224) - - -## 1.10.2 (2017-03-01) - -### Bug Fixes -* clear page fragment when scroll to the beginning -* update docs for x-tagGroup, add warning [#215](https://github.com/Rebilly/ReDoc/issues/215) -* show warning for non-used in tagGroup tags - - -## 1.10.1 (2017-02-27) - - -### Bug Fixes - -* improve x-servers dropdown animation performance ([69c7d98](https://github.com/Rebilly/ReDoc/commit/69c7d98)) - - - - -# 1.10.0 (2017-02-27) - - -### Bug Fixes -* Revert: remove unused hide-hostname option ([7031176](https://github.com/Rebilly/ReDoc/commit/7031176)) - -### Features - -* new option `required-props-first` ([c724df4](https://github.com/Rebilly/ReDoc/commit/c724df4)), closes [#191](https://github.com/Rebilly/ReDoc/issues/191) -* update fragment while scrolling and on menu clicks ([66c06b3](https://github.com/Rebilly/ReDoc/commit/66c06b3)), closes [#138](https://github.com/Rebilly/ReDoc/issues/138) [#202](https://github.com/Rebilly/ReDoc/issues/202) - - - - -# 1.9.0 (2017-02-25) - - -### Bug Fixes - -* do not crash if version is not string ([accd016](https://github.com/Rebilly/ReDoc/commit/accd016)), closes [#208](https://github.com/Rebilly/ReDoc/issues/208) -* long paths break EndpointLink ui ([8472045](https://github.com/Rebilly/ReDoc/commit/8472045)) -* remove unused hide-hostname option ([7031176](https://github.com/Rebilly/ReDoc/commit/7031176)) - - -### Features - -* Add support for `x-servers` ([fd49082](https://github.com/Rebilly/ReDoc/commit/fd49082)) -* Color of "default" Response depends on other successful responses are specified ([9d0dd25](https://github.com/Rebilly/ReDoc/commit/9d0dd25)), closes [#197](https://github.com/Rebilly/ReDoc/issues/197) -* improved type string with minLength == maxLength ([e76bcc3](https://github.com/Rebilly/ReDoc/commit/e76bcc3)), closes [#212](https://github.com/Rebilly/ReDoc/issues/212) -* show type string with minLength 1 as "non-empty" ([d175a4d](https://github.com/Rebilly/ReDoc/commit/d175a4d)), closes [#192](https://github.com/Rebilly/ReDoc/issues/192) - - - - -## 1.8.1 (2017-02-23) - - -### Bug Fixes -* Fix toggle icon width on IE, closes [#198](https://github.com/Rebilly/ReDoc/issues/198) -* Add safe guards array without items, closes [#199](https://github.com/Rebilly/ReDoc/issues/199) -* Fix extra slash if basePath is not present ([a5c03ab](https://github.com/Rebilly/ReDoc/commit/a5c03ab)), closes [#201](https://github.com/Rebilly/ReDoc/issues/201) -* response samples - render description as markdown ([4acfc11](https://github.com/Rebilly/ReDoc/commit/4acfc11)), closes [#190](https://github.com/Rebilly/ReDoc/issues/190) -* take snapshot of schema to not overwrite inlined references ([77bc3c4](https://github.com/Rebilly/ReDoc/commit/77bc3c4)), closes [#203](https://github.com/Rebilly/ReDoc/issues/203) -* use items description if not present on top level ([23e7847](https://github.com/Rebilly/ReDoc/commit/23e7847)) - - -### Features - -* autoscroll menu ([b43a87d](https://github.com/Rebilly/ReDoc/commit/b43a87d)) - - -# 1.8.0 (2017-02-03) -### Features/Improvements -* In-page search :tada: []#51](https://github.com/Rebilly/ReDoc/issues/51) -* Render externalDocs [#103](https://github.com/Rebilly/ReDoc/issues/103) -* Undeprecate x-traitTag - -### Bug fixes -* Tags with x-traitTag: true are now greyed out in ReDoc output bug [#194](https://github.com/Rebilly/ReDoc/issues/194) -* CSS: request body model-tree wrapping problem [#185](https://github.com/Rebilly/ReDoc/issues/185) -* Strange request to `example.com` causing CSP error [#178](https://github.com/Rebilly/ReDoc/issues/178) -* Fix latest empty menu-items not getting active [#194](https://github.com/Rebilly/ReDoc/issues/194) -* Fixed crash when level-2 heading goes before level-1 in description [#179](https://github.com/Rebilly/ReDoc/issues/179) (by [@jsmartfo](https://github.com/jsmartfo)) - -# 1.7.0 (2017-01-06) -### Features/Improvements -* Add support for grouping items in menu via [`x-tagGroups`](https://github.com/Rebilly/ReDoc/blob/master/docs/redoc-vendor-extensions.md#x-taggroups) -* Support inherited discriminator (only one at the moment) -* Add support for second-level headings from Markdown docs (by [@jaingaurav](https://github.com/jaingaurav)) - -### Bug fixes -* Fix response list for shared schemas (fixes [#177](https://github.com/Rebilly/ReDoc/issues/177)) -* Fix right panel overlaps site-footer - -# 1.6.4 (2016-12-28) -### Bug fixes -* Fix crash on MS Edge (fixes [#166](https://github.com/Rebilly/ReDoc/issues/166)) -* Uncomment animation after upgrade to the latest ng2 (resolves [#162](https://github.com/Rebilly/ReDoc/issues/162)) - -# 1.6.3 (2016-12-19) -### Bug fixes -* Disable side-menu animation (workaround for [#162](https://github.com/Rebilly/ReDoc/issues/162)) -* Use markdown for response description (fixes [#158](https://github.com/Rebilly/ReDoc/issues/158)) -* Fix leaks (fixes [#167](https://github.com/Rebilly/ReDoc/issues/167)) -* Update webpack and stick to ts@2.0.9 (fixes [#169](https://github.com/Rebilly/ReDoc/issues/169), [#168](https://github.com/Rebilly/ReDoc/issues/168)) - -### Features/Improvements -* add `expand-responses` option - specify which responses are expand by default ([#165](https://github.com/Rebilly/ReDoc/issues/165)). - -# 1.6.2 (2016-12-11) -### Bug fixes -* Use markdown in responses description ([#158](https://github.com/Rebilly/ReDoc/issues/158)) - -### Features/Improvements -* [x-displayName](https://github.com/Rebilly/ReDoc/blob/master/docs/redoc-vendor-extensions.md#x-displayname) for tags - by [@bfirsh](https://github.com/bfirsh) ([PR #152](https://github.com/Rebilly/ReDoc/pull/152)) - -# 1.6.1 (2016-12-02) -### Bug fixes -* Fix only the first instance of schema was rendered ([#150](https://github.com/Rebilly/ReDoc/issues/150)) -* Regression: fix side panel overlaps footer -* Fix menu was not initialized for specs without tags - -### Features/Improvements -* Don't show error screen for runtimes after render finished -* Updated dependencies (angular to the latest version + dev deps) - - -# 1.6.0 (2016-11-30) -### Bug fixes -* Update webpack to the latest beta ([#143](https://github.com/Rebilly/ReDoc/issues/143)) -* Fix read-only fields appear in request samples ([#142](https://github.com/Rebilly/ReDoc/issues/142)) -* A few more minor UI improvements - -### Features/Improvements -* Major performance optimization with new option `lazy-rendering` - -To enable use `` tag parameter: ``. -In this mode ReDoc shows initial screen ASAP and then renders the rest operations asynchronously while showing progress bar on the top. Check out [the demo](//rebilly.github.io/ReDoc) for the example. -* Enable cors-proxy for demo -* README: Add button link to yeoman-generator - -# 1.5.2 (2016-11-28) -### Bug fixes -* Fix crashing on array without items ([#104](https://github.com/Rebilly/ReDoc/issues/104)) -* Fix `allOf` within array items ([#136](https://github.com/Rebilly/ReDoc/issues/136)) -* Fix reference resolution from external files ([#96](https://github.com/Rebilly/ReDoc/issues/96)) -* Fix object to become an array ([#146](https://github.com/Rebilly/ReDoc/issues/146)) - -### Features/Improvements -* Add support for Swagger `collectionFormat` -* Wrap API version in span with class ([#145](https://github.com/Rebilly/ReDoc/issues/145)) -* Update openapi-sampler to 0.3.3 - -# 1.5.1 (2016-10-31) -### Bug fixes -* Fix content scrolling on language switch ([#130](https://github.com/Rebilly/ReDoc/issues/130)) - -### Features/Improvements -* Support for Swagger `pattern` property ([#42](https://github.com/Rebilly/ReDoc/issues/42)) -* Add option to hide hostname in method definition (by @bfirsh) -* Add Docker development environment (by @bfirsh) - -# 1.5.0 (2016-10-31) -### Bug fixes -* Fix side menu items wrong sync with description headers - -### Features/Improvements -* Support for Security Definitions -* Update angular2 to the 2.1.2 - -### Deprecations -* Deprecate `x-traitTag` - -### Code refactoring -* Separate RedocModule from AppModule -* Get rid of angular facade/lang dependencies -* Error handler refactor - -# 1.4.1 (2016-10-18) -### Bug fixes -* Emit helpers for module build - -# 1.4.0 (2016-10-14) -### Bug fixes -* Fix destroy/reinit -* Fix minimum/maximum zero not rendered ([#123](https://github.com/Rebilly/ReDoc/issues/123)) - -### Features/Improvements -* Do spec load after bootstrap -* Build and publish angular2 module ([#126](https://github.com/Rebilly/ReDoc/issues/126)) - -# 1.3.3 (2016-09-28) -### Features/Improvements -* Implemented x-extendedDiscriminator to workaround name clashes in big specs -* Add engines to package.json ([#83](https://github.com/Rebilly/ReDoc/issues/83)) -* Fix npm start on windows ([#119](https://github.com/Rebilly/ReDoc/issues/119), [#118](https://github.com/Rebilly/ReDoc/issues/118)) -* Update webpack to latest beta -* Update angular to 2.0.1 -* Update local dev steps -* Update openapi-sampler lib ([#111](https://github.com/Rebilly/ReDoc/issues/111)) - -# 1.3.2 (2016-09-13) -### Bug fixes -* Fix broken tabs styling for response samples -* Fix v1.x.x deployment - -# 1.3.1 (2016-09-13) -### Bug fixes -* Makes basePath optional (by @LeFnord) -* Fixed little typo (by @adamd) -* Typo s/IGNORRED/IGNORED (by @MikeRalphson) -* Fixed indentation (by @bennyn) -* Fix default hostname ([#108](https://github.com/Rebilly/ReDoc/issues/108)) -* Fix default value for falsy values is not displayed ([#109](https://github.com/Rebilly/ReDoc/issues/109)) -* Fix schema collapse after change discriminator - -### Features/Improvements -* Update to latest Angular RC.6 -* Smaller bundle size by removing esprima dep from bundle -* Updated dependencies - -# 1.3.0 (2016-08-31) -### Bug fixes -* Fix code samples are not shown for operations without body param ([#93](https://github.com/Rebilly/ReDoc/issues/93)) -* Fixed side menu overlapped site footer ([#75](https://github.com/Rebilly/ReDoc/issues/75)) -* Fix broken order in discriminator dropdown - -### Features/Improvements -* Support "x-nullable" property by @kedashoe ([#92](https://github.com/Rebilly/ReDoc/issues/92)) - -# 1.2.0 (2016-08-30) -### Bug fixes -* Fix sticky sidebar top sticking ([#75](https://github.com/Rebilly/ReDoc/issues/75)) -* Fix array inside objects if referenced directly ([#84](https://github.com/Rebilly/ReDoc/issues/84)) -* Add banner to the bundle file ([#89](https://github.com/Rebilly/ReDoc/issues/89)) -* Fix broken additionalProperties -* Fix version render issue (extra "v" letter) - -### Features/Improvements -* Change the way discriminator is rendered -* Created CDN major release 1.x.x ([#87](https://github.com/Rebilly/ReDoc/issues/87)) -* Smaller bundle size (371KB gzipped) -* Better start-up time due to [AoT](http://blog.mgechev.com/2016/08/14/ahead-of-time-compilation-angular-offline-precompilation/) - -### Code refactoring -* Moved build-system to Webpack -* Moved to latest Typescript + get rid of typings -* Upgrade to the latest Angular2 RC.5 - -# 1.1.2 (2016-08-21) -### Bug fixes -* Revert "Fix markdown newlines to be GFM" ([#82](https://github.com/Rebilly/ReDoc/issues/82)) -* Move license and contact info above description - -# 1.1.1 (2016-08-21) -### Bug fixes -* Fix markdown newlines to be GFM ([#82](https://github.com/Rebilly/ReDoc/issues/82)) -* Fix markdown code blocks in api description - -# 1.1.0 (2016-08-12) -### Bug fixes - -* Fix API description width on mobile -* Render valid JSON in samples (quoted object keys) - -### Features/Improvements - -* Add Tuple support (arrays with separate schema for each value) ([#69](https://github.com/Rebilly/ReDoc/issues/69)) -* Add special representation for enum with one value ([#70](https://github.com/Rebilly/ReDoc/issues/70)) -* Change `< * >` notation to `< anything >` - - -# 1.0.1 (2016-08-01) -### Bug fixes - -* Use api host if schema host is undefined diff --git a/LICENSE b/LICENSE index 20075d85..eaf0fa0e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ The MIT License (MIT) -Copyright (c) 2015-present, Rebilly, Inc. +Copyright (c) 2015-present, Rebilly, Inc. +Copyright (c) 2021-present, Redocly Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -19,4 +20,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/README.md b/README.md index cb79ec89..0077d589 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ By default Redoc offers a three-panel, responsive layout: If you want to see how Redoc renders your OpenAPI definition, you can try it out online at https://redocly.github.io/redoc/. -A version of the Swagger Petstore API is displayed by default. +A version of the Redocly Museum API is displayed by default. To test it with your own OpenAPI definition, enter the URL for your definition and select **TRY IT**. @@ -37,12 +37,12 @@ enter the URL for your definition and select **TRY IT**. - Ability to integrate your API introduction into the side menu - High-level grouping in side menu with the [`x-tagGroups`](https://redocly.com/docs/api-reference-docs/specification-extensions/x-tag-groups/) specification extension - [Simple integration with `create-react-app`](https://redocly.com/docs/redoc/quickstart/react/) -- Code samples support (with vendor extension)
- ![code samples in action](docs/images/code-samples-demo.gif) +- Code samples support (with the `x-codeSamples` specification extension)
+ ![code samples in action](https://raw.githubusercontent.com/Redocly/redoc/main/demo/code-samples-demo.gif) ## Usage -Redoc is provided as a CLI tool (also distributed as a Docker image), HTML tag, and React component. +Redoc Community Edition is available as an HTML tag, a React component, and via the Redocly CLI (also distributed as a Docker image). ### Generate documentation from the CLI @@ -73,20 +73,23 @@ Add your own `spec-url` to the `` tag; this attribute can also be a local Check out the [deployment documentation](./docs/deployment/intro.md) for more options, and detailed documentation for each. -## Redoc vs. Redocly API Reference +## Redoc CE vs. Redoc -Redoc is Redocly's community-edition product. Looking for something more? -We also offer [hosted API reference documentation](https://redocly.com/docs/api-registry/guides/api-registry-quickstart/) -with additional features including: +Redoc CE is Redocly's community-edition product. Looking for something more? +We also offer [Redoc](https://redocly.com/redoc) +with support specifications like GraphQL/AsyncAPI/SOAP and additional features including: -* Try-it console +* Try-it panel(Replay) * Automated code samples -* Pagination -* Extra theme options +* Mock server +* Full customization +* Lint + +For a detailed comparison of premium vs open source, see [Premium vs Open Source features](https://redocly.com/blog/premium-vs-open-source). ### Documentation and resources -- [Reference docs](https://redocly.com/docs/api-reference-docs/getting-started/) - we take care of the hosting +- [Realm + Reunite](https://redocly.com/docs/realm) - we take care of the hosting, which includes everything you need for documentation. - [Redoc](https://redocly.com/docs/redoc/) - detailed documentation for this open source project (also in the `docs/` folder) - [Command-line interface to bundle your docs into a web-ready HTML file](https://redocly.com/docs/cli/commands/build-docs/) - API linting, bundling, and much more with open source [Redocly CLI](https://redocly.com/docs/cli) @@ -117,6 +120,7 @@ Redoc uses the following [specification extensions](https://redocly.com/docs/api * [`x-traitTag`](docs/redoc-vendor-extensions.md#x-traitTag) - useful for tags that refer to non-navigation properties like Pagination, Rate-Limits, etc * [`x-codeSamples`](docs/redoc-vendor-extensions.md#x-codeSamples) - specify operation code samples * [`x-badges`](docs/redoc-vendor-extensions.md#x-badges) - specify operation badges +* ['x-enumDescriptions'](docs/redoc-vendor-extensions.md#x-enumDescriptions) - list of the enum values and descriptions to include in the documentation * [`x-examples`](docs/redoc-vendor-extensions.md#x-examples) - specify JSON example for requests * [`x-nullable`](docs/redoc-vendor-extensions.md#x-nullable) - mark schema param as a nullable * [`x-displayName`](docs/redoc-vendor-extensions.md#x-displayname) - specify human-friendly names for the menu categories @@ -130,8 +134,12 @@ Redoc uses the following [specification extensions](https://redocly.com/docs/api **The README for the `1.x` version is on the [v1.x](https://github.com/Redocly/redoc/tree/v1.x) branch.** -All the 2.x releases are deployed to npm and can be used with Redocly-cdn: -- particular release, for example, `v2.0.0`: https://cdn.redoc.ly/redoc/v2.0.0/bundles/redoc.standalone.js +**The README for the `2.x` version is on the [v2.x](https://github.com/Redocly/redoc/tree/v2.x) branch.** + +All the 2.x and 3.x releases are deployed to npm and can be used with Redocly-cdn: +- particular release, for example: +- `v2.0.0`: https://cdn.redoc.ly/redoc/v2.0.0/bundles/redoc.standalone.js +- `v3.0.0`: https://cdn.redoc.ly/redoc/v3.0.0/bundles/redoc.standalone.js - `latest` release: https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js Additionally, all the 1.x releases are hosted on our GitHub Pages-based CDN **(deprecated)**: diff --git a/api-extractor.json b/api-extractor.json new file mode 100644 index 00000000..fcf20994 --- /dev/null +++ b/api-extractor.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "/lib/index.d.ts", + "compiler": { + "tsconfigFilePath": "/tsconfig.json" + }, + "apiReport": { + "enabled": false + }, + "docModel": { + "enabled": false + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "/bundle/redoc.d.ts" + }, + "tsdocMetadata": { + "enabled": false + }, + "messages": { + "compilerMessageReporting": { + "default": { + "logLevel": "warning" + } + }, + "extractorMessageReporting": { + "default": { + "logLevel": "warning" + }, + "ae-missing-release-tag": { + "logLevel": "none" + } + }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + } + } +} diff --git a/benchmark/benchmark.js b/benchmark/benchmark.js deleted file mode 100644 index 32623a6b..00000000 --- a/benchmark/benchmark.js +++ /dev/null @@ -1,125 +0,0 @@ -const beautifyBenchmark = require('beautify-benchmark'); -const sh = require('shelljs'); -const fs = require('fs'); -const pathJoin = require('path').join; -const spawn = require('child_process').spawn; -const puppeteer = require('puppeteer'); - -const args = process.argv.slice(2); -args[0] = args[0] || 'HEAD'; -args[1] = args[1] || 'local'; - -let started = false; - -console.log('Benchmarking revisions: ' + args.join(', ')); - -const localDistDir = './benchmark/revisions/local/bundles'; -sh.rm('-rf', localDistDir); -console.log(`Building local dist: ${localDistDir}`); -sh.mkdir('-p', localDistDir); -exec(`npm run bundle:lib --output-path ${localDistDir}`); - -const revisions = []; -for (const arg of args) { - revisions.push({ name: arg, path: buildRevisionDist(arg) }); -} - -const configFile = ` - export const revisions = [ ${revisions.map(rev => JSON.stringify(rev)).join(', ')} ]; -`; - -const configDir = './benchmark/revisions/config.js'; -console.log(`Writing config "${configDir}"`); -fs.writeFileSync(configDir, configFile); - -console.log('Starting benchmark server'); -const proc = spawn('npm', ['run', 'start:benchmark']); - -proc.stdout.on('data', data => { - if (data.toString().indexOf('Compiled successfully') > -1) { - console.log('Server started'); - startBenchmark(); - } -}); - -proc.stderr.on('data', data => { - console.error(data.toString()); -}); - -proc.on('close', code => { - console.log(`Benchmark server stopped with code ${code}`); -}); - -async function runPuppeteer() { - return await puppeteer - .launch({ args: ['--no-sandbox', '--disable-setuid-sandbox'] }) - .then(async browser => { - const page = await browser.newPage(); - let resolve; - const prom = new Promise(_resolve => { - resolve = _resolve; - }); - page.on('console', async msg => { - const args = msg.args(); - const obj = args.length > 0 && (await args[0].jsonValue()); - if (!obj) return; - - if (obj.done) { - beautifyBenchmark.log(); - // resolve(obj); - } else if (obj.cycle) { - beautifyBenchmark.add(obj.cycle); - } else if (obj.allDone) { - resolve(); - } else { - console.log(obj); - } - }); - await page.goto('http://127.0.0.1:9090', { timeout: 0 }); - const res = await prom; - await browser.close(); - return res; - }); -} - -async function startBenchmark() { - if (started) return; - started = true; - console.log('Starting benchmarks'); - await runPuppeteer(); - - console.log('Killing benchmark server'); - proc.kill('SIGINT'); -} - -function exec(command) { - const { code, stdout, stderr } = sh.exec(command, { silent: true }); - if (code !== 0) { - console.error(stdout); - console.error(stderr); - sh.exit(code); - } - return stdout.trim(); -} - -function buildRevisionDist(revision) { - if (revision === 'local') { - return localDistDir; - } - const hash = exec(`git log -1 --format=%h "${revision}"`); - const buildDir = './benchmark/revisions/' + hash; - const distDir = buildDir + '/bundles'; - if (sh.test('-d', distDir)) { - console.log(`Using prebuilt "${revision}"(${hash}) revision: ${buildDir}`); - return distDir; - } - console.log(`Building "${revision}"(${hash}) revision: ${buildDir}`); - sh.mkdir('-p', buildDir); - exec(`git archive "${hash}" | tar -xC "${buildDir}"`); - - const pwd = sh.pwd(); - sh.cd(buildDir); - exec('npm uninstall cypress puppeteer && npm install && npm run bundle:lib'); - sh.cd(pwd); - return distDir; -} diff --git a/benchmark/index.html b/benchmark/index.html deleted file mode 100644 index 247406a0..00000000 --- a/benchmark/index.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - ReDoc - - - - - - - - - - - - - \ No newline at end of file diff --git a/benchmark/index.tsx b/benchmark/index.tsx deleted file mode 100644 index 139f1ec4..00000000 --- a/benchmark/index.tsx +++ /dev/null @@ -1,128 +0,0 @@ -import * as React from 'react'; -import { render, unmountComponentAtNode } from 'react-dom'; - -import { Redoc, RedocProps } from '../src/components'; - -import { loadAndBundleSpec } from '../src/utils'; - -import { revisions } from './revisions/config'; -import { configure } from 'mobx'; - -declare var Benchmark; - -configure({ - isolateGlobalState: true, -}); - -const node = document.getElementById('example'); - -const renderRoot = (Component: typeof Redoc, props: RedocProps) => - render(, node!); - -async function importRedocs() { - return Promise.all( - revisions.map(rev => { - return import('./' + rev.path.substring(12) + '/redoc.lib.js'); - }), - ); -} - -function startFullTime(redocs, resolvedSpec) { - return new Promise(async resolve => { - const suite = new Benchmark.Suite('Full time', { - maxTime: 20, - initCount: 2, - onStart(event) { - console.log(' ⏱️ ' + event.currentTarget.name); - }, - onCycle(event) { - console.log({ cycle: event.target }); - }, - onComplete() { - console.log({ done: true }); - setTimeout(() => resolve(), 10); - }, - }); - - revisions.forEach((rev, idx) => { - const redoc = redocs[idx]; - suite.add(rev.name, () => { - const store = new redoc.AppStore(resolvedSpec, 'openapi.yaml'); - renderRoot(redoc.Redoc, { store }); - unmountComponentAtNode(node!); - }); - }); - - suite.run({ async: true }); - }); -} - -function startInitStore(redocs, resolvedSpec) { - return new Promise(async resolve => { - const suite = new Benchmark.Suite('Create Store Time', { - maxTime: 20, - initCount: 2, - onStart(event) { - console.log(' ⏱️ ' + event.currentTarget.name); - }, - onCycle(event) { - console.log({ cycle: event.target }); - }, - onComplete() { - console.log({ done: true }); - setTimeout(() => resolve(), 10); - }, - }); - - revisions.forEach((rev, idx) => { - const redoc = redocs[idx]; - suite.add(rev.name, () => { - const store = new redoc.AppStore(resolvedSpec, 'openapi.yaml'); - store.dispose(); - }); - }); - - suite.run({ async: true }); - }); -} - -function startRenderTime(redocs, resolvedSpec) { - return new Promise(async resolve => { - const suite = new Benchmark.Suite('Render time', { - maxTime: 20, - initCount: 2, - onStart(event) { - console.log(' ⏱️ ' + event.currentTarget.name); - }, - onCycle(event) { - console.log({ cycle: event.target }); - unmountComponentAtNode(node!); - }, - onComplete() { - console.log({ done: true }); - setTimeout(() => resolve(), 10); - }, - }); - - revisions.forEach((rev, idx) => { - const redoc = redocs[idx]; - const store = new redoc.AppStore(resolvedSpec, 'openapi.yaml'); - suite.add(rev.name, () => { - renderRoot(redoc.Redoc, { store }); - }); - }); - - suite.run({ async: true }); - }); -} - -async function runBenchmarks() { - const redocs: any[] = await importRedocs(); - const resolvedSpec = await loadAndBundleSpec('openapi.yaml'); - await startInitStore(redocs, resolvedSpec); - await startRenderTime(redocs, resolvedSpec); - await startFullTime(redocs, resolvedSpec); - console.log({ allDone: true }); -} - -runBenchmarks(); diff --git a/config/docker/Dockerfile b/config/docker/Dockerfile index b56daf4d..a2ce59ff 100644 --- a/config/docker/Dockerfile +++ b/config/docker/Dockerfile @@ -5,52 +5,47 @@ # npm i -g http-server # http-server -p 8000 --cors -FROM node:18-alpine +FROM node:22.20.0-alpine@sha256:dbcedd8aeab47fbc0f4dd4bffa55b7c3c729a707875968d467aaaea42d6225af AS build -RUN apk update && apk add --no-cache git - -# Install dependencies WORKDIR /build -COPY package.json package-lock.json /build/ -RUN npm ci --no-optional --ignore-scripts -RUN npm explore esbuild -- npm run postinstall -# copy only required for the build files -COPY src /build/src -COPY webpack.config.ts tsconfig.json custom.d.ts /build/ -COPY config/webpack-utils.ts /build/config/ -COPY typings/styled-patch.d.ts /build/typings/styled-patch.d.ts +COPY . . -RUN npm run bundle:standalone +RUN npm ci --no-optional --ignore-scripts --no-fund --omit=dev \ + && npm install --no-save vite -FROM nginx:alpine +RUN npm run build:standalone && npm run minify + +FROM nginx:1.28-alpine@sha256:8f2bcf97c473dfe311e79a510ee540ee02e28ce1e6a64e1ef89bfad32574ef10 ENV PAGE_TITLE="ReDoc" ENV PAGE_FAVICON="favicon.png" ENV BASE_PATH= -ENV SPEC_URL="http://petstore.swagger.io/v2/swagger.json" +ENV SPEC_URL="https://cdn.redocly.com/redoc/museum-api.yaml" ENV PORT=80 +ENV HOST=localhost ENV REDOC_OPTIONS= -# copy files to the nginx folder -COPY --from=0 build/bundles /usr/share/nginx/html -COPY config/docker/index.tpl.html /usr/share/nginx/html/index.html -COPY demo/favicon.png /usr/share/nginx/html/ -COPY config/docker/nginx.conf /etc/nginx/ -COPY config/docker/docker-run.sh /usr/local/bin +# add docker-entrypoint scripts +COPY config/docker/docker-entrypoint.d/ /docker-entrypoint.d/ +RUN chmod -R +x /docker-entrypoint.d/ + +# copy nginx config +COPY config/docker/nginx/templates/ /etc/nginx/templates/ +COPY config/docker/nginx/nginx.conf config/docker/nginx/handle_options.conf config/docker/nginx/security.conf /etc/nginx/ + +# copy static files +COPY config/docker/static/ /usr/share/nginx/html/ +COPY --from=build /build/bundle/redoc.standalone.js /usr/share/nginx/html/ # Provide rights to the root group to write to nginx repositories (needed to run in OpenShift) -RUN chgrp -R 0 /etc/nginx && \ - chgrp -R 0 /usr/share/nginx/html && \ - chgrp -R 0 /var/cache/nginx && \ - chgrp -R 0 /var/log/nginx && \ - chgrp -R 0 /var/run && \ - chmod -R g+rwX /etc/nginx && \ - chmod -R g+rwX /usr/share/nginx/html && \ - chmod -R g+rwX /var/cache/nginx && \ - chmod -R g+rwX /var/log/nginx && \ - chmod -R g+rwX /var/run - -EXPOSE 80 - -CMD ["sh", "/usr/local/bin/docker-run.sh"] +RUN chgrp -R 0 /etc/nginx \ + && chgrp -R 0 /usr/share/nginx/html \ + && chgrp -R 0 /var/cache/nginx \ + && chgrp -R 0 /var/log/nginx \ + && chgrp -R 0 /var/run \ + && chmod -R g+rwX /etc/nginx \ + && chmod -R g+rwX /usr/share/nginx/html \ + && chmod -R g+rwX /var/cache/nginx \ + && chmod -R g+rwX /var/log/nginx \ + && chmod -R g+rwX /var/run diff --git a/config/docker/README.md b/config/docker/README.md index 8e042f4a..014a91ac 100644 --- a/config/docker/README.md +++ b/config/docker/README.md @@ -1,4 +1,4 @@ -# Official ReDoc Docker Image +# Official Redoc Docker Image ## Usage @@ -45,8 +45,9 @@ Another issue with OpenShift is that the default exposed port `80` cannot be use - `PAGE_TITLE` (default `"ReDoc"`) - page title - `PAGE_FAVICON` (default `"favicon.png"`) - URL to page favicon -- `BASE_PATH` (optional) - prepend favicon & standalone bundle with this path -- `SPEC_URL` (default `"http://petstore.swagger.io/v2/swagger.json"`) - URL to spec +- `BASE_PATH` (optional) - path prefix +- `SPEC_URL` (default `"http://petstore.swagger.io/v2/swagger.json"`) – URL to the spec (if mounted as a file inside the container and `BASE_PATH` is used, the spec should contain the prefix, e.g., for `"/v1/swagger.json"`) +- `HOST` (default `localhost`) - nginx server_name - `PORT` (default `80`) - nginx port - `REDOC_OPTIONS` (optional) - [`` tag attributes](https://github.com/Redocly/redoc#redoc-tag-attributes) diff --git a/config/docker/docker-entrypoint.d/90-envsubst-on-html-templates.sh b/config/docker/docker-entrypoint.d/90-envsubst-on-html-templates.sh new file mode 100644 index 00000000..62096762 --- /dev/null +++ b/config/docker/docker-entrypoint.d/90-envsubst-on-html-templates.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +# Loop through all *.tpl.html files and transform them +for tpl in /usr/share/nginx/html/*.tpl.html; do + target="/usr/share/nginx/html/$(basename "$tpl" .tpl.html).html" + envsubst < "$tpl" > "$target" +done diff --git a/config/docker/docker-entrypoint.d/95-clean-up.sh b/config/docker/docker-entrypoint.d/95-clean-up.sh new file mode 100644 index 00000000..6315291d --- /dev/null +++ b/config/docker/docker-entrypoint.d/95-clean-up.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# remove template files +rm -f /usr/share/nginx/html/index.prefix.tpl.html /usr/share/nginx/html/index.tpl.html + +if [ -n "$BASE_PATH" ]; then + rm -f /etc/nginx/conf.d/default.conf + rm -f /usr/share/nginx/html/index.html + mv /usr/share/nginx/html/index.prefix.html /usr/share/nginx/html/index.html +else + rm -f /etc/nginx/conf.d/default.prefix.conf + rm -f /usr/share/nginx/html/index.prefix.html +fi diff --git a/config/docker/docker-run.sh b/config/docker/docker-run.sh deleted file mode 100644 index f9c69e0c..00000000 --- a/config/docker/docker-run.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -set -e - -sed -i -e "s|%PAGE_TITLE%|$PAGE_TITLE|g" /usr/share/nginx/html/index.html -sed -i -e "s|%PAGE_FAVICON%|$PAGE_FAVICON|g" /usr/share/nginx/html/index.html -sed -i -e "s|%BASE_PATH%|$BASE_PATH|g" /usr/share/nginx/html/index.html -sed -i -e "s|%SPEC_URL%|$SPEC_URL|g" /usr/share/nginx/html/index.html -sed -i -e "s|%REDOC_OPTIONS%|${REDOC_OPTIONS}|g" /usr/share/nginx/html/index.html -sed -i -e "s|\(listen\s*\) [0-9]*|\1 ${PORT}|g" /etc/nginx/nginx.conf - -exec nginx -g 'daemon off;' diff --git a/config/docker/hooks/build b/config/docker/hooks/build deleted file mode 100755 index 1de054f1..00000000 --- a/config/docker/hooks/build +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -# DockerHub cd into Dockerfile location before build -# So we have to undo this. -cd ../.. -docker build -f config/docker/Dockerfile -t $IMAGE_NAME . diff --git a/config/docker/index.tpl.html b/config/docker/index.tpl.html deleted file mode 100644 index 83258786..00000000 --- a/config/docker/index.tpl.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - %PAGE_TITLE% - - - - - - - - - - diff --git a/config/docker/nginx.conf b/config/docker/nginx.conf deleted file mode 100644 index 9c529346..00000000 --- a/config/docker/nginx.conf +++ /dev/null @@ -1,71 +0,0 @@ -worker_processes 1; - -events { - worker_connections 1024; -} - -http { - include mime.types; - default_type application/octet-stream; - - sendfile on; - - keepalive_timeout 65; - - server { - listen 80; - server_name localhost; - index index.html index.htm; - - location / { - alias /usr/share/nginx/html/; - - if ($request_method = 'OPTIONS') { - # Add security headers - add_header 'X-Frame-Options' 'deny always'; - add_header 'X-XSS-Protection' '"1; mode=block" always'; - add_header 'X-Content-Type-Options' 'nosniff always'; - add_header 'Referrer-Policy' 'strict-origin-when-cross-origin'; - - # Set access control header - add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - # - # Custom headers and headers various browsers *should* be OK with but aren't - # - add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; - # - # Tell client that this pre-flight info is valid for 20 days - # - add_header 'Access-Control-Max-Age' 1728000; - add_header 'Content-Type' 'text/plain charset=UTF-8'; - add_header 'Content-Length' 0; - return 204; - } - if ($request_method = 'POST') { - # Add security headers - add_header 'X-Frame-Options' 'deny always'; - add_header 'X-XSS-Protection' '"1; mode=block" always'; - add_header 'X-Content-Type-Options' 'nosniff always'; - add_header 'Referrer-Policy' 'strict-origin-when-cross-origin'; - - # Set access control header - add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; - } - if ($request_method = 'GET') { - # Add security headers - add_header 'X-Frame-Options' 'deny always'; - add_header 'X-XSS-Protection' '"1; mode=block" always'; - add_header 'X-Content-Type-Options' 'nosniff always'; - add_header 'Referrer-Policy' 'strict-origin-when-cross-origin'; - - # Set access control header - add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; - } - } - } -} diff --git a/config/docker/nginx/handle_options.conf b/config/docker/nginx/handle_options.conf new file mode 100644 index 00000000..dde5921f --- /dev/null +++ b/config/docker/nginx/handle_options.conf @@ -0,0 +1,9 @@ +if ($request_method = 'OPTIONS') { + include /etc/nginx/security.conf; + # Tell client that this pre-flight info is valid for 20 days + # + add_header 'Access-Control-Max-Age' 1728000; + add_header 'Content-Type' 'text/plain charset=UTF-8'; + add_header 'Content-Length' 0; + return 204; +} \ No newline at end of file diff --git a/config/docker/nginx/nginx.conf b/config/docker/nginx/nginx.conf new file mode 100644 index 00000000..a2eb3991 --- /dev/null +++ b/config/docker/nginx/nginx.conf @@ -0,0 +1,18 @@ +worker_processes 1; + +events { + worker_connections 1024; +} + +http { + include mime.types; + default_type application/octet-stream; + + sendfile on; + + keepalive_timeout 65; + + + include /etc/nginx/security.conf; + include /etc/nginx/conf.d/*.conf; +} diff --git a/config/docker/nginx/security.conf b/config/docker/nginx/security.conf new file mode 100644 index 00000000..7341715b --- /dev/null +++ b/config/docker/nginx/security.conf @@ -0,0 +1,9 @@ + # Add security headers + add_header 'X-Frame-Options' 'deny always' always; + add_header 'X-XSS-Protection' '"1; mode=block" always' always; + add_header 'X-Content-Type-Options' 'nosniff always' always; + add_header 'Referrer-Policy' 'strict-origin-when-cross-origin' always; + # Set access control header + add_header 'Access-Control-Allow-Origin' '*' always; + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always; + add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type' always; \ No newline at end of file diff --git a/config/docker/nginx/templates/default.conf.template b/config/docker/nginx/templates/default.conf.template new file mode 100644 index 00000000..782f864a --- /dev/null +++ b/config/docker/nginx/templates/default.conf.template @@ -0,0 +1,16 @@ +server { + listen ${PORT}; + server_name ${HOST}; + + root /usr/share/nginx/html; + + location / { + include /etc/nginx/handle_options.conf; + try_files /index.html =404; + } + + location ~* ^/(.+\.[^/]+)$ { + include /etc/nginx/handle_options.conf; + try_files /$1 =404; + } +} \ No newline at end of file diff --git a/config/docker/nginx/templates/default.prefix.conf.template b/config/docker/nginx/templates/default.prefix.conf.template new file mode 100644 index 00000000..f8e53834 --- /dev/null +++ b/config/docker/nginx/templates/default.prefix.conf.template @@ -0,0 +1,27 @@ +server { + listen ${PORT}; + server_name ${HOST}; + + root /usr/share/nginx/html; + + location / { + include /etc/nginx/handle_options.conf; + return 404; + } + + location = /${BASE_PATH} { + include /etc/nginx/handle_options.conf; + try_files /index.html =404; + } + + location /${BASE_PATH}/ { + include /etc/nginx/handle_options.conf; + try_files /index.html =404; + } + + location ~* ^/${BASE_PATH}/(.+\.[^/]+)$ { + include /etc/nginx/handle_options.conf; + alias /usr/share/nginx/html/; + try_files /$1 =404; + } +} \ No newline at end of file diff --git a/demo/favicon.png b/config/docker/static/favicon.png similarity index 100% rename from demo/favicon.png rename to config/docker/static/favicon.png diff --git a/config/docker/static/index.prefix.tpl.html b/config/docker/static/index.prefix.tpl.html new file mode 100644 index 00000000..2d015887 --- /dev/null +++ b/config/docker/static/index.prefix.tpl.html @@ -0,0 +1,24 @@ + + + + + + ${PAGE_TITLE} + + + + + + + + + + diff --git a/demo/playground/index.html b/config/docker/static/index.tpl.html similarity index 50% rename from demo/playground/index.html rename to config/docker/static/index.tpl.html index bfc9589b..a032b3f0 100644 --- a/demo/playground/index.html +++ b/config/docker/static/index.tpl.html @@ -1,19 +1,11 @@ - + - Redoc - + ${PAGE_TITLE} + + - + + diff --git a/config/docker/static/styles.css b/config/docker/static/styles.css new file mode 100644 index 00000000..7c716ac2 --- /dev/null +++ b/config/docker/static/styles.css @@ -0,0 +1,8 @@ +body { + margin: 0; + padding: 0; +} + +redoc { + display: block; +} diff --git a/config/webpack-utils.ts b/config/webpack-utils.ts deleted file mode 100644 index 609f55eb..00000000 --- a/config/webpack-utils.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as webpack from 'webpack'; - -export function webpackIgnore(regexp) { - return new webpack.NormalModuleReplacementPlugin(regexp, require.resolve('lodash.noop')); -} diff --git a/custom.d.ts b/custom.d.ts deleted file mode 100644 index b0df57d6..00000000 --- a/custom.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/// - -declare module '*.json' { - const content: any; - export = content; -} - -declare module '*.svg' { - const content: string; - export default content; -} - -declare module '*.css' { - const content: string; - export default content; -} - -declare var __REDOC_VERSION__: string; -declare var __REDOC_REVISION__: string; - -declare var reactHotLoaderGlobal: any; - -interface Element { - scrollIntoViewIfNeeded(centerIfNeeded?: boolean): void; -} - -type GenericObject = Record; diff --git a/cypress.config.ts b/cypress.config.ts deleted file mode 100644 index cd67b971..00000000 --- a/cypress.config.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { defineConfig } from 'cypress'; - -export default defineConfig({ - fixturesFolder: false, - fileServerFolder: '.', - video: true, - projectId: 'z6eb6h', - viewportWidth: 1440, - viewportHeight: 720, - e2e: { - // We've imported your old cypress plugins here. - // You may want to clean this up later by importing these. - setupNodeEvents(on, config) { - return require('./e2e/plugins/index.js')(on, config); - }, - excludeSpecPattern: '*.js.map', - specPattern: 'e2e/integration/**/*.{js,jsx,ts,tsx}', - supportFile: false, - }, -}); diff --git a/demo/ComboBox.tsx b/demo/ComboBox.tsx deleted file mode 100644 index 97d2b25b..00000000 --- a/demo/ComboBox.tsx +++ /dev/null @@ -1,221 +0,0 @@ -/** - * Could not find ready-to-use component with required behaviour so - * I quickly hacked my own. Will refactor into separate npm package later - */ - -import * as React from 'react'; -import styled from '../src/styled-components'; - -const DropDownItem = styled.li<{ $active?: boolean }>` - ${(props: any) => (props.$active ? 'background-color: #eee' : '')}; - padding: 13px 16px; - &:hover { - background-color: #eee; - } - cursor: pointer; - text-overflow: ellipsis; - overflow: hidden; -`; - -const DropDownList = styled.ul` - box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), - 0 3px 1px -2px rgba(0, 0, 0, 0.2); - background: #fff; - border-radius: 0 0 2px 2px; - top: 100%; - left: 0; - right: 0; - z-index: 200; - overflow: hidden; - position: absolute; - list-style: none; - margin: 4px 0 0 0; - padding: 5px 0; - font-family: Roboto, sans-serif; - overflow: hidden; -`; - -const ComboBoxWrap = styled.div` - position: relative; - width: 100%; - max-width: 500px; - display: flex; -`; - -const Input = styled.input` - box-sizing: border-box; - width: 100%; - padding: 0 10px; - color: #555; - background-color: #fff; - border: 1px solid #ccc; - - font-size: 16px; - height: 28px; - box-sizing: border-box; - vertical-align: middle; - line-height: 1; - outline: none; - - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; - - &:focus { - border-color: #66afe9; - outline: 0; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); - } -`; - -const Button = styled.button` - background-color: #fff; - color: #333; - padding: 2px 10px; - touch-action: manipulation; - cursor: pointer; - user-select: none; - border: 1px solid #ccc; - border-left: 0; - font-size: 16px; - height: 28px; - box-sizing: border-box; - vertical-align: middle; - line-height: 1; - outline: none; - width: 80px; - - white-space: nowrap; - - @media screen and (max-width: 450px) { - display: none; - } -`; - -export interface ComboBoxProps { - onChange?: (val: string) => void; - options: Array<{ value: string; label: string }>; - placeholder?: string; - value?: string; -} -export interface ComboBoxState { - open: boolean; - value: string; - activeItemIdx: number; -} - -export default class ComboBox extends React.Component { - state = { - open: false, - value: this.props.value || '', - activeItemIdx: -1, - }; - - open = () => { - this.setState({ - open: true, - }); - }; - - close = () => { - this.setState({ - open: false, - activeItemIdx: -1, - }); - }; - - handleChange = e => { - this.updateValue(e.currentTarget.value); - }; - - updateValue(value) { - this.setState({ - value, - activeItemIdx: -1, - }); - } - - handleSelect(value: string) { - this.updateValue(value); - if (this.props.onChange) { - this.props.onChange(value); - } - this.close(); - } - - handleTryItClick = () => { - this.handleSelect(this.state.value); - }; - - handleKeyPress = (e: React.KeyboardEvent) => { - if (e.keyCode === 13) { - this.handleSelect(e.currentTarget.value); - } else if (e.keyCode === 40) { - const activeItemIdx = Math.min(this.props.options.length - 1, ++this.state.activeItemIdx); - this.setState({ - open: true, - activeItemIdx, - value: this.props.options[activeItemIdx].value, - }); - e.preventDefault(); - } else if (e.keyCode === 38) { - const activeItemIdx = Math.max(0, --this.state.activeItemIdx); - this.setState({ - activeItemIdx, - value: this.props.options[activeItemIdx].value, - }); - e.preventDefault(); - } else if (e.keyCode === 27) { - this.close(); - } - }; - - handleBlur = () => { - setTimeout(() => this.close(), 100); - }; - - handleItemClick = (val, idx) => { - this.handleSelect(val); - this.setState({ - activeItemIdx: idx, - }); - }; - - renderOption = (option: { value: string; label: string }, idx: number) => { - return ( - { - this.handleItemClick(option.value, idx); - }} - > - - {option.label} - -
- {option.value} -
- ); - }; - - render() { - const { open, value } = this.state; - const { options, placeholder } = this.props; - return ( - - - - {open && {options.map(this.renderOption)}} - - ); - } -} diff --git a/demo/big-openapi.json b/demo/big-openapi.json deleted file mode 100644 index 3152d142..00000000 --- a/demo/big-openapi.json +++ /dev/null @@ -1,27363 +0,0 @@ -{ - "openapi": "3.0.0", - "servers": [ - { - "url": "//api.rebilly.com/v2.1", - "description": "Live Server" - }, - { - "url": "//api-sandbox.rebilly.com/v2.1", - "description": "Sandbox Server" - } - ], - "info": { - "version": "2.1", - "title": "Rebilly REST API", - "contact": { - "name": "Rebilly API Support", - "url": "https://www.rebilly.com/contact/", - "email": "integrations@rebilly.com" - }, - "license": { - "name": "Rebilly", - "url": "https://my.rebilly.com/api/license/" - }, - "termsOfService": "https://www.rebilly.com/terms/", - "x-logo": { - "url": "https://rebilly.github.io/RebillyAPI/rb_apiLogo.svg", - "backgroundColor": "#0033A0", - "altText": "Rebilly API logo" - }, - "description": "# Introduction\nThe Rebilly API is built on HTTP. Our API is RESTful. It has predictable\nresource URLs. It returns HTTP response codes to indicate errors. It also\naccepts and returns JSON in the HTTP body. You can use your favorite\nHTTP/REST library for your programming language to use Rebilly's API, or\nyou can use one of our SDKs (currently available in [PHP](https://github.com/Rebilly/rebilly-php)\nand [C#](https://github.com/Rebilly/rebilly-dotnet-client)).\n\n# Authentication\nWhen you sign up for an account, you are given your first API key.\nYou can generate additional API keys, and delete API keys (as you may\nneed to rotate your keys in the future). You authenticate to the\nRebilly API by providing your secret key in the request header.\n\nRebilly offers three forms of authentication: private key, JSON Web Tokens, and\npublic key.\n- private key: authenticates each request by searching for the presence\nof an HTTP header: REB-APIKEY.\n- JWT: authenticates each request by the HTTP header: Authorization.\n- public key: authenticates by the HTTP header: REB-AUTH (read more on this below).\n\nRebilly also offers JSON Web Tokens (JWT) authentication, where you can control\nthe specific granular permissions and expiration for that JWT. We call our resource\nfor generating JWT [Sessions](#tag/Sessions).\n\nRebilly also has a client-side authentication scheme that uses an\napiUser and HMAC-SHA1 signature (only for the Tokens resource), so\nthat you may safely create tokens from the client-side without compromising\nyour secret keys.\n\nNever share your secret keys. Keep them guarded and secure.\nThe client-side authentication scheme uses one HTTP header named REB-AUTH.\n\n\n\n# PHP SDK\nFor all PHP SDK examples provided in this spec you will need to configure `$client`.\nYou may do it like this:\n\n```php\n$client = new Rebilly\\Client([\n 'apiKey' => 'YourApiKeyHere',\n 'baseUrl' => 'https://api.rebilly.com',\n]);\n```\n" - }, - "tags": [ - { - "name": "3D Secure", - "description": "3D Secure is a way to authenticate and protect transactions. Typically,\nit's only possible to protect the initial transaction in a subscription\nwith 3D Secure.\n" - }, - { - "name": "API Keys", - "description": "Always keep your API Keys private. In addition to your API Keys, you may use\nJSON Web Tokens (JWT) to authenticate to the API. See\nour [Sessions](#tag/Sessions) resource for more information.\n" - }, - { - "name": "Bank Accounts", - "description": "Bank Accounts are a type of payment instrument used to collect\nACH (echeck) payments, similar to how a payment\ncard would be used to for a credit card payment.\n" - }, - { - "name": "Blacklists", - "description": "Your blacklists contains values of customerIds, email addresses,\nipAddresses, bank identification numbers, countries or payment cards that\nyou do NOT want to do business with. They are a good tool for managing\nrisk. A blacklist entry that expires after a period of time we call a\ngreylist.\n" - }, - { - "name": "Checkout Pages", - "description": "Hosted checkout pages.\n" - }, - { - "name": "Contacts", - "description": "Contacts are Customer's address book.\nAll contact information used in Invoices, Subscriptions, Transacions, etc is enlisted here. However, changing a Contact won't change corresponding contact information in related resources\n" - }, - { - "name": "Coupons", - "description": "Coupons allows to apply different types of discounts to Invoices, Subscriptions and Plans. Redeemed Coupons will be applied only to Invoices with the same currency.\n" - }, - { - "name": "Customers", - "description": "Customers are your customers, sometimes known as accounts, clients,\nmembers, patrons, or players in other systems.\n" - }, - { - "name": "Customer Authentication", - "description": "Create authentication credentials, login, logout, and verify your customers.\n" - }, - { - "name": "Custom Events", - "description": "If system events can't solve your problems, you are able to create a custom event\nthat can fit your requirements, and use it to solve your own business logic.\n" - }, - { - "name": "Custom Rules", - "description": "\"Don't conform to the rules. Create the rules.\"\nRather than adapt your workflow and business, Rebilly can align with your business\nobjectives by giving you the power to automate certain behaviors when key events happen.\nYou can use this to your advantage to mitigate risk, maximize conversions and minimize costs.\nYou have the controls at your fingertips here. If you need more control,\nor help dialing in on a strategy, feel free to contact us.\n\nWhen an event happens, it triggers the evaluation of conditions (that you set up),\nin order from top to bottom. If the condition is met, the corresponding actions are executed.\nThe conditions continue to be checked until either all of the conditions have been executed,\nor a special \"stop\" action is executed.\n" - }, - { - "name": "Custom Fields", - "description": "Create additional custom fields for particular resources. You may name,\ndescribe, and determine the type of the schema.\n" - }, - { - "name": "Credential Hashes", - "description": "Get and create SMTP and Webhook credential hashes.\n" - }, - { - "name": "Disputes", - "description": "Handle disputes (chargebacks and retrievals).\n" - }, - { - "name": "Email Credentials", - "description": "Send automated emails through our system by connecting to your third party\nSMTP server (or your third party email service provider's SMTP server).\n" - }, - { - "name": "Files", - "description": "A File is an entity that can store a physical file and some metadata. It also provides an easy access to\nits size, mime-type, user-defined tags and description thus allowing easy sorting and searching among stored\nfiles.\nThere are several methods of file uploading available: multipart/form-data encoded form, RAW POST (by sending\nfile contents as POST body), fetching from URL (by providing the file URL via 'url' param)\nAttachment is an entity that is used to link a File to one or multiple objects like Customer, Dispute, Payment,\nTransaction, Subscription, Plan, Product, Invoice, Note. That allows to quickly find and use files related to\nthose specific entities.\n" - }, - { - "name": "Gateway Accounts", - "description": "Gateway accounts connect payment request to third party networks and platforms.\n" - }, - { - "name": "Invoices", - "description": "Invoices leave a record for both you and your customer of the products sold.\n" - }, - { - "name": "Layouts", - "description": "Layouts are used to hold collections of plans. A layout can be used to\npower a pricing page. You can make multiple layouts, and use rules to\ntarget them to different audiences.\n" - }, - { - "name": "Lists", - "description": "Lists contain sets of values and may be referenced within Rules criteria.\n\nYou may grant permissions to edit Lists to different people than those who can edit Rules.\nIt may be useful if your workflow involves frequent updates to value sets used in criteria.\n" - }, - { - "name": "Migrate payment cards", - "description": "Migrate payment cards from one gateway to another.\n" - }, - { - "name": "Notes", - "description": "Leave notes on a customer record to have a handy location to share with\nothers who may interface with the customer. It's great for customer service.\n" - }, - { - "name": "Organizations", - "description": "Organizations include the name and address of the entities related to your\naccount. An account may be multi-national, and support multiple\norganizations. Note: Organizations are share between \"Live\" and \"Sandbox\"\n" - }, - { - "name": "Payments", - "description": "Collect money from your customers with payments. You can schedule a payment\nto occur in the future. You can assign a dunning schedule to a payment to collect\nin the case of a decline.\n\nSome payments may be, what we term, suspended payments. These types of payments\nrequire user interaction. For example, an initial PayPal purchase, a 3D Secure\npurchase, China Union Pay, and more require the customer's interaction to\ncomplete the payment. We call these a \"suspended\" payment flow.\n" - }, - { - "name": "Payment Cards", - "description": "Payment cards are a type of payment instrument used for credit and debit card\nsales. Rebilly securely vaults the full payment card number, and can pass it\nonward securely to any gateway account to transact business.\n" - }, - { - "name": "Payment Tokens", - "description": "Payment tokens are used to reduce the scope of PCI DSS compliance. A payment\ntoken can be made using a different authentication scheme (refer to the public key\nauthentication scheme in the Authentication section), which allows you to\ncreate a payment token directly from the browser, bypassing the need to send\nsensitive cardholder info to your servers. We recommend using this with our\nRebilly.js library, which helps you wire a form into this API resource and create\npayment tokens.\n" - }, - { - "name": "Plans", - "description": "Plans are a template for making a subscription. For example, you may have a plan\nthat has a 30-day free trial followed by a recurring charge of $19.95 per month\nuntil canceled. The combination of the plan and a request to make a subscription\nwill apply those instructions to create the invoices according to the plan's\nschedule.\n" - }, - { - "name": "Products", - "description": "Proposed: Your product includes digital goods, services, and physical goods.\n" - }, - { - "name": "Reports", - "description": "The Rebilly Reporting API is currently experimental. You may see\nthe [Reports API Documentation here](https://rebilly.github.io/RebillyReportsAPI/).\n" - }, - { - "name": "Rules", - "description": "\"Don't conform to the rules. Create the rules.\"\nRather than adapt your workflow and business, Rebilly can align with your business\nobjectives by giving you the power to automate certain behaviors when key events happen.\nYou can use this to your advantage to mitigate risk, maximize conversions and minimize costs.\nYou have the controls at your fingertips here. If you need more control,\nor help dialing in on a strategy, feel free to contact us.\n\nWhen an event happens, it triggers the evaluation of conditions (that you set up),\nin order from top to bottom. If the condition is met, the corresponding actions are executed.\nThe conditions continue to be checked until either all of the conditions have been executed,\nor a special \"stop\" action is executed.\n" - }, - { - "name": "Sessions", - "description": "A session contains a token, which is a JSON Web Token. The token is created\nwith a user's signin credentials.\n\nThis token can be used to authenticate to the API. In addition, the session can be set to\nexpire at a particular time, and has very granular control over permissions.\nUse the token to then authenticate for further requests to the Rebilly API.\n\nThe token should be kept private, but could be stored on the user's browser\nclient to simulate a \"session.\"\n" - }, - { - "name": "Shipping Zones", - "description": "A shipping zone contains regions and countries that you ship to. Each shipping zone has its own shipping rates.\n" - }, - { - "name": "Status", - "description": "Check the status of the Rebilly API (no authentication required).\n" - }, - { - "name": "Subscriptions", - "description": "A subscription applies a plan's template to create invoices for a customer at the\nappropriate scheduled intervals. A subscription may also determine if the payment\nis collected automatically (with autopay set true).\n" - }, - { - "name": "Taxes", - "description": "Proposed: You can map a product to a tax category. The tax category is used by\ntax providers to calculate taxes for invoices.\n" - }, - { - "name": "Tracking", - "description": "Tracking is a layer for accessing all the activity (API requests,\nsubscriptions, webhooks, events, etc.), thus providing easier\ndebugging and issues auditing.\n" - }, - { - "name": "Transactions", - "description": "Get and refund transactions.\n" - }, - { - "name": "Users", - "description": "A User represents a person who can login to Rebilly, and take actions subject to\ntheir granted permissions.\n" - }, - { - "name": "Websites", - "description": "A Website represents the website/brand that customers interact with... You\ncould think of it like a brand. For example, Nestle owns Perrier and Purina\nand PowerBar.\n\nWe recognize that some enterprises have more than one website (or brand). The\nwebsite is related to each invoice and each payment gateway account. This feature\nwould allow you to have gateway accounts that are related to multiple websites, or\nexclusive to particular websites. And gives you more control over your business.\n" - }, - { - "name": "Webhooks", - "description": "Webhooks are designed to notify your systems when certain/all registered events happen in near real-time.\nThey allow you to collect information about those events. Rebilly can send these information via\nPOST to an URL of your choice.\n" - } - ], - "security": [ - { - "ApiKey": [] - } - ], - "paths": { - "/3dsecure": { - "get": { - "tags": [ - "3D Secure" - ], - "summary": "Retrieve a list of ThreeDSecure entries", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ThreeDSecure" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - } - }, - "post": { - "tags": [ - "3D Secure" - ], - "summary": "Create a ThreeDSecure entry", - "description": "Create a ThreeDSecure entry\n", - "responses": { - "201": { - "description": "ThreeDSecure entry was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThreeDSecure" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThreeDSecure" - } - } - }, - "description": "ThreeDSecure resource", - "required": true - } - } - }, - "/3dsecure/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "3D Secure" - ], - "summary": "Retrieve a ThreeDSecure entry", - "description": "Retrieve a ThreeDSecure entry with specified identifier string\n", - "responses": { - "200": { - "description": "ThreeDSecure entry was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThreeDSecure" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/activation/{token}": { - "parameters": [ - { - "name": "token", - "in": "path", - "description": "The token string", - "required": true, - "schema": { - "type": "string" - } - } - ], - "post": { - "tags": [ - "Users" - ], - "summary": "Sends a token to activate user account", - "description": "Sends a token to activate user account\n", - "security": [ - { - "RebAuth": [] - } - ], - "responses": { - "204": { - "description": "User account was activated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Invalid token was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "try {\n $client->users()->activate('token');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ] - } - }, - "/api-keys": { - "get": { - "tags": [ - "API Keys" - ], - "summary": "Retrieve a list of api keys", - "description": "Retrieve a list of api keys\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of api keys was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApiKey" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$apiKeys = $client->apiKeys()->search([\n 'filter' => 'description:Test',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "API Keys" - ], - "summary": "Create an api key", - "description": "Create an api key\n", - "responses": { - "201": { - "description": "Api Key was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiKey" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$apiKeyForm = new Rebilly\\Entities\\ApiKey();\n$apiKeyForm->setDescription('Test');\n$apiKeyForm->setDatetimeFormat($apiKeyForm::DATETIME_FORMAT_MYSQL);\n\ntry {\n $apiKey = $client->apiKeys()->create($apiKeyForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/ApiKey" - } - } - }, - "/api-keys/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "API Keys" - ], - "summary": "Retrieve api key", - "description": "Retrieve api key with specified identifier string\n", - "responses": { - "200": { - "description": "Api key was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiKey" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$apiKeys = $client->apiKeys()->load('apiKeyID');\n" - } - ] - }, - "put": { - "tags": [ - "API Keys" - ], - "summary": "Create or update api key with predefined ID", - "description": "Create or update api key with predefined identifier string\n", - "responses": { - "200": { - "description": "ApiKey was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiKey" - } - } - } - }, - "201": { - "description": "ApiKey was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiKey" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$apiKeyForm = new Rebilly\\Entities\\ApiKey();\n$apiKeyForm->setDescription('TestPut');\n$apiKeyForm->setDatetimeFormat($apiKeyForm::DATETIME_FORMAT_MYSQL);\n\ntry {\n $apiKey = $client->apiKeys()->update('apiKeyID', $apiKeyForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/ApiKey" - } - }, - "delete": { - "tags": [ - "API Keys" - ], - "summary": "Delete api key", - "description": "Delete api key with predefined identifier string\n", - "responses": { - "204": { - "description": "ApiKey was deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "$ref": "#/components/responses/Conflict" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$client->apiKeys()->delete('apiKeyID');\n" - } - ] - } - }, - "/attachments": { - "get": { - "tags": [ - "Files" - ], - "summary": "Retrieve a list of Attachments", - "description": "Retrieve a list of Attachments\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - }, - { - "$ref": "#/components/parameters/collectionFilter" - }, - { - "$ref": "#/components/parameters/collectionQuery" - }, - { - "$ref": "#/components/parameters/collectionExpand" - }, - { - "$ref": "#/components/parameters/collectionFields" - }, - { - "name": "sort", - "in": "query", - "description": "The collection items sort field and order (prefix with \"-\" for descending sort).", - "style": "form", - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "id", - "-id", - "name", - "-name", - "relatedId", - "-relatedId", - "relatedType", - "-relatedType", - "fileId", - "-fileId", - "createdTime", - "-createdTime", - "updatedTime", - "-updatedTime" - ] - } - } - } - ], - "responses": { - "200": { - "description": "A list of Attachments was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Attachment" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$attachments = $client->attachments()->search([\n 'filter' => 'relatedType:customer',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Files" - ], - "summary": "Create an Attachment", - "description": "Create an Attachment\n", - "responses": { - "201": { - "description": "Attachment was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Attachment" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$attachmentForm = new Rebilly\\Entities\\Attachment();\n$attachmentForm->setFileId('fileId');\n$attachmentForm->setRelatedType($attachmentForm::TYPE_CUSTOMER);\n$attachmentForm->setRelatedId('customerId');\n\ntry {\n $attachment = $client->attachments()->create($attachmentForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Attachment" - } - } - }, - "/attachments/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Files" - ], - "summary": "Retrieve an Attachment", - "description": "Retrieve a Attachment with specified identifier string\n", - "responses": { - "200": { - "description": "Attachment was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Attachment" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$attachment = $client->attachments()->load('attachmentId');\n" - } - ] - }, - "put": { - "tags": [ - "Files" - ], - "summary": "Update the Attachment with predefined ID", - "description": "Update the Attachment with predefined ID\n", - "responses": { - "200": { - "description": "Attachment was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Attachment" - } - } - } - }, - "201": { - "description": "Attachment was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Attachment" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$attachmentForm = new Rebilly\\Entities\\Attachment();\n$attachmentForm->setFileId('fileId');\n$attachmentForm->setRelatedType($attachmentForm::TYPE_CUSTOMER);\n$attachmentForm->setRelatedId('customerId');\n\ntry {\n $attachment = $client->attachments()->update('attachmentId', $attachmentForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Attachment" - } - }, - "delete": { - "tags": [ - "Files" - ], - "summary": "Delete an Attachment", - "description": "Delete the Attachment with predefined identifier string\n", - "responses": { - "204": { - "description": "Attachment was deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$client->attachments()->delete('attachmentId');\n" - } - ] - } - }, - "/authentication-options": { - "get": { - "tags": [ - "Customer Authentication" - ], - "summary": "Read current authentication options", - "description": "Read current authentication options\n", - "responses": { - "200": { - "description": "Current authentication options was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AuthenticationOptions" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$authenticationOptions = $client->authenticationOptions()->load();\n" - } - ] - }, - "put": { - "tags": [ - "Customer Authentication" - ], - "summary": "Change authentication options", - "description": "Change options\n", - "responses": { - "200": { - "description": "Authentication Options were updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthenticationOptions" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$authenticationOptionsForm = new Rebilly\\Entities\\AuthenticationOptions();\n// Regular expression below matches any password with 6+ length that contains alphabet symbols and/or numbers.\n$authenticationOptionsForm->setPasswordPattern('/^[a-zA-Z0-9]{6,}$/');\n\ntry {\n $authenticationOptions = $client->authenticationOptions()->update($authenticationOptionsForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthenticationOptions" - } - } - }, - "description": "Authentication Options resource", - "required": true - } - } - }, - "/authentication-tokens": { - "get": { - "tags": [ - "Customer Authentication" - ], - "summary": "Retrieve a list of auth tokens", - "description": "Retrieve a list of auth tokens\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of auth tokens was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AuthenticationToken" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$authenticationTokens = $client->authenticationTokens()->search([\n 'filter' => 'customerId:testCustomer',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Customer Authentication" - ], - "summary": "Login", - "description": "Login a user (customer)\n", - "responses": { - "201": { - "description": "Login successful", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthenticationToken" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$authenticationForm = new Rebilly\\Entities\\AuthenticationToken();\n$authenticationForm->setUsername('username');\n$authenticationForm->setPassword('test123');\n\ntry {\n $authenticationToken = $client->authenticationTokens()->login($authenticationForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthenticationToken" - } - } - }, - "description": "AuthenticationToken resource", - "required": true - } - } - }, - "/authentication-tokens/{token}": { - "parameters": [ - { - "name": "token", - "in": "path", - "description": "The token identifier string", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "tags": [ - "Customer Authentication" - ], - "summary": "Verify", - "description": "Verify an authentication token\n", - "responses": { - "200": { - "description": "Authentication Token was verified", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthenticationToken" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$isVerified = $client->authenticationTokens()->verify('token');\n" - } - ] - }, - "delete": { - "tags": [ - "Customer Authentication" - ], - "summary": "Logout a user", - "description": "Logout a user\n", - "responses": { - "204": { - "description": "User was logged out", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$client->authenticationTokens()->logout('token');\n" - } - ] - } - }, - "/bank-accounts": { - "get": { - "tags": [ - "Bank Accounts" - ], - "summary": "Retrieve a list of bank accounts", - "description": "Retrieve a list of Bank Accounts\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of Bank Accounts was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BankAccount" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$bankAccounts = $client->bankAccounts()->search([\n 'filter' => 'customerId:testId',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Bank Accounts" - ], - "summary": "Create a Bank Account", - "description": "Create a Bank Account\n", - "responses": { - "201": { - "description": "Bank Account was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BankAccount" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$bankAccountForm = new Rebilly\\Entities\\BankAccount();\n$bankAccountForm->setCustomerId('customerId');\n$bankAccountForm->setContactId('contactId');\n$bankAccountForm->setRoutingNumber('0123456');\n$bankAccountForm->setAccountNumber('0123456');\n$bankAccountForm->setAccountType('checking');\n\ntry {\n $bankAccount = $client->bankAccounts()->create($bankAccountForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/BankAccount" - } - } - }, - "/bank-accounts/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Bank Accounts" - ], - "summary": "Retrieve a Bank Account", - "description": "Retrieve a Bank Account with specified identifier string\n", - "responses": { - "200": { - "description": "BankAccount was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BankAccount" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$bankAccount = $client->bankAccounts()->load('bankAccountId');\n" - } - ] - }, - "put": { - "tags": [ - "Bank Accounts" - ], - "summary": "Create a BankAccount with predefined ID", - "description": "Create or update a BankAccount with predefined identifier string\n", - "responses": { - "200": { - "description": "BankAccount was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BankAccount" - } - } - } - }, - "201": { - "description": "BankAccount was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BankAccount" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$bankAccountForm = new Rebilly\\Entities\\BankAccount();\n$bankAccountForm->setCustomerId('customerId');\n$bankAccountForm->setContactId('contactId');\n$bankAccountForm->setRoutingNumber('0123456');\n$bankAccountForm->setAccountNumber('0123456');\n$bankAccountForm->setAccountType('checking');\n\ntry {\n $bankAccount = $client->customers()->create($bankAccountForm, 'bankAccountId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/BankAccount" - } - } - }, - "/bank-accounts/{id}/deactivation": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "post": { - "tags": [ - "Bank Accounts" - ], - "summary": "Deactivate a Bank Account", - "description": "Deactivate a Bank Account\n", - "responses": { - "201": { - "description": "Deactivated successful", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BankAccount" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$bankAccount = $client->bankAccounts()->deactivate('bankAccountId');\n" - } - ] - } - }, - "/blacklists": { - "get": { - "tags": [ - "Blacklists" - ], - "summary": "Retrieve a list of blacklists", - "description": "Retrieve a list of blacklists\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of Blacklists was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Blacklist" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$blacklists = $client->blacklists()->search([\n 'filter' => 'value:testValue',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Blacklists" - ], - "summary": "Create a blacklist", - "description": "Create a blacklist\n", - "responses": { - "201": { - "description": "Blacklist was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Blacklist" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$blacklistForm = new Rebilly\\Entities\\Blacklist();\n$blacklistForm->setType($blacklistForm::TYPE_EMAIL);\n$blacklistForm->setValue('test@test.com');\n$blacklistForm->setExpiredTime('2025-01-01 05:00:00');\n\ntry {\n $blacklist = $client->blacklists()->create($blacklistForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Blacklist" - } - } - }, - "/blacklists/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Blacklists" - ], - "summary": "Retrieve a blacklist", - "description": "Retrieve a blacklist with specified identifier string\n", - "responses": { - "200": { - "description": "Blacklist was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Blacklist" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$blacklist = $client->blacklists()->load('blacklistId');\n" - } - ] - }, - "put": { - "tags": [ - "Blacklists" - ], - "summary": "Create a blacklist with predefined ID", - "description": "Create a blacklist with predefined identifier string\n", - "responses": { - "201": { - "description": "Blacklist was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Blacklist" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "409": { - "description": "Blacklist exist and cannot be updated", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$blacklistForm = new Rebilly\\Entities\\Blacklist();\n$blacklistForm->setType($blacklistForm::TYPE_EMAIL);\n$blacklistForm->setValue('test@test.com');\n$blacklistForm->setExpiredTime('2025-01-01 05:00:00');\n\ntry {\n $blacklist = $client->blacklists()->create($blacklistForm, 'blacklistId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Blacklist" - } - }, - "delete": { - "tags": [ - "Blacklists" - ], - "summary": "Delete a blacklist", - "description": "Delete a blacklist with predefined identifier string\n", - "responses": { - "204": { - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "description": "Blacklist was deleted" - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$client->blacklists()->delete('blacklistId');\n" - } - ] - } - }, - "/checkout-pages": { - "get": { - "tags": [ - "Checkout Pages" - ], - "summary": "Retrieve a list of checkout pages", - "description": "Retrieve a list of checkout pages\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of checkout pages was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CheckoutPage" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$checkoutPages = $client->checkoutPages()->search([\n 'filter' => 'name:testCheckoutPage',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Checkout Pages" - ], - "summary": "Create a Checkout Page", - "description": "Create a Checkout Page\n", - "responses": { - "201": { - "description": "Checkout Page was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutPage" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$checkoutPageForm = new Rebilly\\Entities\\CheckoutPage();\n$checkoutPageForm->setPlanId('planId');\n$checkoutPageForm->setWebsiteId('websiteId');\n$checkoutPageForm->setName('TestCheckoutPage');\n$checkoutPageForm->setUriPath('test-checkout-page');\n\ntry {\n $checkoutPage = $client->checkoutPages()->create($checkoutPageForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/CheckoutPage" - } - } - }, - "/checkout-pages/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Checkout Pages" - ], - "summary": "Retrieve a Checkout Page", - "description": "Retrieve a Checkout Page with specified identifier string\n", - "responses": { - "200": { - "description": "Checkout Page was retrieved successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutPage" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$checkoutPage = $client->checkoutPages()->load('checkoutPageId');\n" - } - ] - }, - "put": { - "tags": [ - "Checkout Pages" - ], - "summary": "Create or update a Checkout Page with predefined ID", - "description": "Create or update a Checkout Page with predefined identifier string\n", - "responses": { - "200": { - "description": "Checkout Page was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutPage" - } - } - } - }, - "201": { - "description": "Checkout Page was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutPage" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$checkoutPageForm = new Rebilly\\Entities\\CheckoutPage();\n$checkoutPageForm->setPlanId('planId');\n$checkoutPageForm->setWebsiteId('websiteId');\n$checkoutPageForm->setName('TestCheckoutPage');\n$checkoutPageForm->setUriPath('test-checkout-page');\n\ntry {\n $checkoutPage = $client->checkoutPages()->update('checkoutPageId', $checkoutPageForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/CheckoutPage" - } - }, - "delete": { - "tags": [ - "Checkout Pages" - ], - "summary": "Delete a Checkout Page", - "description": "Delete a Checkout Page with predefined identifier string\n", - "responses": { - "204": { - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "description": "Checkout Page was deleted" - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "description": "Checkout page cannot be deleted" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$client->checkoutPages()->delete('checkoutPageId');\n" - } - ] - } - }, - "/contacts": { - "get": { - "tags": [ - "Contacts" - ], - "summary": "Retrieve a list of contacts", - "description": "Retrieve a list of contacts\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of Contacts was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contact" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$contacts = $client->contacts()->search([\n 'filter' => 'firstName:John',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Contacts" - ], - "summary": "Create a contact", - "description": "Create a contact\n", - "responses": { - "201": { - "description": "Contact was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contact" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$contactForm = new Rebilly\\Entities\\Contact();\n$contactForm->setFirstName('Sherlock');\n$contactForm->setLastName('Holmes');\n$contactForm->setOrganization('TestOrganization');\n\ntry {\n $contact = $client->contacts()->create($contactForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Contact" - } - } - }, - "/contacts/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Contacts" - ], - "summary": "Retrieve a contact", - "description": "Retrieve a contact with specified identifier string\n", - "responses": { - "200": { - "description": "Contact was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contact" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$contact = $client->contacts()->load('contactId');\n" - } - ] - }, - "put": { - "tags": [ - "Contacts" - ], - "summary": "Create or update a contact with predefined ID", - "description": "Create or update a contact with predefined identifier string\n", - "responses": { - "201": { - "description": "Contact was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contact" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "description": "Contact exists and cannot be updated" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$contactForm = new Rebilly\\Entities\\Contact();\n$contactForm->setFirstName('Sherlock');\n$contactForm->setLastName('Holmes');\n$contactForm->setOrganization('TestOrganization');\n\ntry {\n $contact = $client->contacts()->update('contactId', $contactForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Contact" - } - }, - "delete": { - "tags": [ - "Contacts" - ], - "summary": "Delete a contact", - "description": "Delete a contact with predefined identifier string\n", - "responses": { - "204": { - "description": "Contact was deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "402": { - "description": "Contact cannot be deleted" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/coupons-redemptions": { - "get": { - "tags": [ - "Coupons" - ], - "summary": "Retrieve a list of coupon redemptions", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - }, - { - "$ref": "#/components/parameters/collectionFilter" - }, - { - "$ref": "#/components/parameters/collectionQuery" - }, - { - "$ref": "#/components/parameters/collectionCriteria" - }, - { - "$ref": "#/components/parameters/collectionSort" - } - ], - "responses": { - "200": { - "description": "Coupons redemptions were retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CouponRedemption" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$couponRedemptions = $client->couponsRedemptions()->search([\n 'filter' => 'customerId:testCustomer',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Coupons" - ], - "summary": "Redeem a coupon", - "description": "Redeem a coupon\n", - "responses": { - "201": { - "description": "Coupon was redeemed", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CouponRedemption" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$redemptionForm = new Rebilly\\Entities\\Coupons\\Redemption();\n$redemptionForm->setCustomerId('customerId');\n$redemptionForm->setRedemptionCode('redemptionCode');\n\n$restrictionArray = [\n 'type' => Rebilly\\Entities\\Coupons\\Restriction::TYPE_DISCOUNTS_PER_REDEMPTION,\n 'quantity' => 2,\n];\n\n$restrictionForm = new Rebilly\\Entities\\Coupons\\Restriction([\n $restrictionArray,\n]);\n\n$redemptionForm->setAdditionalRestrictions($restrictionForm);\n\ntry {\n $couponRedemption = $client->couponsRedemptions()->redeem($redemptionForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CouponRedemption" - } - } - }, - "description": "Redeem a coupon", - "required": true - } - } - }, - "/coupons-redemptions/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Coupons" - ], - "summary": "Retrieve a coupon redemption with specified identifier string", - "responses": { - "200": { - "description": "Retrieve a coupon redemption with specified identifier string", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CouponRedemption" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$couponRedemption = $client->couponsRedemptions()->load('redemptionCode');\n" - } - ] - } - }, - "/coupons-redemptions/{id}/cancel": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "post": { - "tags": [ - "Coupons" - ], - "summary": "Cancel a coupon redemption", - "responses": { - "201": { - "description": "Cancel a coupon redemption" - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$client->couponsRedemptions()->cancel('id');\n" - } - ] - } - }, - "/coupons": { - "get": { - "tags": [ - "Coupons" - ], - "summary": "Retrieve a list of coupons", - "description": "Retrieve a list of coupons\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - }, - { - "$ref": "#/components/parameters/collectionFilter" - }, - { - "$ref": "#/components/parameters/collectionQuery" - }, - { - "$ref": "#/components/parameters/collectionCriteria" - }, - { - "$ref": "#/components/parameters/collectionSort" - } - ], - "responses": { - "200": { - "description": "A list of coupons was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Coupon" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$coupons = $client->coupons()->search([\n 'filter' => 'status:issued',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Coupons" - ], - "summary": "Create a coupon", - "description": "Create a coupon\n", - "responses": { - "201": { - "description": "Coupon was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Coupon" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$couponForm = new Rebilly\\Entities\\Coupons\\Coupon();\n\n$discountArray = [\n 'currency' => 'USD',\n 'amount' => 1.99,\n];\n\n$discountForm = new \\Rebilly\\Entities\\Coupons\\Discounts\\Fixed($discountArray);\n$couponForm->setDiscount($discountForm);\n// Coupon can be used right now\n$couponForm->setIssuedTime(date('Y-m-d H:i:s'));\n\n$restrictionArray = [\n 'quantity' => 2,\n];\n\n$restrictionForm = new Rebilly\\Entities\\Coupons\\Restrictions\\DiscountsPerRedemption($restrictionArray);\n\n$couponForm->setRestrictions([$restrictionForm]);\n\ntry {\n $coupon = $client->coupons()->create($couponForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Coupon" - } - } - }, - "/coupons/{redemptionCode}": { - "parameters": [ - { - "name": "redemptionCode", - "in": "path", - "description": "The Coupon's redemption code", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "tags": [ - "Coupons" - ], - "summary": "Retrieve a coupon", - "description": "Retrieve a coupon with specified redemption code string\n", - "responses": { - "200": { - "description": "Coupon was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Coupon" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$coupon = $client->coupons()->load('redemptionCode');\n" - } - ] - }, - "put": { - "tags": [ - "Coupons" - ], - "summary": "Create or update a coupon with predefined redemption code", - "description": "Create or update a coupon with predefined redemption code\n", - "responses": { - "200": { - "description": "Coupon was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Coupon" - } - } - } - }, - "201": { - "description": "Coupon was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Coupon" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "description": "Coupon was redeemed already and cannot be changed" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$couponForm = new Rebilly\\Entities\\Coupons\\Coupon();\n\n$discountArray = [\n 'type' => Rebilly\\Entities\\Coupons\\Discount::TYPE_FIXED,\n 'currency' => 'USD',\n 'amount' => 1.99,\n];\n\n$discountForm = new Rebilly\\Entities\\Coupons\\Discount($discountArray);\n$couponForm->setDiscount($discountForm);\n\n$restrictionArray = [\n 'type' => Rebilly\\Entities\\Coupons\\Restriction::TYPE_DISCOUNTS_PER_REDEMPTION,\n 'quantity' => 2,\n];\n\n$restrictionForm = new Rebilly\\Entities\\Coupons\\Restriction([\n $restrictionArray,\n]);\n\n$couponForm->setRestrictions($restrictionForm);\n\ntry {\n $coupon = $client->coupons()->create($couponForm, 'redemptionCode');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Coupon" - } - } - }, - "/coupons/{redemptionCode}/expiration": { - "parameters": [ - { - "name": "redemptionCode", - "in": "path", - "description": "The Coupon's redemption code", - "required": true, - "schema": { - "type": "string" - } - } - ], - "post": { - "tags": [ - "Coupons" - ], - "summary": "Set a coupon's expiration time.", - "description": "Set a coupon's expiry time with the specified redemption code.\nThe expiredTime of a coupon must be greater than its issuedTime.\nThis cannot be performed on expired coupons.\n", - "responses": { - "201": { - "description": "Coupon expiration was successfully set", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Coupon" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "$ref": "#/components/responses/Conflict" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CouponExpiration" - } - } - }, - "description": "Coupon resource" - } - } - }, - "/credential-hashes/emails": { - "post": { - "tags": [ - "Credential Hashes" - ], - "summary": "Create an email credential", - "description": "Create an email credential\n", - "responses": { - "201": { - "description": "Email credential was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SmtpCredential" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SmtpCredential" - } - } - }, - "description": "Email credential resource", - "required": true - } - } - }, - "/credential-hashes/emails/{hash}": { - "parameters": [ - { - "$ref": "#/components/parameters/hash" - } - ], - "get": { - "tags": [ - "Credential Hashes" - ], - "summary": "Retrieve an email credential", - "description": "Retrieve an email credential with specified token identifier string\n", - "responses": { - "200": { - "description": "Email credential was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SmtpCredential" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/credential-hashes/webhooks": { - "post": { - "tags": [ - "Credential Hashes" - ], - "summary": "Create a webhook credential", - "description": "Create a webhook credential\n", - "responses": { - "201": { - "description": "Webhook credential was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookCredential" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookCredential" - } - } - }, - "description": "Credential resource", - "required": true - } - } - }, - "/credential-hashes/webhooks/{hash}": { - "parameters": [ - { - "$ref": "#/components/parameters/hash" - } - ], - "get": { - "tags": [ - "Credential Hashes" - ], - "summary": "Retrieve a webhook credential", - "description": "Retrieve a webhook credential with specified token identifier string\n", - "responses": { - "200": { - "description": "Webhook credential was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookCredential" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/credentials": { - "get": { - "tags": [ - "Customer Authentication" - ], - "summary": "Retrieve a list of credentials", - "description": "Retrieve a list of credentials\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of Credentials was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Credential" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$customerCredentials = $client->customerCredentials()->search([\n 'filter' => 'customerId:testCustomer',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Customer Authentication" - ], - "summary": "Create a credential", - "description": "Create a credential\n", - "responses": { - "201": { - "description": "Credential was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Credential" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$customerCredentialForm = new Rebilly\\Entities\\CustomerCredential();\n$customerCredentialForm->setCustomerId('customerId');\n$customerCredentialForm->setUsername('test');\n$customerCredentialForm->setPassword('1234');\n\ntry {\n $customerCredential = $client->customerCredentials()->create($customerCredentialForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Credential" - } - } - }, - "/credentials/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Customer Authentication" - ], - "summary": "Retrieve a credential", - "description": "Retrieve a credential with specified identifier string\n", - "responses": { - "200": { - "description": "Credential was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Credential" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$customerCredential = $client->customerCredentials()->load('credentialId');\n" - } - ] - }, - "put": { - "tags": [ - "Customer Authentication" - ], - "summary": "Create or update a credential with predefined ID", - "description": "Create or update a credential with predefined identifier string\n", - "responses": { - "200": { - "description": "Credential was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Credential" - } - } - } - }, - "201": { - "description": "Credential was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Credential" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$customerCredentialForm = new Rebilly\\Entities\\CustomerCredential();\n$customerCredentialForm->setCustomerId('customerId');\n$customerCredentialForm->setUsername('test');\n$customerCredentialForm->setPassword('1234');\n\ntry {\n $customerCredential = $client->customerCredentials()->update('credentialId', $customerCredentialForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Credential" - } - }, - "delete": { - "tags": [ - "Customer Authentication" - ], - "summary": "Delete a credential", - "description": "Delete a credential with predefined identifier string\n", - "responses": { - "204": { - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "description": "Credential was deleted" - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$client->customerCredentials()->delete('credentialId');\n" - } - ] - } - }, - "/custom-events": { - "get": { - "tags": [ - "Custom Events" - ], - "summary": "Retrieve a list of custom events", - "description": "Retrieve a list of custom events\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - }, - { - "name": "sort", - "in": "query", - "description": "The collection items sort field and order (prefix with \"-\" for descending sort).", - "style": "form", - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "createdTime", - "-createdTime", - "handledTime", - "-handledTime", - "scheduledTime", - "-scheduledTime" - ] - } - } - } - ], - "responses": { - "200": { - "description": "A list of custom events was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomEvent" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - } - }, - "post": { - "tags": [ - "Custom Events" - ], - "summary": "Create a custom event", - "description": "Create a custom event\n", - "responses": { - "202": { - "description": "Custom event was accepted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomEvent" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/CustomEvent" - } - } - }, - "/custom-events/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Custom Events" - ], - "summary": "Retrieve a custom event", - "description": "Retrieve a custom event with predefined identifier string\n", - "responses": { - "200": { - "description": "Custom event was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomEvent" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - }, - "put": { - "tags": [ - "Custom Events" - ], - "summary": "Create a custom event with predefined ID", - "description": "Create a custom event with predefined identifier string\n", - "responses": { - "202": { - "description": "Custom event was accepted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomEvent" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "409": { - "$ref": "#/components/responses/Conflict" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/CustomEvent" - } - }, - "delete": { - "tags": [ - "Custom Events" - ], - "summary": "Delete a custom event", - "description": "Delete a custom event with predefined identifier string\n", - "responses": { - "204": { - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "description": "Custom event was deleted" - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "$ref": "#/components/responses/Conflict" - } - } - } - }, - "/custom-events/{id}/rules": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Custom Events", - "Rules" - ], - "summary": "Retrieve a list of rules for custom event", - "responses": { - "200": { - "description": "Rules were retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleSet" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - }, - "put": { - "tags": [ - "Custom Events", - "Rules" - ], - "summary": "Update the rules for custom event", - "responses": { - "200": { - "description": "Rules were updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleSet" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/RuleSet" - } - } - }, - "/custom-events/{id}/rules/history": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Custom Events", - "Rules" - ], - "summary": "Retrieve the change history of the set of rules for a custom event", - "description": "Retrieve the change history of the set of rules for the selected custom event.\nThe history is updated each time you change the rules.\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - }, - { - "$ref": "#/components/parameters/collectionFilter" - }, - { - "$ref": "#/components/parameters/collectionQuery" - }, - { - "$ref": "#/components/parameters/collectionSort" - }, - { - "$ref": "#/components/parameters/collectionFields" - }, - { - "$ref": "#/components/parameters/collectionExpand" - } - ], - "responses": { - "200": { - "description": "History was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RuleSetHistoryItem" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/custom-events/{id}/rules/history/{version}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - }, - { - "$ref": "#/components/parameters/rulesVersion" - } - ], - "get": { - "tags": [ - "Custom Events", - "Rules" - ], - "summary": "Retrieve the record from the change history of the set of rules for a custom event", - "description": "Retrieve the record from the change history of the set of rules for the selected custom event.\nA history record is created each time you change the rules.\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionFields" - }, - { - "$ref": "#/components/parameters/collectionExpand" - } - ], - "responses": { - "200": { - "description": "Rules version was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleSetHistoryItem" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/custom-events/{id}/rules/versions/{version}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - }, - { - "$ref": "#/components/parameters/rulesVersion" - } - ], - "get": { - "tags": [ - "Custom Events", - "Rules" - ], - "summary": "Retrieve the version of the set of rules for a custom event", - "description": "Retrieve the version of the selected set of rules for the selected custom event.\nThe versions are created each time you change the rules.\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionFields" - }, - { - "$ref": "#/components/parameters/collectionExpand" - } - ], - "responses": { - "200": { - "description": "Rules version was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleSetVersion" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/custom-fields/{resource}": { - "parameters": [ - { - "name": "resource", - "in": "path", - "description": "The resource type string", - "required": true, - "schema": { - "type": "string", - "enum": [ - "customers", - "payment-cards", - "subscriptions", - "transactions", - "websites", - "contacts", - "products" - ] - } - } - ], - "get": { - "tags": [ - "Custom Fields" - ], - "summary": "Retrieve Custom Fields", - "description": "Retrieve a schema of Custom Fields for the given resource type\n", - "responses": { - "200": { - "description": "A schema of Custom Fields was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "description": "The list of custom fields", - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomField" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$customFields = $client->customFields()->search([\n 'filter' => 'type:boolean',\n]);\n" - } - ] - } - }, - "/custom-fields/{resource}/{name}": { - "parameters": [ - { - "name": "resource", - "in": "path", - "description": "The resource type string", - "required": true, - "schema": { - "type": "string", - "enum": [ - "customers", - "payment-cards", - "subscriptions", - "transactions", - "websites", - "contacts", - "products" - ] - } - }, - { - "name": "name", - "in": "path", - "description": "The custom field's identifier string", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "tags": [ - "Custom Fields" - ], - "summary": "Retrieve a Custom Field", - "description": "Retrieve a schema of the given Custom Field for the given resource type\n", - "responses": { - "200": { - "description": "A schema of the Custom Field was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomField" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$customField = $client->customFields()->load('customers', 'customerId');\n" - } - ] - }, - "put": { - "tags": [ - "Custom Fields" - ], - "summary": "Create or alter a Custom Field", - "description": "Create or alter a schema of the given Custom Field for the given resource type.\n", - "responses": { - "200": { - "description": "The Custom Field was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomField" - } - } - } - }, - "201": { - "description": "The Custom Fields was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomField" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "409": { - "description": "The schema is in use: remove all the associated data in order to remove or alter the schema", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$customFieldForm = new Rebilly\\Entities\\CustomField();\n$customFieldForm->setType($customFieldForm::TYPE_BOOLEAN);\n\ntry {\n $customField = $client->customFields()->update('customers', 'testFieldName', $customFieldForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomField" - } - } - }, - "description": "Custom Fields schema of the given resource type", - "required": true - } - }, - "delete": { - "tags": [ - "Custom Fields" - ], - "summary": "Delete a custom field", - "description": "Delete a custom field by its name\n", - "responses": { - "204": { - "description": "Custom field has been deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "description": "The field is in use: remove all the associated data first", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$client->customFields()->delete('customers', 'testFieldName');\n" - } - ] - } - }, - "/customers": { - "get": { - "tags": [ - "Customers" - ], - "summary": "Retrieve a list of customers", - "description": "Retrieve a list of customers\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - }, - { - "$ref": "#/components/parameters/collectionFilter" - }, - { - "$ref": "#/components/parameters/collectionQuery" - }, - { - "$ref": "#/components/parameters/collectionExpand" - }, - { - "$ref": "#/components/parameters/collectionFields" - }, - { - "name": "sort", - "in": "query", - "description": "The collection items sort field and order (prefix with \"-\" for descending sort).", - "style": "form", - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "id", - "-id", - "email", - "-email", - "createdTime", - "-createdTime", - "updatedTime", - "-updatedTime" - ] - } - } - }, - { - "name": "Accept", - "in": "header", - "description": "The response media type", - "schema": { - "type": "string", - "enum": [ - "application/json", - "text/csv" - ], - "default": "application/json" - } - } - ], - "responses": { - "200": { - "description": "A list of Customers was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Customer" - } - } - }, - "text/csv": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Customer" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$customers = $client->customers()->search([\n 'filter' => 'firstName:John',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Customers" - ], - "summary": "Create a customer", - "description": "Create a customer\n", - "responses": { - "201": { - "description": "Customer was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$customerForm = new Rebilly\\Entities\\Customer();\n$customerForm->setFirstName('Sherlock');\n$customerForm->setLastName('Holmes');\n$customerForm->setEmail('sherlock.holmes@gmail.com');\n\ntry {\n $customer = $client->customers()->create($customerForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Customer" - } - } - }, - "/customers/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Customers" - ], - "summary": "Retrieve a customer", - "description": "Retrieve a customer with specified identifier string\n", - "responses": { - "200": { - "description": "Customer was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$customers = $client->customers()->load('myCustomerId');\n" - } - ] - }, - "put": { - "tags": [ - "Customers" - ], - "summary": "Create a customer with predefined ID", - "description": "Create a customer with predefined identifier string\n", - "responses": { - "200": { - "description": "Customer was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - } - }, - "201": { - "description": "Customer was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$customerForm = new Rebilly\\Entities\\Customer();\n$customerForm->setFirstName('Sherlock');\n$customerForm->setLastName('Holmes');\n$customerForm->setEmail('sherlock.holmes@gmail.com');\n\ntry {\n $customer = $client->customers()->update('myCustomerId', $customerForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Customer" - } - } - }, - "/customers/{id}/lead-source": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Customers" - ], - "summary": "Retrieve a customer's Lead Source", - "description": "Retrieve a Lead Source of given customer\n", - "responses": { - "200": { - "description": "Lead Source was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LeadSource" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$customer = $client->customers()->load('myCustomerId');\n$leadSource = $customer->getLeadSource();\n" - } - ] - }, - "put": { - "tags": [ - "Customers" - ], - "summary": "Create a Lead Source for a customer", - "description": "Create a Lead Source for a customer\n", - "responses": { - "200": { - "description": "Lead Source was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LeadSource" - } - } - } - }, - "201": { - "description": "Lead Source was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LeadSource" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$leadSourceForm = new Rebilly\\Entities\\LeadSource();\n$leadSourceForm->setSource('TestSource');\n$leadSourceForm->setCampaign('TestCampaign');\n\ntry {\n $customer = $client->customers()->updateLeadSource('myCustomerId', $leadSourceForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/LeadSource" - } - }, - "delete": { - "tags": [ - "Customers" - ], - "summary": "Delete a Lead Source for a customer", - "description": "Delete a Lead Source that belongs to a certain customer\n", - "responses": { - "204": { - "description": "Lead Source was deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "description": "Lead Source cannot be deleted" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$customer = $client->customers()->deleteLeadSource('myCustomerId');\n" - } - ] - } - }, - "/disputes": { - "get": { - "tags": [ - "Disputes" - ], - "summary": "Retrieve a list of disputes", - "description": "Retrieve a list of disputes\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of disputes was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Dispute" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$disputes = $client->disputes()->search([\n 'filter' => 'transactionId:testId',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Disputes" - ], - "summary": "Create a dispute", - "description": "Create a dispute\n", - "responses": { - "201": { - "description": "Dispute was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Dispute" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$disputeForm = new Rebilly\\Entities\\Dispute();\n$disputeForm->setTransactionId('transactionId');\n$disputeForm->setCurrency('USD');\n$disputeForm->setAmount(10);\n$disputeForm->setReasonCode(1000);\n$disputeForm->setType($disputeForm::TYPE_1CB);\n$disputeForm->setStatus($disputeForm::STATUS_RESPONSE_NEEDED);\n$disputeForm->setPostedTime('2025-01-01 05:00:00');\n\ntry {\n $dispute = $client->disputes()->create($disputeForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Dispute" - } - } - }, - "/disputes/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Disputes" - ], - "summary": "Retrieve a dispute", - "description": "Retrieve a dispute with specified identifier string\n", - "responses": { - "200": { - "description": "Dispute was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Dispute" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$dispute = $client->disputes()->load('disputeId');\n" - } - ] - }, - "put": { - "tags": [ - "Disputes" - ], - "summary": "Create or update a Dispute with predefined ID", - "description": "Create or update a Dispute with predefined identifier string\n", - "responses": { - "200": { - "description": "Dispute was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Dispute" - } - } - } - }, - "201": { - "description": "Dispute was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Dispute" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$disputeForm = new Rebilly\\Entities\\Dispute();\n$disputeForm->setTransactionId('transactionId');\n$disputeForm->setCurrency('USD');\n$disputeForm->setAmount(10);\n$disputeForm->setReasonCode(1000);\n$disputeForm->setType($disputeForm::TYPE_1CB);\n$disputeForm->setStatus($disputeForm::STATUS_RESPONSE_NEEDED);\n$disputeForm->setPostedTime('2025-01-01 05:00:00');\n\ntry {\n $dispute = $client->disputes()->update('disputeId', $dispute);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Dispute" - } - } - }, - "/events": { - "get": { - "tags": [ - "Events", - "Rules" - ], - "summary": "Retrieve a list of existing events", - "responses": { - "200": { - "description": "A list of System Events was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SystemEvent" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - } - } - }, - "/events/{eventType}": { - "parameters": [ - { - "$ref": "#/components/parameters/systemEventType" - } - ], - "get": { - "tags": [ - "Events", - "Rules" - ], - "summary": "Retrieve the event information", - "responses": { - "200": { - "description": "Rules were retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SystemEvent" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/events/{eventType}/rules": { - "parameters": [ - { - "$ref": "#/components/parameters/systemEventType" - } - ], - "get": { - "tags": [ - "Events", - "Rules" - ], - "summary": "Retrieve a list of rules for event", - "responses": { - "200": { - "description": "Rules were retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleSet" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - }, - "put": { - "tags": [ - "Events", - "Rules" - ], - "summary": "Update the rules for event", - "responses": { - "200": { - "description": "Rules were updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleSet" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/RuleSet" - } - } - }, - "/events/{eventType}/rules/history": { - "parameters": [ - { - "$ref": "#/components/parameters/systemEventType" - } - ], - "get": { - "tags": [ - "Events", - "Rules" - ], - "summary": "Retrieve the change history of the set of rules", - "description": "Retrieve the change history of the selected set of rules.\nThe history is updated each time you change the rules.\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - }, - { - "$ref": "#/components/parameters/collectionFilter" - }, - { - "$ref": "#/components/parameters/collectionQuery" - }, - { - "$ref": "#/components/parameters/collectionSort" - }, - { - "$ref": "#/components/parameters/collectionFields" - }, - { - "$ref": "#/components/parameters/collectionExpand" - } - ], - "responses": { - "200": { - "description": "History was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RuleSetHistoryItem" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/events/{eventType}/rules/history/{version}": { - "parameters": [ - { - "$ref": "#/components/parameters/systemEventType" - }, - { - "$ref": "#/components/parameters/rulesVersion" - } - ], - "get": { - "tags": [ - "Events", - "Rules" - ], - "summary": "Retrieve the record from the change history of the set of rules", - "description": "Retrieve the record from the change history of the selected set of rules.\nA history record is created each time you change the rules.\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionFields" - }, - { - "$ref": "#/components/parameters/collectionExpand" - } - ], - "responses": { - "200": { - "description": "History record was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleSetHistoryItem" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/events/{eventType}/rules/versions/{version}": { - "parameters": [ - { - "$ref": "#/components/parameters/systemEventType" - }, - { - "$ref": "#/components/parameters/rulesVersion" - } - ], - "get": { - "tags": [ - "Events", - "Rules" - ], - "summary": "Retrieve the version of the set of rules", - "description": "Retrieve the version of the selected set of rules.\nThe versions are created each time you change the rules.\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionFields" - }, - { - "$ref": "#/components/parameters/collectionExpand" - } - ], - "responses": { - "200": { - "description": "Rules version was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleSetVersion" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/files": { - "get": { - "tags": [ - "Files" - ], - "summary": "Retrieve a list of files", - "description": "Retrieve a list of files\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - }, - { - "$ref": "#/components/parameters/collectionFilter" - }, - { - "$ref": "#/components/parameters/collectionQuery" - }, - { - "$ref": "#/components/parameters/collectionExpand" - }, - { - "$ref": "#/components/parameters/collectionFields" - }, - { - "name": "sort", - "in": "query", - "description": "The collection items sort field and order (prefix with \"-\" for descending sort).", - "style": "form", - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "id", - "-id", - "name", - "-name", - "extension", - "-extension", - "size", - "-size", - "width", - "-width", - "height", - "-height", - "createdTime", - "-createdTime", - "updatedTime", - "-updatedTime" - ] - } - } - } - ], - "responses": { - "200": { - "description": "A list of Files was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/File" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$files = $client->files()->search([\n 'filter' => 'name:TestFile',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Files" - ], - "summary": "Create a file", - "description": "Create a file\n", - "responses": { - "201": { - "description": "File was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/File" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$fileForm = new Rebilly\\Entities\\File();\n$fileForm->setUrl('http://test.com/somefile.jpg');\n\ntry {\n $file = $client->files()->create($fileForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "url": { - "description": "The file URL", - "type": "string" - } - } - } - } - }, - "description": "Additionally, a file can be sent with a multipart/form-data POST request or the file's raw body can be sent as a request body", - "required": true - } - } - }, - "/files/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Files" - ], - "summary": "Retrieve a File", - "description": "Retrieve a File with specified identifier string\n", - "responses": { - "200": { - "description": "File was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/File" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$file = $client->files()->load('fileId');\n" - } - ] - }, - "put": { - "tags": [ - "Files" - ], - "summary": "Update the File with predefined ID. Note that file can be uploaded with POST only.", - "description": "Update the File with predefined ID\n", - "responses": { - "200": { - "description": "File was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/File" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$fileForm = new Rebilly\\Entities\\File();\n$fileForm->setDescription('This is a test file');\n\ntry {\n $file = $client->files()->update('fileId', $fileForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/File" - } - } - }, - "description": "File resource", - "required": true - } - }, - "delete": { - "tags": [ - "Files" - ], - "summary": "Delete a File", - "description": "Delete the File with predefined identifier string\n", - "responses": { - "204": { - "description": "File was deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$client->files()->delete('fileId');\n" - } - ] - } - }, - "/files/{id}/download": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Files" - ], - "summary": "Retrieve a file", - "description": "Retrieve a file\n", - "responses": { - "200": { - "description": "The file was retrieved successfully", - "headers": { - "Content-Length": { - "description": "The number of bytes in the file", - "schema": { - "type": "integer" - } - }, - "Content-Type": { - "description": "The MIME type of the file", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "readOnly": true - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/files/{id}/download{extension}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - }, - { - "name": "extension", - "in": "path", - "description": "File extension which also indicates the desired file format", - "required": true, - "schema": { - "type": "string", - "enum": [ - ".png", - ".jpg" - ] - } - } - ], - "get": { - "tags": [ - "Files" - ], - "summary": "Used for converting images server-side", - "description": "Used for converting images server-side\n", - "responses": { - "200": { - "description": "The file was retrieved successfully", - "headers": { - "Content-Length": { - "description": "The number of bytes in the file", - "schema": { - "type": "integer" - } - }, - "Content-Type": { - "description": "The MIME type of the file", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "readOnly": true - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - } - } - }, - "/forgot-password": { - "post": { - "tags": [ - "Users" - ], - "summary": "Sends an email with a link containing a token to reset user password", - "description": "Sends an email with a link containing a token to reset user password\n", - "responses": { - "204": { - "description": "Email sent successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$forgotPasswordForm = new Rebilly\\Entities\\Email();\n$forgotPasswordForm->setEmail('johndoe@test.com');\n\ntry {\n $client->users()->forgotPassword($forgotPasswordForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Email" - } - } - }, - "description": "Email resource", - "required": true - } - } - }, - "/gateway-accounts": { - "get": { - "tags": [ - "Gateway Accounts" - ], - "summary": "Retrieve a list of gateway accounts", - "description": "Retrieve a list of gateway accounts\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of Gateway Accounts was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GatewayAccount" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$gatewayAccounts = $client->$gatewayAccounts()->search([\n 'filter' => 'currency:USD',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Gateway Accounts" - ], - "summary": "Create a Gateway Account", - "description": "Create a Gateway Account\n", - "responses": { - "201": { - "description": "Gateway Account was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GatewayAccount" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$gatewayAccountForm = new Rebilly\\Entities\\GatewayAccount();\n\n$gatewayAccountForm->setGatewayName('A1Gateway');\n$gatewayAccountForm->setAcquirerName('Bank of Rebilly');\n$gatewayAccountForm->setOrganizationId('organizationId');\n$gatewayAccountForm->setMerchantCategoryCode(5734);\n$gatewayAccountForm->setWebsites([\n 'websiteId1',\n 'websiteId2',\n]);\n$gatewayAccountForm->setPaymentCardSchemes([\n Rebilly\\Entities\\PaymentCardScheme::SCHEME_VISA,\n Rebilly\\Entities\\PaymentCardScheme::SCHEME_MASTERCARD,\n]);\n$gatewayAccountForm->setMethod(Rebilly\\Entities\\PaymentMethod::METHOD_CASH);\n\n$gatewayConfig = [\n 'accountId' => 'test',\n 'password' => '123',\n];\n\n$gatewayAccountForm->setGatewayConfig($gatewayConfig);\n\ntry {\n $gatewayAccount = $client->gatewayAccounts()->create($gatewayAccountForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/GatewayAccount" - } - } - }, - "/gateway-accounts/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Gateway Accounts" - ], - "summary": "Retrieve a Gateway Account", - "description": "Retrieve a Gateway Account with specified identifier string\n", - "responses": { - "200": { - "description": "Gateway Account was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GatewayAccount" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$gatewayAccount = $client->gatewayAccounts()->load('gatewayAccountId');\n" - } - ] - }, - "put": { - "tags": [ - "Gateway Accounts" - ], - "summary": "Create or update a Gateway Account with predefined ID", - "description": "Create or update a GatewayAccount with predefined identifier string\n", - "responses": { - "200": { - "description": "Gateway Account was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GatewayAccount" - } - } - } - }, - "201": { - "description": "Gateway Account was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GatewayAccount" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$gatewayAccountForm = new Rebilly\\Entities\\GatewayAccount();\n\n$gatewayAccountForm->setGatewayName('A1Gateway');\n$gatewayAccountForm->setAcquirerName('Bank of Rebilly');\n$gatewayAccountForm->setOrganizationId('organizationId');\n$gatewayAccountForm->setMerchantCategoryCode(5734);\n$gatewayAccountForm->setWebsites([\n 'websiteId1',\n 'websiteId2',\n]);\n$gatewayAccountForm->setPaymentCardSchemes([\n Rebilly\\Entities\\PaymentCardScheme::SCHEME_VISA,\n Rebilly\\Entities\\PaymentCardScheme::SCHEME_MASTERCARD,\n]);\n$gatewayAccountForm->setMethod(Rebilly\\Entities\\PaymentMethod::METHOD_CASH);\n\n$gatewayConfig = [\n 'accountId' => 'test',\n 'password' => '123',\n];\n\n$gatewayAccountForm->setGatewayConfig($gatewayConfig);\n\ntry {\n $gatewayAccount = $client->gatewayAccounts()->update('gatewayAccountId', $gatewayAccountForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/GatewayAccount" - } - }, - "patch": { - "tags": [ - "Gateway Accounts" - ], - "summary": "Update a Gateway Account with predefined ID", - "description": "Update a GatewayAccount with predefined identifier string\n", - "responses": { - "200": { - "description": "Gateway Account was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GatewayAccount" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/GatewayAccount" - } - }, - "delete": { - "tags": [ - "Gateway Accounts" - ], - "summary": "Delete a Gateway Account", - "description": "Delete a Gateway Account with predefined identifier string\n", - "responses": { - "204": { - "description": "Gateway Account was deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "$ref": "#/components/responses/Conflict" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "try {\n $client->gatewayAccounts()->delete('gatewayAccountId');\n} catch (ServerException $e) {\n echo $e->getMessage();\n}\n" - } - ] - } - }, - "/invoices": { - "get": { - "tags": [ - "Invoices" - ], - "summary": "Retrieve a list of invoices", - "description": "Retrieve a list of invoices\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - }, - { - "name": "Accept", - "in": "header", - "description": "The response media type", - "schema": { - "type": "string", - "enum": [ - "application/json", - "text/csv" - ], - "default": "application/json" - } - } - ], - "responses": { - "200": { - "description": "A list of invoices was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Invoice" - } - } - }, - "text/csv": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Invoice" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$invoices = $client->invoices()->search([\n 'filter' => 'customerId:testCustomerId',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Invoices" - ], - "summary": "Create an invoice", - "description": "Create an invoice\n", - "responses": { - "201": { - "description": "Invoice was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Invoice" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$invoiceForm = new Rebilly\\Entities\\Invoice();\n$invoiceForm->setCustomerId('customerId');\n$invoiceForm->setWebsiteId('websiteId');\n$invoiceForm->setCurrency('USD');\n\ntry {\n $invoice = $client->invoices()->create($invoiceForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Invoice" - } - } - }, - "/invoices/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Invoices" - ], - "summary": "Retrieve an invoice", - "description": "Retrieve an invoice with specified identifier string\n", - "parameters": [ - { - "name": "Accept", - "in": "header", - "description": "The response media type", - "schema": { - "type": "string", - "enum": [ - "application/json", - "application/pdf" - ], - "default": "application/json" - } - } - ], - "responses": { - "200": { - "description": "Invoice was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Invoice" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/Invoice" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$invoice = $client->invoices()->load('invoiceId');\n" - } - ] - }, - "put": { - "tags": [ - "Invoices" - ], - "summary": "Create or update an invoice with predefined ID", - "description": "Create or update an invoice with predefined identifier string\n", - "responses": { - "200": { - "description": "Invoice was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Invoice" - } - } - } - }, - "201": { - "description": "Invoice was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Invoice" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$invoiceForm = new Rebilly\\Entities\\Invoice();\n$invoiceForm->setCustomerId('customerId');\n$invoiceForm->setWebsiteId('websiteId');\n$invoiceForm->setCurrency('USD');\n\ntry {\n $invoice = $client->invoices()->update('invoiceId', $invoiceForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Invoice" - } - } - }, - "/invoices/{id}/abandon": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "post": { - "tags": [ - "Invoices" - ], - "summary": "Abandon an invoice", - "description": "Abandon an invoice with specified identifier string\n", - "responses": { - "201": { - "description": "Invoice was abandoned successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Invoice" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$invoice = $client->invoices()->abandon('invoiceId');\n" - } - ] - } - }, - "/invoices/{id}/issue": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "post": { - "tags": [ - "Invoices" - ], - "summary": "Issue an invoice", - "description": "Issue an invoice with specified identifier string\n", - "responses": { - "201": { - "description": "Invoice was issued successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Invoice" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$invoice = $client->invoices()->issue('invoiceId', '2025-01-01 05:00:00');\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvoiceIssue" - } - } - }, - "description": "InvoiceIssue resource", - "required": true - } - } - }, - "/invoices/{id}/items": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Invoices" - ], - "summary": "Retrieve invoice items", - "description": "Retrieve an invoice items with specified invoice identifier string\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "Invoice items were retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InvoiceItem" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$invoiceItems = $client->invoiceItems()->search('invoiceId', [\n 'filter' => 'quantity:5',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Invoices" - ], - "summary": "Create an invoice item", - "description": "Create an invoice item\n", - "responses": { - "201": { - "description": "InvoiceItem was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvoiceItem" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$invoiceItemForm = new Rebilly\\Entities\\InvoiceItem();\n$invoiceItemForm->setType($invoiceItemForm::TYPE_DEBIT);\n$invoiceItemForm->setUnitPrice(0.99);\n$invoiceItemForm->setQuantity(5);\n\ntry {\n $invoiceItem = $client->invoiceItems()->create($invoiceItemForm, 'invoiceId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvoiceItem" - } - } - }, - "description": "InvoiceItem resource", - "required": true - } - } - }, - "/invoices/{id}/lead-source": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Invoices" - ], - "summary": "Retrieve an invoice's Lead Source", - "description": "Retrieve a Lead Source of given invoice\n", - "responses": { - "200": { - "description": "Lead Source was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LeadSource" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$invoice = $client->invoices()->load('invoiceId');\n$leadSource = $invoice->getLeadSource();\n" - } - ] - }, - "put": { - "tags": [ - "Invoices" - ], - "summary": "Create a Lead Source for an invoice", - "description": "Create a Lead Source for an invoice\n", - "responses": { - "200": { - "description": "Lead Source was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LeadSource" - } - } - } - }, - "201": { - "description": "Lead Source was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LeadSource" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$leadSourceForm = new Rebilly\\Entities\\LeadSource();\n$leadSourceForm->setSource('TestSource');\n$leadSourceForm->setCampaign('TestCampaign');\n\ntry {\n $invoice = $client->invoices()->updateLeadSource('invoiceId', $leadSourceForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/LeadSource" - } - }, - "delete": { - "tags": [ - "Invoices" - ], - "summary": "Delete a Lead Source for an invoice", - "description": "Delete a Lead Source that belongs to a certain invoice\n", - "responses": { - "204": { - "description": "Lead Source was deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "description": "Lead Source cannot be deleted" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$invoice = $client->invoices()->deleteLeadSource('invoiceId');\n" - } - ] - } - }, - "/invoices/{id}/void": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "post": { - "tags": [ - "Invoices" - ], - "summary": "Void an invoice", - "description": "Void an invoice with specified identifier string\n", - "responses": { - "201": { - "description": "Invoice was voided successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Invoice" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$invoice = $client->invoices()->void('invoiceId');\n" - } - ] - } - }, - "/layouts": { - "get": { - "tags": [ - "Layouts" - ], - "summary": "Retrieve a layout list", - "description": "Retrieve a layout list\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "Layout list was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Layout" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$layouts = $client->layouts()->search([\n 'filter' => 'name:TestLayout',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Layouts" - ], - "summary": "Create a layout", - "description": "Create a layout\n", - "responses": { - "201": { - "description": "Layout was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Layout" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$layoutForm = new Rebilly\\Entities\\Layout();\n$layoutItemForm = new Rebilly\\Entities\\LayoutItem();\n\n$layoutItemForm->setPlanId('planId');\n$layoutItemForm->setStarred(false);\n\n$layoutForm->setName('TestLayout');\n$layoutForm->setLayoutItems([\n $layoutItemForm,\n]);\n\ntry {\n $layout = $client->layouts()->create($layoutForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Layout" - } - } - }, - "/layouts/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Layouts" - ], - "summary": "Retrieve a layout", - "description": "Retrieve a layout with specified identifier string\n", - "responses": { - "200": { - "description": "Layout was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Layout" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$layout = $client->layouts()->load('layoutId');\n" - } - ] - }, - "put": { - "tags": [ - "Layouts" - ], - "summary": "Create or update a layout with predefined ID", - "description": "Create or update a layout with predefined identifier string\n", - "responses": { - "200": { - "description": "Layout was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Layout" - } - } - } - }, - "201": { - "description": "Layout was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Layout" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$layoutForm = new Rebilly\\Entities\\Layout();\n$layoutItemForm = new Rebilly\\Entities\\LayoutItem();\n\n$layoutItemForm->setPlanId('planId');\n$layoutItemForm->setStarred(false);\n\n$layoutForm->setName('TestLayout');\n$layoutForm->setLayoutItems([\n $layoutItemForm,\n]);\n\ntry {\n $layout = $client->layouts()->update('layoutId', $layoutForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Layout" - } - }, - "delete": { - "tags": [ - "Layouts" - ], - "summary": "Delete a layout", - "description": "Delete a layout with predefined identifier string\n", - "responses": { - "204": { - "description": "Layout was deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$client->layouts()->delete('layoutId');\n" - } - ] - } - }, - "/lists": { - "get": { - "tags": [ - "Lists" - ], - "summary": "Retrieve a collection of Lists (latest version of each List)", - "description": "Retrieve a collection of Lists\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - }, - { - "$ref": "#/components/parameters/collectionFilter" - }, - { - "$ref": "#/components/parameters/collectionCriteria" - }, - { - "$ref": "#/components/parameters/collectionSort" - } - ], - "responses": { - "200": { - "description": "A collection of Lists was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/List" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - } - }, - "post": { - "tags": [ - "Lists" - ], - "summary": "Create a List", - "description": "Create a List\n", - "responses": { - "201": { - "description": "List was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/List" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/List" - } - } - }, - "/lists/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Lists" - ], - "summary": "Retrieve list's latest version", - "description": "Retrieve latest version of List with specified identifier string\n", - "responses": { - "200": { - "description": "List was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/List" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - }, - "put": { - "tags": [ - "Lists" - ], - "summary": "Create or update a list with predefined ID", - "description": "Create or update a list with predefined identifier string\n", - "responses": { - "200": { - "description": "List was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/List" - } - } - } - }, - "201": { - "description": "List was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/List" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/List" - } - }, - "delete": { - "tags": [ - "Lists" - ], - "summary": "Delete a list", - "description": "Delete a list with predefined identifier string\n", - "responses": { - "204": { - "description": "List was deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "description": "List is used in Rules and cannot be deleted" - } - } - } - }, - "/lists/{id}/{version}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "List version", - "schema": { - "type": "integer", - "minimum": 1 - } - } - ], - "get": { - "tags": [ - "Lists" - ], - "summary": "Retrieve List's exact version", - "responses": { - "200": { - "description": "List's exact version was retrieved successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/List" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/notes": { - "get": { - "tags": [ - "Notes" - ], - "summary": "Retrieve a list of notes", - "description": "Retrieve a list of notes\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of Notes was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Note" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$notes = $client->notes()->search([\n 'filter' => 'relatedType:customer',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Notes" - ], - "summary": "Create a note", - "description": "Create a note\n", - "responses": { - "201": { - "description": "Note was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Note" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$noteForm = new Rebilly\\Entities\\Note();\n$noteForm->setRelatedId('customerId');\n$noteForm->setRelatedType(Rebilly\\Entities\\ResourceType::TYPE_CUSTOMER);\n$noteForm->setContent('Test Note');\n\ntry {\n $note = $client->notes()->create($noteForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Note" - } - } - }, - "/notes/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Notes" - ], - "summary": "Retrieve a note", - "description": "Retrieve a note with specified identifier string\n", - "responses": { - "200": { - "description": "Note was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Note" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$note = $client->notes()->load('noteId');\n" - } - ] - }, - "put": { - "tags": [ - "Notes" - ], - "summary": "Create or update a note with predefined ID", - "description": "Create or update a note with predefined identifier string\n", - "responses": { - "200": { - "description": "Note was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Note" - } - } - } - }, - "201": { - "description": "Note was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Note" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$noteForm = new Rebilly\\Entities\\Note();\n$noteForm->setRelatedId('customerId');\n$noteForm->setRelatedType(Rebilly\\Entities\\ResourceType::TYPE_CUSTOMER);\n$noteForm->setContent('Test Note');\n\ntry {\n $note = $client->notes()->update('noteId', $noteForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Note" - } - } - }, - "/organizations": { - "get": { - "tags": [ - "Organizations" - ], - "summary": "Retrieve a list of organizations", - "description": "Retrieve a list of organizations\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of organizations was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Organization" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$organizations = $client->organizations()->search([\n 'filter' => 'city:Test',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Organizations" - ], - "summary": "Create a organization", - "description": "Create a organization\n", - "responses": { - "201": { - "description": "Organization was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Organization" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$organizationForm = new Rebilly\\Entities\\Organization();\n$organizationForm->setName('Test Organization');\n$organizationForm->setCountry('US');\n\ntry {\n $organization = $client->organizations()->create($organizationForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Organization" - } - } - }, - "/organizations/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Organizations" - ], - "summary": "Retrieve a organization", - "description": "Retrieve a organization with specified identifier string\n", - "responses": { - "200": { - "description": "Organization was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Organization" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$organization = $client->organizations()->load('organizationId');\n" - } - ] - }, - "put": { - "tags": [ - "Organizations" - ], - "summary": "Create or update a organization with predefined ID", - "description": "Create or update a organization with predefined identifier string\n", - "responses": { - "200": { - "description": "Organization was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Organization" - } - } - } - }, - "201": { - "description": "Organization was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Organization" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$organizationForm = new Rebilly\\Entities\\Organization();\n$organizationForm->setName('Test Organization');\n$organizationForm->setCountry('US');\n\ntry {\n $organization = $client->organizations()->update('organizationId', $organizationForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Organization" - } - }, - "delete": { - "tags": [ - "Organizations" - ], - "summary": "Delete a organization", - "description": "Delete a organization with predefined identifier string\n", - "responses": { - "204": { - "description": "Organization was deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "description": "Organization has related resources and cannot be deleted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/password-tokens": { - "get": { - "tags": [ - "Customer Authentication" - ], - "summary": "Retrieve a list of tokens", - "description": "Retrieve a list of tokens\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of Reset Password Tokens was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ResetPasswordToken" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$resetPasswordTokens = $client->resetPasswordTokens()->search([\n 'filter' => 'token:string',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Customer Authentication" - ], - "summary": "Create a Reset Password Token", - "description": "Create a Reset Password Token\n", - "responses": { - "201": { - "description": "Reset Password Token was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResetPasswordToken" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$resetPasswordTokenForm = new Rebilly\\Entities\\ResetPasswordToken();\n$resetPasswordTokenForm->setUserName('test');\n$resetPasswordTokenForm->setPassword('1234');\n\ntry {\n $$resetPasswordToken = $client->resetPasswordTokens()->create($resetPasswordTokenForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResetPasswordToken" - } - } - }, - "description": "ResetPasswordToken resource", - "required": true - } - } - }, - "/password-tokens/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Customer Authentication" - ], - "summary": "Retrieve a Reset Password Token", - "description": "Retrieve a Reset Password Token with specified identifier string\n", - "responses": { - "200": { - "description": "ResetPasswordToken was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResetPasswordToken" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$resetPasswordToken = $client->resetPasswordTokens()->load('tokenId');\n" - } - ] - }, - "delete": { - "tags": [ - "Customer Authentication" - ], - "summary": "Delete a Reset Password Token", - "description": "Delete a Reset Password Token with predefined identifier string\n", - "responses": { - "204": { - "description": "ResetPasswordToken was deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "description": "ResetPasswordToken has related resources and cannot be deleted" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "try {\n $client->websites()->delete('websiteId');\n} catch (ServerException $e) {\n echo $e->getMessage();\n}\n" - } - ] - } - }, - "/payment-cards-migrations": { - "get": { - "tags": [ - "Migrate payment cards" - ], - "summary": "Retrieve a list of payment cards ready for migration", - "description": "Retrieve a list of payment cards ready for migration\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of payment cards was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentCard" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$paymentCardMigrations = $client->paymentCardMigrations()->search([\n 'filter' => 'status:active',\n]);\n" - } - ] - } - }, - "/payment-cards-migrations/migrate": { - "post": { - "tags": [ - "Migrate payment cards" - ], - "summary": "Migrate payment cards to another gateway account", - "description": "Migrate payment cards to another gateway account\n", - "responses": { - "201": { - "description": "Migration command was accepted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentCardMigrationResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$paymentCardMigrationForm = new Rebilly\\Entities\\PaymentCardMigrationsRequest();\n$paymentCardMigrationForm->setFromGatewayAccountId('gatewayAccountId');\n$paymentCardMigrationForm->setToGatewayAccountId('newGatewayAccountId');\n\n$paymentCardIds = [\n 'testPaymentCardId',\n 'testPaymentCardId2',\n];\n\n$paymentCardMigrationForm->setPaymentCardIds($paymentCardIds)\n\ntry {\n $paymentCardMigrationResponse = $client->paymentCardMigrations()->migrate($paymentCardMigrationForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentCardMigrationRequest" - } - } - }, - "description": "Payment card migration attributes", - "required": true - } - } - }, - "/payment-cards": { - "get": { - "tags": [ - "Payment Cards" - ], - "summary": "Retrieve a list of Payment Cards", - "description": "Retrieve a list of Payments Cards\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of Payment Card was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentCard" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$paymentCards = $client->paymentCards()->search([\n 'filter' => 'status:active',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Payment Cards" - ], - "summary": "Create a Payment Card", - "description": "Create a Payment Card\n", - "responses": { - "201": { - "description": "Payment Card was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentCard" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$paymentCardForm = new Rebilly\\Entities\\PaymentCard();\n$paymentCardForm->setCustomerId('customerId');\n$paymentCardForm->setPan('4111111111111111');\n$paymentCardForm->setExpYear(2025);\n$paymentCardForm->setExpMonth(8);\n$paymentCardForm->setBillingContactId('contactId');\n\ntry {\n $paymentCard = $client->paymentCards()->create($paymentCardForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentCard" - } - } - }, - "description": "PaymentCard resource", - "required": true - } - } - }, - "/payment-cards/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Payment Cards" - ], - "summary": "Retrieve a Payment Card", - "description": "Retrieve a Payment Card with specified identifier string\n", - "responses": { - "200": { - "description": "PaymentCard was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentCard" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$paymentCard = $client->paymentCards()->load('paymentCardId');\n" - } - ] - }, - "patch": { - "tags": [ - "Payment Cards" - ], - "summary": "Update a payment card's cvv value with predefined ID", - "description": "Update a payment card's cvv value with predefined identifier string\n", - "responses": { - "200": { - "description": "Gateway Account was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentCard" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "cvv": { - "description": "Card's cvv (card verification value).", - "type": "string" - } - } - } - } - }, - "description": "Payment card", - "required": true - } - }, - "put": { - "tags": [ - "Payment Cards" - ], - "summary": "Create a payment card with predefined ID", - "responses": { - "201": { - "description": "Payment card was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentCard" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "409": { - "description": "Payment card already exists and cannot be updated", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$paymentCardForm = new Rebilly\\Entities\\PaymentCard();\n$paymentCardForm->setCustomerId('customerId');\n$paymentCardForm->setPan('4111111111111111');\n$paymentCardForm->setExpYear(2025);\n$paymentCardForm->setExpMonth(8);\n$paymentCardForm->setBillingContactId('contactId');\n\ntry {\n $paymentCard = $client->paymentCards()->create($paymentCardForm, 'paymentCardId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentCard" - } - } - }, - "description": "Payment card", - "required": true - } - } - }, - "/payment-cards/{id}/authorization": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "post": { - "tags": [ - "Payment Cards" - ], - "summary": "Authorize a Payment Card", - "description": "Authorize a Payment Card\n", - "responses": { - "201": { - "description": "Authorization successful", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentCard" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$paymentCardAuthorizationForm = new Rebilly\\Entities\\PaymentCardAuthorization();\n$paymentCardAuthorizationForm->setWebsiteId('websiteId');\n$paymentCardAuthorizationForm->setCurrency('USD');\n$paymentCardAuthorizationForm->setGatewayAccountId('gatewayAccountId');\n\ntry {\n $paymentCard = $client->paymentCards()->authorize('paymentCardId', $paymentCardAuthorizationForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "websiteId", - "currency" - ], - "properties": { - "websiteId": { - "description": "The Website ID", - "type": "string" - }, - "currency": { - "description": "Currency (three letter code)", - "type": "string" - }, - "gatewayAccountId": { - "description": "The Gateway account ID", - "type": "string" - }, - "amount": { - "description": "Amount", - "type": "number", - "format": "double" - } - } - } - } - }, - "description": "Payment Card resource", - "required": true - } - } - }, - "/payment-cards/{id}/deactivation": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "post": { - "tags": [ - "Payment Cards" - ], - "summary": "Deactivate a Payment Card", - "description": "Deactivate a Payment Card\n", - "responses": { - "201": { - "description": "Authorization successful", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentCard" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$client->paymentCards()->deactivate('paymentCardId');\n" - } - ] - } - }, - "/payments": { - "get": { - "tags": [ - "Payments" - ], - "summary": "Retrieve a payment list", - "description": "Retrieve a payment list\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - }, - { - "name": "Accept", - "in": "header", - "description": "The response media type", - "schema": { - "type": "string", - "enum": [ - "application/json", - "text/csv" - ], - "default": "application/json" - } - } - ], - "responses": { - "200": { - "description": "Payment list was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Payment" - } - } - }, - "text/csv": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Payment" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$payments = $client->payments()->search([\n 'filter' => 'currency:USD',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Payments" - ], - "summary": "Create a payment", - "description": "Create a payment\n", - "responses": { - "201": { - "description": "Payment was processed", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Payment" - } - } - } - } - }, - "202": { - "description": "Payment was accepted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Payment" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "409": { - "$ref": "#/components/responses/Conflict" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$paymentForm = new Rebilly\\Entities\\Payment();\n\n$paymentForm->setWebsiteId('websiteId');\n$paymentForm->setCustomerId('customerId');\n$paymentForm->setCurrency('USD');\n$paymentForm->setAmount(1.99);\n\n$data = [\n 'method' => Rebilly\\Entities\\PaymentMethod::METHOD_CASH,\n];\n\n$paymentInstrumentForm = new Rebilly\\Entities\\PaymentMethodInstrument($data);\n\n$paymentForm->setPaymentInstrument($paymentInstrumentForm);\n\ntry {\n $payment = $client->payments()->create($paymentForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Payment" - } - } - }, - "/payments/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Payments" - ], - "summary": "Retrieve a payment", - "description": "Retrieve a payment with specified identifier string\n", - "responses": { - "200": { - "description": "Payment was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Payment" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$payment = $client->payments()->load('paymentId');\n" - } - ] - }, - "put": { - "tags": [ - "Payments" - ], - "summary": "Create a payment with predefined ID", - "description": "Make a payment with predefined identifier string\n", - "responses": { - "201": { - "description": "Payment was processed", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Payment" - } - } - } - } - }, - "202": { - "description": "Payment was accepted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Payment" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$paymentForm = new Rebilly\\Entities\\Payment();\n\n$paymentForm->setWebsiteId('websiteId');\n$paymentForm->setCustomerId('customerId');\n$paymentForm->setCurrency('USD');\n$paymentForm->setAmount(1.99);\n\n$data = [\n 'method' => Rebilly\\Entities\\PaymentMethod::METHOD_CASH,\n];\n\n$paymentInstrumentForm = new Rebilly\\Entities\\PaymentMethodInstrument($data);\n\n$paymentForm->setPaymentInstrument($paymentInstrumentForm);\n\ntry {\n $payment = $client->payments()->update('paymentId', $paymentForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Payment" - } - } - }, - "/paypal-accounts": { - "get": { - "tags": [ - "PayPal Accounts" - ], - "summary": "Retrieve a list of PayPal accounts", - "description": "Retrieve a list of PayPal Accounts\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of PayPal Accounts was retrieved successfully", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayPalAccount" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - } - }, - "post": { - "tags": [ - "PayPal Accounts" - ], - "summary": "Create a PayPal Account", - "description": "Create a PayPal Account\n", - "responses": { - "201": { - "description": "PayPal Account was created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayPalAccount" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayPalAccount" - } - } - }, - "description": "PayPalAccount resource", - "required": true - } - } - }, - "/paypal-accounts/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "PayPal Accounts" - ], - "summary": "Retrieve a PayPal Account", - "description": "Retrieve a PayPal Account with specified identifier string\n", - "responses": { - "200": { - "description": "PayPal Account was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayPalAccount" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - }, - "put": { - "tags": [ - "PayPal Accounts" - ], - "summary": "Create a PayPal account with predefined ID", - "responses": { - "201": { - "description": "PayPal Account was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayPalAccount" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "409": { - "description": "PayPal Account exist and cannot be updated", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayPalAccount" - } - } - }, - "description": "PayPal Account", - "required": true - } - } - }, - "/paypal-accounts/{id}/activation": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "post": { - "tags": [ - "PayPal Accounts" - ], - "summary": "Activate a PayPal Account", - "description": "Activate a PayPal Account\n", - "responses": { - "201": { - "description": "Activate successful", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayPalAccount" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "websiteId", - "currency" - ], - "properties": { - "websiteId": { - "description": "The Website ID", - "type": "string" - }, - "currency": { - "description": "Currency (three letter code)", - "type": "string" - }, - "amount": { - "description": "The amount to authorize", - "type": "number", - "format": "double", - "default": 1 - }, - "redirectURLs": { - "description": "Redirect URLs", - "type": "object" - }, - "gatewayAccountId": { - "description": "The Gateway Account ID which use to send transactions", - "type": "string" - } - } - } - } - }, - "description": "PayPal Account resource", - "required": true - } - } - }, - "/paypal-accounts/{id}/deactivation": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "post": { - "tags": [ - "PayPal Accounts" - ], - "summary": "Deactivate a PayPal Account", - "description": "Deactivate a PayPal Account\n", - "responses": { - "201": { - "description": "Deactivate successful", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayPalAccount" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - } - } - }, - "/plans": { - "get": { - "tags": [ - "Plans" - ], - "summary": "Retrieve a list of plans", - "description": "Retrieve a list of plans\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of Plans was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Plan" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$plans = $client->plans()->search([\n 'filter' => 'name:TestPlan',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Plans" - ], - "summary": "Create a plan", - "description": "Create a plan\n", - "responses": { - "201": { - "description": "Plan was created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Plan" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$planForm = new Rebilly\\Entities\\Plan();\n$planForm->setName('TestPlan');\n$planForm->setCurrency('USD');\n$planForm->setTrialAmount(1);\n$planForm->setTrialPeriodUnit('day');\n$planForm->setTrialPeriodLength(1);\n\ntry {\n $plan = $client->plans()->create($planForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Plan" - } - } - }, - "/plans/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Plans" - ], - "summary": "Retrieve a plan", - "description": "Retrieve a plan with specified identifier string\n", - "responses": { - "200": { - "description": "Plan was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Plan" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$plan = $client->plans()->load('planId');\n" - } - ] - }, - "put": { - "tags": [ - "Plans" - ], - "summary": "Create or update a Plan with predefined ID", - "description": "Create or update a Plan with predefined identifier string\n", - "responses": { - "200": { - "description": "Plan was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Plan" - } - } - } - }, - "201": { - "description": "Plan was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Plan" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$planForm = new Rebilly\\Entities\\Plan();\n$planForm->setName('TestPlan');\n$planForm->setCurrency('USD');\n$planForm->setTrialAmount(1);\n$planForm->setTrialPeriodUnit('day');\n$planForm->setTrialPeriodLength(1);\n\ntry {\n $plan = $client->plans()->update('planId', $planForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Plan" - } - }, - "delete": { - "tags": [ - "Plans" - ], - "summary": "Delete a Plan", - "description": "Delete a Plan with predefined identifier string\n", - "responses": { - "204": { - "description": "Plan was deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$client->plans()->delete('planId');\n" - } - ] - } - }, - "/previews/rule-actions/send-email": { - "post": { - "tags": [ - "Rules" - ], - "summary": "Send a test email", - "description": "Send a test email\n", - "security": [ - { - "RebAuth": [] - } - ], - "responses": { - "200": { - "description": "Test email was sent", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SendTestEmail" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SendTestEmail" - } - } - }, - "description": "Test email resource", - "required": true - } - } - }, - "/previews/rule-actions/trigger-webhook": { - "post": { - "tags": [ - "Rules" - ], - "summary": "Trigger a test webhook", - "description": "Trigger a test webhook\n", - "security": [ - { - "RebAuth": [] - } - ], - "responses": { - "200": { - "description": "Test webhook was triggered", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SendPreviewWebhook" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SendPreviewWebhook" - } - } - }, - "description": "Test webhook resource", - "required": true - } - } - }, - "/previews/webhooks": { - "post": { - "tags": [ - "Webhooks" - ], - "summary": "Trigger a test webhook", - "description": "Trigger a test webhook\n", - "responses": { - "204": { - "description": "Test webhook was triggered", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/GlobalWebhook" - } - } - }, - "/products": { - "get": { - "tags": [ - "Products" - ], - "summary": "Retrieve a list of products", - "description": "Retrieve a list of products\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of products was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - } - }, - "post": { - "tags": [ - "Products" - ], - "summary": "Create a Product", - "description": "Create a Product\n", - "responses": { - "201": { - "description": "Product was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/Product" - } - } - }, - "/products/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Products" - ], - "summary": "Retrieve a product", - "description": "Retrieve a product with specified identifier string\n", - "responses": { - "200": { - "description": "Product was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - }, - "put": { - "tags": [ - "Products" - ], - "summary": "Create a product with predefined ID", - "description": "Create a product with predefined identifier string\n", - "responses": { - "200": { - "description": "Product was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - } - }, - "201": { - "description": "Product was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/Product" - } - }, - "delete": { - "tags": [ - "Products" - ], - "summary": "Delete a product", - "description": "Delete a product with predefined identifier string\n", - "responses": { - "204": { - "description": "Product was deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/profile": { - "get": { - "tags": [ - "Profile" - ], - "summary": "Retrieve user's profile", - "description": "Retrieve user's profile\n", - "responses": { - "200": { - "description": "Profile was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Profile" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - }, - "put": { - "tags": [ - "Profile" - ], - "summary": "Update user's profile", - "description": "Update user's profile\n", - "responses": { - "200": { - "description": "Profile was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Profile" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Profile" - } - } - }, - "description": "Profile resource", - "required": true - } - } - }, - "/profile/password": { - "post": { - "tags": [ - "Profile" - ], - "summary": "Updates user's password with the specified newPassword", - "description": "Updates user's password with the specified newPassword. And checks if currentPassword matches the actual one.\n", - "responses": { - "201": { - "description": "Password updated successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Profile" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/UpdatePassword" - } - } - }, - "/profile/totp-reset": { - "post": { - "tags": [ - "Profile" - ], - "summary": "Reset (renew) totpSecret", - "description": "Reset (renew) totpSecret\n", - "responses": { - "201": { - "description": "totpSecret reset (renewed) successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Profile" - } - } - } - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/queue/custom-events": { - "get": { - "tags": [ - "Custom Events" - ], - "summary": "Retrieve a list of scheduled custom events", - "description": "Retrieve a list of scheduled custom events\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of scheduled custom events was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomEvent" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - } - } - }, - "/queue/custom-events/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Custom Events" - ], - "summary": "Retrieve a scheduled custom event", - "description": "Retrieve a scheduled custom event with predefined identifier string\n", - "responses": { - "200": { - "description": "Scheduled custom event was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomEvent" - } - } - } - }, - "303": { - "description": "Custom event was successfully processed and moved out from queue", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomEvent" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - }, - "delete": { - "tags": [ - "Custom Events" - ], - "summary": "Delete a scheduled custom event", - "description": "Delete a scheduled custom event with predefined identifier string\n", - "responses": { - "204": { - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "description": "Scheduled custom event was deleted" - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/queue/payments": { - "get": { - "tags": [ - "Payments" - ], - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "summary": "Retrieve a scheduled payment list", - "description": "Retrieve a scheduled payment list\n", - "responses": { - "200": { - "description": "Successful retrieve the payments list that still waiting to be processed", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Payment" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$payments = $client->payments()->searchInQueue([\n 'filter' => 'currency:USD',\n]);\n" - } - ] - } - }, - "/queue/payments/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Payments" - ], - "summary": "Retrieve a scheduled payment", - "description": "Retrieve a payment with specified identifier string\n", - "responses": { - "200": { - "description": "Successful retrieve the payment that still waiting to be processed", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Payment" - } - } - } - }, - "303": { - "description": "Payment was successfully processed and moved out from queue", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Payment" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$payment = $client->payments()->loadFromQueue('paymentId');\n" - } - ] - }, - "put": { - "tags": [ - "Payments" - ], - "summary": "Update pending payment", - "responses": { - "200": { - "description": "Payment was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Payment" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "description": "Payment is already handled and cannot be updated" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/Payment" - } - } - }, - "/sessions": { - "get": { - "tags": [ - "Sessions" - ], - "summary": "Retrieve a list of sessions", - "description": "Retrieve a list of sessions\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of Sessions was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Session" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$sessions = $client->sessions()->search([\n 'filter' => 'userId:testUserId',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Sessions" - ], - "summary": "Create a session", - "description": "Create a session\n", - "responses": { - "201": { - "description": "Session was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$sessionForm = new Rebilly\\Entities\\Session();\n\n$permissions = [\n // Example permission to use GET and POST methods only for certain Customers\n [\n 'resourceName' => Rebilly\\Entities\\ResourceType::TYPE_CUSTOMERS,\n 'methods' => [\n $sessionForm::METHOD_GET,\n $sessionForm::METHOD_POST,\n ],\n 'resourceIds' => [\n 'testCustomerId',\n 'testCustomerId2',\n ],\n ],\n // Example permission to use all methods for Websites resource\n [\n 'resourceName' => Rebilly\\Entities\\ResourceType::TYPE_WEBSITES,\n 'methods' => [\n $sessionForm::METHOD_GET,\n $sessionForm::METHOD_POST,\n $sessionForm::METHOD_PUT,\n $sessionForm::METHOD_HEAD,\n $sessionForm::METHOD_DELETE,\n ],\n ],\n // Example permission to use all methods for all resources\n [],\n];\n\n$sessionForm->setPermissions($permissions);\n\ntry {\n $session = $client->sessions()->create($sessionForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } - }, - "description": "Sessions resource", - "required": true - } - } - }, - "/sessions/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Sessions" - ], - "summary": "Retrieve a Session", - "description": "Retrieve a Session with specified identifier string\n", - "responses": { - "200": { - "description": "Session was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$session = $client->sessions()->load('sessionId');\n" - } - ] - }, - "put": { - "tags": [ - "Sessions" - ], - "summary": "Create or update a Session with predefined ID", - "description": "Create or update a Session with predefined identifier string\n", - "responses": { - "200": { - "description": "Session was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } - } - }, - "201": { - "description": "Session was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$sessionForm = new Rebilly\\Entities\\Session();\n\n$permissions = [\n [\n 'resourceName' => Rebilly\\Entities\\ResourceType::TYPE_CUSTOMERS,\n 'methods' => [\n $sessionForm::METHOD_GET,\n $sessionForm::METHOD_POST,\n ],\n 'resourceIds' => [\n 'testCustomerId',\n 'testCustomerId2',\n ],\n ],\n [\n 'resourceName' => Rebilly\\Entities\\ResourceType::TYPE_WEBSITES,\n 'methods' => [\n $sessionForm::METHOD_GET,\n $sessionForm::METHOD_POST,\n ],\n 'resourceIds' => [\n 'testWebsiteId',\n 'testWebsiteId2',\n ],\n ],\n];\n\n$sessionForm->setPermissions($permissions);\n\ntry {\n $session = $client->sessions()->update('sessionId', $sessionForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } - }, - "description": "Session resource", - "required": true - } - }, - "delete": { - "tags": [ - "Sessions" - ], - "summary": "Delete a Session", - "description": "Delete a Session with predefined identifier string\n", - "responses": { - "204": { - "description": "Session was deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "description": "Session has related resources and cannot be deleted" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "try {\n $client->sessions()->delete('sessionId');\n} catch (ServerException $e) {\n echo $e->getMessage();\n}\n" - } - ] - } - }, - "/shipping-zones": { - "get": { - "tags": [ - "Shipping Zones" - ], - "summary": "Retrieve a list of shipping zones", - "description": "Retrieve a list of shipping zones\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of shipping zones was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ShippingZone" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - } - }, - "post": { - "tags": [ - "Shipping Zones" - ], - "summary": "Create a Shipping Zone", - "description": "Create a Shipping Zone\n", - "responses": { - "201": { - "description": "Shipping Zone was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShippingZone" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShippingZone" - } - } - }, - "description": "Shipping Zone resource", - "required": true - } - } - }, - "/shipping-zones/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Shipping Zones" - ], - "summary": "Retrieve a shipping zone", - "description": "Retrieve a shipping zone with specified identifier string\n", - "responses": { - "200": { - "description": "Shipping zone was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShippingZone" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - }, - "put": { - "tags": [ - "Shipping Zones" - ], - "summary": "Create a shipping zone with predefined ID", - "description": "Create a shipping zone with predefined identifier string\n", - "responses": { - "200": { - "description": "Shipping zone was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShippingZone" - } - } - } - }, - "201": { - "description": "Shipping zone was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShippingZone" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShippingZone" - } - } - }, - "description": "Shipping zone resource", - "required": true - } - }, - "delete": { - "tags": [ - "Shipping Zones" - ], - "summary": "Delete a shipping zone", - "description": "Delete a shipping zone with predefined identifier string\n", - "responses": { - "204": { - "description": "Shipping zone was deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/signin": { - "post": { - "tags": [ - "Users", - "Sessions" - ], - "summary": "Create a session with email and password", - "description": "Create a session with email and password\n", - "security": [], - "responses": { - "201": { - "description": "Session was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$loginForm = new Rebilly\\Entities\\Login();\n$loginForm->setEmail('test@test.com');\n$loginForm->setPassword('1234');\n\ntry {\n $user = $client->users()->signin($loginForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Signin" - } - } - }, - "description": "Signin resource", - "required": true - } - } - }, - "/signup": { - "post": { - "tags": [ - "Users" - ], - "summary": "Creates a new user and sends an email confirmation", - "description": "Creates a new user and sends an email confirmation\n", - "responses": { - "201": { - "description": "User was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$signupForm = new Rebilly\\Entities\\Signup();\n$signupForm->setFirstName('John');\n$signupForm->setLastName('Doe');\n$signupForm->setEmail('johndoe@test.com');\n$signupForm->setBusinessPhone('+123456789');\n$signupForm->setPassword('1234');\n\ntry {\n $client->users()->signup($signupForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Signup" - } - } - }, - "description": "Signup resource", - "required": true - } - } - }, - "/status": { - "get": { - "tags": [ - "Status" - ], - "summary": "Retrieve API current status", - "description": "Retrieve API current status\n", - "security": [], - "responses": { - "200": { - "description": "Status was received", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Status" - } - } - } - } - } - } - }, - "/subscriptions": { - "get": { - "tags": [ - "Subscriptions" - ], - "summary": "Retrieve a list of subscriptions", - "description": "Retrieve a list of subscriptions\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - }, - { - "name": "Accept", - "in": "header", - "description": "The response media type", - "schema": { - "type": "string", - "enum": [ - "application/json", - "text/csv" - ], - "default": "application/json" - } - } - ], - "responses": { - "200": { - "description": "A list of subscriptions was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Subscription" - } - } - }, - "text/csv": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Subscription" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$subscriptions = $client->subscriptions()->search([\n 'filter' => 'customerId:testCustomerId',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Subscriptions" - ], - "summary": "Create a subscription", - "description": "Create a subscription\n", - "responses": { - "201": { - "description": "Subscription was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Subscription" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$subscriptionForm = new Rebilly\\Entities\\Subscription();\n$subscriptionForm->setCustomerId('customerId');\n$subscriptionForm->setWebsiteId('websiteId');\n$subscriptionForm->setPlanId('planId');\n\ntry {\n $subscription = $client->subscriptions()->create($subscriptionForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Subscription" - } - } - }, - "/subscriptions/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Subscriptions" - ], - "summary": "Retrieve a subscription", - "description": "Retrieve a subscription with specified identifier string\n", - "responses": { - "200": { - "description": "Subscription was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Subscription" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$subscription = $client->subscriptions()->load('subscriptionId');\n" - } - ] - }, - "put": { - "tags": [ - "Subscriptions" - ], - "summary": "Create or update a subscription with predefined ID", - "description": "Create or update a subscription with predefined identifier string\n", - "responses": { - "200": { - "description": "Subscription was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Subscription" - } - } - } - }, - "201": { - "description": "Subscription was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Subscription" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$subscriptionForm = new Rebilly\\Entities\\Subscription();\n$subscriptionForm->setCustomerId('customerId');\n$subscriptionForm->setWebsiteId('websiteId');\n$subscriptionForm->setPlanId('planId');\n\ntry {\n $subscription = $client->subscriptions()->update('subscriptionId', $subscriptionForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Subscription" - } - } - }, - "/subscriptions/{id}/cancel": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "post": { - "tags": [ - "Subscriptions" - ], - "summary": "Cancel a subscription", - "description": "Cancel a subscription\n", - "responses": { - "201": { - "description": "Subscription was switched", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Subscription" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$subscriptionCancelForm = new Rebilly\\Entities\\SubscriptionCancel();\n$subscriptionCancelForm->setPolicy($subscriptionCancelForm::NOW);\n\ntry {\n $subscription = $client->subscriptions()->cancel('subscriptionId', $subscriptionCancelForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubscriptionCancel" - } - } - }, - "description": "Only policy", - "required": true - } - } - }, - "/subscriptions/{id}/lead-source": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Subscriptions" - ], - "summary": "Retrieve a subscription's Lead Source", - "description": "Retrieve a Lead Source of given subscription\n", - "responses": { - "200": { - "description": "Lead Source was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LeadSource" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$subscription = $client->subscriptions()->load('subscriptionId');\n$leadSource = $subscription->getLeadSource();\n" - } - ] - }, - "put": { - "tags": [ - "Subscriptions" - ], - "summary": "Create a Lead Source for a Subscription", - "description": "Create a Lead Source for a Subscription\n", - "responses": { - "200": { - "description": "Lead Source was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LeadSource" - } - } - } - }, - "201": { - "description": "Lead Source was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LeadSource" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$leadSourceForm = new Rebilly\\Entities\\LeadSource();\n$leadSourceForm->setSource('TestSource');\n$leadSourceForm->setCampaign('TestCampaign');\n\ntry {\n $subscription = $client->subscriptions()->updateLeadSource('subscriptionId', $leadSourceForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/LeadSource" - } - }, - "delete": { - "tags": [ - "Subscriptions" - ], - "summary": "Delete a Lead Source for a Subscription", - "description": "Delete a Lead Source that belongs to a certain Subscription\n", - "responses": { - "204": { - "description": "Lead Source was deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "description": "Lead Source cannot be deleted" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$subscription = $client->subscriptions()->deleteLeadSource('subscriptionId');\n" - } - ] - } - }, - "/subscriptions/{id}/switch": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "post": { - "tags": [ - "Subscriptions" - ], - "summary": "Switch a subscription", - "description": "Switch a subscription\n", - "responses": { - "201": { - "description": "Subscription was switched", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Subscription" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$subscriptionSwitchForm = new Rebilly\\Entities\\SubscriptionSwitch();\n$subscriptionSwitchForm->setPlanId('newPlanId');\n$subscriptionSwitchForm->setPolicy($subscriptionSwitchForm::NOW);\n\ntry {\n $subscription = $client->subscriptions()->switchTo('subscriptionId', $subscriptionSwitchForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubscriptionSwitch" - } - } - }, - "description": "SubscriptionSwitch resource", - "required": true - } - } - }, - "/tax-categories": { - "get": { - "tags": [ - "Taxes" - ], - "summary": "Retrieve a list of tax categories", - "description": "Retrieve a list of tax categories\n", - "responses": { - "200": { - "description": "A list of tax categories was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaxCategory" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - } - } - }, - "/tokens": { - "get": { - "tags": [ - "Payment Tokens" - ], - "summary": "Retrieve a list of tokens", - "description": "Retrieve a list of tokens\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of tokens was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentToken" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$paymentCardTokens = $client->paymentCardTokens()->search([\n 'filter' => 'token:string',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Payment Tokens" - ], - "summary": "Create a payment token", - "description": "Create a token\n", - "security": [ - { - "RebAuth": [] - } - ], - "responses": { - "201": { - "description": "Token was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentToken" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$paymentCardTokenForm = new Rebilly\\Entities\\PaymentCardToken();\n$paymentCardTokenForm->setFirstName('John');\n$paymentCardTokenForm->setLastName('Doe');\n$paymentCardTokenForm->setAddress('1313 Main Street');\n$paymentCardTokenForm->setCity('Gotham');\n$paymentCardTokenForm->setPostalCode('12345');\n$paymentCardTokenForm->setRegion('NY');\n$paymentCardTokenForm->setCountry('US');\n\n$paymentInstrumentForm = new Entities\\PaymentInstruments\\PaymentCardPaymentInstrument();\n$paymentInstrumentForm->setPan('4111111111111111');\n$paymentInstrumentForm->setExpYear(2025);\n$paymentInstrumentForm->setExpMonth(8);\n$paymentInstrumentForm->setCvv(123);\n\n$paymentCardTokenForm->setPaymentInstrument($paymentInstrumentForm);\n\ntry {\n $paymentCardToken = $client->paymentCardTokens()->create($paymentCardTokenForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/PaymentToken" - } - } - }, - "/tokens/{token}": { - "parameters": [ - { - "name": "token", - "in": "path", - "description": "The token identifier string", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "tags": [ - "Payment Tokens" - ], - "summary": "Retrieve a token", - "description": "Retrieve a token with specified identifier string\n", - "security": [ - { - "RebAuth": [] - } - ], - "responses": { - "200": { - "description": "Token was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentToken" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$paymentCardToken = $client->paymentCardTokens()->load('tokenId');\n" - } - ] - } - }, - "/tokens/{token}/expiration": { - "parameters": [ - { - "name": "token", - "in": "path", - "description": "The token identifier string", - "required": true, - "schema": { - "type": "string" - } - } - ], - "post": { - "tags": [ - "Payment Tokens" - ], - "summary": "Expire a token", - "description": "Expire a token\n", - "responses": { - "201": { - "description": "Token expiration successful", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentToken" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "try {\n $paymentCardToken = $client->paymentCardTokens()->expire('tokenId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/PaymentToken" - } - } - }, - "/tracking/api": { - "get": { - "tags": [ - "Tracking" - ], - "summary": "Retrieve a list of tracking API logs", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - }, - { - "name": "Accept", - "in": "header", - "description": "The response media type", - "schema": { - "type": "string", - "enum": [ - "application/json", - "text/csv" - ], - "default": "application/json" - } - } - ], - "responses": { - "200": { - "description": "Tracking API logs was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApiTracking" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$apiTrackingLog = $client->apiTracking()->search([\n 'filter' => 'status:200',\n]);\n" - } - ] - } - }, - "/tracking/api/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Tracking" - ], - "summary": "Retrieve a tracking API log with specified identifier string", - "responses": { - "200": { - "description": "Tracking API log was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiTracking" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$apiTrackingLog = $client->apiTracking()->load('apiLogId');\n" - } - ] - } - }, - "/tracking/lists": { - "get": { - "tags": [ - "Tracking" - ], - "summary": "Retrieve Lists changes history", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "Lists changes history was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/List" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - } - } - }, - "/tracking/subscriptions": { - "get": { - "tags": [ - "Tracking" - ], - "summary": "Retrieve a list of tracking subscription logs", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "Tracking subscription logs was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SubscriptionTracking" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - } - } - }, - "/tracking/subscriptions/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Tracking" - ], - "summary": "Retrieve a tracking subscription log with specified identifier string", - "responses": { - "200": { - "description": "Tracking subscription log was retrieved successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubscriptionTracking" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/tracking/webhooks": { - "get": { - "tags": [ - "Tracking" - ], - "summary": "Retrieve a list of tracking webhook notifications", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - }, - { - "$ref": "#/components/parameters/collectionSort" - }, - { - "$ref": "#/components/parameters/collectionFilter" - }, - { - "$ref": "#/components/parameters/collectionCriteria" - } - ], - "responses": { - "200": { - "description": "Tracking webhook notifications was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WebhookTracking" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - } - } - }, - "/tracking/webhooks/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Tracking" - ], - "summary": "Retrieve a tracking webhook notification with specified identifier string", - "responses": { - "200": { - "description": "Tracking webhook notification was retrieved successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookTracking" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/tracking/website-webhooks": { - "get": { - "tags": [ - "Tracking" - ], - "summary": "Retrieve a list of tracking webhook notifications", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "Tracking webhook notifications was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WebsiteWebhookTracking" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - } - } - }, - "/tracking/website-webhooks/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Tracking" - ], - "summary": "Retrieve a tracking webhook notification with specified identifier string", - "responses": { - "200": { - "description": "Tracking webhook notification was retrieved successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebsiteWebhookTracking" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/transactions": { - "get": { - "tags": [ - "Transactions" - ], - "summary": "Retrieve a list of transactions", - "description": "Retrieve a list of transactions\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - }, - { - "$ref": "#/components/parameters/collectionFilter" - }, - { - "$ref": "#/components/parameters/collectionQuery" - }, - { - "$ref": "#/components/parameters/collectionCriteria" - }, - { - "$ref": "#/components/parameters/collectionSort" - }, - { - "name": "Accept", - "in": "header", - "description": "The response media type", - "schema": { - "type": "string", - "enum": [ - "application/json", - "text/csv" - ], - "default": "application/json" - } - } - ], - "responses": { - "200": { - "description": "A list of transactions was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transaction" - } - } - }, - "text/csv": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transaction" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$transactions = $client->transactions()->search([\n 'filter' => 'result:approved',\n]);\n" - } - ] - } - }, - "/transactions/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Transactions" - ], - "summary": "Retrieve a Transaction", - "description": "Retrieve a Transaction with specified identifier string\n", - "responses": { - "200": { - "description": "Transaction was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Transaction" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$transaction = $client->transactions()->load('transactionId');\n" - } - ] - } - }, - "/transactions/{id}/cancel": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "post": { - "tags": [ - "Transactions" - ], - "summary": "Cancel a pending or suspended transaction", - "description": "Cancel a scheduled transaction. Once handled a transaction cannot be canceled", - "responses": { - "201": { - "description": "Successful cancel the payment", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Transaction" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "try {\n $payment = $client->transactions()->cancel('transactionId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ] - } - }, - "/transactions/{id}/gateway-logs": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Transactions" - ], - "summary": "Retrieve a Transaction Gateway Logs", - "description": "Retrieve Gateway communication Logs for Transaction with specified identifier string", - "responses": { - "200": { - "description": "Logs were retrieved successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactionGatewayLog" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/transactions/{id}/lead-source": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Transactions" - ], - "summary": "Retrieve a transaction's Lead Source", - "description": "Retrieve a Lead Source of given transaction\n", - "responses": { - "200": { - "description": "Lead Source was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LeadSource" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$transaction = $client->transactions()->load('transactionId');\n$leadSource = $transaction->getLeadSource();\n" - } - ] - }, - "put": { - "tags": [ - "Transactions" - ], - "summary": "Create a Lead Source for a transaction", - "description": "Create a Lead Source for a transaction\n", - "responses": { - "200": { - "description": "Lead Source was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LeadSource" - } - } - } - }, - "201": { - "description": "Lead Source was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LeadSource" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$leadSourceForm = new Rebilly\\Entities\\LeadSource();\n$leadSourceForm->setSource('TestSource');\n$leadSourceForm->setCampaign('TestCampaign');\n\ntry {\n $transaction = $client->transactions()->updateLeadSource('transactionId', $leadSourceForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/LeadSource" - } - }, - "delete": { - "tags": [ - "Transactions" - ], - "summary": "Delete a Lead Source for a transaction", - "description": "Delete a Lead Source that belongs to a certain transaction\n", - "responses": { - "204": { - "description": "Lead Source was deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "description": "Lead Source cannot be deleted" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$payment = $client->transactions()->deleteLeadSource('transactionId');\n" - } - ] - } - }, - "/transactions/{id}/refund": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "post": { - "tags": [ - "Transactions" - ], - "summary": "Refund a Transaction", - "description": "Refund a Transaction with specified identifier string.\nNote that the refund will be in the same currency as the original transaction.\n", - "responses": { - "201": { - "description": "Transaction was refunded successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Transaction" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$transaction = $client->transactions()->refund('transactionId', 1.99);\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactionRefund" - } - } - }, - "description": "Transaction resource", - "required": true - } - } - }, - "/users": { - "get": { - "tags": [ - "Users" - ], - "summary": "Retrieve a list of users", - "description": "Retrieve a list of users\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of users was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/User" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$users = $client->users()->search([\n 'filter' => 'firstName:John',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Users" - ], - "summary": "Create an user", - "description": "Create an user\n", - "responses": { - "201": { - "description": "User was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$userForm = new Rebilly\\Entities\\User();\n$userForm->setFirstName('John');\n$userForm->setLastName('Doe');\n$userForm->setEmail('johndoe@test.com');\n\ntry {\n $user = $client->users()->create($userForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/User" - } - } - }, - "/users/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Users" - ], - "summary": "Retrieve user", - "description": "Retrieve user with specified identifier string\n", - "responses": { - "200": { - "description": "User was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$user = $client->users()->load('userId');\n" - } - ] - }, - "put": { - "tags": [ - "Users" - ], - "summary": "Create or update user with predefined ID", - "description": "Create or update user with predefined identifier string\n", - "responses": { - "200": { - "description": "User was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "201": { - "description": "User was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$userForm = new Rebilly\\Entities\\User();\n$userForm->setFirstName('John');\n$userForm->setLastName('Doe');\n$userForm->setEmail('johndoe@test.com');\n\ntry {\n $user = $client->users()->update('userId', $userForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/User" - } - }, - "delete": { - "tags": [ - "Users" - ], - "summary": "Delete user", - "description": "Delete user with predefined identifier string\n", - "responses": { - "204": { - "description": "User was deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "$ref": "#/components/responses/Conflict" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "try {\n $client->users()->delete('userId');\n} catch (ServerException $e) {\n echo $e->getMessage();\n}\n" - } - ] - } - }, - "/users/{id}/password": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "post": { - "tags": [ - "Users" - ], - "summary": "Updates user's password with the specified newPassword", - "description": "Updates user's password with the specified newPassword. And checks if currentPassword matches the actual one.\n", - "responses": { - "201": { - "description": "Password updated successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "$ref": "#/components/responses/InvalidDataError" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$updatePasswordForm = new Rebilly\\Entities\\UpdatePassword();\n$updatePasswordForm->setCurrentPassword('1234');\n$updatePasswordForm->setNewPassword('5678');\n\ntry {\n $user = $client->users()->updatePassword('userId', $updatePasswordForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/UpdatePassword" - } - } - }, - "/users/{id}/totp-reset": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "post": { - "tags": [ - "Users" - ], - "summary": "Reset (renew) totpSecret", - "description": "Reset (renew) totpSecret\n", - "responses": { - "201": { - "description": "totpSecret reset (renewed) successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$user = $client->users()->resetTotp('userId');\n" - } - ] - } - }, - "/users/reset-password/{token}": { - "parameters": [ - { - "name": "token", - "in": "path", - "description": "The token string", - "required": true, - "schema": { - "type": "string" - } - } - ], - "post": { - "tags": [ - "Users" - ], - "summary": "Reset user password", - "description": "Reset user password\n", - "responses": { - "201": { - "description": "Password was reset successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$resetPasswordForm = new Rebilly\\Entities\\ResetPassword();\n$resetPasswordForm->setNewPassword('1234');\n\ntry {\n $user = $client->users()->resetPassword('userId', 'token', $resetPasswordForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResetPassword" - } - } - }, - "description": "ResetPassword resource", - "required": true - } - } - }, - "/webhooks": { - "get": { - "tags": [ - "Webhooks" - ], - "summary": "Retrieve a list of webhooks", - "description": "Retrieve a list of webhooks\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - } - ], - "responses": { - "200": { - "description": "A list of Webhooks was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GlobalWebhook" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - } - }, - "post": { - "tags": [ - "Webhooks" - ], - "summary": "Create a webhook", - "description": "Create a webhook\n", - "responses": { - "201": { - "description": "Webhook was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GlobalWebhook" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/GlobalWebhook" - } - } - }, - "/webhooks/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Webhooks" - ], - "summary": "Retrieve a webhook", - "description": "Retrieve a webhook with specified identifier string\n", - "responses": { - "200": { - "description": "Webhook was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GlobalWebhook" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - }, - "put": { - "tags": [ - "Webhooks" - ], - "summary": "Create or update a webhook with predefined ID", - "description": "Create or update a webhook with predefined identifier string\n", - "responses": { - "200": { - "description": "Webhook was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GlobalWebhook" - } - } - } - }, - "201": { - "description": "Webhook was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GlobalWebhook" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/GlobalWebhook" - } - } - }, - "/websites": { - "get": { - "tags": [ - "Websites" - ], - "summary": "Retrieve a list of websites", - "description": "Retrieve a list of websites\n", - "parameters": [ - { - "$ref": "#/components/parameters/collectionLimit" - }, - { - "$ref": "#/components/parameters/collectionOffset" - }, - { - "name": "Accept", - "in": "header", - "description": "The response media type", - "schema": { - "type": "string", - "enum": [ - "application/json", - "text/csv" - ], - "default": "application/json" - } - } - ], - "responses": { - "200": { - "description": "A list of Websites was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - }, - "Pagination-Total": { - "description": "Total items count", - "schema": { - "type": "integer" - } - }, - "Pagination-Limit": { - "description": "Items per page limit", - "schema": { - "type": "integer" - } - }, - "Pagination-Offset": { - "description": "Pagination offset", - "schema": { - "type": "integer" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Website" - } - } - }, - "text/csv": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Website" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$websites = $client->websites()->search([\n 'filter' => 'name:TestWebsite',\n]);\n" - } - ] - }, - "post": { - "tags": [ - "Websites" - ], - "summary": "Create a website", - "description": "Create a website\n", - "responses": { - "201": { - "description": "Website was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Website" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$websiteForm = new Rebilly\\Entities\\Website();\n$websiteForm->setName('TestWebsite');\n$websiteForm->setUrl('http://testwebsite.com');\n$websiteForm->setServicePhone('+0123456789');\n$websiteForm->setServiceEmail('test@testwebsite.com');\n\ntry {\n $website = $client->websites()->create($websiteForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Website" - } - } - }, - "/websites/{id}": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Websites" - ], - "summary": "Retrieve a website", - "description": "Retrieve a website with specified identifier string\n", - "responses": { - "200": { - "description": "Website was retrieved successfully", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Website" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$website = $client->websites()->load('websiteId');\n" - } - ] - }, - "put": { - "tags": [ - "Websites" - ], - "summary": "Create or update a website with predefined ID", - "description": "Create or update a website with predefined identifier string\n", - "responses": { - "200": { - "description": "Website was updated", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Website" - } - } - } - }, - "201": { - "description": "Website was created", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Website" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$websiteForm = new Rebilly\\Entities\\Website();\n$websiteForm->setName('TestWebsite');\n$websiteForm->setUrl('http://testwebsite.com');\n$websiteForm->setServicePhone('+0123456789');\n$websiteForm->setServiceEmail('test@testwebsite.com');\n\ntry {\n $website = $client->websites()->update('websiteId', $websiteForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/Website" - } - }, - "delete": { - "tags": [ - "Websites" - ], - "summary": "Delete a website", - "description": "Delete a website with predefined identifier string\n", - "responses": { - "204": { - "description": "Website was deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "description": "Website has related resources and cannot be deleted" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "try {\n $client->websites()->delete('websiteId');\n} catch (ServerException $e) {\n echo $e->getMessage();\n}\n" - } - ] - } - }, - "/websites/{id}/webhook": { - "parameters": [ - { - "$ref": "#/components/parameters/resourceId" - } - ], - "get": { - "tags": [ - "Websites" - ], - "summary": "Retrieve a webhook for website", - "description": "Retrieve a webhook for website with specified identifier string\n", - "responses": { - "200": { - "description": "Webhook was retrieved successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebsiteWebhook" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$websiteWebhook = $client->websiteWebhook()->load('websiteId');\n" - } - ] - }, - "put": { - "tags": [ - "Websites" - ], - "summary": "Create or update a webhook for website with predefined ID", - "description": "Create or update a webhook for website with predefined identifier string\n", - "responses": { - "200": { - "description": "Webhook was updated", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebsiteWebhook" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$websiteWebhookForm = new Rebilly\\Entities\\WebsiteWebhook();\n$websiteWebhookForm->setWebHookUrl('http://testwebsite.com/webhook');\n$websiteWebhookForm->setWebHookUsername('test');\n$websiteWebhookForm->setWebHookPassword('1234');\n\ntry {\n $website = $client->websiteWebhook()->update('websiteId', $websiteWebhookForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebsiteWebhook" - } - } - }, - "description": "Webhook resource", - "required": true - } - }, - "delete": { - "tags": [ - "Websites" - ], - "summary": "Delete a webhook", - "description": "Delete a webhook that belongs to a website with predefined ID\n", - "responses": { - "204": { - "description": "Webhook was deleted", - "headers": { - "Rate-Limit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer" - } - }, - "Rate-Limit-Reset": { - "description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/AccessForbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-code-samples": [ - { - "lang": "PHP", - "source": "$client->websiteWebhook()->delete('websiteId');\n" - } - ] - } - } - }, - "components": { - "schemas": { - "ApiKey": { - "type": "object", - "description": "API secret Key.", - "properties": { - "id": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "description": { - "description": "API key description", - "type": "string" - }, - "datetimeFormat": { - "description": "Date time format", - "type": "string", - "default": "iso8601", - "enum": [ - "mysql", - "iso8601" - ] - }, - "apiUser": { - "description": "API user name", - "type": "string", - "readOnly": true - }, - "secretKey": { - "description": "API secret key's value", - "type": "string", - "readOnly": true - }, - "createdTime": { - "description": "The API key created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "Attachment": { - "type": "object", - "required": [ - "fileId", - "relatedId", - "relatedType" - ], - "properties": { - "id": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "fileId": { - "description": "Linked File object id", - "type": "string" - }, - "relatedType": { - "description": "Linked object type", - "type": "string", - "enum": [ - "customer", - "dispute", - "invoice", - "note", - "payment", - "plan", - "product", - "subscription", - "transaction" - ] - }, - "relatedId": { - "description": "Linked object Id", - "type": "string" - }, - "name": { - "description": "The Original Attachment name", - "type": "string" - }, - "description": { - "description": "The Attachment description", - "type": "string" - }, - "createdTime": { - "description": "Creation date/time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "Latest update date/time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 3, - "maxItems": 3, - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SelfLink" - }, - { - "$ref": "#/components/schemas/FileLink" - }, - { - "$ref": "#/components/schemas/AttachmentResourceLink" - } - ] - } - } - } - }, - "AuthenticationOptions": { - "type": "object", - "properties": { - "passwordPattern": { - "description": "Allowed password pattern", - "type": "string" - }, - "credentialTtl": { - "description": "The default lifetime of the credential in seconds", - "type": "integer" - }, - "authTokenTtl": { - "description": "The default lifetime of the auth-token in seconds", - "type": "integer" - }, - "resetTokenTtl": { - "description": "The default lifetime of the reset-token in seconds", - "type": "integer" - } - } - }, - "AuthenticationToken": { - "type": "object", - "required": [ - "username", - "password" - ], - "properties": { - "token": { - "description": "The token identifier string", - "type": "string", - "readOnly": true - }, - "username": { - "description": "The token's username", - "type": "string" - }, - "password": { - "description": "The token's password (write-only)", - "type": "string", - "format": "password" - }, - "credentialId": { - "description": "The credential's ID", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "customerId": { - "description": "The token's customer ID", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "expiredTime": { - "description": "Token's expired time", - "type": "string", - "format": "date-time" - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "BankAccount": { - "type": "object", - "properties": { - "id": { - "description": "The bank account identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "customerId": { - "description": "The Customer's ID.", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "bankName": { - "description": "Bank's name.", - "type": "string" - }, - "routingNumber": { - "description": "Bank's Routing Number. Required if bank account is not created from Token. This field is write-only", - "type": "string" - }, - "accountNumber": { - "description": "Bank's Account Number. Required if bank account is not created from Token. This field is write-only", - "type": "string" - }, - "accountType": { - "description": "Banks's Account type. Required if bank account is not created from Token", - "type": "string" - }, - "token": { - "description": "Bank Account Token. Use without any other fields", - "type": "string" - }, - "address": { - "description": "The Address. Required if bank account is not created from Token", - "allOf": [ - { - "$ref": "#/components/schemas/ContactObject" - } - ] - }, - "status": { - "description": "Bank Account status", - "type": "string", - "enum": [ - "active", - "deactivated" - ] - }, - "createdTime": { - "description": "Bank Account created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "Bank Account updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "customFields": { - "$ref": "#/components/schemas/ResourceCustomFields" - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 3, - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SelfLink" - }, - { - "$ref": "#/components/schemas/CustomerLink" - }, - { - "$ref": "#/components/schemas/ContactLink" - } - ] - } - } - } - }, - "Blacklist": { - "type": "object", - "required": [ - "type", - "value" - ], - "properties": { - "id": { - "description": "The blacklist identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "type": { - "description": "The blacklist type", - "type": "string", - "enum": [ - "payment-card-id", - "customer-id", - "email", - "ip-address", - "country", - "fingerprint", - "bin" - ] - }, - "value": { - "description": "The blacklist value", - "type": "string" - }, - "expiredTime": { - "description": "The blacklist expired time", - "type": "string", - "format": "date-time" - }, - "createdTime": { - "description": "The blacklist created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "The blacklist updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "CheckoutPage": { - "type": "object", - "required": [ - "name", - "planId", - "websiteId", - "uriPath" - ], - "properties": { - "id": { - "description": "Checkout page identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "planId": { - "description": "Checkout page plan ID", - "type": "string", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "websiteId": { - "description": "Checkout page website ID", - "type": "string", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "uriPath": { - "description": "Your own custom uri path for this Checkout Page. It will be appended to checkout url https://checkout.rebilly.com/website/", - "type": "string" - }, - "name": { - "description": "Checkout page name", - "type": "string" - }, - "isActive": { - "description": "If checkout page active", - "type": "boolean" - }, - "redirectUrl": { - "description": "Checkout page url", - "type": "string" - }, - "redirectTimeout": { - "description": "Checkout page redirect timeout", - "type": "integer" - }, - "allowCustomCustomerId": { - "description": "If to enable your own customer ID in requests", - "type": "boolean" - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "none": { - "allOf": [ - { - "$ref": "#/components/schemas/AmountAdjustment" - }, - { - "$ref": "#/components/schemas/SmtpAuthorization" - }, - { - "$ref": "#/components/schemas/WebhookAuthorization" - } - ] - }, - "Contact": { - "type": "object", - "properties": { - "id": { - "description": "The contact identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "customerId": { - "description": "The contact customer ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "firstName": { - "description": "The contact first name", - "type": "string" - }, - "lastName": { - "description": "The contact last name", - "type": "string" - }, - "organization": { - "description": "The contact organization", - "type": "string" - }, - "address": { - "description": "The contact street address", - "type": "string", - "maxLength": 60 - }, - "address2": { - "description": "The contact street address (second line)", - "type": "string", - "maxLength": 60 - }, - "city": { - "description": "The contact city", - "type": "string", - "maxLength": 45 - }, - "region": { - "description": "The contact region (state)", - "type": "string", - "maxLength": 45 - }, - "country": { - "description": "The contact country ISO Alpha-2 code", - "type": "string", - "pattern": "^[A-Z]{2}$" - }, - "postalCode": { - "description": "The contact postal code", - "type": "string", - "maxLength": 10 - }, - "phoneNumbers": { - "$ref": "#/components/schemas/ContactPhoneNumbers" - }, - "emails": { - "$ref": "#/components/schemas/ContactEmails" - }, - "isOutdated": { - "description": "Is contact outdated", - "type": "boolean", - "readOnly": true - }, - "createdTime": { - "description": "The contact created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "The contact updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "customFields": { - "$ref": "#/components/schemas/ResourceCustomFields" - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 2, - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SelfLink" - }, - { - "$ref": "#/components/schemas/CustomerLink" - } - ] - } - } - } - }, - "ContactEmails": { - "description": "The contact emails", - "type": "array", - "items": { - "type": "object", - "required": [ - "label", - "value" - ], - "properties": { - "label": { - "description": "The email label", - "type": "string" - }, - "value": { - "description": "The email value", - "type": "string" - }, - "primary": { - "description": "True if email is primary", - "type": "boolean" - } - } - } - }, - "ContactObject": { - "type": "object", - "properties": { - "firstName": { - "description": "The contact first name", - "type": "string" - }, - "lastName": { - "description": "The contact last name", - "type": "string" - }, - "organization": { - "description": "The contact organization", - "type": "string" - }, - "address": { - "description": "The contact street address", - "type": "string", - "maxLength": 60 - }, - "address2": { - "description": "The contact street address (second line)", - "type": "string", - "maxLength": 60 - }, - "city": { - "description": "The contact city", - "type": "string", - "maxLength": 45 - }, - "region": { - "description": "The contact region (state)", - "type": "string", - "maxLength": 45 - }, - "country": { - "description": "The contact country ISO Alpha-2 code", - "type": "string", - "pattern": "^[A-Z]{2}$" - }, - "postalCode": { - "description": "The contact postal code", - "type": "string", - "maxLength": 10 - }, - "phoneNumbers": { - "$ref": "#/components/schemas/ContactPhoneNumbers" - }, - "emails": { - "$ref": "#/components/schemas/ContactEmails" - } - } - }, - "ContactPhoneNumbers": { - "description": "The contact phone numbers", - "type": "array", - "items": { - "type": "object", - "required": [ - "label", - "value" - ], - "properties": { - "label": { - "description": "The phone label", - "type": "string" - }, - "value": { - "description": "The phone value", - "type": "string" - }, - "primary": { - "description": "True if phone is primary", - "type": "boolean" - } - } - } - }, - "Coupon": { - "type": "object", - "description": "Coupons and Discounts", - "required": [ - "discount", - "issuedTime" - ], - "properties": { - "redemptionCode": { - "description": "Coupon's redemption code", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "discount": { - "$ref": "#/components/schemas/Discount" - }, - "restrictions": { - "description": "Coupon restrictions", - "type": "array", - "items": { - "$ref": "#/components/schemas/CouponRestriction" - } - }, - "redemptionsCount": { - "type": "integer", - "description": "Coupon's redemptions count", - "minimum": 0, - "readOnly": true - }, - "status": { - "type": "string", - "description": "If coupon enabled", - "readOnly": true, - "enum": [ - "issued", - "expired" - ] - }, - "description": { - "type": "string", - "description": "Your coupon description. When it is not empty this is used for invoice discount item description,\notherwise the item's description uses coupon's redemptionCode like 'Coupon \"redemptionCode\"'\n" - }, - "issuedTime": { - "description": "Coupon's issued time (start time)", - "type": "string", - "format": "date-time" - }, - "expiredTime": { - "description": "Coupon's expire time (end time)", - "type": "string", - "format": "date-time" - }, - "createdTime": { - "description": "Coupon created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "Coupon updated time.", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "CouponExpiration": { - "type": "object", - "required": [ - "expiredTime" - ], - "properties": { - "expiredTime": { - "description": "The coupon's expiry time, must be greater than the issued time. Null or empty string will immediately expire the coupon.", - "type": "string", - "format": "date-time" - } - } - }, - "CouponRedemption": { - "type": "object", - "description": "Coupons redemption log", - "properties": { - "id": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "redemptionCode": { - "description": "Coupon's redemption code", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "customerId": { - "description": "Customer's ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "additionalRestrictions": { - "description": "Additional restrictions for coupon's redemptions", - "type": "array", - "items": { - "$ref": "#/components/schemas/RedemptionRestriction" - } - }, - "redeemedTime": { - "description": "Coupon redeem time", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "canceledTime": { - "description": "Coupon redemption canceled time", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "CouponRestriction": { - "description": "Coupon restrictions", - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/GenericRestriction" - }, - { - "type": "object", - "properties": { - "type": { - "description": "Coupon's restriction type", - "type": "string", - "enum": [ - "discounts-per-redemption", - "redemptions-per-customer", - "restrict-to-invoices", - "restrict-to-plans", - "restrict-to-subscriptions", - "minimum-order-amount", - "total-redemptions" - ] - } - } - } - ] - }, - "Discount": { - "type": "object", - "discriminator": { - "propertyName": "type" - }, - "properties": { - "type": { - "description": "Discount type", - "type": "string", - "enum": [ - "fixed", - "percent" - ] - } - } - }, - "discounts-per-redemption": { - "description": "discounts-per-redemption restrictions", - "allOf": [ - { - "$ref": "#/components/schemas/GenericRestriction" - }, - { - "type": "object", - "required": [ - "quantity" - ], - "properties": { - "quantity": { - "type": "integer", - "description": "Restriction quantity" - } - } - } - ] - }, - "fixed": { - "description": "Coupon fixed amount discount", - "allOf": [ - { - "$ref": "#/components/schemas/Discount" - }, - { - "type": "object", - "required": [ - "amount", - "currency" - ], - "properties": { - "amount": { - "description": "Discount amount", - "type": "number", - "format": "double" - }, - "currency": { - "description": "Discount currency", - "type": "string" - } - } - } - ] - }, - "GenericRestriction": { - "description": "All restriction", - "type": "object", - "discriminator": { - "propertyName": "type" - }, - "properties": { - "type": { - "description": "Restriction type", - "type": "string" - } - } - }, - "InvoiceDiscount": { - "type": "object", - "readOnly": true, - "properties": { - "redemptionCode": { - "description": "Coupon's redemption code", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "redemptionId": { - "description": "Redemption ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "amount": { - "description": "Total amount that was discounted by this Coupon", - "type": "number", - "format": "double" - }, - "description": { - "type": "string", - "description": "Discount description" - } - } - }, - "minimum-order-amount": { - "description": "minimum-order-amount restrictions", - "allOf": [ - { - "$ref": "#/components/schemas/GenericRestriction" - }, - { - "type": "object", - "required": [ - "amount", - "currency" - ], - "properties": { - "amount": { - "type": "integer", - "description": "Minimum order quantity" - }, - "currency": { - "type": "string", - "description": "Minimum order currency" - } - } - } - ] - }, - "percent": { - "description": "Coupon percent discount", - "allOf": [ - { - "$ref": "#/components/schemas/Discount" - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "description": "Discount percent", - "type": "number", - "format": "double" - } - } - } - ] - }, - "RedemptionRestriction": { - "description": "Redemption restrictions", - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/GenericRestriction" - }, - { - "type": "object", - "properties": { - "type": { - "description": "Redemption's additional restriction type", - "type": "string", - "enum": [ - "discounts-per-redemption", - "restrict-to-invoices", - "restrict-to-plans", - "restrict-to-subscriptions", - "minimum-order-amount" - ] - } - } - } - ] - }, - "redemptions-per-customer": { - "description": "Quantity per Customer restrictions", - "allOf": [ - { - "$ref": "#/components/schemas/GenericRestriction" - }, - { - "type": "object", - "required": [ - "quantity" - ], - "properties": { - "quantity": { - "type": "integer", - "description": "Restriction value" - } - } - } - ] - }, - "restrict-to-invoices": { - "description": "restrict-to-invoices restrictions", - "allOf": [ - { - "$ref": "#/components/schemas/GenericRestriction" - }, - { - "type": "object", - "required": [ - "invoiceIds" - ], - "properties": { - "invoiceIds": { - "type": "array", - "description": "Invoice IDs coupon can be applied to", - "items": { - "type": "string" - } - } - } - } - ] - }, - "restrict-to-plans": { - "description": "restrict-to-plans restrictions", - "allOf": [ - { - "$ref": "#/components/schemas/GenericRestriction" - }, - { - "type": "object", - "required": [ - "planIds" - ], - "properties": { - "planIds": { - "type": "array", - "description": "Plan IDs coupon can be applied to", - "items": { - "type": "string" - } - } - } - } - ] - }, - "restrict-to-subscriptions": { - "description": "restrict-to-subscriptions restrictions", - "allOf": [ - { - "$ref": "#/components/schemas/GenericRestriction" - }, - { - "type": "object", - "required": [ - "subscriptionIds" - ], - "properties": { - "subscriptionIds": { - "type": "array", - "description": "Subscription IDs coupon can be applied to", - "items": { - "type": "string" - } - } - } - } - ] - }, - "total-redemptions": { - "description": "total-redemptions restrictions", - "allOf": [ - { - "$ref": "#/components/schemas/GenericRestriction" - }, - { - "type": "object", - "required": [ - "quantity" - ], - "properties": { - "quantity": { - "type": "integer", - "description": "Total redemptions quantity" - } - } - } - ] - }, - "Credential": { - "type": "object", - "required": [ - "username", - "password", - "customerId" - ], - "properties": { - "id": { - "description": "The credential identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "username": { - "description": "Credential's username", - "type": "string" - }, - "password": { - "description": "The credential's password", - "type": "string", - "format": "password" - }, - "customerId": { - "description": "The credential's customer ID", - "type": "string" - }, - "expiredTime": { - "description": "The credential's expired time", - "type": "string", - "format": "date-time" - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 2, - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SelfLink" - }, - { - "$ref": "#/components/schemas/CustomerLink" - } - ] - } - } - } - }, - "Condition": { - "type": "object", - "discriminator": { - "propertyName": "op" - }, - "properties": { - "op": { - "type": "string", - "description": "The condition operation", - "enum": [ - "and", - "or", - "not", - "between", - "equals", - "in", - "gt", - "gte", - "lt", - "lte" - ] - } - }, - "required": [ - "op" - ] - }, - "and": { - "type": "object", - "description": "Logical AND", - "allOf": [ - { - "$ref": "#/components/schemas/Condition" - }, - { - "$ref": "#/components/schemas/logical" - } - ] - }, - "between": { - "type": "object", - "description": "Between condition", - "allOf": [ - { - "$ref": "#/components/schemas/Condition" - }, - { - "type": "object", - "properties": { - "path": { - "type": "string" - }, - "min": { - "type": "string" - }, - "max": { - "type": "string" - } - }, - "required": [ - "path", - "min", - "max" - ] - } - ] - }, - "compare": { - "type": "object", - "properties": { - "path": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": [ - "path", - "value" - ] - }, - "equals": { - "type": "object", - "description": "Equals condition", - "allOf": [ - { - "$ref": "#/components/schemas/Condition" - }, - { - "$ref": "#/components/schemas/compare" - } - ] - }, - "gt": { - "type": "object", - "description": "Greater than condition", - "allOf": [ - { - "$ref": "#/components/schemas/Condition" - }, - { - "$ref": "#/components/schemas/compare" - } - ] - }, - "gte": { - "type": "object", - "description": "Greater than or equals condition", - "allOf": [ - { - "$ref": "#/components/schemas/Condition" - }, - { - "$ref": "#/components/schemas/compare" - } - ] - }, - "in": { - "type": "object", - "description": "In condition", - "allOf": [ - { - "$ref": "#/components/schemas/Condition" - }, - { - "type": "object", - "properties": { - "path": { - "type": "string" - }, - "values": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "path", - "values" - ] - } - ] - }, - "logical-not": { - "type": "object", - "properties": { - "condition": { - "$ref": "#/components/schemas/Condition" - } - }, - "required": [ - "condition" - ], - "example": { - "operation": "not", - "condition": { - "operation": "equals", - "path": "/name", - "value": "John Dou" - } - } - }, - "logical": { - "type": "object", - "properties": { - "conditions": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "#/components/schemas/Condition" - } - } - }, - "required": [ - "conditions" - ] - }, - "lt": { - "type": "object", - "description": "Less than condition", - "allOf": [ - { - "$ref": "#/components/schemas/Condition" - }, - { - "$ref": "#/components/schemas/compare" - } - ] - }, - "lte": { - "type": "object", - "description": "Less than or equals condition", - "allOf": [ - { - "$ref": "#/components/schemas/Condition" - }, - { - "$ref": "#/components/schemas/compare" - } - ] - }, - "not": { - "type": "object", - "description": "Logical NOT", - "allOf": [ - { - "$ref": "#/components/schemas/Condition" - }, - { - "$ref": "#/components/schemas/logical-not" - } - ] - }, - "or": { - "type": "object", - "description": "Logical OR", - "allOf": [ - { - "$ref": "#/components/schemas/Condition" - }, - { - "$ref": "#/components/schemas/logical" - } - ] - }, - "Customer": { - "type": "object", - "properties": { - "id": { - "description": "The customer identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "defaultPaymentInstrument": { - "$ref": "#/components/schemas/PaymentInstrument" - }, - "createdTime": { - "description": "The customer created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "The customer updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "customFields": { - "$ref": "#/components/schemas/ResourceCustomFields" - }, - "primaryAddress": { - "$ref": "#/components/schemas/ContactObject" - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 3, - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SelfLink" - }, - { - "$ref": "#/components/schemas/NotesLink" - }, - { - "$ref": "#/components/schemas/DefaultPaymentInstrumentLink" - }, - { - "$ref": "#/components/schemas/LeadSourceLink" - } - ] - } - } - } - }, - "CustomEvent": { - "type": "object", - "properties": { - "id": { - "description": "The custom event identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "eventType": { - "type": "string", - "description": "The system event type", - "enum": [ - "subscription-ended", - "subscription-trial-ended", - "subscription-renewed", - "payment-card-expired", - "invoice-past-due", - "invoice-issued", - "invoice-voided", - "invoice-paid", - "invoice-abandoned" - ] - }, - "title": { - "type": "string", - "description": "The custom event title" - }, - "description": { - "type": "string", - "description": "The custom event description" - }, - "chronology": { - "type": "string", - "description": "The emitting time of the custom event relatively to the system event", - "enum": [ - "before", - "after" - ] - }, - "scheduleInstruction": { - "$ref": "#/components/schemas/CustomEventScheduleInstruction" - }, - "createdTime": { - "$ref": "#/components/schemas/ServerTimestamp" - }, - "rulesCount": { - "type": "integer", - "readOnly": true - } - }, - "required": [ - "eventType", - "title", - "chronology", - "scheduleInstruction" - ] - }, - "CustomField": { - "description": "A separate Custom Field schema", - "type": "object", - "required": [ - "name", - "type" - ], - "properties": { - "name": { - "description": "The name of the custom field", - "type": "string" - }, - "type": { - "description": "Type value | Description\n------------- | -------------\narray | An array of strings up to 255 characters, maximum size is 1000 elements\nboolean | true or false\ndate | String of format \"full-date\" (YYYY-MM-DD) from RFC-3339 (full-date)\ndatetime | String of format \"date-time\" (YYYY-MM-DDTHH:MM:SSZ) from RFC-3339 (date-time)\ninteger | Cardinal value of -2^31..2^31-1\nnumber | Float value. It can take cardinal values also which are interpreted as float\nstring | Regular string up to 255 characters\nmonetary | A map of 3-letters currency code and amount, e.g. {\"currency\": \"EUR\", \"amount\": 25.30}\n", - "type": "string", - "enum": [ - "array", - "boolean", - "datetime", - "integer", - "number", - "string", - "monetary" - ] - }, - "description": { - "description": "The custom field description", - "type": "string" - }, - "isUsed": { - "description": "A flag to represent that the custom field is used on a record of the resource.", - "type": "boolean" - }, - "additionalSchema": { - "description": "Additional parameters which can be added according to type:\nParameter Name | Types | Description\n-------------- | ------------- | -------------\nallowedValues | string, array | List of allowed values\n" - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "Dispute": { - "type": "object", - "required": [ - "currency", - "transactionId", - "postedTime", - "type", - "status", - "reasonCode" - ], - "properties": { - "id": { - "description": "The dispute identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "customerId": { - "description": "The dispute's customer ID", - "type": "string", - "readOnly": true - }, - "transactionId": { - "description": "The dispute's transaction ID", - "type": "string" - }, - "currency": { - "description": "The dispute currency ISO Alpha code", - "type": "string" - }, - "amount": { - "description": "The dispute amount", - "type": "number", - "format": "double" - }, - "acquirerReferenceNumber": { - "description": "The dispute's acquirer reference number", - "type": "string" - }, - "reasonCode": { - "description": "The dispute's reason code", - "type": "string", - "enum": [ - "1000", - "12", - "2", - "30", - "31", - "35", - "37", - "40", - "41", - "42", - "46", - "47", - "49", - "50", - "53", - "54", - "55", - "57", - "59", - "60", - "62", - "7", - "70", - "71", - "72", - "73", - "74", - "75", - "76", - "77", - "79", - "8", - "80", - "81", - "82", - "83", - "85", - "86", - "93", - "00", - "63", - "A01", - "A02", - "A08", - "F10", - "F14", - "F22", - "F24", - "F29", - "C02", - "C04", - "C05", - "C08", - "C14", - "C18", - "C28", - "C31", - "C32", - "M10", - "M49", - "P01", - "P03", - "P04", - "P05", - "P07", - "P08", - "P22", - "P23", - "R03", - "R13", - "M01", - "FR1", - "FR4", - "FR6", - "AL", - "AP", - "AW", - "CA", - "CD", - "CR", - "DA", - "DP", - "DP1", - "EX", - "IC", - "IN", - "IS", - "LP", - "N", - "NA", - "NC", - "P", - "RG", - "RM", - "RN1", - "RN2", - "SV", - "TF", - "TNM", - "UA01", - "UA02", - "UA32", - "UA99", - "UA03", - "UA10", - "UA11", - "UA12", - "UA18", - "UA20", - "UA21", - "UA22", - "UA23", - "UA28", - "UA30", - "UA31", - "UA38", - "duplicate", - "fraudulent", - "subscription_canceled", - "product_unacceptable", - "product_not_received", - "unrecognized", - "credit_not_processed", - "customer_initiated", - "incorrect_account_details", - "insufficient_funds", - "bank_cannot_process", - "debit_not_authorized", - "general" - ] - }, - "category": { - "description": "The dispute's category", - "type": "string", - "readOnly": true, - "enum": [ - "fraud", - "unrecognized", - "product-not-received", - "product-unacceptable", - "product-not-refunded", - "duplicate", - "subscription-canceled", - "uncategorized" - ] - }, - "type": { - "description": "The dispute's type", - "type": "string", - "enum": [ - "information-request", - "first-chargeback", - "second-chargeback", - "arbitration" - ] - }, - "status": { - "description": "The dispute's status", - "type": "string", - "enum": [ - "response-needed", - "under-review", - "forfeited", - "won", - "lost", - "unknown" - ] - }, - "postedTime": { - "description": "Dispute posted time", - "type": "string", - "format": "date-time" - }, - "deadlineTime": { - "description": "Dispute deadline time", - "type": "string", - "format": "date-time" - }, - "rawResponse": { - "description": "Dispute raw response from gateway", - "type": "string", - "readOnly": true - }, - "resolvedTime": { - "description": "Dispute resolved time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "createdTime": { - "description": "Dispute created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "Dispute updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "DisputeEvidence": { - "type": "object", - "properties": { - "policy": { - "description": "The id of a file upload with the policy materials (may include the cancellation policy, refund policy, and terms of use).", - "type": "string" - }, - "accessLogs": { - "description": "The id of a file upload with the access logs showing the customer activity.", - "type": "string" - }, - "customerCommunication": { - "description": "The id of a file upload showing communication with the customer (for example emails).", - "type": "string" - }, - "customerSignature": { - "description": "The id of a file upload showing the signed contract or signed delivery receipt.", - "type": "string" - }, - "deliveryProof": { - "description": "The id of a file upload showing the proof of delivery.", - "type": "string" - }, - "explanation": { - "description": "An explanation relevant to the category of dispute.", - "type": "string" - }, - "additionalFile": { - "description": "Any additional evidence as a file upload id.", - "type": "string" - } - } - }, - "Email": { - "type": "object", - "required": [ - "email" - ], - "properties": { - "email": { - "description": "Email", - "type": "string", - "format": "email" - } - } - }, - "SmtpAuthorization": { - "type": "object", - "discriminator": { - "propertyName": "type" - }, - "properties": { - "type": { - "type": "string", - "enum": [ - "none", - "plain", - "login", - "cram-md5" - ], - "default": "none" - } - } - }, - "cram-md5": { - "allOf": [ - { - "$ref": "#/components/schemas/SmtpAuthorization" - }, - { - "$ref": "#/components/schemas/UserPasswordAuthorization" - } - ] - }, - "login": { - "allOf": [ - { - "$ref": "#/components/schemas/SmtpAuthorization" - }, - { - "$ref": "#/components/schemas/UserPasswordAuthorization" - } - ] - }, - "plain": { - "allOf": [ - { - "$ref": "#/components/schemas/SmtpAuthorization" - }, - { - "$ref": "#/components/schemas/UserPasswordAuthorization" - } - ] - }, - "SmtpCredential": { - "type": "object", - "description": "SMTP Credential", - "required": [ - "host" - ], - "properties": { - "hash": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "host": { - "type": "string", - "description": "The host name" - }, - "port": { - "type": "integer", - "description": "The port value", - "minimum": 1, - "maximum": 65535, - "default": 25 - }, - "encryption": { - "type": "string", - "description": "The encryption value", - "enum": [ - "none", - "tls", - "ssl" - ], - "default": "none" - }, - "auth": { - "$ref": "#/components/schemas/SmtpAuthorization" - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "UserPasswordAuthorization": { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "password": { - "type": "string", - "format": "password" - } - }, - "required": [ - "username", - "password" - ] - }, - "Error": { - "type": "object", - "properties": { - "status": { - "type": "integer", - "minimum": 100, - "maximum": 600 - }, - "error": { - "type": "string" - } - } - }, - "SystemEvent": { - "type": "object", - "description": "The application event", - "readOnly": true, - "properties": { - "eventType": { - "$ref": "#/components/schemas/EventType" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "rulesCount": { - "type": "integer", - "readOnly": true - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "EventType": { - "type": "string", - "description": "Rebilly event type", - "readOnly": true, - "enum": [ - "dispute-created", - "gateway-account-requested", - "transaction-processed", - "subscription-canceled", - "subscription-created", - "subscription-renewed", - "payment-card-expired", - "payment-declined", - "transaction-process-requested", - "risk-score-changed" - ] - }, - "File": { - "type": "object", - "properties": { - "id": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "name": { - "description": "Original File name", - "type": "string" - }, - "extension": { - "description": "The File extension", - "type": "string" - }, - "description": { - "description": "The File description", - "type": "string" - }, - "url": { - "description": "Write-only. If defined on POST, this would be used as a file source.", - "type": "string" - }, - "tags": { - "description": "The tags list", - "type": "array", - "items": { - "type": "string" - } - }, - "mime": { - "description": "The mime type", - "type": "string", - "readOnly": true, - "enum": [ - "image/png", - "image/jpeg", - "image/gif", - "application/pdf", - "audio/mpeg" - ] - }, - "size": { - "description": "The File size in bytes", - "type": "integer", - "readOnly": true - }, - "width": { - "description": "Image width, applicable to images only", - "type": "integer", - "readOnly": true - }, - "height": { - "description": "Image height, applicable to images only", - "type": "integer", - "readOnly": true - }, - "sha1": { - "description": "Hash sum of the file", - "type": "string", - "readOnly": true - }, - "createdTime": { - "description": "The upload date/time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "The latest update date/time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 2, - "maxItems": 2, - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SelfLink" - }, - { - "$ref": "#/components/schemas/PermalinkLink" - } - ] - } - } - } - }, - "GatewayAccount": { - "type": "object", - "required": [ - "gatewayName", - "acquirerName", - "merchantCategoryCode", - "websites", - "acceptedCurrencies", - "organizationId" - ], - "discriminator": { - "propertyName": "gatewayName" - }, - "properties": { - "id": { - "description": "The gateway identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "status": { - "description": "The gateway account's status", - "readOnly": true, - "type": "string", - "enum": [ - "active", - "inactive", - "pending" - ] - }, - "gatewayName": { - "$ref": "#/components/schemas/GatewayName" - }, - "acquirerName": { - "$ref": "#/components/schemas/AcquirerName" - }, - "merchantCategoryCode": { - "description": "The gateway account's merchant category code", - "type": "integer", - "minimum": 742, - "maximum": 9950 - }, - "dccMarkup": { - "description": "Dynamic currency conversion markup in basis points", - "type": "integer", - "minimum": 1, - "maximum": 10000 - }, - "descriptor": { - "description": "The gateway account's descriptor", - "type": "string" - }, - "cityField": { - "description": "The gateway account's city field (also known as line 2 descriptor)", - "type": "string" - }, - "organizationId": { - "description": "Organization ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "websites": { - "description": "Websites IDs", - "type": "array", - "items": { - "description": "Website ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - } - }, - "excludedDccQuoteCurrencies": { - "description": "Excluded Dynamic Currency Conversion Quote Currencies", - "type": "array", - "items": { - "type": "string" - } - }, - "monthlyLimit": { - "description": "Monthly Limit", - "type": "integer", - "format": "double", - "minimum": 0 - }, - "threeDSecure": { - "description": "True, if Gateway Account allows 3DSecure", - "type": "boolean" - }, - "dynamicDescriptor": { - "description": "True, if Gateway Account allows dynamic descriptor", - "type": "boolean" - }, - "acceptedCurrencies": { - "description": "Accepted currencies (array of the currency three letter code)", - "type": "array", - "items": { - "type": "string" - } - }, - "method": { - "$ref": "#/components/schemas/Method" - }, - "paymentCardSchemes": { - "description": "Accepted payment card brands", - "type": "array", - "items": { - "type": "string", - "enum": [ - "Visa", - "MasterCard", - "American Express", - "Discover", - "Maestro", - "Solo", - "Electron", - "JCB", - "Voyager", - "Diners Club", - "Switch", - "Laser", - "China Unionpay" - ] - } - }, - "downtimeStart": { - "description": "Gateway account downtime start", - "type": "string", - "format": "date-time" - }, - "downtimeEnd": { - "description": "Gateway account downtime end", - "type": "string", - "format": "date-time" - }, - "createdTime": { - "description": "Gateway Account created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "Gateway Account updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 2, - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SelfLink" - }, - { - "$ref": "#/components/schemas/OnBoardingUrlLink" - } - ] - } - } - } - }, - "A1Gateway": { - "description": "A1Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "description": "A1Gateway credentials object", - "properties": { - "accountId": { - "type": "string", - "description": "A1Gateway account ID" - }, - "password": { - "type": "string", - "description": "A1Gateway password", - "format": "password" - } - }, - "required": [ - "accountId", - "password" - ] - }, - "mpi": { - "$ref": "#/components/schemas/A1GatewayMpis" - } - } - } - ] - }, - "AmexVPC": { - "description": "AmexVPC config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "description": "AmexVPC credentials object", - "properties": { - "url": { - "type": "string", - "description": "Virtual Payment Client URL" - }, - "merchantId": { - "type": "string", - "description": "Merchant ID" - }, - "accessCode": { - "type": "string", - "description": "Access Code", - "format": "password" - }, - "user": { - "type": "string", - "description": "User (used for refund, void and capture)" - }, - "password": { - "type": "string", - "description": "Password (used for refund, void and capture)", - "format": "password" - } - }, - "required": [ - "url", - "merchantId", - "accessCode", - "user", - "password" - ] - } - } - } - ] - }, - "AuthorizeNet": { - "description": "AuthorizeNet Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "apiLoginId": { - "type": "string", - "description": "AuthorizeNet Gateway api login ID" - }, - "transactionKey": { - "description": "AuthorizeNet Gateway Transaction Key", - "type": "string", - "format": "password" - } - }, - "required": [ - "apiLoginId", - "transactionKey" - ] - } - } - } - ] - }, - "Beanstream": { - "description": "Beanstream Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "merchantId": { - "type": "string", - "description": "Beanstream Gateway merchant ID" - }, - "apiPasscode": { - "type": "string", - "description": "Beanstream Gateway API Passcode", - "format": "password" - } - }, - "required": [ - "merchantId", - "apiPasscode" - ] - } - } - } - ] - }, - "BraintreePayments": { - "description": "BraintreePayments Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "publicKey": { - "type": "string", - "description": "BraintreePayments Public Key" - }, - "privateKey": { - "type": "string", - "description": "BraintreePayments Private Key", - "format": "password" - }, - "merchantId": { - "type": "string", - "description": "BraintreePayments merchant ID", - "format": "password" - }, - "merchantAccountId": { - "type": "string", - "description": "BraintreePayments merchant account ID", - "format": "password" - } - }, - "required": [ - "publicKey", - "privateKey", - "merchantId", - "merchantAccountId" - ] - } - } - } - ] - }, - "Cashflows": { - "description": "Cashflows Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "authId": { - "type": "string", - "description": "Cashflows Gateway auth ID" - }, - "authPassword": { - "type": "string", - "description": "Cashflows Gateway auth password", - "format": "password" - } - }, - "required": [ - "authPassword", - "authId" - ] - } - } - } - ] - }, - "Cayan": { - "description": "Cayan Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "merchantSiteId": { - "type": "string", - "description": "Cayan Gateway merchant site ID" - }, - "merchantName": { - "type": "string", - "description": "Cayan Gateway merchant name" - }, - "merchantKey": { - "type": "string", - "description": "Cayan Gateway merchant key", - "format": "password" - } - }, - "required": [ - "merchantSiteId", - "merchantName", - "merchantKey" - ] - } - } - } - ] - }, - "Chase": { - "description": "Chase Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "username": { - "type": "string", - "description": "Chase Gateway Net Connect username" - }, - "password": { - "type": "string", - "description": "Chase Gateway Net Connect password", - "format": "password" - }, - "coNumber": { - "type": "string", - "description": "Chase Gateway CO Number used for delimited file reports" - }, - "divisionId": { - "type": "string", - "description": "Chase Gateway division ID" - }, - "partialAuth": { - "type": "boolean", - "description": "Support for Partial Auths", - "default": false - } - }, - "required": [ - "username", - "password", - "coNumber", - "divisionId", - "partialAuth" - ] - } - } - } - ] - }, - "ChinaUnionPay": { - "description": "China Union Pay Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "accountId": { - "type": "string", - "description": "China Union Pay Gateway account ID" - }, - "partyId": { - "type": "string", - "description": "China Union Pay Gateway party ID" - }, - "goods": { - "type": "string", - "description": "China Union Pay Gateway goods" - }, - "md5key": { - "type": "string", - "description": "China Union Pay Gateway md5key", - "format": "password" - }, - "mobilePay": { - "type": "string", - "description": "China Union Pay Gateway mobile pay param" - } - }, - "required": [ - "accountId", - "partyId", - "goods", - "md5key", - "mobilePay" - ] - } - } - } - ] - }, - "Credorax": { - "description": "Credorax Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "merchantId": { - "type": "string", - "description": "Credorax Gateway merchant ID" - }, - "merchantMd5Signature": { - "type": "string", - "description": "Credorax Gateway md5 signature", - "format": "password" - } - }, - "required": [ - "merchantId", - "merchantMd5Signature" - ] - } - } - } - ] - }, - "DataCash": { - "description": "DataCash Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "client": { - "type": "string", - "description": "DataCash Gateway client" - }, - "password": { - "type": "string", - "description": "DataCash Gateway password", - "format": "password" - }, - "policy": { - "type": "integer", - "description": "Policy", - "minimum": 0, - "maximum": 7, - "default": 2 - }, - "delay": { - "type": "integer", - "description": "Auto Capture delay (in hours)", - "minimum": 0, - "default": 0 - } - }, - "required": [ - "client", - "password", - "policy", - "delay" - ] - }, - "mpi": { - "$ref": "#/components/schemas/DataCashMpis" - } - } - } - ] - }, - "Dengi": { - "description": "Dengi Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "projectId": { - "type": "string", - "description": "Dengi Gateway project ID" - }, - "publicKey": { - "type": "string", - "description": "Dengi Gateway public key", - "format": "password" - }, - "refundKey": { - "type": "string", - "description": "Dengi Gateway refund key", - "format": "password" - } - }, - "required": [ - "projectId", - "publicKey", - "refundKey" - ] - } - } - } - ] - }, - "eMerchantPay": { - "description": "eMerchantPay Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "eMerchantPay Gateway client ID" - }, - "apiKey": { - "type": "string", - "description": "eMerchantPay Gateway api key", - "format": "password" - } - }, - "required": [ - "clientId", - "apiKey" - ] - }, - "mpi": { - "$ref": "#/components/schemas/eMerchantPayMpis" - } - } - } - ] - }, - "Flexepin": { - "description": "Flexepin Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "apiKey": { - "type": "string", - "description": "Flexepin API Key" - }, - "apiSecret": { - "type": "string", - "description": "Flexepin API Secret", - "format": "password" - } - }, - "required": [ - "apiKey", - "apiSecret" - ] - } - } - } - ] - }, - "Forte": { - "description": "Forte Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "accountId": { - "type": "string", - "description": "Forte Gateway account ID" - }, - "locationId": { - "type": "string", - "description": "Forte Gateway location ID" - }, - "apiAccessId": { - "type": "string", - "description": "Forte Gateway api access ID", - "format": "password" - }, - "apiSecretKey": { - "type": "string", - "description": "Forte Gateway api secret key", - "format": "password" - } - }, - "required": [ - "accountId", - "locationId", - "apiAccessId", - "apiSecretKey" - ] - } - } - } - ] - }, - "FundSend": { - "description": "FundSend Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "FundSend Gateway client ID" - }, - "secretWord": { - "type": "string", - "description": "FundSend Gateway secret word", - "format": "password" - } - }, - "required": [ - "clientId", - "secretWord" - ] - } - } - } - ] - }, - "GET": { - "description": "GET Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "accountId": { - "type": "string", - "description": "GET Gateway account ID" - } - }, - "required": [ - "accountId" - ] - }, - "mpi": { - "$ref": "#/components/schemas/GETMpis" - } - } - } - ] - }, - "GlobalCollect": { - "description": "GlobalCollect Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "merchantId": { - "type": "string", - "description": "GlobalCollect Gateway merchant ID" - }, - "apiKeyId": { - "type": "string", - "description": "GlobalCollect Gateway api key ID" - }, - "apiSecretKey": { - "type": "string", - "description": "GlobalCollect Gateway api secret key", - "format": "password" - }, - "skipFraudService": { - "type": "boolean", - "description": "GlobalCollect skip fraud service" - } - }, - "required": [ - "merchantId", - "apiKeyId", - "apiSecretKey" - ] - }, - "mpi": { - "$ref": "#/components/schemas/GlobalCollectMpis" - } - } - } - ] - }, - "GlobalOne": { - "description": "GlobalOne Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "terminalId": { - "type": "string", - "description": "GlobalOne Gateway terminal ID" - }, - "sharedSecret": { - "type": "string", - "description": "GlobalOne Gateway shared secret", - "format": "password" - } - }, - "required": [ - "terminalId", - "sharedSecret" - ] - } - } - } - ] - }, - "Gpaysafe": { - "description": "Gpaysafe Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "apiKey": { - "type": "string", - "description": "Gpaysafe apiKey" - } - }, - "required": [ - "apiKey" - ] - } - } - } - ] - }, - "iCheque": { - "description": "iCheque Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "iCheque Gateway client ID" - }, - "secretWord": { - "type": "string", - "description": "iCheque Gateway secret word", - "format": "password" - } - }, - "required": [ - "clientId", - "secretWord" - ] - } - } - } - ] - }, - "Ilixium": { - "description": "Ilixium Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "merchantId": { - "type": "string", - "description": "Ilixium Gateway merchant ID" - }, - "accountId": { - "type": "string", - "description": "Ilixium Gateway account ID" - }, - "digestPassword": { - "type": "string", - "description": "Ilixium Gateway digest password", - "format": "password" - } - }, - "required": [ - "merchantId", - "accountId", - "digestPassword" - ] - }, - "mpi": { - "$ref": "#/components/schemas/IlixiumMpis" - } - } - } - ] - }, - "Jeton": { - "description": "Jeton Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "apiKey": { - "type": "string", - "description": "Jeton apiKey" - } - }, - "required": [ - "apiKey" - ] - } - } - } - ] - }, - "JetPay": { - "description": "JetPay Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "TerminalID": { - "type": "string", - "description": "JetPay Gateway terminal ID" - } - }, - "required": [ - "TerminalID" - ] - } - } - } - ] - }, - "Moneris": { - "description": "Moneris Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "apiToken": { - "type": "string", - "description": "Moneris Gateway api token", - "format": "password" - }, - "storeId": { - "type": "string", - "description": "Moneris Gateway store ID" - } - }, - "required": [ - "storeId", - "apiToken" - ] - } - } - } - ] - }, - "NMI": { - "description": "NMI Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "username": { - "type": "string", - "description": "NMI Gateway api token" - }, - "password": { - "type": "string", - "description": "NMI Gateway store ID", - "format": "password" - } - }, - "required": [ - "username", - "password" - ] - }, - "mpi": { - "$ref": "#/components/schemas/NMIMpis" - } - } - } - ] - }, - "OchaPay": { - "description": "OchaPay Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "apiUsername": { - "type": "string", - "description": "OchaPay Gateway username" - }, - "apiPassword": { - "type": "string", - "description": "OchaPay Gateway api password", - "format": "password" - }, - "secretWord": { - "type": "string", - "description": "OchaPay Gateway secret word", - "format": "password" - } - }, - "required": [ - "apiUsername", - "apiPassword", - "secretWord" - ] - } - } - } - ] - }, - "Optimal": { - "description": "Optimal Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "storeId": { - "type": "string", - "description": "Optimal Gateway store ID" - }, - "storePwd": { - "type": "string", - "description": "Optimal Gateway store password", - "format": "password" - }, - "accountNum": { - "type": "string", - "description": "Optimal Gateway account number" - } - }, - "required": [ - "storeId", - "storePwd", - "accountNum" - ] - }, - "mpi": { - "$ref": "#/components/schemas/OptimalMpis" - } - } - } - ] - }, - "PandaGateway": { - "description": "Panda Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "merchantCode": { - "type": "string", - "description": "Panda Gateway merchant code" - }, - "apiCode": { - "type": "string", - "description": "Panda Gateway api code" - }, - "signKey": { - "type": "string", - "description": "Panda Gateway sign key", - "format": "password" - } - }, - "required": [ - "merchantCode", - "apiCode", - "signKey" - ] - } - } - } - ] - }, - "Payeezy": { - "description": "Payeezy Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "merchantId": { - "type": "string", - "description": "Payeezy Merchant ID" - }, - "merchantToken": { - "type": "string", - "description": "Merchant Token", - "format": "password" - }, - "apiKey": { - "type": "string", - "description": "API Key" - }, - "apiSecret": { - "type": "string", - "description": "API Secret", - "format": "password" - } - }, - "required": [ - "merchantId", - "merchantToken", - "apiKey", - "apiSecret" - ] - } - } - } - ] - }, - "Payflow": { - "description": "Payflow config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "description": "Payflow credentials object", - "properties": { - "user": { - "type": "string", - "description": "If you set up one or more additional users on the account, this value is the ID of the user authorized to process transactions. If, however, you have not set up additional users, USER has the same value as VENDOR" - }, - "vendor": { - "type": "string", - "description": "Your merchant login ID created when you registered for the account." - }, - "password": { - "type": "string", - "description": "The password you defined while registering for the account.", - "format": "password" - } - }, - "required": [ - "user", - "vendor", - "password" - ] - } - } - } - ] - }, - "PayPal": { - "description": "PayPal Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "merchantIdInPayPal": { - "type": "string", - "description": "PayPal Gateway merchant id" - }, - "redirectUrl": { - "type": "string", - "description": "PayPal Gateway redirect url", - "format": "url" - } - }, - "required": [ - "merchantIdInPayPal", - "redirectUrl" - ] - } - } - } - ] - }, - "Payr": { - "description": "Payr Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "Payr Gateway client ID" - }, - "secretWord": { - "type": "string", - "description": "Payr Gateway secret word", - "format": "password" - } - }, - "required": [ - "clientId", - "secretWord" - ] - } - } - } - ] - }, - "Payvision": { - "description": "Payvision Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "memberId": { - "type": "string", - "description": "Payvision Gateway member id" - }, - "memberGuid": { - "type": "string", - "description": "Payvision Gateway member guid", - "format": "password" - }, - "avs": { - "type": "boolean", - "description": "Payvision Gateway avs" - }, - "delay": { - "type": "integer", - "description": "Payvision Gateway delay" - } - }, - "required": [ - "memberId", - "memberGuid", - "avs", - "delay" - ] - }, - "mpi": { - "$ref": "#/components/schemas/PayvisionMpis" - } - } - } - ] - }, - "Plugnpay": { - "description": "Plugnpay Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "publisher-name": { - "type": "string", - "description": "Plugnpay Gateway member id" - }, - "publisher-password": { - "type": "string", - "description": "Plugnpay Gateway avs", - "format": "password" - } - }, - "required": [ - "publisher-name", - "publisher-password" - ] - } - } - } - ] - }, - "Realex": { - "description": "Realex Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "merchantId": { - "type": "string", - "description": "Realex Gateway merchant id" - }, - "secretKey": { - "type": "string", - "description": "Realex Gateway secret key", - "format": "password" - }, - "rebatePassword": { - "type": "string", - "description": "Realex Gateway rebate password", - "format": "password" - }, - "account": { - "type": "string", - "description": "Realex Gateway account" - } - }, - "required": [ - "merchantId", - "secretKey", - "rebatePassword", - "account" - ] - } - } - } - ] - }, - "RealTime": { - "description": "RealTime Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "RealTime Gateway client ID" - }, - "secretWord": { - "type": "string", - "description": "RealTime Gateway secret word", - "format": "password" - } - }, - "required": [ - "clientId", - "secretWord" - ] - } - } - } - ] - }, - "RebillyProcessor": { - "description": "RebillyProcessor Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "properties": { - "mpi": { - "$ref": "#/components/schemas/RebillyProcessorMpis" - } - } - } - ] - }, - "Redsys": { - "description": "Redsys Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "merchantCode": { - "type": "string", - "description": "Redsys Gateway merchant code", - "format": "password" - }, - "secretCode": { - "type": "string", - "description": "Redsys Gateway secret code", - "format": "password" - } - }, - "required": [ - "merchantCode", - "secretCode" - ] - } - } - } - ] - }, - "RPN": { - "description": "RPN Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "mid": { - "type": "string", - "description": "RPN MID" - }, - "key": { - "type": "string", - "description": "RPN Key", - "format": "password" - } - }, - "required": [ - "mid", - "key" - ] - } - } - } - ] - }, - "Sagepay": { - "description": "Sagepay Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "M_ID": { - "type": "string", - "description": "Sagepay Gateway merchant ID" - }, - "M_KEY": { - "type": "string", - "description": "Sagepay Gateway merchant key", - "format": "password" - } - }, - "required": [ - "M_ID", - "M_KEY" - ] - } - } - } - ] - }, - "SMSVoucher": { - "description": "SMSVoucher Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "AppId": { - "type": "string", - "description": "SMSVoucher AppId" - } - }, - "required": [ - "AppId" - ] - } - } - } - ] - }, - "Stripe": { - "description": "Stripe Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "redirectUrl": { - "type": "string", - "description": "Stripe Gateway redirect url", - "format": "url" - } - }, - "required": [ - "redirectUrl" - ] - } - } - } - ] - }, - "UPayCard": { - "description": "UPayCard Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "receiver_account": { - "type": "string", - "description": "merchant receiver account" - }, - "key": { - "type": "string", - "description": "merchant key", - "format": "password" - }, - "secret": { - "type": "string", - "description": "merchant secret", - "format": "password" - } - }, - "required": [ - "receiver_account", - "key", - "secret" - ] - } - } - } - ] - }, - "USAePay": { - "description": "USAePay Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "sourceKey": { - "type": "string", - "description": "USAePay Gateway source key", - "format": "password" - }, - "pin": { - "type": "string", - "description": "USAePay Gateway pin", - "format": "password" - } - }, - "required": [ - "sourceKey", - "pin" - ] - } - } - } - ] - }, - "VantivLitle": { - "description": "VantivLitle Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "username": { - "type": "string", - "description": "VantivLitle Gateway username" - }, - "password": { - "type": "string", - "description": "VantivLitle Gateway password", - "format": "password" - }, - "merchantId": { - "type": "string", - "description": "VantivLitle Gateway merchant ID" - } - }, - "required": [ - "username", - "password", - "merchantId" - ] - }, - "mpi": { - "$ref": "#/components/schemas/VantivLitleMpis" - } - } - } - ] - }, - "vegaaH": { - "description": "vegaaH Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "terminalId": { - "type": "string", - "description": "vegaaH Gateway terminal ID" - }, - "password": { - "type": "string", - "description": "vegaaH Gateway password", - "format": "password" - } - }, - "required": [ - "terminalId", - "password" - ] - } - } - } - ] - }, - "Walpay": { - "description": "Walpay Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "merchantName": { - "type": "string", - "description": "Walpay Gateway merchant name" - }, - "merchantPin": { - "type": "string", - "description": "Walpay Gateway merchant pin", - "format": "password" - } - }, - "required": [ - "merchantName", - "merchantPin" - ] - }, - "mpi": { - "$ref": "#/components/schemas/WalpayMpis" - } - } - } - ] - }, - "Wirecard": { - "description": "Wirecard Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "merchantUsername": { - "type": "string", - "description": "Wirecard Gateway merchant username" - }, - "merchantPassword": { - "type": "string", - "description": "Wirecard Gateway merchant password", - "format": "password" - }, - "businessSignature": { - "type": "string", - "description": "Wirecard Gateway merchant business case signature", - "format": "password" - }, - "delay": { - "type": "integer", - "description": "Wirecard Gateway delay" - } - }, - "required": [ - "merchantUsername", - "merchantPassword", - "businessSignature", - "delay" - ] - }, - "mpi": { - "$ref": "#/components/schemas/WirecardMpis" - } - } - } - ] - }, - "Worldpay": { - "description": "Worldpay Gateway config", - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccount" - }, - { - "type": "object", - "required": [ - "gatewayConfig" - ], - "properties": { - "gatewayConfig": { - "type": "object", - "properties": { - "merchantCode": { - "type": "string", - "description": "Worldpay Gateway merchant code", - "format": "password" - }, - "merchantPassword": { - "type": "string", - "description": "Worldpay Gateway merchant password", - "format": "password" - } - }, - "required": [ - "merchantCode", - "merchantPassword" - ] - }, - "mpi": { - "$ref": "#/components/schemas/WorldpayMpis" - } - } - } - ] - }, - "AcquirerName": { - "description": "Acquirer name", - "type": "string", - "enum": [ - "Alipay", - "AIB", - "B+S", - "Bank of America", - "Bank of Moscow", - "Bank of Rebilly", - "Bank One", - "Beanstream", - "BMO Harris Bank", - "Borgun", - "BraintreePayments", - "Catalunya Caixa", - "Chase", - "ChinaUnionPay", - "CIM", - "Credorax", - "Elavon", - "EMS", - "Fifth Third Bank", - "First Data Buypass", - "First Data Nashville", - "First Data North", - "First Data Omaha", - "Flexepin", - "Forte", - "FundSend", - "GlobalCollect", - "Global East", - "Gpaysafe", - "Heartland", - "HSBC", - "iCheque", - "Ilixium", - "Jeton", - "Masapay", - "Merrick", - "Mission Valley Bank", - "Moneris", - "NATWEST", - "NMI", - "OchaPay", - "Other", - "Panda Bank", - "PayPal", - "Payr", - "Payvision", - "Peoples Trust Company", - "Privatbank", - "RBC", - "RBS WorldPay", - "RealTime", - "RebillyProcessor", - "SMSVoucher", - "State Bank of Mauritius", - "Stripe", - "TBI", - "TrustPay", - "TSYS", - "UPayCard", - "Vantiv", - "VoicePay", - "WeChat Pay", - "Wells Fargo", - "Wing Hang Bank", - "Wirecard", - "WorldPay" - ] - }, - "GatewayName": { - "description": "The gateway name", - "type": "string", - "enum": [ - "A1Gateway", - "AmexVPC", - "AuthorizeNet", - "Beanstream", - "BraintreePayments", - "Cashflows", - "Cayan", - "Chase", - "ChinaUnionPay", - "Credorax", - "DataCash", - "Dengi", - "eMerchantPay", - "Flexepin", - "FundSend", - "Forte", - "GET", - "GlobalCollect", - "GlobalOne", - "Gpaysafe", - "iCheque", - "Ilixium", - "JetPay", - "Jeton", - "Moneris", - "NMI", - "OchaPay", - "Optimal", - "PandaGateway", - "Payeezy", - "Payflow", - "PayPal", - "Payr", - "Payvision", - "Plugnpay", - "Realex", - "RealTime", - "RebillyProcessor", - "Redsys", - "RPN", - "Sagepay", - "SMSVoucher", - "Stripe", - "UPayCard", - "USAePay", - "VantivLitle", - "vegaaH", - "Walpay", - "Wirecard", - "Worldpay" - ] - }, - "MpiName": { - "description": "The Merchant plug-in Name", - "type": "string", - "enum": [ - "PayvisionMpi", - "WirecardMpi", - "IlixiumMpi", - "DataCashMpi", - "OptimalMpi", - "GlobalCollectMpi", - "CardinalCommerce", - "Other" - ] - }, - "GlobalWebhook": { - "type": "object", - "required": [ - "method", - "url", - "credentialHash" - ], - "properties": { - "id": { - "description": "The webhook identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "eventsFilter": { - "description": "An array of System event type", - "type": "array", - "default": [], - "items": { - "$ref": "#/components/schemas/GlobalWebhookEventType" - } - }, - "status": { - "$ref": "#/components/schemas/OnOff" - }, - "method": { - "type": "string", - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE" - ] - }, - "url": { - "description": "URL that will be triggered when the given event occurs.", - "type": "string", - "format": "uri" - }, - "headers": { - "type": "object", - "description": "Map of elements with header name - header value association" - }, - "credentialHash": { - "type": "string", - "description": "Hash from Credentials which is used for authentication by the given URL" - }, - "createdTime": { - "description": "List created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "List updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "Links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "GlobalWebhookEventType": { - "type": "string", - "description": "Rebilly webhooks event type", - "enum": [ - "gateway-account-requested", - "subscription-trial-ended", - "subscription-activated", - "subscription-canceled", - "subscription-renewed", - "transaction-processed", - "payment-card-expired", - "payment-declined", - "invoice-modified", - "invoice-created", - "dispute-created", - "suspended-payment-completed" - ] - }, - "InvalidError": { - "allOf": [ - { - "$ref": "#/components/schemas/Error" - }, - { - "type": "object", - "properties": { - "details": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - ] - }, - "Invoice": { - "type": "object", - "required": [ - "customerId", - "websiteId", - "currency" - ], - "properties": { - "id": { - "description": "The invoice identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "customerId": { - "description": "The customer's ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "websiteId": { - "description": "The website's ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "organizationId": { - "description": "The organization's ID", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "subscriptionId": { - "description": "The related Subscription's ID if available, otherwise null", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "currency": { - "description": "The currency three letter code", - "type": "string" - }, - "amount": { - "description": "The Invoice's amount", - "type": "number", - "format": "double", - "readOnly": true - }, - "shippingAmount": { - "description": "The Invoice's shipping amount", - "type": "number", - "format": "double", - "readOnly": true - }, - "billingAddress": { - "description": "Invoice's billing address", - "allOf": [ - { - "$ref": "#/components/schemas/ContactObject" - } - ] - }, - "deliveryAddress": { - "description": "Invoice's delivery address", - "allOf": [ - { - "$ref": "#/components/schemas/ContactObject" - } - ] - }, - "notes": { - "description": "Notes for the customer which will display on the invoice", - "type": "string" - }, - "items": { - "type": "array", - "description": "Invoice items array", - "readOnly": true, - "items": { - "type": "string" - } - }, - "taxes": { - "type": "array", - "description": "Taxes applied to this invoice", - "readOnly": true, - "items": { - "allOf": [ - { - "$ref": "#/components/schemas/InvoiceTax" - } - ] - } - }, - "discounts": { - "type": "array", - "description": "Discounts applied", - "readOnly": true, - "items": { - "allOf": [ - { - "$ref": "#/components/schemas/InvoiceDiscount" - } - ] - } - }, - "status": { - "type": "string", - "description": "Invoice status.", - "readOnly": true, - "enum": [ - "draft", - "issued", - "past-due", - "paid", - "abandoned", - "voided" - ] - }, - "delinquentCollectionPeriod": { - "type": "integer", - "description": "Delinquent Collection Period - difference between paidTime and dueTime in days.", - "readOnly": true - }, - "collectionPeriod": { - "type": "integer", - "description": "Collection Period - difference between paidTime and issuedTime in days.", - "readOnly": true - }, - "abandonedTime": { - "description": "Invoice abandoned time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "voidedTime": { - "description": "Invoice voided time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "paidTime": { - "description": "Invoice paid time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "dueTime": { - "description": "Invoice due time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "issuedTime": { - "description": "Invoice issued time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "createdTime": { - "description": "Invoice created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 6, - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SelfLink" - }, - { - "$ref": "#/components/schemas/CustomerLink" - }, - { - "$ref": "#/components/schemas/WebsiteLink" - }, - { - "$ref": "#/components/schemas/BillingContactLink" - }, - { - "$ref": "#/components/schemas/DeliveryContactLink" - }, - { - "$ref": "#/components/schemas/OrganizationLink" - }, - { - "$ref": "#/components/schemas/LeadSourceLink" - } - ] - } - } - } - }, - "InvoiceIssue": { - "type": "object", - "properties": { - "issuedTime": { - "type": "string", - "format": "date-time" - } - } - }, - "InvoiceItem": { - "type": "object", - "required": [ - "type", - "unitPrice" - ], - "properties": { - "id": { - "description": "The website identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "type": { - "description": "Invoice item's type", - "type": "string", - "enum": [ - "debit", - "credit" - ] - }, - "unitPrice": { - "description": "Invoice item's price", - "type": "number", - "format": "double" - }, - "quantity": { - "description": "Invoice item's quantity", - "type": "integer" - }, - "productId": { - "description": "The product's ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "description": { - "description": "Invoice item's description", - "type": "string" - }, - "discountAmount": { - "description": "Invoice item discount amount", - "type": "number", - "format": "double", - "readOnly": true - }, - "periodStartTime": { - "description": "Start time", - "type": "string", - "format": "date-time" - }, - "periodEndTime": { - "description": "End time", - "type": "string", - "format": "date-time" - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 2, - "items": { - "x-tuple": true, - "anyOf": [ - { - "$ref": "#/components/schemas/SelfLink" - }, - { - "$ref": "#/components/schemas/SubscriptionLink" - } - ] - } - } - } - }, - "InvoiceTax": { - "type": "object", - "readOnly": true, - "properties": { - "amount": { - "description": "Tax amount", - "type": "number", - "format": "double" - }, - "description": { - "type": "string", - "description": "Tax description" - } - } - }, - "Layout": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "id": { - "description": "The layout identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "name": { - "description": "The name of the layout string", - "type": "string" - }, - "items": { - "description": "The array of layout items (planId and starred)", - "type": "array", - "items": { - "$ref": "#/components/schemas/LayoutItem" - } - }, - "createdTime": { - "description": "Layout created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "customFields": { - "$ref": "#/components/schemas/ResourceCustomFields" - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 2, - "maxItems": 2, - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SelfLink" - }, - { - "$ref": "#/components/schemas/ItemsLink" - } - ] - } - } - } - }, - "LayoutItem": { - "type": "object", - "required": [ - "planId" - ], - "properties": { - "planId": { - "description": "The plan identifier string", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "starred": { - "description": "Boolean if the plan should be starred (special callout presentation)", - "type": "boolean" - }, - "order": { - "description": "Item's order in Layout", - "type": "integer", - "readOnly": true - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "LeadSource": { - "type": "object", - "properties": { - "id": { - "description": "The lead source identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "medium": { - "description": "Lead Source's medium (eg search, display)", - "type": "string" - }, - "source": { - "description": "Lead Source's source (eg google, yahoo)", - "type": "string" - }, - "campaign": { - "description": "Lead Source's campaign (eg go-big-123)", - "type": "string" - }, - "term": { - "description": "Lead Source's term (eg salt shakers)", - "type": "string" - }, - "content": { - "description": "Lead Source's content (eg smiley faces)", - "type": "string" - }, - "affiliate": { - "description": "Lead Source's affiliate (eg 123, Bob Smith)", - "type": "string" - }, - "subAffiliate": { - "description": "Lead Source's sub-affiliate also called a sub-id or click id in some circles (eg 123456)", - "type": "string" - }, - "salesAgent": { - "description": "Lead Source's sales agent (eg James Bond)", - "type": "string" - }, - "clickId": { - "description": "Lead Source's click id (may come from an ad server)", - "type": "string" - }, - "path": { - "description": "Lead Source's path uri (eg www.example.com/some/landing/path)", - "type": "string" - }, - "ipAddress": { - "description": "Customer's IP Address", - "type": "string" - }, - "currency": { - "description": "Currency (three letter ISO 4217 alpha code) (eg USD, EUR)", - "type": "string" - }, - "amount": { - "description": "The amount that the lead cost", - "type": "number", - "format": "double" - }, - "createdTime": { - "description": "LeadSource created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "LeadSource updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 2, - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SelfLink" - }, - { - "$ref": "#/components/schemas/CustomerLink" - } - ] - } - } - } - }, - "ApprovalUrlLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "approvalUrl" - ] - } - }, - "required": [ - "rel" - ] - }, - "AttachmentResourceLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "customer", - "dispute", - "invoice", - "note", - "payment", - "plan", - "product", - "subscription", - "transaction" - ] - } - }, - "required": [ - "rel" - ] - }, - "BankAccountLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "bankAccount" - ] - } - }, - "required": [ - "rel" - ] - }, - "BillingContactLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "billingContact" - ] - } - }, - "required": [ - "rel" - ] - }, - "CancelUrlLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "cancelUrl" - ] - } - }, - "required": [ - "rel" - ] - }, - "ContactLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "contact" - ] - } - }, - "required": [ - "rel" - ] - }, - "CustomerLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "customer" - ] - } - }, - "required": [ - "rel" - ] - }, - "DefaultPaymentInstrumentLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "defaultPaymentInstrument" - ] - } - }, - "required": [ - "rel" - ] - }, - "DeliveryContactLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "deliveryContact" - ] - } - }, - "required": [ - "rel" - ] - }, - "DisputeLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "dispute" - ] - } - }, - "required": [ - "rel" - ] - }, - "FileLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "file" - ] - } - }, - "required": [ - "rel" - ] - }, - "GatewayAccountLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "gatewayAccount" - ] - } - }, - "required": [ - "rel" - ] - }, - "ItemsLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "items" - ] - } - }, - "required": [ - "rel" - ] - }, - "LeadSourceLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "leadSource" - ] - } - }, - "required": [ - "rel" - ] - }, - "NewLink": { - "type": "object", - "properties": { - "href": { - "description": "The link URL", - "type": "string" - } - }, - "required": [ - "href" - ] - }, - "NotesLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "notes" - ] - } - }, - "required": [ - "rel" - ] - }, - "OnBoardingUrlLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "onBoardingUrl" - ] - } - }, - "required": [ - "rel" - ] - }, - "OrganizationLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "organization" - ] - } - }, - "required": [ - "rel" - ] - }, - "ParentTransactionLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "parentTransaction" - ] - } - }, - "required": [ - "rel" - ] - }, - "PaymentCardLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "paymentCard" - ] - } - }, - "required": [ - "rel" - ] - }, - "PaymentLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "payment" - ] - } - }, - "required": [ - "rel" - ] - }, - "PermalinkLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "permalink" - ] - } - }, - "required": [ - "rel" - ] - }, - "PlanLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "plan" - ] - } - }, - "required": [ - "rel" - ] - }, - "RefundUrlLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "refundUrl" - ] - } - }, - "required": [ - "rel" - ] - }, - "RetriedTransactionLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "retriedTransaction" - ] - } - }, - "required": [ - "rel" - ] - }, - "RuleSetVersionLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "rules" - ] - } - }, - "required": [ - "rel" - ] - }, - "SelfLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "self" - ] - } - }, - "required": [ - "rel" - ] - }, - "SubscriptionLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "subscription" - ] - } - }, - "required": [ - "rel" - ] - }, - "TransactionLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "transaction" - ] - } - }, - "required": [ - "rel" - ] - }, - "WebsiteLink": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NewLink" - } - ], - "properties": { - "rel": { - "description": "The link type", - "type": "string", - "enum": [ - "website" - ] - } - }, - "required": [ - "rel" - ] - }, - "List": { - "type": "object", - "required": [ - "name", - "values" - ], - "properties": { - "id": { - "description": "List ID", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "version": { - "description": "List version", - "type": "integer", - "readOnly": true, - "minimum": 1 - }, - "name": { - "description": "List name", - "type": "string" - }, - "values": { - "description": "List values", - "type": "array", - "items": { - "type": "string" - } - }, - "createdTime": { - "description": "List created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "List updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "Links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "Method": { - "type": "string", - "description": "The payment method", - "enum": [ - "ach", - "cash", - "payment-card", - "paypal", - "Alipay", - "China UnionPay", - "Flexepin", - "Gpaysafe", - "Jeton", - "OchaPay", - "SMSVoucher", - "UPayCard", - "WeChat Pay" - ] - }, - "A1GatewayMpis": { - "description": "A1Gateway Mpis", - "discriminator": { - "propertyName": "name" - }, - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "allOf": [ - { - "$ref": "#/components/schemas/MpiName" - } - ], - "enum": [ - "Other" - ] - } - } - }, - "DataCashMpi": { - "description": "DataCash Integrated", - "allOf": [ - { - "$ref": "#/components/schemas/DataCashMpis" - } - ] - }, - "DataCashMpis": { - "description": "DataCash Mpis", - "discriminator": { - "propertyName": "name" - }, - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "allOf": [ - { - "$ref": "#/components/schemas/MpiName" - } - ], - "enum": [ - "DataCashMpi" - ] - } - } - }, - "eMerchantPayMpis": { - "description": "eMerchantPay Mpis", - "discriminator": { - "propertyName": "name" - }, - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "allOf": [ - { - "$ref": "#/components/schemas/MpiName" - } - ], - "enum": [ - "Other" - ] - } - } - }, - "GETMpis": { - "description": "GET Mpis", - "discriminator": { - "propertyName": "name" - }, - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "allOf": [ - { - "$ref": "#/components/schemas/MpiName" - } - ], - "enum": [ - "Other" - ] - } - } - }, - "GlobalCollectMpi": { - "description": "GlobalCollect Integrated", - "allOf": [ - { - "$ref": "#/components/schemas/GlobalCollectMpis" - } - ] - }, - "GlobalCollectMpis": { - "description": "GlobalCollect Mpis", - "discriminator": { - "propertyName": "name" - }, - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "allOf": [ - { - "$ref": "#/components/schemas/MpiName" - } - ], - "enum": [ - "GlobalCollectMpi" - ] - } - } - }, - "IlixiumMpi": { - "description": "Ilixium Integrated", - "allOf": [ - { - "$ref": "#/components/schemas/IlixiumMpis" - } - ] - }, - "IlixiumMpis": { - "description": "IlixiumMpis Mpis", - "discriminator": { - "propertyName": "name" - }, - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "allOf": [ - { - "$ref": "#/components/schemas/MpiName" - } - ], - "enum": [ - "IlixiumMpi" - ] - } - } - }, - "NMIMpis": { - "description": "NMI Mpis", - "discriminator": { - "propertyName": "name" - }, - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "allOf": [ - { - "$ref": "#/components/schemas/MpiName" - } - ], - "enum": [ - "Other" - ] - } - } - }, - "OptimalMpi": { - "description": "Optimal Integrated", - "allOf": [ - { - "$ref": "#/components/schemas/OptimalMpis" - } - ] - }, - "OptimalMpis": { - "description": "Optimal Mpis", - "discriminator": { - "propertyName": "name" - }, - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "allOf": [ - { - "$ref": "#/components/schemas/MpiName" - } - ], - "enum": [ - "OptimalMpi" - ] - } - } - }, - "Other": { - "description": "Other", - "allOf": [ - { - "$ref": "#/components/schemas/A1GatewayMpis" - }, - { - "$ref": "#/components/schemas/eMerchantPayMpis" - }, - { - "$ref": "#/components/schemas/GETMpis" - }, - { - "$ref": "#/components/schemas/NMIMpis" - }, - { - "$ref": "#/components/schemas/PayvisionMpis" - }, - { - "$ref": "#/components/schemas/VantivLitleMpis" - }, - { - "$ref": "#/components/schemas/WalpayMpis" - }, - { - "$ref": "#/components/schemas/WorldpayMpis" - } - ] - }, - "CardinalCommerce": { - "description": "CardinalCommerce Mpi Credentials", - "allOf": [ - { - "$ref": "#/components/schemas/PayvisionMpis" - }, - { - "type": "object", - "required": [ - "merchantId", - "processorId", - "transactionPwd" - ], - "properties": { - "merchantId": { - "type": "string", - "description": "Cardinal MerchantId" - }, - "processorId": { - "type": "string", - "description": "Cardinal ProcessorId" - }, - "transactionPwd": { - "type": "string", - "format": "password", - "description": "Cardinal TransactionPwd" - } - } - } - ] - }, - "PayvisionMpi": { - "description": "Payvision Integrated", - "allOf": [ - { - "$ref": "#/components/schemas/PayvisionMpis" - } - ] - }, - "PayvisionMpis": { - "description": "Payvision Mpis", - "discriminator": { - "propertyName": "name" - }, - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "allOf": [ - { - "$ref": "#/components/schemas/MpiName" - } - ], - "enum": [ - "PayvisionMpi", - "CardinalCommerce", - "Other" - ] - } - } - }, - "RebillyProcessorMpi": { - "description": "RebillyProcessor Integrated", - "allOf": [ - { - "$ref": "#/components/schemas/RebillyProcessorMpis" - } - ] - }, - "RebillyProcessorMpis": { - "description": "RebillyProcessorMpis Mpis", - "discriminator": { - "propertyName": "name" - }, - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "allOf": [ - { - "$ref": "#/components/schemas/MpiName" - } - ], - "enum": [ - "RebillySandboxMpi" - ] - } - } - }, - "VantivLitleMpis": { - "description": "VantivLitle Mpis", - "discriminator": { - "propertyName": "name" - }, - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "allOf": [ - { - "$ref": "#/components/schemas/MpiName" - } - ], - "enum": [ - "Other" - ] - } - } - }, - "WalpayMpis": { - "description": "WalpayMpis Mpis", - "discriminator": { - "propertyName": "name" - }, - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "allOf": [ - { - "$ref": "#/components/schemas/MpiName" - } - ], - "enum": [ - "Other" - ] - } - } - }, - "WirecardMpi": { - "description": "Wirecard Integrated", - "allOf": [ - { - "$ref": "#/components/schemas/WirecardMpis" - } - ] - }, - "WirecardMpis": { - "description": "Wirecard Mpis", - "discriminator": { - "propertyName": "name" - }, - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "allOf": [ - { - "$ref": "#/components/schemas/MpiName" - } - ], - "enum": [ - "WirecardMpi" - ] - } - } - }, - "WorldpayMpis": { - "description": "Worldpay Mpis", - "discriminator": { - "propertyName": "name" - }, - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "allOf": [ - { - "$ref": "#/components/schemas/MpiName" - } - ], - "enum": [ - "Other" - ] - } - } - }, - "Note": { - "type": "object", - "required": [ - "content", - "relatedType", - "relatedId" - ], - "properties": { - "id": { - "description": "The note identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "createdBy": { - "description": "The note's creator", - "type": "string", - "readOnly": true - }, - "content": { - "description": "The note's name", - "type": "string" - }, - "archived": { - "description": "Is the note archived (excluded from List method)", - "type": "boolean" - }, - "relatedType": { - "description": "The note's related resource type", - "type": "string", - "enum": [ - "customer", - "payment-card", - "payment-gateway", - "subscription", - "transaction" - ] - }, - "relatedId": { - "description": "The note's related resource ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "createdTime": { - "description": "Note created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "Note updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "archivedTime": { - "description": "Note archived time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "OnOff": { - "type": "string", - "default": "active", - "enum": [ - "active", - "inactive" - ] - }, - "Organization": { - "type": "object", - "required": [ - "name", - "country" - ], - "properties": { - "id": { - "description": "The organization identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "createdTime": { - "$ref": "#/components/schemas/ServerTimestamp" - }, - "updatedTime": { - "description": "The organization updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "name": { - "description": "The organization name", - "type": "string", - "maxLength": 60 - }, - "address": { - "description": "The organization street address", - "type": "string", - "maxLength": 60 - }, - "address2": { - "description": "The organization street address", - "type": "string", - "maxLength": 60 - }, - "city": { - "description": "The organization city", - "type": "string", - "maxLength": 45 - }, - "region": { - "description": "The organization region (state)", - "type": "string", - "maxLength": 45 - }, - "country": { - "description": "The organization country ISO Alpha-2 code", - "type": "string", - "pattern": "^[A-Z]{2}$" - }, - "postalCode": { - "description": "The organization postal code", - "type": "string", - "maxLength": 10 - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "Payment": { - "type": "object", - "required": [ - "websiteId", - "customerId", - "currency", - "amount" - ], - "properties": { - "id": { - "description": "The payment identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "websiteId": { - "description": "The website identifier string", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "customerId": { - "description": "The customer identifier string", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "currency": { - "description": "The payment currency ISO Alpha code", - "type": "string" - }, - "amount": { - "description": "The payment amount", - "type": "integer", - "format": "double" - }, - "scheduledTime": { - "description": "The time the payment is scheduled for collection", - "type": "string", - "format": "date-time" - }, - "invoiceIds": { - "description": "The array of invoice identifiers", - "type": "array", - "items": { - "$ref": "#/components/schemas/ResourceId" - } - }, - "description": { - "description": "The payment description", - "type": "string", - "maxLength": 255 - }, - "retryInstruction": { - "$ref": "#/components/schemas/PaymentRetry" - }, - "retryNumber": { - "readOnly": true, - "description": "The position in the sequence of retries", - "type": "integer" - }, - "retriedPaymentId": { - "readOnly": true, - "description": "The retried payment ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "customFields": { - "$ref": "#/components/schemas/ResourceCustomFields" - }, - "paymentInstrument": { - "$ref": "#/components/schemas/PaymentInstrument" - }, - "billingAddress": { - "description": "Billing Address", - "allOf": [ - { - "$ref": "#/components/schemas/ContactObject" - } - ] - }, - "createdBy": { - "description": "The process that created this payment", - "type": "string" - }, - "updatedBy": { - "description": "The process that updated this payment", - "type": "string" - }, - "status": { - "description": "Payment status", - "type": "string", - "readOnly": true, - "enum": [ - "scheduled", - "queued", - "in-progress", - "incomplete", - "waiting-gateway", - "suspended", - "completed" - ] - }, - "result": { - "description": "Payment result", - "type": "string", - "readOnly": true, - "enum": [ - "approved", - "declined", - "canceled", - "unknown" - ] - }, - "riskMetadata": { - "description": "Risk metadata", - "allOf": [ - { - "$ref": "#/components/schemas/RiskMetadata" - } - ] - }, - "createdTime": { - "description": "Payment created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "Payment updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 4, - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SelfLink" - }, - { - "$ref": "#/components/schemas/WebsiteLink" - }, - { - "$ref": "#/components/schemas/TransactionLink" - }, - { - "$ref": "#/components/schemas/ApprovalUrlLink" - }, - { - "$ref": "#/components/schemas/LeadSourceLink" - } - ] - } - } - } - }, - "PaymentCard": { - "type": "object", - "properties": { - "id": { - "description": "The card identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "customerId": { - "description": "The Customer's ID. Required if card is creating not from Token", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "pan": { - "description": "The card PAN (Primary Account Number). Required if card is creating not from Token", - "type": "string" - }, - "bin": { - "description": "The card's bin (the PAN's first 6 digits)", - "type": "string", - "format": "bin", - "readOnly": true - }, - "last4": { - "description": "The PAN's last 4 digits", - "type": "string", - "readOnly": true - }, - "expYear": { - "description": "Card's expiry year. Required if card is creating not from Token", - "type": "integer" - }, - "expMonth": { - "description": "Card's expiry month. Required if card is creating not from Token", - "type": "integer" - }, - "cvv": { - "description": "Card's cvv (card verification value). Required if card is creating not from Token", - "type": "string" - }, - "billingAddress": { - "description": "The Billing Address. Required if card is creating not from Token", - "allOf": [ - { - "$ref": "#/components/schemas/ContactObject" - } - ] - }, - "token": { - "description": "PaymentCardToken. Use without any other fields", - "type": "string" - }, - "safeHash": { - "description": "The card's hash. Based on bin and last 4 digits of the PAN", - "type": "string", - "readOnly": true - }, - "status": { - "description": "Payment Card status", - "type": "string", - "readOnly": true, - "enum": [ - "active", - "expired", - "inactive", - "deactivated", - "pending" - ] - }, - "brand": { - "description": "Payment Card brand", - "type": "string", - "readOnly": true, - "enum": [ - "Visa", - "MasterCard", - "American Express", - "Discover", - "Maestro", - "Solo", - "Electron", - "JCB", - "Voyager", - "Diners Club", - "Switch", - "Laser", - "China UnionPay" - ] - }, - "bankCountry": { - "description": "Payment Card bank country", - "type": "string", - "readOnly": true - }, - "bankName": { - "description": "Payment Card bank name", - "type": "string", - "readOnly": true - }, - "createdTime": { - "description": "Card created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "Card updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "customFields": { - "$ref": "#/components/schemas/ResourceCustomFields" - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 3, - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SelfLink" - }, - { - "$ref": "#/components/schemas/CustomerLink" - }, - { - "$ref": "#/components/schemas/BillingContactLink" - } - ] - } - } - } - }, - "PaymentCardMigrationRequest": { - "type": "object", - "required": [ - "fromGatewayAccountId", - "toGatewayAccountId", - "paymentCardIds" - ], - "properties": { - "fromGatewayAccountId": { - "description": "An ID of Gateway Account cards should be migrated from", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "toGatewayAccountId": { - "description": "An ID of Gateway Account cards should be migrated to", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "paymentCardIds": { - "type": "array", - "minItems": 1, - "items": { - "description": "An array of payment card IDs", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - } - } - } - }, - "PaymentCardMigrationResponse": { - "type": "object", - "properties": { - "migratedCards": { - "type": "integer", - "description": "Amount of cards that were successfully migrated" - } - } - }, - "PaymentInstrument": { - "type": "object", - "required": [ - "method" - ], - "discriminator": { - "propertyName": "method" - }, - "properties": { - "method": { - "$ref": "#/components/schemas/Method" - } - } - }, - "ach": { - "description": "ACH payment instrument object", - "allOf": [ - { - "$ref": "#/components/schemas/PaymentInstrument" - }, - { - "type": "object", - "required": [ - "bankAccountId" - ], - "properties": { - "bankAccountId": { - "description": "The bank account identifier string", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "gatewayAccountId": { - "description": "The payment gateway identifier string", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - } - } - } - ] - }, - "cash": { - "description": "Cash payment instrument object", - "allOf": [ - { - "$ref": "#/components/schemas/PaymentInstrument" - }, - { - "type": "object", - "properties": { - "receivedBy": { - "description": "The receiver's name", - "type": "string" - } - } - } - ] - }, - "payment-card": { - "description": "Payment card payment instrument object", - "allOf": [ - { - "$ref": "#/components/schemas/PaymentInstrument" - }, - { - "type": "object", - "required": [ - "paymentCardId" - ], - "properties": { - "paymentCardId": { - "description": "The payment card identifier string", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "gatewayAccountId": { - "description": "The payment gateway identifier string", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - } - } - } - ] - }, - "paypal": { - "description": "PayPal payment instrument object", - "allOf": [ - { - "$ref": "#/components/schemas/PaymentInstrument" - }, - { - "type": "object", - "required": [ - "payPalAccountId" - ], - "properties": { - "payPalAccountId": { - "description": "The PayPal account identifier string", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "gatewayAccountId": { - "description": "The payment gateway identifier string", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - } - } - } - ] - }, - "AmountAdjustment": { - "type": "object", - "discriminator": { - "propertyName": "method" - }, - "properties": { - "method": { - "type": "string", - "enum": [ - "none", - "partial", - "discount" - ] - } - }, - "required": [ - "method" - ] - }, - "PaymentRetry": { - "type": "object", - "properties": { - "attempts": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "properties": { - "scheduleInstruction": { - "$ref": "#/components/schemas/CommonScheduleInstruction" - }, - "paymentInstruction": { - "$ref": "#/components/schemas/AmountAdjustment" - } - }, - "required": [ - "scheduleInstruction", - "paymentInstruction" - ] - } - }, - "afterAttemptPolicy": { - "description": "The policy on the attempt finishes", - "type": "string", - "enum": [ - "none", - "change-subscription-renewal-time" - ] - }, - "afterRetryEndPolicy": { - "description": "The policy on the retry ends", - "type": "string", - "enum": [ - "none", - "cancel-subscription" - ] - } - }, - "required": [ - "attempts", - "afterAttemptPolicy", - "afterRetryEndPolicy" - ] - }, - "discount": { - "allOf": [ - { - "$ref": "#/components/schemas/AmountAdjustment" - }, - { - "type": "object", - "properties": { - "value": { - "description": "The payment amount discount", - "type": "number", - "format": "float" - }, - "type": { - "description": "The payment amount discount type", - "type": "string", - "enum": [ - "percent", - "fixed" - ] - } - }, - "required": [ - "value", - "type" - ] - } - ] - }, - "partial": { - "allOf": [ - { - "$ref": "#/components/schemas/AmountAdjustment" - }, - { - "type": "object", - "properties": { - "value": { - "description": "The payment amount", - "type": "number", - "format": "float" - }, - "type": { - "description": "The payment amount type", - "type": "string", - "enum": [ - "percent", - "fixed" - ] - } - }, - "required": [ - "value", - "type" - ] - } - ] - }, - "PaymentToken": { - "type": "object", - "required": [ - "method", - "paymentInstrument" - ], - "properties": { - "id": { - "description": "The token identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "method": { - "$ref": "#/components/schemas/Method" - }, - "paymentInstrument": { - "$ref": "#/components/schemas/PaymentTokenInstrument" - }, - "fingerprint": { - "description": "Device fingerprint hash", - "type": "string" - }, - "billingAddress": { - "description": "The Address. Required if bank account is not created from Token", - "allOf": [ - { - "$ref": "#/components/schemas/ContactObject" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "PaymentTokenInstrument": { - "type": "object", - "description": "Payment Token instrument object", - "properties": { - "pan": { - "description": "The card PAN (Primary Account Number)", - "type": "string" - }, - "expMonth": { - "description": "Card's expiry month", - "type": "integer" - }, - "expYear": { - "description": "Card's expiry year", - "type": "integer" - }, - "cvv": { - "description": "The CVV/CVC of the payment card", - "type": "string" - }, - "routingNumber": { - "description": "Routing Number", - "type": "integer" - }, - "accountNumber": { - "description": "AccountNumber", - "type": "integer" - }, - "accountType": { - "description": "Account Type", - "type": "string" - }, - "bankName": { - "description": "Bank name", - "type": "string" - } - } - }, - "PayPalAccount": { - "type": "object", - "properties": { - "id": { - "description": "The PayPal identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "customerId": { - "description": "The Customer's ID.", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "billingAddress": { - "description": "The Customer's Billing Address.", - "allOf": [ - { - "$ref": "#/components/schemas/ContactObject" - } - ] - }, - "username": { - "description": "PayPal username.", - "type": "string" - }, - "status": { - "description": "PayPal Account status", - "type": "string", - "readOnly": true, - "enum": [ - "inactive", - "active", - "deactivated" - ] - }, - "createdTime": { - "description": "PayPal Account created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "PayPal Account updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "customFields": { - "$ref": "#/components/schemas/ResourceCustomFields" - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 4, - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SelfLink" - }, - { - "$ref": "#/components/schemas/CustomerLink" - }, - { - "$ref": "#/components/schemas/ContactLink" - }, - { - "$ref": "#/components/schemas/ApprovalUrlLink" - } - ] - } - } - }, - "required": [ - "customerId", - "billingAddress" - ] - }, - "Plan": { - "type": "object", - "required": [ - "name", - "currency" - ], - "properties": { - "id": { - "description": "The website identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "name": { - "description": "The plan name", - "type": "string" - }, - "currency": { - "description": "Currency (three letter ISO 4217 code)", - "type": "string" - }, - "currencySign": { - "description": "Currency sign", - "type": "string" - }, - "isActive": { - "description": "If the plan is not active, customers cannot subscribe to the plan (default to true)", - "type": "boolean" - }, - "description": { - "description": "The plan description", - "type": "string" - }, - "richDescription": { - "description": "The plan rich description - supports HTML", - "type": "string" - }, - "recurringAmount": { - "description": "The amount that recurs according to the schedule", - "type": "number", - "format": "double" - }, - "recurringPeriodUnit": { - "description": "The unit of time", - "type": "string", - "enum": [ - "day", - "week", - "month", - "year" - ] - }, - "recurringPeriodLength": { - "description": "The length of time (used with the recurringPeriodUnit)", - "type": "integer" - }, - "trialAmount": { - "description": "The amount of a trial - 0 is a valid value (for free)", - "type": "number", - "format": "double" - }, - "trialPeriodUnit": { - "description": "The unit of time", - "type": "string", - "enum": [ - "day", - "week", - "month", - "year" - ] - }, - "trialPeriodLength": { - "description": "The length of time (used with the trialPeriodUnit)", - "type": "integer" - }, - "setupAmount": { - "description": "The amount of a trial - 0 is a valid value (for free)", - "type": "number", - "format": "double" - }, - "expiredTime": { - "description": "Time when the plan is not longer valid", - "type": "string", - "format": "date-time" - }, - "contractTermUnit": { - "description": "The unit of time", - "type": "string", - "enum": [ - "day", - "week", - "month", - "year" - ] - }, - "contractTermLength": { - "description": "The length that corresponds with the contractTermUnit", - "type": "integer" - }, - "recurringPeriodLimit": { - "description": "The number of times a subscription will rebill until the contract is over", - "type": "integer" - }, - "minQuantity": { - "description": "Minimum quantity per order, defaults to 1", - "type": "integer" - }, - "maxQuantity": { - "description": "Maximum quantity per order (NULL if no maximum)", - "type": "integer" - }, - "createdTime": { - "description": "Plan created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "Plan updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "PriceBasedShippingRate": { - "type": "object", - "required": [ - "name", - "currency", - "price" - ], - "properties": { - "name": { - "description": "The shipping rate name", - "type": "string", - "maxLength": 255 - }, - "minOrderSubtotal": { - "description": "Minimum order subtotal for which this shipping rate is applicable, defaults to 0.00", - "type": "number", - "format": "double", - "default": 0 - }, - "maxOrderSubtotal": { - "description": "Maximum order subtotal for which this shipping rate is applicable (NULL if no maximum)", - "type": "number", - "format": "double" - }, - "price": { - "description": "The shipping price - 0 is a valid value (for free)", - "type": "number", - "format": "double" - }, - "currency": { - "description": "Currency (three letter ISO 4217 code)", - "type": "string" - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "Product": { - "type": "object", - "required": [ - "name" - ], - "description": "Your product includes digital goods, services, and physical goods.\nProducts appear on invoice line items. If you set a tax category identifier,\ntaxes will be calculated upon invoice generation.\n", - "example": "{\n \"id\": \"stringid\",\n \"name\": \"Widget\",\n \"description\": \"Fantastic widget\",\n \"taxCategoryId\": null,\n \"requiresShipping\": true,\n \"accountingCode\": \"100\",\n \"customFields\": [],\n \"createdTime\": \"2015-08-27 13:45:12\",\n \"updatedTime\": \"2015-08-27 13:45:12\",\n \"_links\": [\n {\n \"rel\": \"self\",\n \"href\": \"https://api.rebilly.com/v2.1/products/stringid\"\n }\n ]\n}\n", - "properties": { - "id": { - "description": "The product identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "name": { - "description": "The product name", - "type": "string", - "maxLength": 255 - }, - "description": { - "description": "The product description", - "type": "string", - "maxLength": 512 - }, - "taxCategoryId": { - "description": "The product's tax category identifier string", - "type": "string", - "enum": [ - 99999, - 20010, - 40030, - 51020, - 51010, - 31000, - 30070 - ] - }, - "requiresShipping": { - "description": "If the product requires shipping, shipping calculations will be applied", - "type": "boolean" - }, - "accountingCode": { - "description": "The product accounting code", - "type": "string" - }, - "customFields": { - "$ref": "#/components/schemas/ResourceCustomFields" - }, - "createdTime": { - "description": "The product created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "The product updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "Profile": { - "type": "object", - "properties": { - "id": { - "description": "The user identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "email": { - "description": "The user email", - "readOnly": true, - "type": "string", - "format": "email", - "maxLength": 100 - }, - "firstName": { - "description": "User's first name", - "readOnly": true, - "type": "string" - }, - "lastName": { - "description": "User's last name", - "readOnly": true, - "type": "string" - }, - "businessPhone": { - "description": "The user business phone number", - "readOnly": true, - "type": "string" - }, - "mobilePhone": { - "description": "The user mobile phone number", - "readOnly": true, - "type": "string" - }, - "availableCurrencies": { - "type": "array", - "description": "An array of reporting currencies enabled for the merchant", - "readOnly": true, - "items": { - "type": "string" - } - }, - "reportingCurrency": { - "description": "The user's ISO Alpha-3 code used for reports", - "type": "string" - }, - "totpRequired": { - "description": "The user setting of two-factor authentication", - "readOnly": true, - "type": "boolean" - }, - "totpSecret": { - "description": "The user TOTP key for authentication app (if TOTP enabled)", - "readOnly": true, - "type": "string" - }, - "totpUrl": { - "description": "The user link to QR-code for TOTP authentication app (if TOTP enabled)", - "readOnly": true, - "type": "string", - "format": "url" - }, - "country": { - "description": "The user country setting - two letter code", - "readOnly": true, - "type": "string" - }, - "preferences": { - "description": "User preferences like timezone, language and many more. This is an object with custom properties.", - "type": "object" - } - } - }, - "ResetPassword": { - "type": "object", - "required": [ - "newPassword" - ], - "properties": { - "newPassword": { - "description": "New password", - "type": "string", - "format": "password" - } - } - }, - "ResetPasswordToken": { - "type": "object", - "required": [ - "username", - "password" - ], - "properties": { - "token": { - "description": "The token's identifier string", - "type": "string", - "readOnly": true - }, - "username": { - "description": "The token's username", - "type": "string" - }, - "password": { - "description": "Token's password (only for POST)", - "type": "string", - "format": "password" - }, - "credential": { - "description": "Token's credential ID", - "type": "string" - }, - "expiredTime": { - "description": "Password expired time", - "type": "string", - "format": "date-time" - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "ResourceCustomFields": { - "description": "\"Custom Fields list as a map `{\"custom field name\": \"custom field value\", ...}\"`.\nThe format must follow the saved format (see Custom Fields section for the formats).\n", - "type": "object" - }, - "ResourceId": { - "type": "string", - "description": "The resource ID. Defaults to UUID v4", - "maxLength": 50, - "example": "4f6cf35x-2c4y-483z-a0a9-158621f77a21" - }, - "RiskMetadata": { - "type": "object", - "properties": { - "ipAddress": { - "description": "The customer's IP", - "type": "string", - "format": "ipv4" - }, - "isProxy": { - "description": "True if customer's ip address is related to proxy", - "type": "boolean", - "readOnly": true - }, - "isVpn": { - "description": "True if customer's ip address is related to VPN", - "type": "boolean", - "readOnly": true - }, - "isTor": { - "description": "True if customer's ip address is related to TOR", - "type": "boolean", - "readOnly": true - }, - "isHosting": { - "description": "True if customer's ip address is related to hosting", - "type": "boolean", - "readOnly": true - }, - "vpnServiceName": { - "description": "VPN service name, if available", - "type": "string", - "readOnly": true - }, - "isp": { - "description": "Internet Service Provider name, if available", - "type": "string", - "readOnly": true - }, - "country": { - "description": "Country ISO Alpha-2 code for specified ipAddress", - "maxLength": 2, - "type": "string", - "readOnly": true, - "example": "US" - }, - "city": { - "description": "City for specified ipAddress", - "type": "string", - "readOnly": true, - "example": "New York" - }, - "latitude": { - "description": "Latitude for specified ipAddress", - "type": "number", - "format": "double", - "readOnly": true - }, - "longitude": { - "description": "Longitude for specified ipAddress", - "type": "number", - "format": "double", - "readOnly": true - }, - "postalCode": { - "description": "Postal code for specified ipAddress", - "type": "string", - "maxLength": 10, - "readOnly": true - }, - "timeZone": { - "description": "Time zone for specified ipAddress", - "type": "string", - "readOnly": true, - "example": "America/New_York" - }, - "accuracyRadius": { - "description": "Accuracy radius for specified ipAddress (kilometers)", - "type": "integer", - "readOnly": true - }, - "fingerprint": { - "description": "The fingerprint", - "type": "string" - }, - "httpHeaders": { - "description": "HTTP headers", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "example": { - "User-Agent": "Mozilla/5.0", - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" - } - } - } - }, - "add-risk-score": { - "allOf": [ - { - "$ref": "#/components/schemas/RuleAction" - }, - { - "type": "object", - "description": "Add risk score", - "properties": { - "score": { - "type": "integer", - "default": 0 - } - } - } - ] - }, - "blacklist": { - "description": "Add customer data to blacklist", - "allOf": [ - { - "$ref": "#/components/schemas/RuleAction" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "customer-id", - "email", - "fingerprint", - "ip-address", - "payment-card-id" - ] - }, - "ttl": { - "type": "integer", - "description": "Blacklist TTL. Defaults to zero, meaning blacklist record won't expire ever.", - "default": 0 - } - }, - "required": [ - "type" - ] - } - ] - }, - "cancel-scheduled-payments": { - "description": "", - "allOf": [ - { - "$ref": "#/components/schemas/RuleAction" - } - ] - }, - "guess-payment-card-expiration": { - "description": "", - "allOf": [ - { - "$ref": "#/components/schemas/RuleAction" - } - ] - }, - "pick-gateway-account": { - "description": "", - "allOf": [ - { - "$ref": "#/components/schemas/RuleAction" - }, - { - "type": "object", - "properties": { - "pickInstruction": { - "$ref": "#/components/schemas/GatewayAccountPickInstruction" - } - }, - "required": [ - "pickInstruction" - ] - } - ] - }, - "schedule-payment-retry": { - "description": "", - "allOf": [ - { - "$ref": "#/components/schemas/RuleAction" - }, - { - "$ref": "#/components/schemas/PaymentRetry" - } - ] - }, - "schedule-payment": { - "description": "", - "allOf": [ - { - "$ref": "#/components/schemas/RuleAction" - }, - { - "type": "object", - "description": "The calculation instruction of scheduled time for payment", - "properties": { - "scheduleInstruction": { - "$ref": "#/components/schemas/CommonScheduleInstruction" - }, - "amountPolicy": { - "type": "string", - "enum": [ - "balance-outstanding", - "invoice-total" - ] - } - }, - "required": [ - "scheduleInstruction", - "amountPolicy" - ] - } - ] - }, - "send-email": { - "description": "", - "allOf": [ - { - "$ref": "#/components/schemas/RuleAction" - }, - { - "$ref": "#/components/schemas/EmailNotification" - } - ] - }, - "stop-subscriptions": { - "description": "Stop active subscriptions", - "allOf": [ - { - "$ref": "#/components/schemas/RuleAction" - } - ] - }, - "trigger-webhook": { - "description": "", - "allOf": [ - { - "$ref": "#/components/schemas/RuleAction" - }, - { - "$ref": "#/components/schemas/Webhook" - } - ] - }, - "SendPreviewWebhook": { - "description": "Trigger a test webhook", - "allOf": [ - { - "$ref": "#/components/schemas/Webhook" - } - ] - }, - "SendTestEmail": { - "description": "Send a test email", - "allOf": [ - { - "$ref": "#/components/schemas/EmailNotification" - } - ] - }, - "EmailNotification": { - "type": "object", - "properties": { - "credentialHash": { - "type": "string", - "description": "SMTP Credential identifier string." - }, - "sender": { - "type": "string", - "description": "The sender address. The template palceholders are allowed." - }, - "recipients": { - "type": "array", - "description": "The recipients addresses. The template palceholders are allowed.", - "minItems": 1, - "items": { - "type": "string" - } - }, - "cc": { - "type": "array", - "description": "The recipients addresses. The template palceholders are allowed.", - "items": { - "type": "string" - } - }, - "bcc": { - "type": "array", - "description": "The hidden recipients addresses. The template palceholders are allowed.", - "items": { - "type": "string" - } - }, - "subject": { - "type": "string", - "description": "The message subject. The template palceholders are allowed." - }, - "bodyText": { - "type": "string", - "description": "Leave empty to use text from \"bodyHtml\" without tags.\nThe template palceholders are allowed.\n" - }, - "bodyHtml": { - "type": "string", - "description": "Leave empty to receive \"text/plain\" email.\nThe template palceholders are allowed.\n" - } - }, - "required": [ - "credentialHash", - "sender", - "recipients", - "subject", - "bodyText", - "bodyHtml" - ] - }, - "GatewayAccountPickInstruction": { - "type": "object", - "discriminator": { - "propertyName": "method" - }, - "properties": { - "method": { - "type": "string", - "enum": [ - "gateway-account-weights", - "gateway-acquirer-weights" - ] - } - }, - "required": [ - "method" - ] - }, - "gateway-account-weights": { - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccountPickInstruction" - }, - { - "type": "object", - "properties": { - "weightedList": { - "type": "array", - "uniqueItems": true, - "minimum": 0, - "items": { - "type": "object", - "properties": { - "gatewayAccountId": { - "$ref": "#/components/schemas/ResourceId" - }, - "weight": { - "type": "integer" - } - }, - "required": [ - "gatewayAccountId", - "weight" - ] - }, - "example": "[\n {\"gatewayAccountId\": \"my_gateway_account_1\", \"weight\": 80},\n {\"gatewayAccountId\": \"my_gateway_account_2\", \"weight\": 20}\n]\n" - } - }, - "required": [ - "weightedList" - ] - } - ] - }, - "gateway-acquirer-weights": { - "allOf": [ - { - "$ref": "#/components/schemas/GatewayAccountPickInstruction" - }, - { - "type": "object", - "properties": { - "weightedList": { - "type": "array", - "uniqueItems": true, - "minimum": 0, - "items": { - "type": "object", - "properties": { - "gatewayName": { - "$ref": "#/components/schemas/GatewayName" - }, - "acquirerName": { - "$ref": "#/components/schemas/AcquirerName" - }, - "weight": { - "type": "integer" - } - }, - "required": [ - "gatewayName", - "acquirerName", - "weight" - ] - }, - "example": "[\n {\"gatewayName\": \"RebillyProcessor\", \"acquirerName\": \"AIB\", \"weight\": 80},\n {\"gatewayName\": \"RebillyProcessor\", \"acquirerName\": \"B+S\", \"weight\": 20}\n" - } - }, - "required": [ - "weightedList" - ] - } - ] - }, - "Rule": { - "type": "object", - "description": "The rule", - "properties": { - "name": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/OnOff" - }, - "final": { - "description": "Whether rule is final, meaning stop further matching rules if this is matched", - "type": "boolean", - "default": true - }, - "criteria": { - "$ref": "#/components/schemas/Condition" - }, - "actions": { - "type": "array", - "uniqueItems": true, - "items": { - "$ref": "#/components/schemas/RuleAction" - } - } - }, - "required": [ - "name", - "actions" - ] - }, - "RuleAction": { - "type": "object", - "discriminator": { - "propertyName": "name" - }, - "properties": { - "name": { - "type": "string", - "description": "The action name", - "enum": [ - "blacklist", - "cancel-scheduled-payments", - "guess-payment-card-expiration", - "pick-gateway-account", - "schedule-payment-retry", - "schedule-payment", - "send-email", - "trigger-webhook", - "stop-subscriptions", - "add-risk-score" - ] - }, - "status": { - "$ref": "#/components/schemas/OnOff" - } - }, - "required": [ - "name" - ] - }, - "RuleSet": { - "type": "object", - "description": "Set of rules for particular event", - "properties": { - "version": { - "type": "integer", - "readOnly": true - }, - "rules": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Rule" - } - }, - "updatedTime": { - "$ref": "#/components/schemas/ServerTimestamp" - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - }, - "required": [ - "rules" - ] - }, - "RuleSetHistoryItem": { - "type": "object", - "description": "Version of rules", - "readOnly": true, - "properties": { - "version": { - "type": "integer" - }, - "createdTime": { - "$ref": "#/components/schemas/ServerTimestamp" - }, - "_links": { - "type": "array", - "description": "The links related to a resource", - "readOnly": true, - "minItems": 2, - "maxItems": 2, - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SelfLink" - }, - { - "$ref": "#/components/schemas/RuleSetVersionLink" - } - ] - } - } - } - }, - "RuleSetVersion": { - "type": "object", - "description": "Version of rules", - "readOnly": true, - "properties": { - "version": { - "type": "integer" - }, - "rules": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Rule" - } - }, - "createdTime": { - "$ref": "#/components/schemas/ServerTimestamp" - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "Webhook": { - "type": "object", - "properties": { - "method": { - "type": "string", - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE" - ] - }, - "url": { - "type": "string", - "format": "uri" - }, - "query": { - "type": "object", - "description": "The URI parameters", - "additionalProperties": { - "type": "string", - "example": { - "param1": "value1", - "param2": "value2" - } - } - }, - "body": { - "type": "string" - }, - "credentialHash": { - "type": "string", - "description": "Webhook Credential identifier string." - }, - "headers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WebhookHeader" - } - } - }, - "required": [ - "method", - "url" - ] - }, - "WebhookHeader": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/OnOff" - }, - "value": { - "type": "string", - "example": { - "Header1": "value1", - "Header2": "value2;value3" - } - } - }, - "required": [ - "name", - "value" - ] - }, - "CommonScheduleInstruction": { - "type": "object", - "description": "The calculation instruction of scheduled time", - "discriminator": { - "propertyName": "method" - }, - "properties": { - "method": { - "type": "string", - "enum": [ - "auto", - "immediately", - "date-interval", - "day-of-month", - "day-of-week" - ] - } - }, - "required": [ - "method" - ] - }, - "CustomEventScheduleInstruction": { - "type": "object", - "description": "The calculation instruction of scheduled time", - "discriminator": { - "propertyName": "method" - }, - "properties": { - "method": { - "type": "string", - "enum": [ - "date-interval", - "day-of-month", - "day-of-week" - ] - } - }, - "required": [ - "method" - ] - }, - "DayOfWeek": { - "type": "string", - "enum": [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ] - }, - "auto": { - "allOf": [ - { - "$ref": "#/components/schemas/CommonScheduleInstruction" - } - ] - }, - "date-interval": { - "allOf": [ - { - "$ref": "#/components/schemas/CommonScheduleInstruction" - }, - { - "$ref": "#/components/schemas/CustomEventScheduleInstruction" - }, - { - "type": "object", - "properties": { - "duration": { - "type": "integer", - "description": "The number of the units", - "minimum": 1 - }, - "unit": { - "$ref": "#/components/schemas/TimeUnit" - } - }, - "required": [ - "duration", - "unit" - ] - } - ] - }, - "day-of-month": { - "allOf": [ - { - "$ref": "#/components/schemas/CommonScheduleInstruction" - }, - { - "$ref": "#/components/schemas/CustomEventScheduleInstruction" - }, - { - "type": "object", - "properties": { - "day": { - "type": "integer", - "minimum": 1, - "maximum": 31, - "description": "The day of the month when event will be scheduled.\nBe aware if the month has less days,\nthe last day of the month will be selected.\n" - }, - "time": { - "$ref": "#/components/schemas/Time" - } - }, - "required": [ - "day" - ] - } - ] - }, - "day-of-week": { - "allOf": [ - { - "$ref": "#/components/schemas/CommonScheduleInstruction" - }, - { - "$ref": "#/components/schemas/CustomEventScheduleInstruction" - }, - { - "type": "object", - "properties": { - "day": { - "$ref": "#/components/schemas/DayOfWeek" - }, - "week": { - "type": "string", - "default": "next", - "enum": [ - "next", - "first-in-month", - "last-in-month" - ] - }, - "time": { - "$ref": "#/components/schemas/Time" - } - }, - "required": [ - "day" - ] - } - ] - }, - "immediately": { - "allOf": [ - { - "$ref": "#/components/schemas/CommonScheduleInstruction" - } - ] - }, - "Time": { - "type": "string", - "format": "date-time", - "pattern": "^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](Z(\\+|\\-)([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9])?$" - }, - "TimeUnit": { - "type": "string", - "enum": [ - "second", - "seconds", - "minute", - "minutes", - "hour", - "hours", - "day", - "days", - "month", - "months", - "year", - "years" - ] - }, - "ServerTimestamp": { - "type": "string", - "description": "Read-only timestamp, automatically assigned on back-end.", - "format": "date-time", - "readOnly": true - }, - "Session": { - "type": "object", - "required": [ - "permissions" - ], - "properties": { - "id": { - "description": "The session identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "token": { - "description": "The session's token used for authentication", - "type": "string" - }, - "permissions": { - "description": "The session's permissions. See the format in example", - "allOf": [ - { - "$ref": "#/components/schemas/UserPermissions" - } - ] - }, - "userId": { - "description": "The user identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "createdTime": { - "description": "Session created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "Session updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "expiredTime": { - "description": "Session expired time. Defaults to one hour", - "type": "string", - "format": "date-time" - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "ShippingZone": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "id": { - "description": "The shipping zone identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "name": { - "description": "The shipping zone name", - "type": "string", - "maxLength": 255 - }, - "countries": { - "description": "Countries covered by the shipping zone. A country can only belong to one shipping zone (no overlapping).\nThis property can be empty or null to create a default shipping zone for countries that were not specified in other zones.\n", - "type": "array", - "items": { - "description": "Country ISO Alpha-2 code", - "type": "string", - "pattern": "^[A-Z]{2}$" - } - }, - "rates": { - "description": "Price-based shipping rate instructions", - "type": "array", - "items": { - "description": "Price based shipping rate instruction", - "allOf": [ - { - "$ref": "#/components/schemas/PriceBasedShippingRate" - } - ] - } - }, - "isDefault": { - "description": "Is this Shipping Zone default", - "readOnly": true - }, - "createdTime": { - "description": "The shipping zone created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "The shipping zone updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "Signin": { - "type": "object", - "required": [ - "email", - "password" - ], - "properties": { - "email": { - "description": "Email", - "type": "string" - }, - "password": { - "description": "Password", - "type": "string", - "format": "password" - }, - "expiredTime": { - "description": "Session expired time. Defaults to one hour", - "type": "string", - "format": "date-time" - } - } - }, - "Signup": { - "type": "object", - "required": [ - "email", - "company", - "firstName", - "lastName", - "businessPhone", - "password", - "website" - ], - "properties": { - "email": { - "description": "The user email", - "type": "string", - "format": "email", - "maxLength": 100 - }, - "company": { - "description": "The user's company name", - "type": "string" - }, - "firstName": { - "description": "The user first name", - "type": "string" - }, - "lastName": { - "description": "The user last name", - "type": "string" - }, - "businessPhone": { - "description": "The user business phone number", - "type": "string" - }, - "password": { - "description": "The user password", - "type": "string", - "format": "password" - }, - "website": { - "description": "The user's website address", - "type": "string" - }, - "currencies": { - "description": "An array of currencies codes", - "type": "array", - "default": [ - "USD" - ], - "items": { - "description": "3 letters ISO 4217 currency code", - "type": "string" - } - }, - "merchantCategoryCode": { - "description": "Merchant category code. Defaults to \"Computer Software Stores\"", - "type": "integer", - "default": 5734 - } - } - }, - "Status": { - "type": "object", - "properties": { - "status": { - "description": "The API status. If everything is ok - value is 'ok'", - "type": "string", - "readOnly": true, - "enum": [ - "ok" - ] - }, - "time": { - "description": "Current time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - } - } - }, - "Subscription": { - "type": "object", - "required": [ - "customerId", - "planId", - "websiteId" - ], - "properties": { - "id": { - "description": "The Subscription identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "customerId": { - "description": "Unique id for each customer", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "planId": { - "description": "Unique id for each plan", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "websiteId": { - "description": "Unique id for each website", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "initialInvoiceId": { - "description": "Unique id for the initial invoice", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "deliveryAddress": { - "description": "Delivery address", - "allOf": [ - { - "$ref": "#/components/schemas/ContactObject" - } - ] - }, - "billingAddress": { - "description": "Billing address", - "allOf": [ - { - "$ref": "#/components/schemas/ContactObject" - } - ] - }, - "status": { - "description": "Subscription status", - "type": "string", - "readOnly": true - }, - "quantity": { - "description": "Quantity for each subscription. Default value to 1", - "type": "integer" - }, - "autopay": { - "description": "Autopay determines if a payment attempt will be automatic", - "type": "boolean", - "default": true - }, - "inTrial": { - "description": "True if the subscription is currently in a trial period", - "type": "boolean", - "readOnly": true - }, - "rebillNumber": { - "description": "The current period number", - "type": "integer", - "readOnly": true - }, - "canceledBy": { - "description": "Canceled by", - "type": "string", - "readOnly": true, - "enum": [ - "merchant", - "customer", - "rebilly" - ] - }, - "cancelCategory": { - "description": "Cancel category", - "type": "string", - "readOnly": true, - "enum": [ - "billing-failure", - "did-not-use", - "did-not-want", - "missing-features", - "bugs-or-problems", - "do-not-remember", - "risk-warning", - "contract-expired", - "too-expensive", - "never-started", - "switched-plan", - "other" - ] - }, - "cancelDescription": { - "description": "Cancel reason description in free form", - "type": "string", - "readOnly": true, - "maxLength": 255 - }, - "riskMetadata": { - "description": "Risk metadata", - "allOf": [ - { - "$ref": "#/components/schemas/RiskMetadata" - } - ] - }, - "startTime": { - "description": "Subscription start time", - "type": "string", - "format": "date-time" - }, - "activationTime": { - "description": "Subscription activation time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "endTime": { - "description": "Subscription end time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "renewalTime": { - "description": "Subscription renewal time", - "type": "string", - "format": "date-time" - }, - "canceledTime": { - "description": "Subscription canceled time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "createdTime": { - "description": "Subscription created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "Subscription updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "customFields": { - "$ref": "#/components/schemas/ResourceCustomFields" - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 6, - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SelfLink" - }, - { - "$ref": "#/components/schemas/CustomerLink" - }, - { - "$ref": "#/components/schemas/PlanLink" - }, - { - "$ref": "#/components/schemas/WebsiteLink" - }, - { - "$ref": "#/components/schemas/BillingContactLink" - }, - { - "$ref": "#/components/schemas/DeliveryContactLink" - }, - { - "$ref": "#/components/schemas/LeadSourceLink" - } - ] - } - } - } - }, - "SubscriptionCancel": { - "type": "object", - "required": [ - "policy", - "canceledBy", - "cancelCategory" - ], - "properties": { - "policy": { - "description": "Cancel policy", - "type": "string", - "enum": [ - "at-next-renewal", - "now-with-prorata-credit", - "now" - ] - }, - "canceledBy": { - "description": "Canceled by", - "type": "string", - "enum": [ - "merchant", - "customer" - ] - }, - "cancelCategory": { - "description": "Cancel category", - "type": "string", - "enum": [ - "did-not-use", - "did-not-want", - "missing-features", - "bugs-or-problems", - "do-not-remember", - "risk-warning", - "contract-expired", - "too-expensive", - "other" - ] - }, - "cancelDescription": { - "description": "Cancel reason description in free form", - "type": "string", - "maxLength": 255 - } - } - }, - "SubscriptionSwitch": { - "type": "object", - "required": [ - "planId", - "policy" - ], - "properties": { - "planId": { - "description": "The plan identifier string", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "policy": { - "description": "Switch policy", - "type": "string", - "enum": [ - "at-next-renewal", - "now-with-prorata-credit", - "now" - ] - }, - "websiteId": { - "description": "The website's ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "quantity": { - "description": "Quantity for each subscription. Default value to 1", - "type": "integer" - } - } - }, - "TaxCategory": { - "type": "object", - "properties": { - "id": { - "description": "The tax category identifier string", - "type": "string", - "readOnly": true, - "maxLength": 50, - "enum": [ - 99999, - 20010, - 40030, - 51020, - 51010, - 31000, - 30070 - ] - }, - "description": { - "description": "The tax category description", - "type": "string", - "maxLength": 512 - }, - "taxProvider": { - "description": "The tax category maps to a provider", - "type": "string", - "enum": [ - "tax-jar" - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "ThreeDSecure": { - "type": "object", - "required": [ - "enrolled", - "enrollmentEci", - "customerId", - "gatewayAccountId", - "paymentCardId", - "websiteId", - "currency", - "amount" - ], - "properties": { - "id": { - "description": "The 3D Secure entry identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "customerId": { - "description": "Related customer ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "gatewayAccountId": { - "description": "Related gateway account ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "paymentCardId": { - "description": "Related payment card ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "websiteId": { - "description": "Related Website ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "enrolled": { - "description": "Is the cardholder enrolled in 3DSecure", - "type": "string", - "enum": [ - "Y", - "N", - "U" - ] - }, - "enrollmentEci": { - "description": "The 3D Secure entry enrollment eci", - "type": "string" - }, - "eci": { - "description": "The 3D Secure entry electronic commerce indicator", - "type": "integer" - }, - "cavv": { - "description": "The 3D Secure entry cardholder authentication verification value", - "type": "string" - }, - "xid": { - "description": "The 3D Secure entry transaction Id", - "type": "string" - }, - "payerAuthResponseStatus": { - "description": "The 3D Secure entry Auth Response Status", - "type": "string", - "enum": [ - "Y", - "N", - "U", - "A" - ] - }, - "signatureVerification": { - "description": "If signature was verified", - "type": "string", - "enum": [ - "Y", - "N" - ] - }, - "amount": { - "description": "Transaction amount", - "type": "number", - "format": "double" - }, - "currency": { - "description": "The currency three letter code", - "type": "string" - }, - "createdTime": { - "description": "The 3D Secure entry created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "ApiTracking": { - "type": "object", - "description": "Tracking API Requests.", - "readOnly": true, - "properties": { - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "status": { - "type": "integer", - "description": "HTTP response code" - }, - "url": { - "type": "string", - "description": "API request address" - }, - "method": { - "type": "string", - "description": "HTTP method", - "enum": [ - "HEAD", - "GET", - "POST", - "PUT", - "DELETE", - "PATCH" - ] - }, - "request": { - "type": "string", - "description": "Request JSON-string" - }, - "response": { - "type": "string", - "description": "Response JSON-string" - }, - "requestHeaders": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "example": { - "User-Agent": "Mozilla/5.0", - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" - } - }, - "responseHeaders": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "example": { - "Rate-Limit-Limit": 5000, - "Rate-Limit-Remaining": 4999, - "Rate-Limit-Reset": "Mon, 31 Jul 2017 04:16:00 +0000" - } - }, - "user": { - "type": "object", - "description": "The user who has made a request", - "readOnly": true, - "properties": { - "userId": { - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "apiKeyId": { - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "email": { - "description": "The user email", - "type": "string", - "format": "email" - }, - "firstName": { - "description": "The user first name", - "type": "string" - }, - "lastName": { - "description": "The user last name", - "type": "string" - }, - "ipAddress": { - "type": "string", - "description": "Client IP address", - "format": "ipv4" - }, - "userAgent": { - "description": "The software that is acting on behalf of a user", - "type": "string" - }, - "fingerprint": { - "description": "The user device fingerprint hash", - "type": "string" - }, - "isSupport": { - "description": "If user from support", - "type": "boolean" - } - } - }, - "duration": { - "type": "integer", - "description": "Request duration in milliseconds" - }, - "createdTime": { - "description": "The log created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "SubscriptionTracking": { - "type": "object", - "description": "Tracking subscription log", - "readOnly": true, - "properties": { - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "subscriptionId": { - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "invoiceItemId": { - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "result": { - "type": "string", - "description": "Subscription's result", - "enum": [ - "created", - "postponed", - "stopped", - "error" - ] - }, - "message": { - "type": "string", - "description": "It contains the transaction number and renewal time" - }, - "createdTime": { - "description": "The log created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "WebhookTracking": { - "type": "object", - "description": "Webhook Tracking Requests.", - "readOnly": true, - "properties": { - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "eventType": { - "$ref": "#/components/schemas/EventType" - }, - "url": { - "type": "string", - "description": "Url where webhook was sent" - }, - "method": { - "type": "string", - "description": "HTTP method which was used to send webhook", - "example": "POST" - }, - "headers": { - "type": "object", - "description": "HTTP headers which were used to send webhook", - "additionalProperties": { - "type": "string" - }, - "example": { - "My-Header": "Cool-Value" - } - }, - "responseCode": { - "type": "integer", - "description": "HTTP code response" - }, - "responseBody": { - "type": "string", - "description": "Response body received" - }, - "payload": { - "type": "object", - "description": "Event's data information" - }, - "sentTime": { - "description": "Sent time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "initiatedTime": { - "description": "Initiated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "createdTime": { - "description": "The log created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "WebsiteWebhookTracking": { - "type": "object", - "description": "Webhook Tracking Requests.", - "readOnly": true, - "properties": { - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "websiteId": { - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "eventName": { - "type": "string", - "description": "Event name for which webhook was called" - }, - "status": { - "type": "string", - "description": "Event's status", - "enum": [ - "fail", - "success" - ] - }, - "response": { - "type": "integer", - "description": "HTTP code response" - }, - "pushData": { - "type": "string", - "description": "Event's data information JSON-string" - }, - "sentTime": { - "description": "Sent time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "nextSendTime": { - "description": "Next send time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "createdTime": { - "description": "The log created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "TransactionGatewayLog": { - "type": "object", - "readOnly": true, - "properties": { - "headers": { - "description": "The request headers", - "type": "array", - "items": { - "type": "string" - } - }, - "url": { - "description": "The request URL", - "type": "string" - }, - "request": { - "description": "The request body", - "type": "string" - }, - "response": { - "description": "The response body", - "type": "string" - }, - "duration": { - "description": "The request time, msec", - "type": "integer" - }, - "createdTime": { - "description": "The log entry created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/TransactionLink" - } - } - } - }, - "TransactionRefund": { - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "description": "Refund amount", - "type": "number", - "format": "double" - } - } - }, - "RedirectUrls": { - "type": "object", - "description": "The redirect URIs", - "required": [ - "error", - "success", - "decline", - "cancel" - ], - "properties": { - "error": { - "type": "string", - "format": "url" - }, - "success": { - "type": "string", - "format": "url" - }, - "decline": { - "type": "string", - "format": "url" - }, - "cancel": { - "type": "string", - "format": "url" - } - } - }, - "ThreeDSecureResult": { - "type": "object", - "readOnly": true, - "required": [ - "enrolled", - "authenticated", - "liability" - ], - "properties": { - "enrolled": { - "description": "Is the cardholder enrolled in 3D Secure", - "type": "string", - "enum": [ - "yes", - "no", - "invalid card/timeout", - "unavailable" - ] - }, - "authenticated": { - "description": "The 3D Secure entry Auth Response Status", - "type": "string", - "enum": [ - "yes", - "no", - "not applicable", - "attempted" - ] - }, - "liability": { - "type": "string", - "enum": [ - "protected", - "not protected", - "protected (attempt)" - ] - } - } - }, - "Transaction": { - "type": "object", - "properties": { - "id": { - "description": "The transaction identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "type": { - "description": "Transaction type", - "type": "string", - "readOnly": true, - "enum": [ - "authorize", - "capture", - "credit", - "refund", - "sale", - "void" - ] - }, - "status": { - "description": "Transaction status", - "type": "string", - "readOnly": true, - "enum": [ - "completed", - "connection-error", - "never-sent", - "pending", - "sending", - "suspended", - "timeout", - "waiting-capture", - "waiting-refund" - ] - }, - "result": { - "description": "Transaction result", - "type": "string", - "readOnly": true, - "enum": [ - "approved", - "canceled", - "declined", - "unknown" - ] - }, - "amount": { - "description": "The transactions's amount", - "type": "number", - "format": "double", - "readOnly": true - }, - "currency": { - "description": "The transactions's currency", - "type": "string", - "readOnly": true - }, - "parentTransactionId": { - "description": "The transactions's parent ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ], - "readOnly": true - }, - "childTransactions": { - "description": "The child transaction IDs", - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/components/schemas/ResourceId" - } - }, - "invoiceIds": { - "description": "The invoice IDs related to transaction", - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/components/schemas/ResourceId" - } - }, - "subscriptionIds": { - "description": "The subscription IDs related to transaction", - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/components/schemas/ResourceId" - } - }, - "isRebill": { - "type": "boolean", - "readOnly": true - }, - "rebillNumber": { - "description": "The transactions's rebill number", - "type": "integer", - "readOnly": true - }, - "gatewayAccountId": { - "description": "The transactions's Gateway Account ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ], - "readOnly": true - }, - "gatewayTransactionId": { - "description": "The gateway's transaction ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ], - "readOnly": true - }, - "gateway": { - "type": "object", - "description": "The related gateway information", - "readOnly": true, - "properties": { - "response": { - "description": "The gateway's response", - "type": "object", - "properties": { - "code": { - "description": "The gateway's response code", - "type": "string" - }, - "message": { - "description": "The gateway's response message", - "type": "string" - }, - "type": { - "description": "The gateway's response type", - "type": "string" - }, - "originalCode": { - "description": "The raw, unmapped gateway's response code", - "type": "string" - }, - "originalMessage": { - "description": "The raw, unmapped gateway's response message", - "type": "string" - } - } - }, - "avsResponse": { - "description": "The AVS gateway's response", - "type": "object", - "properties": { - "code": { - "description": "The raw response code", - "type": "string" - }, - "message": { - "description": "The raw response message", - "type": "string" - } - } - }, - "cvvResponse": { - "description": "The CVV gateway's response", - "type": "object", - "properties": { - "code": { - "description": "The raw response code", - "type": "string" - }, - "message": { - "description": "The raw response message", - "type": "string" - } - } - } - } - }, - "gatewayName": { - "description": "Payment Gateway name, available only when transaction use gateway, else null", - "type": "string", - "readOnly": true - }, - "acquirerName": { - "description": "Acquirer name, available only when transaction use gateway, else null", - "type": "string", - "readOnly": true - }, - "websiteId": { - "description": "Website's ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ], - "readOnly": true - }, - "customerId": { - "description": "Customer's ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ], - "readOnly": true - }, - "method": { - "description": "Payment Method", - "allOf": [ - { - "$ref": "#/components/schemas/Method" - } - ] - }, - "velocity": { - "description": "The number of transactions by the same customer in the past 24 hours", - "type": "number", - "format": "integer" - }, - "bin": { - "description": "Payment Card BIN", - "type": "string", - "format": "bin", - "readOnly": true - }, - "paymentInstrument": { - "$ref": "#/components/schemas/PaymentInstrument" - }, - "billingAddress": { - "description": "Billing Address", - "allOf": [ - { - "$ref": "#/components/schemas/ContactObject" - } - ] - }, - "has3ds": { - "type": "boolean", - "readOnly": true - }, - "3ds": { - "allOf": [ - { - "$ref": "#/components/schemas/ThreeDSecureResult" - } - ] - }, - "hasDcc": { - "description": "True if transaction has Dynamic Currency Conversion applied", - "type": "boolean", - "readOnly": true - }, - "dcc": { - "description": "Dynamic Currency Conversion detailed information. Null if hasDcc is false", - "type": "object", - "readOnly": true, - "properties": { - "base": { - "type": "object", - "description": "Initial amount and currency to convert from", - "properties": { - "amount": { - "type": "number", - "format": "double" - }, - "currency": { - "type": "string" - } - } - }, - "quote": { - "type": "object", - "description": "Suggested amount and currency to convert to", - "properties": { - "amount": { - "type": "number", - "format": "double" - }, - "currency": { - "type": "string" - } - } - }, - "usdMarkup": { - "description": "The amount of markup translated to USD", - "type": "number", - "format": "double" - }, - "outcome": { - "type": "string", - "description": "Dynamic Currency Conversion outcome", - "enum": [ - "rejected", - "selected", - "unknown" - ] - } - } - }, - "riskScore": { - "description": "The transactions's risk score", - "type": "number", - "format": "integer", - "readOnly": true - }, - "riskMetadata": { - "description": "Risk metadata", - "allOf": [ - { - "$ref": "#/components/schemas/RiskMetadata" - } - ] - }, - "redirectUrls": { - "$ref": "#/components/schemas/RedirectUrls" - }, - "retryInstruction": { - "$ref": "#/components/schemas/PaymentRetry" - }, - "retryNumber": { - "type": "integer", - "readOnly": true, - "description": "The position in the sequence of retries" - }, - "retriedTransactionId": { - "readOnly": true, - "description": "The retried transaction ID", - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "description": { - "type": "string", - "description": "The payment description", - "maxLength": 255 - }, - "isDisputed": { - "description": "True if transaction is disputed", - "type": "boolean", - "readOnly": true - }, - "customFields": { - "$ref": "#/components/schemas/ResourceCustomFields" - }, - "scheduledTime": { - "type": "string", - "description": "The time the transaction is scheduled for collection", - "format": "date-time" - }, - "processedTime": { - "description": "Transaction processed time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "createdTime": { - "description": "Transaction created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "Transaction updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 13, - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SelfLink" - }, - { - "$ref": "#/components/schemas/GatewayAccountLink" - }, - { - "$ref": "#/components/schemas/CustomerLink" - }, - { - "$ref": "#/components/schemas/WebsiteLink" - }, - { - "$ref": "#/components/schemas/PaymentCardLink" - }, - { - "$ref": "#/components/schemas/ParentTransactionLink" - }, - { - "$ref": "#/components/schemas/RetriedTransactionLink" - }, - { - "$ref": "#/components/schemas/BillingContactLink" - }, - { - "$ref": "#/components/schemas/LeadSourceLink" - }, - { - "$ref": "#/components/schemas/ApprovalUrlLink" - }, - { - "$ref": "#/components/schemas/CancelUrlLink" - }, - { - "$ref": "#/components/schemas/RefundUrlLink" - }, - { - "$ref": "#/components/schemas/DisputeLink" - } - ] - } - } - } - }, - "UpdatePassword": { - "type": "object", - "properties": { - "currentPassword": { - "description": "Current user's password - used when requesting password change", - "type": "string", - "format": "password" - }, - "newPassword": { - "description": "New user's password - used when requesting password change", - "type": "string", - "format": "password" - } - } - }, - "User": { - "type": "object", - "required": [ - "email", - "firstName", - "lastName" - ], - "properties": { - "id": { - "description": "The user identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "email": { - "description": "The user email", - "type": "string", - "format": "email", - "maxLength": 100 - }, - "firstName": { - "description": "User's first name", - "type": "string" - }, - "lastName": { - "description": "User's last name", - "type": "string" - }, - "businessPhone": { - "description": "The user business phone number", - "type": "string" - }, - "mobilePhone": { - "description": "The user mobile phone number", - "type": "string" - }, - "password": { - "description": "User's password. If not provided, password reset email will be sent", - "type": "string", - "format": "password" - }, - "permissions": { - "description": "The user's permissions. See the format in example", - "allOf": [ - { - "$ref": "#/components/schemas/UserPermissions" - } - ] - }, - "createdTime": { - "description": "The user created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "The user updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "loginTime": { - "description": "The user last login time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "reportingCurrency": { - "description": "The user's ISO Alpha-3 code used for reports", - "type": "string" - }, - "availableCurrencies": { - "type": "array", - "description": "An array of reporting currencies enabled for the merchant", - "readOnly": true, - "items": { - "type": "string" - } - }, - "totpRequired": { - "description": "The user setting of two-factor authentication", - "type": "boolean" - }, - "totpSecret": { - "description": "The user TOTP key for authentication app (if TOTP enabled)", - "type": "string" - }, - "totpUrl": { - "description": "The user link to QR-code for TOTP authentication app (if TOTP enabled)", - "type": "string", - "format": "url" - }, - "status": { - "description": "The user status", - "type": "string", - "enum": [ - "active", - "inactive", - "pending-confirmation" - ], - "readOnly": true - }, - "country": { - "description": "The user country setting - two letter code", - "type": "string" - }, - "preferences": { - "description": "User preferences like timezone, language and many more. This is an object with custom properties.", - "type": "object" - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 1, - "items": { - "$ref": "#/components/schemas/SelfLink" - } - } - } - }, - "UserPermissions": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "properties": { - "resourceName": { - "type": "string", - "enum": [ - "3dsecure", - "api-keys", - "api-tracking", - "authentication-options", - "authentication-tokens", - "bank-accounts", - "blacklists", - "checkout-pages", - "contacts", - "coupons", - "coupons-redemptions", - "credentials", - "custom-events", - "custom-fields", - "customers", - "disputes", - "events", - "gateway-accounts", - "invoices", - "layouts", - "lead-sources", - "lists", - "matched-rules", - "notes", - "oct-batch", - "organizations", - "password-tokens", - "payments", - "payment-cards", - "payment-cards-migrations", - "paypal-accounts", - "plans", - "reports", - "reset-sandbox", - "rulesets", - "sessions", - "subscriptions", - "subscription-tracking", - "tokens", - "transactions", - "users", - "webhook", - "webhook-tracking", - "websites" - ] - }, - "methods": { - "type": "array", - "minItems": 1, - "items": { - "type": "string", - "enum": [ - "HEAD", - "GET", - "POST", - "PUT", - "DELETE", - "PATCH" - ] - } - }, - "resourceIds": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ResourceId" - } - } - } - }, - "example": [ - { - "resourceName": "plans", - "methods": [ - "GET", - "POST", - "PUT", - "HEAD", - "DELETE" - ] - }, - { - "resourceName": "invoices", - "methods": [ - "GET", - "HEAD" - ], - "resourceIds": [ - "4f6cf35x-2c4y-483z-a0a9-158621f77a21", - "1586f35x-4f6c-483z-a0a9-2c4y21f77a21" - ] - }, - { - "resourceName": null, - "methods": null, - "resourceIds": null - } - ] - }, - "WebhookAuthorization": { - "type": "object", - "discriminator": { - "propertyName": "type" - }, - "properties": { - "type": { - "type": "string", - "description": "The authorization type", - "enum": [ - "none", - "basic", - "digest", - "oauth1" - ], - "default": "none" - } - }, - "required": [ - "type" - ] - }, - "basic": { - "allOf": [ - { - "$ref": "#/components/schemas/WebhookAuthorization" - }, - { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "password": { - "type": "string", - "format": "password" - } - }, - "required": [ - "username", - "password" - ] - } - ] - }, - "digest": { - "allOf": [ - { - "$ref": "#/components/schemas/WebhookAuthorization" - }, - { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "password": { - "type": "string", - "format": "password" - } - }, - "required": [ - "username", - "password" - ] - } - ] - }, - "oauth1": { - "allOf": [ - { - "$ref": "#/components/schemas/WebhookAuthorization" - }, - { - "type": "object", - "properties": { - "consumerKey": { - "type": "string" - }, - "consumerSecret": { - "type": "string" - }, - "token": { - "type": "string" - }, - "tokenSecret": { - "type": "string" - } - }, - "required": [ - "consumerKey", - "consumerSecret", - "token", - "tokenSecret" - ] - } - ] - }, - "WebhookCredential": { - "type": "object", - "description": "Webhook credential", - "properties": { - "hash": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "host": { - "type": "string", - "description": "The host name" - }, - "auth": { - "$ref": "#/components/schemas/WebhookAuthorization" - } - }, - "required": [ - "host" - ] - }, - "Website": { - "type": "object", - "required": [ - "name", - "url", - "servicePhone", - "serviceEmail" - ], - "properties": { - "id": { - "description": "The website identifier string", - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/ResourceId" - } - ] - }, - "name": { - "description": "The website's name", - "type": "string" - }, - "url": { - "description": "The website's domain address", - "type": "string" - }, - "servicePhone": { - "description": "The website's customer service phone number", - "type": "string" - }, - "serviceEmail": { - "description": "The website's customer service email address", - "type": "string", - "format": "email" - }, - "checkoutPageUri": { - "description": "Your own custom URI for this Checkout Page", - "type": "string" - }, - "createdTime": { - "description": "Website created time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "updatedTime": { - "description": "Website updated time", - "allOf": [ - { - "$ref": "#/components/schemas/ServerTimestamp" - } - ] - }, - "customFields": { - "$ref": "#/components/schemas/ResourceCustomFields" - }, - "_links": { - "type": "array", - "description": "The links related to resource", - "readOnly": true, - "minItems": 1, - "maxItems": 2, - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SelfLink" - }, - { - "$ref": "#/components/schemas/NotesLink" - } - ] - } - } - } - }, - "WebsiteWebhook": { - "type": "object", - "required": [ - "webHookUrl", - "webHookUsername", - "webHookPassword" - ], - "properties": { - "webHookUrl": { - "description": "Webhook Url", - "type": "string" - }, - "webHookUsername": { - "description": "Webhook HTTP Authentication Username", - "type": "string" - }, - "webHookPassword": { - "description": "Webhook HTTP Authentication Password. An empty string will be returned in the response", - "type": "string" - } - } - } - }, - "responses": { - "AccessForbidden": { - "description": "Access forbidden, invalid API-KEY was used", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "NotFound": { - "description": "Resource was not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "Conflict": { - "description": "Conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "InvalidDataError": { - "description": "Invalid data was sent", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidError" - } - } - } - } - }, - "parameters": { - "resourceId": { - "name": "id", - "in": "path", - "description": "The resource identifier string", - "required": true, - "schema": { - "type": "string" - } - }, - "collectionLimit": { - "name": "limit", - "in": "query", - "description": "The collection items limit", - "schema": { - "type": "integer", - "minimum": 0, - "maximum": 1000 - } - }, - "collectionOffset": { - "name": "offset", - "in": "query", - "description": "The collection items offset", - "schema": { - "type": "integer", - "minimum": 0 - } - }, - "collectionFilter": { - "name": "filter", - "in": "query", - "description": "The collection items filter requires a special format.\nUse \",\" for multiple allowed values. Use \";\" for multiple fields.\nSee the filter guide for more options and examples about this format.\n", - "schema": { - "type": "string" - } - }, - "collectionQuery": { - "name": "q", - "in": "query", - "description": "The partial search of the text fields.", - "schema": { - "type": "string" - } - }, - "collectionCriteria": { - "name": "criteria", - "in": "query", - "description": "The json criteria for collection", - "schema": { - "type": "string" - } - }, - "collectionSort": { - "name": "sort", - "in": "query", - "description": "The collection items sort field and order (prefix with \"-\" for descending sort).", - "style": "form", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "collectionFields": { - "name": "fields", - "in": "query", - "description": "Limit the returned fields to the list specified, separated by comma. Note that id is always returned.", - "schema": { - "type": "string" - } - }, - "collectionExpand": { - "name": "expand", - "in": "query", - "description": "Expand response to get full related object instead of ID. See the expand guide for more info.", - "schema": { - "type": "string" - } - }, - "systemEventType": { - "name": "eventType", - "in": "path", - "description": "The event type", - "required": true, - "schema": { - "type": "string" - } - }, - "rulesVersion": { - "name": "version", - "in": "path", - "required": true, - "description": "The rule set version. Expand response to get full related object instead of ID. See the expand guide for more info.", - "schema": { - "type": "integer", - "minimum": 1 - } - }, - "hash": { - "name": "hash", - "in": "path", - "description": "The token identifier string", - "required": true, - "schema": { - "type": "string" - } - }, - "mediaType": { - "name": "Accept", - "in": "header", - "description": "The response media type", - "schema": { - "type": "string", - "enum": [ - "application/json" - ], - "default": "application/json" - } - } - }, - "requestBodies": { - "ApiKey": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiKey" - } - } - }, - "description": "ApiKey resource", - "required": true - }, - "Attachment": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Attachment" - } - } - }, - "description": "Attachment resource", - "required": true - }, - "BankAccount": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BankAccount" - } - } - }, - "description": "BankAccount resource", - "required": true - }, - "Blacklist": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Blacklist" - } - } - }, - "description": "Blacklist resource", - "required": true - }, - "CheckoutPage": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutPage" - } - } - }, - "description": "Checkout Page resource", - "required": true - }, - "Contact": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contact" - } - } - }, - "description": "Contact resource", - "required": true - }, - "Coupon": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Coupon" - } - } - }, - "description": "Coupon resource", - "required": true - }, - "Credential": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Credential" - } - } - }, - "description": "Credential resource", - "required": true - }, - "CustomEvent": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomEvent" - } - } - }, - "description": "Custom event resource", - "required": true - }, - "RuleSet": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleSet" - } - } - }, - "description": "Set of rules resource", - "required": true - }, - "Customer": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - }, - "description": "Customer resource", - "required": true - }, - "LeadSource": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LeadSource" - } - } - }, - "description": "Lead Source resource", - "required": true - }, - "Dispute": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Dispute" - } - } - }, - "description": "Dispute resource", - "required": true - }, - "GatewayAccount": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GatewayAccount" - } - } - }, - "description": "Gateway Account resource", - "required": true - }, - "Invoice": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Invoice" - } - } - }, - "description": "Invoice resource", - "required": true - }, - "Layout": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Layout" - } - } - }, - "description": "Layout resource", - "required": true - }, - "List": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/List" - } - } - }, - "description": "List resource", - "required": true - }, - "Note": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Note" - } - } - }, - "description": "Note resource", - "required": true - }, - "Organization": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Organization" - } - } - }, - "description": "Organization resource", - "required": true - }, - "Payment": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Payment" - } - } - }, - "description": "Payment resource", - "required": true - }, - "Plan": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Plan" - } - } - }, - "description": "Plan resource", - "required": true - }, - "GlobalWebhook": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GlobalWebhook" - } - } - }, - "description": "Webhook resource", - "required": true - }, - "Product": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - }, - "description": "Product resource", - "required": true - }, - "UpdatePassword": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdatePassword" - } - } - }, - "description": "currentPassword and newPassword", - "required": true - }, - "Subscription": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Subscription" - } - } - }, - "description": "Subscription resource", - "required": true - }, - "PaymentToken": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentToken" - } - } - }, - "description": "PaymentToken resource", - "required": true - }, - "User": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - }, - "description": "User resource", - "required": true - }, - "Website": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Website" - } - } - }, - "description": "Website resource", - "required": true - } - }, - "securitySchemes": { - "ApiKey": { - "description": "When you sign up for an account, you are given your first API key.\nTo do so please follow this link: https://www.rebilly.com/site/signup/\nAlso you can generate additional API keys, and delete API keys (as you may\nneed to rotate your keys in the future).\n", - "name": "REB-APIKEY", - "type": "apiKey", - "in": "header" - }, - "JWT": { - "description": "You can create a JSON Web Token (JWT) via our Sessions resource.\n", - "type": "http", - "scheme": "basic" - }, - "RebAuth": { - "description": "Only for the Tokens resource.\nThe REB-AUTH value is created in this way\nGenerate a Nonce (random string), and a Timestamp (unix timestamp)\nConcatenate the values of ApiUser, Nonce, and Timestamp (in that order).\nUse that value as the input data when you calculate the HMAC-SHA1 with your secret key, called the signature.\nForming the four data points into a JSON object.\n\n```json\n{\n \"REB-APIUSER\": \"abcdefg\",\n \"REB-NONCE\": \"adfsjtreitou345fgkdafgj\",\n \"REB-TIMESTAMP\": \"1382591345\",\n \"REB-SIGNATURE\": \"a234fc95460401cfg09c9d09\"\n}\n```\n\nThen base64 encode that JSON object. This is the final value of the REB-AUTH HTTP header\n", - "name": "REB-AUTH", - "type": "apiKey", - "in": "header" - } - } - } -} diff --git a/demo/code-samples-demo.gif b/demo/code-samples-demo.gif new file mode 100644 index 00000000..a6836eb0 Binary files /dev/null and b/demo/code-samples-demo.gif differ diff --git a/demo/components/FileInput.tsx b/demo/components/FileInput.tsx deleted file mode 100644 index 7ea8d6ff..00000000 --- a/demo/components/FileInput.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import * as yaml from 'js-yaml'; -import * as React from 'react'; -import { ChangeEvent, RefObject, useRef } from 'react'; -import styled from '../../src/styled-components'; - -const Button = styled.button` - background-color: #fff; - color: #333; - padding: 2px 10px; - touch-action: manipulation; - cursor: pointer; - user-select: none; - border: 1px solid #ccc; - font-size: 16px; - height: 28px; - box-sizing: border-box; - vertical-align: middle; - line-height: 1; - outline: none; - white-space: nowrap; - @media (max-width: 699px) { - display: none; - } -`; - -function FileInput(props: { onUpload }) { - const hiddenFileInput: RefObject = useRef(null); - - const handleClick = () => { - if (hiddenFileInput && hiddenFileInput.current) { - hiddenFileInput.current.click(); - } - }; - - const uploadFile = (event: ChangeEvent) => { - const file = (event.target as HTMLInputElement).files![0]; - const reader = new FileReader(); - reader.onload = () => { - props.onUpload(yaml.load(reader.result)); - }; - reader.readAsText(file); - }; - - return ( - - - - - ); -} - -export default FileInput; diff --git a/demo/index.html b/demo/index.html deleted file mode 100644 index 8d751a6b..00000000 --- a/demo/index.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - Redoc Interactive Demo - - - - - - - - - - - - - -
- - - - diff --git a/demo/index.tsx b/demo/index.tsx deleted file mode 100644 index 1e621a45..00000000 --- a/demo/index.tsx +++ /dev/null @@ -1,213 +0,0 @@ -import * as React from 'react'; -import { createRoot } from 'react-dom/client'; -import styled from 'styled-components'; -import { RedocStandalone } from '../src'; -import ComboBox from './ComboBox'; -import FileInput from './components/FileInput'; - -const DEFAULT_SPEC = 'museum.yaml'; -const NEW_VERSION_PETSTORE = 'openapi-3-1.yaml'; - -const demos = [ - { value: DEFAULT_SPEC, label: 'Museum API' }, - { value: NEW_VERSION_PETSTORE, label: 'Petstore OpenAPI 3.1' }, - { value: 'https://api.apis.guru/v2/specs/instagram.com/1.0.0/swagger.yaml', label: 'Instagram' }, - { - value: 'https://api.apis.guru/v2/specs/googleapis.com/calendar/v3/openapi.yaml', - label: 'Google Calendar', - }, - { value: 'https://api.apis.guru/v2/specs/slack.com/1.7.0/openapi.yaml', label: 'Slack' }, - { value: 'https://api.apis.guru/v2/specs/zoom.us/2.0.0/openapi.yaml', label: 'Zoom.us' }, -]; - -class DemoApp extends React.Component< - Record, - { spec: object | undefined; specUrl: string; dropdownOpen: boolean; cors: boolean } -> { - constructor(props) { - super(props); - - let parts = window.location.search.match(/url=([^&]+)/); - let url = DEFAULT_SPEC; - if (parts && parts.length > 1) { - url = decodeURIComponent(parts[1]); - } - - parts = window.location.search.match(/[?&]nocors(&|#|$)/); - let cors = true; - if (parts && parts.length > 1) { - cors = false; - } - - this.state = { - spec: undefined, - specUrl: url, - dropdownOpen: false, - cors, - }; - } - - handleUploadFile = (spec: object) => { - this.setState({ - spec, - specUrl: '', - }); - }; - - handleChange = (url: string) => { - if (url === NEW_VERSION_PETSTORE) { - this.setState({ cors: false }); - 0; - } - this.setState({ - specUrl: url, - }); - window.history.pushState( - undefined, - '', - updateQueryStringParameter(location.search, 'url', url), - ); - }; - - toggleCors = (e: React.ChangeEvent) => { - const cors = e.currentTarget.checked; - this.setState({ - cors, - }); - window.history.pushState( - undefined, - '', - updateQueryStringParameter(location.search, 'nocors', cors ? undefined : ''), - ); - }; - - render() { - const { specUrl, cors } = this.state; - let proxiedUrl = specUrl; - if (specUrl !== DEFAULT_SPEC) { - proxiedUrl = cors - ? 'https://cors.redoc.ly/' + new URL(specUrl, window.location.href).href - : specUrl; - } - return ( - <> - - - - - - - - - - - - -