diff --git a/.github/workflows/release-erlang-v2.yml b/.github/workflows/release-erlang-v2.yml index 19a6d17dac..7f91dc2637 100644 --- a/.github/workflows/release-erlang-v2.yml +++ b/.github/workflows/release-erlang-v2.yml @@ -1,70 +1,63 @@ -name: Release Erlang libraries +name: Release Erlang Libraries on: push: branches: - - v2 + - 'v0' + - 'epic/**' + pull_request: + branches: ["**"] jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: "16" + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 - name: Setup swagger-codegen - uses: valitydev/action-setup-swagger-codegen@v0.0.1 + uses: valitydev/action-setup-swagger-codegen@v0.0.4 with: codegen-version: "2.4.25" generator-version: "1.1.0" - - name: Cache Node Modules and NPM Cache - id: cache - uses: actions/cache@v3 - with: - path: | - node_modules - ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} - - name: Install deps - if: steps.cache.outputs.cache-hit != 'true' run: npm install - name: Bundle spec and build docsite - run: npm run build -- web_deploy + run: npm run build - name: Generate stubs - run: > + run: | mkdir -p out + echo "Generate wallet stubs" + swagger-codegen generate -l vality-erlang-client -i web_deploy/swagger.json -o out/erlang-client --additional-properties packageName=swag_client + swagger-codegen generate -l vality-erlang-server -i web_deploy/swagger.json -o out/erlang-server --additional-properties packageName=swag_server + + - name: Set release suffix + id: vars + run: | + BRANCH_NAME="${GITHUB_REF##*/}" + if [[ "$GITHUB_REF" == refs/heads/epic/* ]]; then + RELEASE_SUFFIX="epic-${BRANCH_NAME}" + else + RELEASE_SUFFIX="v0" + fi + echo "release_suffix=${RELEASE_SUFFIX}" >> $GITHUB_OUTPUT - swagger-codegen generate - -l vality-erlang-client - -i web_deploy/swagger.json - -o out/erlang-client - --additional-properties packageName=swag_client - - swagger-codegen generate - -l vality-erlang-server - -i web_deploy/swagger.json - -o out/erlang-server - --additional-properties packageName=swag_server - name: Deploy erlang-client artifact to release branch - uses: JamesIves/github-pages-deploy-action@v4.3.3 + if: ${{ github.event_name == 'push' }} + uses: JamesIves/github-pages-deploy-action@v4.4.1 with: - branch: release/erlang/client/v2 + branch: release/erlang/client/${{ steps.vars.outputs.release_suffix }} folder: out/erlang-client commit-message: Release ${{ github.repository }}@${{ github.sha }} - name: Deploy erlang-server artifact to release branch - uses: JamesIves/github-pages-deploy-action@v4.3.3 + if: ${{ github.event_name == 'push' }} + uses: JamesIves/github-pages-deploy-action@v4.4.1 with: - branch: release/erlang/server/v2 + branch: release/erlang/server/${{ steps.vars.outputs.release_suffix }} folder: out/erlang-server - commit-message: Release ${{ github.repository }}@${{ github.sha }} + commit-message: Release ${{ github.repository }}@${{ github.sha }} \ No newline at end of file diff --git a/spec/definitions/ArticlesOfAssociation.yaml b/spec/definitions/ArticlesOfAssociation.yaml deleted file mode 100644 index 5a9772729d..0000000000 --- a/spec/definitions/ArticlesOfAssociation.yaml +++ /dev/null @@ -1,4 +0,0 @@ -description: Articles of association -type: object -allOf: - - $ref: "#/definitions/RepresentativeDocument" diff --git a/spec/definitions/Asset.yaml b/spec/definitions/Asset.yaml new file mode 100644 index 0000000000..6484787077 --- /dev/null +++ b/spec/definitions/Asset.yaml @@ -0,0 +1,16 @@ +description: | + The amount of money +type: object +required: + - amount + - currency +properties: + amount: + description: | + The amount of money in minor units, for example, in cents + type: integer + format: int64 + example: 1430000 + currency: + x-rebillyMerge: + - $ref: "#/definitions/Currency" diff --git a/spec/definitions/BankAccount.yaml b/spec/definitions/BankAccount.yaml deleted file mode 100644 index a36500404f..0000000000 --- a/spec/definitions/BankAccount.yaml +++ /dev/null @@ -1,25 +0,0 @@ -description: > - Data of a settlement account in a banking organization operating under the - jurisdiction of the Russian Federation. -type: object -required: - - account - - bankName - - bankPostAccount - - bankBik -properties: - account: - description: Account number - type: string - pattern: '^\d{20}$' - bankName: - description: Name of the legal entity of the banking organization - type: string - maxLength: 100 - bankPostAccount: - type: string - pattern: '^\d{20}$' - bankBik: - description: BIK of the banking organization - type: string - pattern: '^\d{9}$' diff --git a/spec/definitions/Contract.yaml b/spec/definitions/Contract.yaml deleted file mode 100644 index e032175765..0000000000 --- a/spec/definitions/Contract.yaml +++ /dev/null @@ -1,43 +0,0 @@ -description: Contract details -type: object -required: - - id - - createdAt - - status - - contractor - - paymentInstitutionID -properties: - id: - description: Contract ID - type: string - createdAt: - description: Date and time of contract creation - type: string - format: date-time - status: - description: Contract status - type: string - enum: - - active - - terminated - validSince: - description: Contract effective date and time - type: string - format: date-time - validUntil: - description: Contract expiration date and time - type: string - format: date-time - terminatedAt: - description: Contract termination date and time - type: string - format: date-time - contractor: - $ref: "#/definitions/Contractor" - legalAgreement: - $ref: "#/definitions/LegalAgreement" - paymentInstitutionID: - type: integer - format: int32 - reportingPreferences: - $ref: "#/definitions/ReportingPreferences" diff --git a/spec/definitions/ContractAdjustment.yaml b/spec/definitions/ContractAdjustment.yaml deleted file mode 100644 index d144d5e405..0000000000 --- a/spec/definitions/ContractAdjustment.yaml +++ /dev/null @@ -1,21 +0,0 @@ -description: Data of contract adjustment -type: object -required: - - id - - createdAt -properties: - id: - description: Contract adjustment identifier - type: string - createdAt: - description: Date and time of contract adjustment creation - type: string - format: date-time - validSince: - description: Contract adjustment effective date and time - type: string - format: date-time - validUntil: - description: Contract adjustment expiration date and time - type: string - format: date-time diff --git a/spec/definitions/Contractor.yaml b/spec/definitions/Contractor.yaml deleted file mode 100644 index 54e108dd52..0000000000 --- a/spec/definitions/Contractor.yaml +++ /dev/null @@ -1,13 +0,0 @@ -description: Contractor data -type: object -discriminator: contractorType -required: - - contractorType -properties: - contractorType: - description: Contractor type - type: string - enum: - - LegalEntity - - PrivateEntity - - RegisteredUser diff --git a/spec/definitions/Customer.yaml b/spec/definitions/Customer.yaml deleted file mode 100644 index c21179a36e..0000000000 --- a/spec/definitions/Customer.yaml +++ /dev/null @@ -1,32 +0,0 @@ -type: object -required: - - shopID - - contactInfo - - metadata -properties: - id: - description: Customer ID - type: string - readOnly: true - externalID: - x-rebillyMerge: - - $ref: "#/definitions/ExternalID" - - description: External customer identifier - shopID: - description: Shop ID - type: string - partyID: - x-rebillyMerge: - - $ref: "#/definitions/PartyID" - contactInfo: - $ref: "#/definitions/ContactInfo" - status: - description: Customer status - type: string - readOnly: true - enum: - - ready - - unready - metadata: - description: Customer metadata - type: object diff --git a/spec/definitions/CustomerAndToken.yaml b/spec/definitions/CustomerAndToken.yaml deleted file mode 100644 index a9ea629b67..0000000000 --- a/spec/definitions/CustomerAndToken.yaml +++ /dev/null @@ -1,9 +0,0 @@ -type: object -required: - - customer - - customerAccessToken -properties: - customer: - $ref: '#/definitions/Customer' - customerAccessToken: - $ref: '#/definitions/AccessToken' diff --git a/spec/definitions/CustomerBinding.yaml b/spec/definitions/CustomerBinding.yaml deleted file mode 100644 index 0011f2b193..0000000000 --- a/spec/definitions/CustomerBinding.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -x-merge-properties: - - type: object - required: - - id - - paymentResource - properties: - id: - description: Customer binding identifier - type: string - externalID: - x-rebillyMerge: - - $ref: "#/definitions/ExternalID" - - description: External customer binding identifier - paymentResource: - $ref: "#/definitions/PaymentResource" - - $ref: "#/definitions/CustomerBindingStatus" diff --git a/spec/definitions/CustomerBindingError.yaml b/spec/definitions/CustomerBindingError.yaml deleted file mode 100644 index aa40f674e3..0000000000 --- a/spec/definitions/CustomerBindingError.yaml +++ /dev/null @@ -1,10 +0,0 @@ -description: Description of the error that occurred during the binding process -type: object -required: - - code - - message -properties: - code: - type: string - message: - type: string diff --git a/spec/definitions/CustomerBindingInteractionCompleted.yaml b/spec/definitions/CustomerBindingInteractionCompleted.yaml deleted file mode 100644 index 8a702bc5c7..0000000000 --- a/spec/definitions/CustomerBindingInteractionCompleted.yaml +++ /dev/null @@ -1,15 +0,0 @@ -type: object -allOf: - - $ref: "#/definitions/CustomerChange" - - type: object - description: > - Notification on completion of the last requested interaction with the - customer within the bindings - required: - - customerBindingID - properties: - customerBindingID: - description: Customer binding identifier - type: string - userInteraction: - $ref: "#/definitions/UserInteraction" diff --git a/spec/definitions/CustomerBindingInteractionRequested.yaml b/spec/definitions/CustomerBindingInteractionRequested.yaml deleted file mode 100644 index 5afdb3173b..0000000000 --- a/spec/definitions/CustomerBindingInteractionRequested.yaml +++ /dev/null @@ -1,15 +0,0 @@ -type: object -allOf: - - $ref: "#/definitions/CustomerChange" - - type: object - description: > - Require interaction with the customer to continue the binding process - required: - - customerBindingID - - userInteraction - properties: - customerBindingID: - description: Customer binding identifier - type: string - userInteraction: - $ref: "#/definitions/UserInteraction" diff --git a/spec/definitions/CustomerBindingParams.yaml b/spec/definitions/CustomerBindingParams.yaml deleted file mode 100644 index 9420888a96..0000000000 --- a/spec/definitions/CustomerBindingParams.yaml +++ /dev/null @@ -1,10 +0,0 @@ -type: object -required: - - paymentResource -properties: - externalID: - x-rebillyMerge: - - $ref: "#/definitions/ExternalID" - - description: External customer binding identifier - paymentResource: - $ref: "#/definitions/PaymentResource" diff --git a/spec/definitions/CustomerBindingStarted.yaml b/spec/definitions/CustomerBindingStarted.yaml deleted file mode 100644 index 3c9d190d79..0000000000 --- a/spec/definitions/CustomerBindingStarted.yaml +++ /dev/null @@ -1,9 +0,0 @@ -type: object -allOf: - - $ref: "#/definitions/CustomerChange" - - type: object - required: - - customerBinding - properties: - customerBinding: - $ref: "#/definitions/CustomerBinding" diff --git a/spec/definitions/CustomerBindingStatus.yaml b/spec/definitions/CustomerBindingStatus.yaml deleted file mode 100644 index d9b5a25cb1..0000000000 --- a/spec/definitions/CustomerBindingStatus.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: object -required: - - status -properties: - status: - description: Binding status - type: string - enum: - - pending - - succeeded - - failed - error: - $ref: "#/definitions/CustomerBindingError" diff --git a/spec/definitions/CustomerBindingStatusChanged.yaml b/spec/definitions/CustomerBindingStatusChanged.yaml deleted file mode 100644 index 9d2934a68d..0000000000 --- a/spec/definitions/CustomerBindingStatusChanged.yaml +++ /dev/null @@ -1,10 +0,0 @@ -type: object -allOf: - - $ref: "#/definitions/CustomerChange" - - $ref: "#/definitions/CustomerBindingStatus" - - type: object - required: - - customerBindingID - properties: - customerBindingID: - type: string diff --git a/spec/definitions/CustomerChange.yaml b/spec/definitions/CustomerChange.yaml deleted file mode 100644 index 6669fe54e8..0000000000 --- a/spec/definitions/CustomerChange.yaml +++ /dev/null @@ -1,12 +0,0 @@ -type: object -discriminator: changeType -required: - - changeType -properties: - changeType: - type: string - enum: - - CustomerBindingStarted - - CustomerBindingStatusChanged - - CustomerBindingInteractionRequested - - CustomerBindingInteractionCompleted diff --git a/spec/definitions/CustomerEvent.yaml b/spec/definitions/CustomerEvent.yaml deleted file mode 100644 index f5acc3c5a5..0000000000 --- a/spec/definitions/CustomerEvent.yaml +++ /dev/null @@ -1,15 +0,0 @@ -type: object -required: - - id - - createdAt - - changes -properties: - id: - type: integer - createdAt: - type: string - format: date-time - changes: - type: array - items: - $ref: "#/definitions/CustomerChange" diff --git a/spec/definitions/CustomerParams.yaml b/spec/definitions/CustomerParams.yaml deleted file mode 100644 index 03cd688b1b..0000000000 --- a/spec/definitions/CustomerParams.yaml +++ /dev/null @@ -1,21 +0,0 @@ -type: object -required: - - shopID - - contactInfo - - metadata -properties: - externalID: - x-rebillyMerge: - - $ref: "#/definitions/ExternalID" - - description: External customer identifier - shopID: - description: Shop ID - type: string - partyID: - x-rebillyMerge: - - $ref: "#/definitions/PartyID" - contactInfo: - $ref: "#/definitions/ContactInfo" - metadata: - description: Customer metadata - type: object diff --git a/spec/definitions/CustomerPayer.yaml b/spec/definitions/CustomerPayer.yaml deleted file mode 100644 index 0cbb3844a8..0000000000 --- a/spec/definitions/CustomerPayer.yaml +++ /dev/null @@ -1,15 +0,0 @@ -type: object -description: Reusable payment tool -allOf: - - $ref: "#/definitions/Payer" - - type: object - required: - - customerID - properties: - customerID: - description: Customer ID - type: string - maxLength: 40 - minLength: 1 - paymentToolDetails: - $ref: "#/definitions/PaymentToolDetails" diff --git a/spec/definitions/CustomersTopic.yaml b/spec/definitions/CustomersTopic.yaml deleted file mode 100644 index d1688dea3f..0000000000 --- a/spec/definitions/CustomersTopic.yaml +++ /dev/null @@ -1,26 +0,0 @@ -description: > - Scope that includes customer events within a specific shop -allOf: - - $ref: "#/definitions/WebhookScope" - - type: object - required: - - shopID - - eventTypes - properties: - shopID: - description: Shop ID - type: string - maxLength: 40 - minLength: 1 - eventTypes: - description: List of customer event types to be notified about - type: array - items: - type: string - enum: - - CustomerCreated - - CustomerDeleted - - CustomerReady - - CustomerBindingStarted - - CustomerBindingSucceeded - - CustomerBindingFailed diff --git a/spec/definitions/InternationalBankAccount.yaml b/spec/definitions/InternationalBankAccount.yaml deleted file mode 100644 index 712def8919..0000000000 --- a/spec/definitions/InternationalBankAccount.yaml +++ /dev/null @@ -1,21 +0,0 @@ -description: International bank account data -type: object -properties: - number: - description: > - Account number - type: string - pattern: "^[0-9A-Z]{8,40}$" - example: "123006951" - iban: - description: > - International Bank Account Number [ISO 13616](https://en.wikipedia.org/wiki/International_Bank_Account_Number) - - _* If `iban` is specified, `bankDetails` is not required._ - type: string - pattern: "^[A-Z0-9]{3,35}$" - example: "GR1601101250000000012300695" - bankDetails: - $ref: "#/definitions/InternationalBankDetails" - correspondentBankAccount: - $ref: "#/definitions/InternationalCorrespondentBankAccount" diff --git a/spec/definitions/InternationalBankDetails.yaml b/spec/definitions/InternationalBankDetails.yaml deleted file mode 100644 index 54985747c1..0000000000 --- a/spec/definitions/InternationalBankDetails.yaml +++ /dev/null @@ -1,39 +0,0 @@ -description: International banking organization data -type: object -properties: - bic: - description: > - Business Identifier Code [ISO 9362](https://en.wikipedia.org/wiki/ISO_9362). - - _* If `bic` is specified, other data is optional._ - type: string - pattern: "^([A-Z0-9]{8}|[A-Z0-9]{11})$" - example: > - RZBAATWW - abartn: - description: > - [ABA Routing Transit Number](https://en.wikipedia.org/wiki/ABA_routing_transit_number) - banking organization specific to the USA banking system. - - _* If `abartn` is specified, other data is optional._ - type: string - pattern: "^[0-9]{9}$" - example: "129131673" - name: - description: Name of the legal entity of the banking organization - type: string - maxLength: 100 - example: > - RAIFFEISEN BANK INTERNATIONAL AG - countryCode: - x-rebillyMerge: - - $ref: "#/definitions/CountryCode" - - description: > - Country code of residence of the banking organization, alpha-3 code - according to [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) - address: - description: Address of the legal entity of the banking organization - type: string - maxLength: 1000 - example: > - 1030, VIENNA, AM STADTPARK 9 diff --git a/spec/definitions/InternationalCorrespondentBankAccount.yaml b/spec/definitions/InternationalCorrespondentBankAccount.yaml deleted file mode 100644 index c6ae3cc24a..0000000000 --- a/spec/definitions/InternationalCorrespondentBankAccount.yaml +++ /dev/null @@ -1,3 +0,0 @@ -allOf: - - description: Correspondent account data of the specified bank - - $ref: "#/definitions/InternationalBankAccount" diff --git a/spec/definitions/InternationalLegalEntity.yaml b/spec/definitions/InternationalLegalEntity.yaml deleted file mode 100644 index 99c86dcfed..0000000000 --- a/spec/definitions/InternationalLegalEntity.yaml +++ /dev/null @@ -1,29 +0,0 @@ -description: "International legal entity" -type: object -allOf: - - $ref: "#/definitions/LegalEntity" - - type: object - required: - - legalName - - registeredOffice - properties: - legalName: - description: Name - type: string - tradingName: - description: Trade name (if applicable) - type: string - registeredOffice: - description: Registration postal address - type: string - principalPlaceOfBusiness: - description: > - Location address (if different from the address of registration) - type: string - registeredNumber: - description: Registration number - type: string - maxLength: 100 - country: - x-rebillyMerge: - - $ref: "#/definitions/CountryCode" diff --git a/spec/definitions/LegalAgreement.yaml b/spec/definitions/LegalAgreement.yaml deleted file mode 100644 index 3733f5e831..0000000000 --- a/spec/definitions/LegalAgreement.yaml +++ /dev/null @@ -1,17 +0,0 @@ -description: Legal agreement details -type: object -required: - - id - - signedAt -properties: - id: - description: Legal agreement Identifier, e.g. contract number - type: string - signedAt: - description: Date and time of conclusion of the legal agreement - type: string - format: date-time - validUntil: - description: Date and time of termination of the legal agreement - type: string - format: date-time diff --git a/spec/definitions/LegalEntity.yaml b/spec/definitions/LegalEntity.yaml deleted file mode 100644 index 547b3dc865..0000000000 --- a/spec/definitions/LegalEntity.yaml +++ /dev/null @@ -1,14 +0,0 @@ -description: Legal entity -allOf: - - $ref: "#/definitions/Contractor" - - type: object - discriminator: entityType - required: - - entityType - properties: - entityType: - description: Legal entity type - type: string - enum: - - RussianLegalEntity - - InternationalLegalEntity diff --git a/spec/definitions/PaymentSearchResult.yaml b/spec/definitions/PaymentSearchResult.yaml deleted file mode 100644 index 61ca722079..0000000000 --- a/spec/definitions/PaymentSearchResult.yaml +++ /dev/null @@ -1,66 +0,0 @@ -type: object -allOf: - - $ref: "#/definitions/PaymentStatus" - - type: object - required: - - id - - invoiceID - - createdAt - - amount - - currency - - payer - - flow - properties: - id: - description: Payment ID - type: string - shortID: - description: Shortened payment and invoice identifier (spid) - type: string - invoiceID: - description: > - Identifier of the invoice within which the payment was created - type: string - shopID: - description: > - Identifier of the shop within which the payment was created - type: string - createdAt: - description: Created at - type: string - format: date-time - amount: - description: > - The price of the goods or services offered, in minor monetary units, - e.g. cents if U.S. dollars are specified as the currency - type: integer - format: int64 - minimum: 0 - fee: - description: System fee in minor monetary units - type: integer - format: int64 - minimum: 0 - currency: - x-rebillyMerge: - - $ref: "#/definitions/Currency" - payer: - $ref: "#/definitions/Payer" - flow: - $ref: "#/definitions/PaymentFlow" - metadata: - description: Payment metadata - type: object - statusChangedAt: - description: Date and time of payment status change - type: string - format: date-time - transactionInfo: - $ref: "#/definitions/TransactionInfo" - makeRecurrent: - x-rebillyMerge: - - $ref: "#/definitions/PaymentMakeRecurrent" - cart: - $ref: "#/definitions/InvoiceCart" - allocation: - $ref: "#/definitions/Allocation" diff --git a/spec/definitions/PowerOfAttorney.yaml b/spec/definitions/PowerOfAttorney.yaml deleted file mode 100644 index 92948c83e5..0000000000 --- a/spec/definitions/PowerOfAttorney.yaml +++ /dev/null @@ -1,4 +0,0 @@ -type: object -allOf: - - $ref: "#/definitions/RepresentativeDocument" - - $ref: "#/definitions/LegalAgreement" diff --git a/spec/definitions/PrivateEntity.yaml b/spec/definitions/PrivateEntity.yaml deleted file mode 100644 index c6263ea85e..0000000000 --- a/spec/definitions/PrivateEntity.yaml +++ /dev/null @@ -1,13 +0,0 @@ -description: Private entity -allOf: - - $ref: "#/definitions/Contractor" - - type: object - discriminator: entityType - required: - - entityType - properties: - entityType: - description: Private entity type - type: string - enum: - - RussianPrivateEntity diff --git a/spec/definitions/RefundSearchResult.yaml b/spec/definitions/RefundSearchResult.yaml deleted file mode 100644 index 2012045351..0000000000 --- a/spec/definitions/RefundSearchResult.yaml +++ /dev/null @@ -1,14 +0,0 @@ -type: object -allOf: - - type: object - required: - - invoiceID - - paymentID - properties: - invoiceID: - description: Invoice ID - type: string - paymentID: - description: Payment ID - type: string - - $ref: "#/definitions/Refund" diff --git a/spec/definitions/RegisteredUser.yaml b/spec/definitions/RegisteredUser.yaml deleted file mode 100644 index 4e7d8360ab..0000000000 --- a/spec/definitions/RegisteredUser.yaml +++ /dev/null @@ -1,10 +0,0 @@ -description: Registered user of the system -allOf: - - $ref: "#/definitions/Contractor" - - type: object - required: - - email - properties: - email: - description: User-identifying e-mail - type: string diff --git a/spec/definitions/ReportLink.yaml b/spec/definitions/ReportLink.yaml deleted file mode 100644 index f528681986..0000000000 --- a/spec/definitions/ReportLink.yaml +++ /dev/null @@ -1,7 +0,0 @@ -type: object -required: - - url -properties: - url: - description: URL of the file - type: string diff --git a/spec/definitions/ReportParams.yaml b/spec/definitions/ReportParams.yaml deleted file mode 100644 index 74bc789f34..0000000000 --- a/spec/definitions/ReportParams.yaml +++ /dev/null @@ -1,19 +0,0 @@ -type: object -required: - - reportType - - fromTime - - toTime -properties: - reportType: - description: Type of report - type: string - enum: - - paymentRegistry - fromTime: - description: Start of the time period - type: string - format: date-time - toTime: - description: End of the time period - type: string - format: date-time diff --git a/spec/definitions/ReportingPreferences.yaml b/spec/definitions/ReportingPreferences.yaml deleted file mode 100644 index ab044f5776..0000000000 --- a/spec/definitions/ReportingPreferences.yaml +++ /dev/null @@ -1,5 +0,0 @@ -description: Preferences for automatic reporting -type: object -properties: - serviceAcceptanceActPreferences: - $ref: "#/definitions/ServiceAcceptanceActPreferences" diff --git a/spec/definitions/Representative.yaml b/spec/definitions/Representative.yaml deleted file mode 100644 index 679cdcd28c..0000000000 --- a/spec/definitions/Representative.yaml +++ /dev/null @@ -1,15 +0,0 @@ -description: EIO/Representative -type: object -required: - - position - - fullName - - document -properties: - position: - description: Name of the EIO/representative's position - type: string - fullName: - description: EIO/representative full name - type: string - document: - $ref: "#/definitions/RepresentativeDocument" diff --git a/spec/definitions/RepresentativeDocument.yaml b/spec/definitions/RepresentativeDocument.yaml deleted file mode 100644 index c093c35056..0000000000 --- a/spec/definitions/RepresentativeDocument.yaml +++ /dev/null @@ -1,11 +0,0 @@ -description: Document on the basis of which the EIO/representative acts -type: object -discriminator: representativeDocumentType -required: - - representativeDocumentType -properties: - representativeDocumentType: - type: string - enum: - - ArticlesOfAssociation - - PowerOfAttorney diff --git a/spec/definitions/RussianLegalEntity.yaml b/spec/definitions/RussianLegalEntity.yaml deleted file mode 100644 index d0b351e792..0000000000 --- a/spec/definitions/RussianLegalEntity.yaml +++ /dev/null @@ -1,64 +0,0 @@ -description: Legal entity operating under the jurisdiction of the Russian Federation -type: object -allOf: - - $ref: "#/definitions/LegalEntity" - - type: object - required: - - registeredName - - registeredNumber - - inn - - actualAddress - - postAddress - - representativePosition - - representativeFullName - - representativeDocument - - bankAccount - properties: - registeredName: - description: > - Registered name of the legal entity - type: string - maxLength: 100 - registeredNumber: - description: > - OGRN – Major State Registration Number of the entry made in the - Register about formation of a Russian company (consists of 12 digits). - type: string - pattern: '^(\d{13}|\d{15})$' - inn: - description: > - [Russian taxpayer personal identification number - (INN)](https://www.nalog.gov.ru/eng/exchinf/inn/) - type: string - pattern: '^(\d{10}|\d{12})$' - actualAddress: - description: > - Location postal address - type: string - maxLength: 1000 - postAddress: - description: > - Postal address for sending correspondence - type: string - maxLength: 1000 - representativePosition: - description: > - Job title - [EIO](https://ru.wikipedia.org/wiki/Исполнительный_орган_общества) - or its representative - type: string - maxLength: 100 - representativeFullName: - description: > - Full name of - [EIO](https://ru.wikipedia.org/wiki/Исполнительный_орган_общества) - or its representative - type: string - maxLength: 100 - representativeDocument: - description: > - Identification data of the document - type: string - maxLength: 1000 - bankAccount: - $ref: "#/definitions/BankAccount" diff --git a/spec/definitions/RussianPrivateEntity.yaml b/spec/definitions/RussianPrivateEntity.yaml deleted file mode 100644 index d1a23ffb0c..0000000000 --- a/spec/definitions/RussianPrivateEntity.yaml +++ /dev/null @@ -1,25 +0,0 @@ -description: Private entity under the jurisdiction of the Russian Federation -type: object -allOf: - - $ref: "#/definitions/PrivateEntity" - - type: object - required: - - firstName - - secondName - - middleName - - contactInfo - properties: - firstName: - description: Name - type: string - maxLength: 200 - secondName: - description: Surname - type: string - maxLength: 200 - middleName: - description: Middle Name - type: string - maxLength: 200 - contactInfo: - $ref: "#/definitions/ContactInfo" diff --git a/spec/definitions/Schedule.yaml b/spec/definitions/Schedule.yaml deleted file mode 100644 index e296543534..0000000000 --- a/spec/definitions/Schedule.yaml +++ /dev/null @@ -1,15 +0,0 @@ -description: Schedule -type: object -required: - - name - - scheduleID -properties: - scheduleID: - type: integer - format: int32 - name: - type: string - maxLength: 100 - description: - type: string - maxLength: 1000 diff --git a/spec/definitions/ServiceAcceptanceActPreferences.yaml b/spec/definitions/ServiceAcceptanceActPreferences.yaml deleted file mode 100644 index 047c0b728a..0000000000 --- a/spec/definitions/ServiceAcceptanceActPreferences.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: Reporting settings -type: object -required: - - scheduleID - - signer -properties: - scheduleID: - description: Reporting schedule identifier - type: integer - format: int32 - signer: - $ref: "#/definitions/Representative" diff --git a/spec/definitions/ShopAccount.yaml b/spec/definitions/ShopAccount.yaml new file mode 100644 index 0000000000..5f083ec1ef --- /dev/null +++ b/spec/definitions/ShopAccount.yaml @@ -0,0 +1,20 @@ +description: Shop account +type: object +required: + - own + - available +properties: + own: + x-rebillyMerge: + - $ref: "#/definitions/Asset" + - description: | + Own funds + available: + x-rebillyMerge: + - $ref: "#/definitions/Asset" + - description: | + Funds available for use. Usually equal to own funds + minus the sum of all pending transactions + example: + amount: 1200000 + currency: USD diff --git a/spec/paths/analytics@shops@{shopID}@invoices.yaml b/spec/paths/analytics@shops@{shopID}@invoices.yaml deleted file mode 100644 index 3863cc8997..0000000000 --- a/spec/paths/analytics@shops@{shopID}@invoices.yaml +++ /dev/null @@ -1,162 +0,0 @@ -get: - description: Search of invoices - tags: - - Search - operationId: searchInvoices - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - $ref: "#/parameters/shopID" - - $ref: "#/parameters/fromTime" - - $ref: "#/parameters/toTime" - - $ref: "#/parameters/limit" - - name: invoiceStatus - in: query - description: Invoice status for search - required: false - type: string - enum: - - unpaid - - cancelled - - paid - - fulfilled - - name: paymentStatus - in: query - description: Payment status for search - required: false - type: string - enum: - - pending - - processed - - captured - - cancelled - - refunded - - failed - - name: paymentFlow - in: query - description: Payment flow - required: false - type: string - enum: - - instant - - hold - - name: paymentMethod - in: query - description: Payment method - required: false - type: string - enum: - - bankCard - - paymentTerminal - - name: paymentTerminalProvider - in: query - description: Payment terminal provider - required: false - type: string - - name: invoiceID - in: query - description: Invoice ID - required: false - type: string - maxLength: 40 - minLength: 1 - - name: paymentID - in: query - description: Payment ID - required: false - type: string - maxLength: 40 - minLength: 1 - - name: payerEmail - in: query - description: Payer's e-mail - required: false - type: string - format: email - maxLength: 100 - - name: payerIP - in: query - description: Payer IP-address - required: false - type: string - format: ip-address - maxLength: 45 - - name: payerFingerprint - in: query - description: Payer's user agent unique fingerprint - required: false - type: string - maxLength: 1000 - - name: customerID - in: query - description: Customer ID - required: false - type: string - maxLength: 40 - minLength: 1 - - x-rebillyMerge: - - name: bankCardTokenProvider - in: query - required: false - - $ref: "#/definitions/BankCardTokenProvider" - - x-rebillyMerge: - - name: bankCardPaymentSystem - in: query - required: false - - $ref: "#/definitions/BankCardPaymentSystem" - - name: first6 - in: query - description: First 6 digits of the card number - required: false - type: string - pattern: '^\d{6}$' - - name: last4 - in: query - description: Card last digits - required: false - type: string - pattern: '^\d{0,4}$' - - name: rrn - in: query - description: Retrieval Reference Number - required: false - type: string - pattern: "^[a-zA-Z0-9]{12}$" - - name: paymentAmount - in: query - description: Amount - required: false - type: integer - format: int64 - minimum: 1 - - name: invoiceAmount - in: query - description: Invoice amount - required: false - type: integer - format: int64 - minimum: 1 - - x-rebillyMerge: - - name: continuationToken - in: query - required: false - - $ref: "#/definitions/ContinuationToken" - responses: - "200": - description: Invoices found - schema: - type: object - properties: - continuationToken: - x-rebillyMerge: - - $ref: "#/definitions/ContinuationToken" - result: - type: array - items: - $ref: "#/definitions/Invoice" - "404": - $ref: "#/responses/NotFound" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/paths/analytics@shops@{shopID}@payments.yaml b/spec/paths/analytics@shops@{shopID}@payments.yaml deleted file mode 100644 index 0f9653a82e..0000000000 --- a/spec/paths/analytics@shops@{shopID}@payments.yaml +++ /dev/null @@ -1,152 +0,0 @@ -get: - description: Search for payments - tags: - - Search - operationId: searchPayments - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - $ref: "#/parameters/shopID" - - $ref: "#/parameters/fromTime" - - $ref: "#/parameters/toTime" - - $ref: "#/parameters/limit" - - name: paymentStatus - in: query - description: Payment status for search - required: false - type: string - enum: - - pending - - processed - - captured - - cancelled - - refunded - - failed - - name: paymentFlow - in: query - description: Payment flow - required: false - type: string - enum: - - instant - - hold - - name: paymentMethod - in: query - description: Payment method - required: false - type: string - enum: - - bankCard - - paymentTerminal - - name: paymentTerminalProvider - in: query - description: Payment terminal provider - required: false - type: string - - name: invoiceID - in: query - description: Invoice ID - required: false - type: string - maxLength: 40 - minLength: 1 - - name: paymentID - in: query - description: Payment ID - required: false - type: string - maxLength: 40 - minLength: 1 - - name: payerEmail - in: query - description: "Payer's e-mail" - required: false - type: string - format: email - maxLength: 100 - - name: payerIP - in: query - description: Payer IP-address - required: false - type: string - format: ip-address - maxLength: 45 - - name: payerFingerprint - in: query - description: Payer's user agent unique fingerprint - required: false - type: string - maxLength: 1000 - - name: customerID - in: query - description: Customer ID - required: false - type: string - maxLength: 40 - minLength: 1 - - name: first6 - in: query - description: First 6 digits of the card number - required: false - type: string - pattern: '^\d{6}$' - - name: last4 - in: query - description: Card last digits - required: false - type: string - pattern: '^\d{0,4}$' - - name: rrn - in: query - description: Retrieval Reference Number - required: false - type: string - pattern: "^[a-zA-Z0-9]{12}$" - - name: approvalCode - in: query - description: Authorization Approval Code - required: false - type: string - maxLength: 40 - minLength: 1 - - x-rebillyMerge: - - name: bankCardTokenProvider - in: query - required: false - - $ref: "#/definitions/BankCardTokenProvider" - - x-rebillyMerge: - - name: bankCardPaymentSystem - in: query - required: false - - $ref: "#/definitions/BankCardPaymentSystem" - - name: paymentAmount - in: query - description: Amount - required: false - type: integer - format: int64 - minimum: 1 - - x-rebillyMerge: - - name: continuationToken - in: query - required: false - - $ref: "#/definitions/ContinuationToken" - responses: - "200": - description: Payments found - schema: - type: object - properties: - continuationToken: - x-rebillyMerge: - - $ref: "#/definitions/ContinuationToken" - result: - type: array - items: - $ref: "#/definitions/PaymentSearchResult" - "404": - $ref: "#/responses/NotFound" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/paths/analytics@shops@{shopID}@refunds.yaml b/spec/paths/analytics@shops@{shopID}@refunds.yaml deleted file mode 100644 index 6efb41a90a..0000000000 --- a/spec/paths/analytics@shops@{shopID}@refunds.yaml +++ /dev/null @@ -1,73 +0,0 @@ -get: - description: Search for refunds - tags: - - Search - operationId: searchRefunds - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - $ref: "#/parameters/shopID" - - $ref: "#/parameters/fromTime" - - $ref: "#/parameters/toTime" - - $ref: "#/parameters/limit" - - $ref: "#/parameters/offset" - - name: invoiceID - in: query - description: Invoice ID - required: false - type: string - maxLength: 40 - minLength: 1 - - name: paymentID - in: query - description: Payment ID - required: false - type: string - maxLength: 40 - minLength: 1 - - name: refundID - in: query - description: Refund ID - required: false - type: string - maxLength: 40 - minLength: 1 - - name: rrn - in: query - description: Retrieval Reference Number - required: false - type: string - pattern: "^[a-zA-Z0-9]{12}$" - - name: approvalCode - in: query - description: Authorization Approval Code - required: false - type: string - maxLength: 40 - minLength: 1 - - name: refundStatus - in: query - description: Refund status - type: string - enum: - - pending - - succeeded - - failed - responses: - "200": - description: Refunds found - schema: - type: object - properties: - totalCount: - type: integer - result: - type: array - items: - $ref: "#/definitions/RefundSearchResult" - "404": - $ref: "#/responses/NotFound" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/paths/processing@contracts.yaml b/spec/paths/processing@contracts.yaml deleted file mode 100644 index 79e91ee090..0000000000 --- a/spec/paths/processing@contracts.yaml +++ /dev/null @@ -1,19 +0,0 @@ -get: - description: Get data from all of the contracts - operationId: getContracts - tags: - - Contracts - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - responses: - "200": - description: List of contracts - schema: - type: array - items: - $ref: "#/definitions/Contract" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/paths/processing@contracts@{contractID}.yaml b/spec/paths/processing@contracts@{contractID}.yaml deleted file mode 100644 index af05fdaef6..0000000000 --- a/spec/paths/processing@contracts@{contractID}.yaml +++ /dev/null @@ -1,20 +0,0 @@ -get: - description: Get contract by identifier - operationId: getContractByID - tags: - - Contracts - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - $ref: "#/parameters/contractID" - responses: - "200": - description: Contract found - schema: - $ref: "#/definitions/Contract" - "404": - $ref: "#/responses/NotFound" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/paths/processing@contracts@{contractID}@adjustments.yaml b/spec/paths/processing@contracts@{contractID}@adjustments.yaml deleted file mode 100644 index 5e79f9cf0f..0000000000 --- a/spec/paths/processing@contracts@{contractID}@adjustments.yaml +++ /dev/null @@ -1,22 +0,0 @@ -get: - description: Get all adjustments to the specified contract - operationId: getContractAdjustments - tags: - - Contracts - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - $ref: "#/parameters/contractID" - responses: - "200": - description: List of contract adjustments - schema: - type: array - items: - $ref: "#/definitions/ContractAdjustment" - "404": - $ref: "#/responses/NotFound" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/paths/processing@contracts@{contractID}@adjustments@{adjustmentID}.yaml b/spec/paths/processing@contracts@{contractID}@adjustments@{adjustmentID}.yaml deleted file mode 100644 index b072baa1c7..0000000000 --- a/spec/paths/processing@contracts@{contractID}@adjustments@{adjustmentID}.yaml +++ /dev/null @@ -1,21 +0,0 @@ -get: - description: Get contract adjustment data by identifier - operationId: getContractAdjustmentByID - tags: - - Contracts - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - $ref: "#/parameters/contractID" - - $ref: "#/parameters/adjustmentID" - responses: - "200": - description: Data of contract adjustment - schema: - $ref: "#/definitions/ContractAdjustment" - "404": - $ref: "#/responses/NotFound" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/paths/processing@customers.yaml b/spec/paths/processing@customers.yaml deleted file mode 100644 index 2b13da4e91..0000000000 --- a/spec/paths/processing@customers.yaml +++ /dev/null @@ -1,48 +0,0 @@ -post: - description: Create a new customer. - tags: - - Customers - operationId: createCustomer - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - name: customerParams - description: Parameters of the customer to be created - in: body - required: true - schema: - $ref: "#/definitions/CustomerParams" - responses: - "201": - description: Customer created - schema: - $ref: "#/definitions/CustomerAndToken" - "401": - $ref: "#/responses/Unauthorized" - "400": - description: Invalid customer data - schema: - type: object - required: - - code - - message - properties: - code: - description: > - [Error code](#tag/Error-Codes) - type: string - enum: - - operationNotPermitted - - invalidPartyID - - invalidShopID - - invalidPartyStatus - - invalidShopStatus - - invalidRequest - - invalidDeadline - - ambiguousPartyID - message: - description: Human-readable description of the error - type: string - example: Operation not permitted - "409": - $ref: "#/responses/ExternalIDConflict" diff --git a/spec/paths/processing@customers@{customerID}.yaml b/spec/paths/processing@customers@{customerID}.yaml deleted file mode 100644 index 34cb040f18..0000000000 --- a/spec/paths/processing@customers@{customerID}.yaml +++ /dev/null @@ -1,57 +0,0 @@ -get: - description: Get a customer data by identifier. - operationId: getCustomerById - tags: - - Customers - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - $ref: "#/parameters/customerID" - responses: - "200": - description: Customer details - schema: - $ref: "#/definitions/Customer" - "404": - $ref: "#/responses/NotFound" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" -delete: - description: Delete a customer by identifier - operationId: deleteCustomer - tags: - - Customers - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - $ref: "#/parameters/customerID" - responses: - "204": - description: Customer removed - "404": - $ref: "#/responses/NotFound" - "401": - $ref: "#/responses/Unauthorized" - "400": - description: Customer deletion error - schema: - type: object - required: - - code - - message - properties: - code: - description: > - [Error code](#tag/Error-Codes) - type: string - enum: - - invalidPartyStatus - - invalidShopStatus - - invalidRequest - - invalidDeadline - message: - description: Human-readable description of the error - type: string - example: Invalid party status diff --git a/spec/paths/processing@customers@{customerID}@access-tokens.yaml b/spec/paths/processing@customers@{customerID}@access-tokens.yaml deleted file mode 100644 index 521aa71e74..0000000000 --- a/spec/paths/processing@customers@{customerID}@access-tokens.yaml +++ /dev/null @@ -1,21 +0,0 @@ -post: - operationId: createCustomerAccessToken - description: > - Create a new token to access the specified customer. - tags: - - Customers - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - $ref: "#/parameters/customerID" - responses: - "201": - description: Access token created - schema: - $ref: "#/definitions/AccessToken" - "404": - $ref: "#/responses/NotFound" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/paths/processing@customers@{customerID}@bindings.yaml b/spec/paths/processing@customers@{customerID}@bindings.yaml deleted file mode 100644 index 2850e37268..0000000000 --- a/spec/paths/processing@customers@{customerID}@bindings.yaml +++ /dev/null @@ -1,73 +0,0 @@ -post: - description: Start a new payer binding. - tags: - - Customers - operationId: createBinding - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - $ref: "#/parameters/customerID" - - name: bindingParams - description: Parameters of the created binding - in: body - required: true - schema: - $ref: "#/definitions/CustomerBindingParams" - responses: - "201": - description: Binding started - schema: - $ref: "#/definitions/CustomerBinding" - "404": - $ref: "#/responses/NotFound" - "401": - $ref: "#/responses/Unauthorized" - "400": - description: Invalid binding data - schema: - type: object - required: - - code - - message - properties: - code: - description: > - [Error code](#tag/Error-Codes) - type: string - enum: - - invalidPaymentResource - - operationNotPermitted - - invalidPartyStatus - - invalidShopStatus - - invalidPaymentToolToken - - invalidPaymentSession - - invalidRequest - - invalidDeadline - message: - description: Human-readable description of the error - type: string - example: Invalid payment resource - "409": - $ref: "#/responses/ExternalIDConflict" -get: - description: Get all payer bindings. - tags: - - Customers - operationId: getBindings - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - $ref: "#/parameters/customerID" - responses: - "200": - description: List of bindings - schema: - type: array - items: - $ref: "#/definitions/CustomerBinding" - "404": - $ref: "#/responses/NotFound" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/paths/processing@customers@{customerID}@bindings@{customerBindingID}.yaml b/spec/paths/processing@customers@{customerID}@bindings@{customerBindingID}.yaml deleted file mode 100644 index 970f5a1922..0000000000 --- a/spec/paths/processing@customers@{customerID}@bindings@{customerBindingID}.yaml +++ /dev/null @@ -1,21 +0,0 @@ -get: - description: Get customer binding data. - tags: - - Customers - operationId: getBinding - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - $ref: "#/parameters/customerID" - - $ref: "#/parameters/customerBindingID" - responses: - "200": - description: Binding data - schema: - $ref: "#/definitions/CustomerBinding" - "404": - $ref: "#/responses/NotFound" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/paths/processing@customers@{customerID}@events.yaml b/spec/paths/processing@customers@{customerID}@events.yaml deleted file mode 100644 index 43512d13a7..0000000000 --- a/spec/paths/processing@customers@{customerID}@events.yaml +++ /dev/null @@ -1,39 +0,0 @@ -get: - description: Get the history of the specified customer as a list of events. - tags: - - Customers - operationId: getCustomerEvents - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - $ref: "#/parameters/customerID" - - name: limit - in: query - description: Selection limit - required: true - type: integer - format: int32 - minimum: 1 - - name: eventID - in: query - description: > - Event identifier. - - All events that occurred in the system _after_ the specified event will - be included in the selection. - required: false - type: integer - format: int32 - responses: - "200": - description: A list of events - schema: - type: array - items: - $ref: "#/definitions/CustomerEvent" - "404": - $ref: "#/responses/NotFound" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/paths/processing@customers@{customerID}@payment-methods.yaml b/spec/paths/processing@customers@{customerID}@payment-methods.yaml deleted file mode 100644 index c41842adac..0000000000 --- a/spec/paths/processing@customers@{customerID}@payment-methods.yaml +++ /dev/null @@ -1,22 +0,0 @@ -get: - description: Get the payment methods available for the customer. - tags: - - Customers - operationId: getCustomerPaymentMethods - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - $ref: "#/parameters/customerID" - responses: - "200": - description: Payment methods - schema: - type: array - items: - $ref: "#/definitions/PaymentMethod" - "404": - $ref: "#/responses/NotFound" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/paths/processing@me.yaml b/spec/paths/processing@me.yaml deleted file mode 100644 index d6e23cb80c..0000000000 --- a/spec/paths/processing@me.yaml +++ /dev/null @@ -1,16 +0,0 @@ -get: - tags: - - Parties - operationId: getMyParty - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - responses: - "200": - description: Get my party - schema: - $ref: "#/definitions/Party" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/paths/processing@me@activate.yaml b/spec/paths/processing@me@activate.yaml deleted file mode 100644 index a322f9fc1b..0000000000 --- a/spec/paths/processing@me@activate.yaml +++ /dev/null @@ -1,15 +0,0 @@ -put: - description: Activate my party - operationId: activateMyParty - tags: - - Parties - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - responses: - "204": - description: Party activated - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/paths/processing@me@suspend.yaml b/spec/paths/processing@me@suspend.yaml deleted file mode 100644 index 78acc88209..0000000000 --- a/spec/paths/processing@me@suspend.yaml +++ /dev/null @@ -1,15 +0,0 @@ -put: - description: Suspend my party - operationId: suspendMyParty - tags: - - Parties - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - responses: - "204": - description: Party suspended - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/paths/processing@parties@{partyID}@contracts.yaml b/spec/paths/processing@parties@{partyID}@contracts.yaml deleted file mode 100644 index 7da09f248e..0000000000 --- a/spec/paths/processing@parties@{partyID}@contracts.yaml +++ /dev/null @@ -1,22 +0,0 @@ -get: - description: Get data from all of the contracts - operationId: getContractsForParty - tags: - - Contracts - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - $ref: "#/parameters/partyID" - responses: - "200": - description: List of contracts - schema: - type: array - items: - $ref: "#/definitions/Contract" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" - "404": - $ref: "#/responses/NotFound" diff --git a/spec/paths/processing@parties@{partyID}@contracts@{contractID}.yaml b/spec/paths/processing@parties@{partyID}@contracts@{contractID}.yaml deleted file mode 100644 index e9115c11dc..0000000000 --- a/spec/paths/processing@parties@{partyID}@contracts@{contractID}.yaml +++ /dev/null @@ -1,21 +0,0 @@ -get: - description: Get contract data by identifier - operationId: getContractByIDForParty - tags: - - Contracts - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - $ref: "#/parameters/contractID" - - $ref: "#/parameters/partyID" - responses: - "200": - description: Contract found - schema: - $ref: "#/definitions/Contract" - "404": - $ref: "#/responses/NotFound" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/paths/processing@parties@{partyID}@contracts@{contractID}@adjustments.yaml b/spec/paths/processing@parties@{partyID}@contracts@{contractID}@adjustments.yaml deleted file mode 100644 index c947edbed5..0000000000 --- a/spec/paths/processing@parties@{partyID}@contracts@{contractID}@adjustments.yaml +++ /dev/null @@ -1,23 +0,0 @@ -get: - description: Get all adjustments to the specified contract - operationId: getContractAdjustmentsForParty - tags: - - Contracts - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - $ref: "#/parameters/contractID" - - $ref: "#/parameters/partyID" - responses: - "200": - description: List of contract adjustments - schema: - type: array - items: - $ref: "#/definitions/ContractAdjustment" - "404": - $ref: "#/responses/NotFound" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/paths/processing@parties@{partyID}@contracts@{contractID}@adjustments@{adjustmentID}.yaml b/spec/paths/processing@parties@{partyID}@contracts@{contractID}@adjustments@{adjustmentID}.yaml deleted file mode 100644 index e9350e6626..0000000000 --- a/spec/paths/processing@parties@{partyID}@contracts@{contractID}@adjustments@{adjustmentID}.yaml +++ /dev/null @@ -1,22 +0,0 @@ -get: - description: Get contract adjustment data by identifier - operationId: getContractAdjustmentByIDForParty - tags: - - Contracts - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - $ref: "#/parameters/contractID" - - $ref: "#/parameters/adjustmentID" - - $ref: "#/parameters/partyID" - responses: - "200": - description: Data of contract adjustment - schema: - $ref: "#/definitions/ContractAdjustment" - "404": - $ref: "#/responses/NotFound" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/paths/processing@shops@{shopID}.yaml b/spec/paths/processing@parties@{partyID}@shops@{shopID}@account.yaml similarity index 72% rename from spec/paths/processing@shops@{shopID}.yaml rename to spec/paths/processing@parties@{partyID}@shops@{shopID}@account.yaml index 5c51853218..3fac54e832 100644 --- a/spec/paths/processing@shops@{shopID}.yaml +++ b/spec/paths/processing@parties@{partyID}@shops@{shopID}@account.yaml @@ -1,17 +1,18 @@ get: - description: Get shop by id - operationId: getShopByID + description: Get shop account + operationId: getShopAccount tags: - Shops parameters: - $ref: "#/parameters/requestID" - $ref: "#/parameters/deadline" - $ref: "#/parameters/shopID" + - $ref: "#/parameters/partyID" responses: "200": description: Shop found schema: - $ref: "#/definitions/Shop" + $ref: "#/definitions/ShopAccount" "404": $ref: "#/responses/NotFound" "401": diff --git a/spec/paths/processing@shops.yaml b/spec/paths/processing@shops.yaml deleted file mode 100644 index 78fa434648..0000000000 --- a/spec/paths/processing@shops.yaml +++ /dev/null @@ -1,19 +0,0 @@ -get: - description: Get all shops - operationId: getShops - tags: - - Shops - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - responses: - "200": - description: List of shops - schema: - type: array - items: - $ref: "#/definitions/Shop" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/paths/processing@shops@{shopID}@activate.yaml b/spec/paths/processing@shops@{shopID}@activate.yaml deleted file mode 100644 index 906963fce5..0000000000 --- a/spec/paths/processing@shops@{shopID}@activate.yaml +++ /dev/null @@ -1,18 +0,0 @@ -put: - description: Activate shop - operationId: activateShop - tags: - - Shops - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - $ref: "#/parameters/shopID" - responses: - "204": - description: Shop activated - "404": - $ref: "#/responses/NotFound" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/paths/processing@shops@{shopID}@suspend.yaml b/spec/paths/processing@shops@{shopID}@suspend.yaml deleted file mode 100644 index 6882f7758c..0000000000 --- a/spec/paths/processing@shops@{shopID}@suspend.yaml +++ /dev/null @@ -1,20 +0,0 @@ -put: - description: > - Suspend the shop. This type of requests is processed by the platform - automatically and is executed immediately after sending. - operationId: suspendShop - tags: - - Shops - parameters: - - $ref: "#/parameters/requestID" - - $ref: "#/parameters/deadline" - - $ref: "#/parameters/shopID" - responses: - "204": - description: Shop suspended - "404": - $ref: "#/responses/NotFound" - "401": - $ref: "#/responses/Unauthorized" - "400": - $ref: "#/responses/DefaultLogicError" diff --git a/spec/swagger.yaml b/spec/swagger.yaml index ca31308c43..cc231aa7b6 100644 --- a/spec/swagger.yaml +++ b/spec/swagger.yaml @@ -158,14 +158,6 @@ parameters: type: string maxLength: 40 minLength: 1 - contractID: - name: contractID - in: path - description: Contract ID - required: true - type: string - maxLength: 40 - minLength: 1 residence: name: residence in: query @@ -175,22 +167,6 @@ parameters: required: false type: string pattern: "^[A-Z]{3}$" - customerID: - name: customerID - in: path - description: Customer ID - required: true - type: string - maxLength: 40 - minLength: 1 - customerBindingID: - name: customerBindingID - in: path - description: Customer binding identifier - required: true - type: string - maxLength: 40 - minLength: 1 webhookID: name: webhookID in: path @@ -199,14 +175,6 @@ parameters: type: string maxLength: 40 minLength: 1 - adjustmentID: - name: adjustmentID - in: path - description: Contract adjustment identifier - required: true - type: string - maxLength: 40 - minLength: 1 invoiceID: name: invoiceID in: path @@ -230,36 +198,6 @@ parameters: type: string maxLength: 100 minLength: 1 - fromTime: - name: fromTime - in: query - description: Start of the time period - required: true - type: string - format: date-time - toTime: - name: toTime - in: query - description: End of the time period - required: true - type: string - format: date-time - limit: - name: limit - in: query - description: Selection limit - required: true - type: integer - format: int32 - minimum: 1 - maximum: 1000 - offset: - name: offset - in: query - description: Query offset - required: false - type: integer - minimum: 0 deadline: name: X-Request-Deadline in: header @@ -546,19 +484,6 @@ tags: Categories are used to describe groups of goods and services offered by shops. Categories can influence on statistics provision, shops organisation and also system financial terms. - - name: Contracts - x-displayName: Contracts - description: > - A contract contains all details of a legal agreement on basis of which - the system provides all possible services to a merchant. In particular a - list of conditions, on basis of which the system services are provided, is - written in the contract. The examples of this can be the transaction - fees, conditions of withdrawal and legal entity data. - - Any changes of the shops require system verification by creating change - requests. - - Any data changes require system verification by creating change requests. - name: Webhooks x-displayName: Webhooks description: > @@ -571,12 +496,6 @@ tags: You will need to read the specification [Vality Webhooks Events API] (https://github.com/valitydev/swag-payments-webhook-events) in order to implement notification handler. - - name: Search - x-displayName: Search - description: > - You should call the corresponding system method to get a list of all - invoices or payments of the specified shop. It is possible to filter - sampling by the status. - name: PaymentInstitutions x-displayName: Payment Institutions description: >