diff --git a/changes_script.rb b/changes_script.rb new file mode 100644 index 0000000..788f69b --- /dev/null +++ b/changes_script.rb @@ -0,0 +1,39 @@ +require 'fileutils' + +source_dir = '../openapi-unit-sdk/schemas' +target_dir = '../openapi-unit-sdk/schemas_with_one_of' + +exclusions = [ + 'account.json', + 'application.json', + 'authorization_request.json', + 'card.json', + 'customer.json', + 'limits.json', + 'payment.json', + 'recurring_payment.json', + 'repayment.json', + 'transaction.json' +] + +def copy_files(source, target, exclusions) + FileUtils.mkdir_p(target) unless File.exist?(target) + + Dir.foreach(source) do |item| + next if item == '.' or item == '..' + next if exclusions.include?(item) + + source_path = File.join(source, item) + target_path = File.join(target, item) + + if File.directory?(source_path) + copy_files(source_path, target_path, exclusions) + else + FileUtils.cp(source_path, target_path) + end + end +end + +copy_files(source_dir, target_dir, exclusions) + +puts "Files copied successfully, excluding specified files." diff --git a/generate.rb b/generate.rb index 5ab5f81..b04a2f4 100644 --- a/generate.rb +++ b/generate.rb @@ -25,6 +25,15 @@ def replace_paths_with_one_of(openapi_file, new_paths) "/applications/{applicationId}": { "$ref": "./schemas_with_one_of/application_paths.json#/application" }, + "/applications/{applicationId}/cancel": { + "$ref": "./schemas_with_one_of/application_paths.json#/cancel_application" + }, + "/applications": { + "$ref": "./schemas_with_one_of/application_paths.json#/applications" + }, + "/application-forms": { + "$ref": "./schemas_with_one_of/application_paths.json#/application_forms" + }, "/applications/{applicationId}/documents/{documentId}": { "$ref": "./schemas_with_one_of/application_paths.json#/upload_pdf_file" }, @@ -34,14 +43,26 @@ def replace_paths_with_one_of(openapi_file, new_paths) "/applications/{applicationId}/documents/{documentId}/?": { "$ref": "./schemas_with_one_of/application_paths.json#/upload_jpg_file" }, - "/applications/{applicationId}/cancel": { - "$ref": "./schemas_with_one_of/application_paths.json#/cancel_application" + "/applications/{applicationId}/documents/{documentId}/back": { + "$ref": "./schemas_with_one_of/application_paths.json#/upload_pdf_file_back" }, - "/applications": { - "$ref": "./schemas_with_one_of/application_paths.json#/applications" + "/applications/{applicationId}/documents/{documentId}/back/": { + "$ref": "./schemas_with_one_of/application_paths.json#/upload_png_file_back" }, - "/application-forms": { - "$ref": "./schemas_with_one_of/application_paths.json#/application_forms" + "/applications/{applicationId}/documents/{documentId}/back/?": { + "$ref": "./schemas_with_one_of/application_paths.json#/upload_jpg_file_back" + }, + "/applications/{applicationId}/documents": { + "$ref": "./schemas_with_one_of/application_paths.json#/documents" + }, + "/applications/{applicationId}/documents/{documentId}/verify": { + "$ref": "./schemas_with_one_of/application_paths.json#/verify_document" + }, + "/applications/{applicationId}/documents/{documentId}/download": { + "$ref": "./schemas_with_one_of/application_paths.json#/download_document" + }, + "/applications/{applicationId}/documents/{documentId}/download/back": { + "$ref": "./schemas_with_one_of/application_paths.json#/download_back_side_document" }, "/application-forms/{applicationFormId}": { "$ref": "./schemas_with_one_of/application_paths.json#/application_form" @@ -218,10 +239,7 @@ def replace_paths_with_one_of(openapi_file, new_paths) "$ref": "./schemas_with_one_of/check_deposit_paths.json#/get_back_check_deposit" }, "/users/{userId}/api-tokens": { - "$ref": "./schemas_with_one_of/token_paths.json#/create_token" - }, - "/users": { - "$ref": "./schemas_with_one_of/token_paths.json#/list_tokens" + "$ref": "./schemas_with_one_of/token_paths.json#/api_tokens" }, "/users/{userId}/api-tokens/{tokenId}": { "$ref": "./schemas_with_one_of/token_paths.json#/delete_token" @@ -274,13 +292,25 @@ def replace_paths_with_one_of(openapi_file, new_paths) "/check-payments/{checkPaymentId}/approve": { "$ref": "./schemas_with_one_of/check_payment_paths.json#/check_payment_approve" }, + "/check-payments/{checkPaymentId}/cancel": { + "$ref": "./schemas_with_one_of/check_payment_paths.json#/check_payment_cancel" + }, + "/check-payments/{checkPaymentId}/return": { + "$ref": "./schemas_with_one_of/check_payment_paths.json#/check_payment_return" + }, + "/check-payments/{checkPaymentId}/front": { + "$ref": "./schemas_with_one_of/check_payment_paths.json#/get_check_payment_front" + }, + "/check-payments/{checkPaymentId}/back": { + "$ref": "./schemas_with_one_of/check_payment_paths.json#/get_check_payment_back" + }, "/stop-payments": { "$ref": "./schemas_with_one_of/stop_payment_paths.json#/stop_payments" }, "/stop-payments/{stop_payment_id}": { "$ref": "./schemas_with_one_of/stop_payment_paths.json#/stop_payment" }, - "/stop-payments/disable": { + "/stop-payments/{stop_payment_id}/disable": { "$ref": "./schemas_with_one_of/stop_payment_paths.json#/disable_stop_payment" } } diff --git a/schemas_with_one_of/account.json b/schemas_with_one_of/account.json index dbab750..dab7260 100644 --- a/schemas_with_one_of/account.json +++ b/schemas_with_one_of/account.json @@ -142,6 +142,7 @@ "$ref": "customer.json#/definitions/customerLinkage" } }, + "additionalProperties": true, "oneOf": [ { "required": [ diff --git a/schemas_with_one_of/account_paths.json b/schemas_with_one_of/account_paths.json index 3cadf4f..721e99c 100644 --- a/schemas_with_one_of/account_paths.json +++ b/schemas_with_one_of/account_paths.json @@ -1,604 +1,611 @@ { - "UnitAccountResponse": { - "type": "object", - "title": "UnitAccountResponse", - "properties": { - "data": { - "$ref": "account.json" + "UnitAccountResponse":{ + "type":"object", + "title":"UnitAccountResponse", + "properties":{ + "data":{ + "$ref":"account.json" + } + } + }, + "UnitAccountResponseWithIncluded":{ + "type":"object", + "title":"UnitAccountResponseWithIncluded", + "properties":{ + "data":{ + "$ref":"account.json" + }, + "included":{ + "type":"array", + "items":{ + "$ref":"customer.json" } - } - }, - "UnitAccountResponseWithIncluded": { - "type": "object", - "title": "UnitAccountResponseWithIncluded", - "properties": { - "data": { - "$ref": "account.json" + } + } + }, + "accounts":{ + "get":{ + "tags":[ + "Get List Accounts" + ], + "operationId":"execute", + "summary":"Get List Accounts", + "description":"Get List Accounts from API ", + "parameters":[ + { + "name":"page", + "in":"query", + "schema":{ + "$ref":"types.json#/definitions/listPageParametersObject" + } }, - "included": { - "type": "array", - "items": { - "$ref": "customer.json" - } - } - } - }, - "accounts": { - "get": { - "tags": [ - "Get List Accounts" - ], - "operationId": "execute", - "summary": "Get List Accounts", - "description": "Get List Accounts from API ", - "parameters": [ - { - "name": "page", - "in": "query", - "schema": { - "$ref": "types.json#/definitions/listPageParametersObject" - } - }, - { - "name": "filter", - "in": "query", - "style": "deepObject", - "allowReserved": true, - "schema": { - "type": "object", - "properties": { - "customerId": { - "type": "string" - }, - "status": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "Open", - "Frozen", - "Closed" - ] - } - }, - "type": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "deposit", - "credit" - ] - } - }, - "fromBalance": { - "type": "number" - }, - "toBalance": { - "type": "number" - }, - "tags": { - "type": "object" - } + { + "name":"filter", + "in":"query", + "style":"deepObject", + "allowReserved":true, + "schema":{ + "type":"object", + "properties":{ + "customerId":{ + "type":"string" + }, + "status":{ + "type":"array", + "items":{ + "type":"string", + "enum":[ + "Open", + "Frozen", + "Closed" + ] } - } - }, - { - "name": "include", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/vnd.api+json; charset=utf-8": { - "schema": { - "title": "UnitAccountsListResponse", - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "account.json" - } - }, - "included": { - "type": "array", - "items": { - "$ref": "customer.json" - } - } - } - } + }, + "type":{ + "type":"array", + "items":{ + "type":"string", + "enum":[ + "deposit", + "credit" + ] } - } - }, - "401": { - "$ref": "types.json#/definitions/unitError" - } - } - }, - "post": { - "tags": [ - "Create an Account" - ], - "operationId": "execute", - "summary": "Create an Account", - "description": "Create an Account via API ", - "requestBody": { - "description": "Create Account Request", - "required": true, - "content": { - "application/vnd.api+json": { - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "createAccount.json" - } - } + }, + "fromBalance":{ + "type":"number" + }, + "toBalance":{ + "type":"number" + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" } - } - } + } + } + } }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/vnd.api+json; charset=utf-8": { - "schema": { - "$ref": "account_paths.json#/UnitAccountResponse" - } - } - } - }, - "default": { - "$ref": "types.json#/definitions/unitError" - } + { + "name":"include", + "in":"query", + "schema":{ + "type":"string" + } } - } - }, - "account": { - "get": { - "tags": [ - "Get Account" - ], - "operationId": "execute", - "parameters": [ - { - "schema": { - "type": "string" - }, - "name": "accountId", - "in": "path", - "required": true, - "description": "ID of the account to get" - }, - { - "name": "include", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "summary": "Get Account by Id", - "description": "Get an Account from API ", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/vnd.api+json; charset=utf-8": { - "schema": { - "$ref": "account_paths.json#/UnitAccountResponseWithIncluded" - } + ], + "responses":{ + "200":{ + "description":"Successful Response", + "content":{ + "application/vnd.api+json; charset=utf-8":{ + "schema":{ + "title":"UnitAccountsListResponse", + "type":"object", + "properties":{ + "data":{ + "type":"array", + "items":{ + "$ref":"account.json" + } + }, + "included":{ + "type":"array", + "items":{ + "$ref":"customer.json" + } + }, + "meta": { + "$ref": "types.json#/definitions/paginationMeta" + } } - } - } + } + } + } + }, + "401":{ + "$ref":"types.json#/definitions/unitError" } - }, - "patch": { - "tags": [ - "Update Account" - ], - "operationId": "execute", - "summary": "Update Account", - "description": "Update an Account via API ", - "parameters": [ - { - "schema": { - "type": "string" - }, - "name": "accountId", - "in": "path", - "required": true, - "description": "ID of the account to update" - } - ], - "requestBody": { - "description": "Update Account Request", - "required": true, - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "patch_account.json" - } - } - } + } + }, + "post":{ + "tags":[ + "Create Account" + ], + "operationId":"execute", + "summary":"Create Account", + "description":"Create Account via API ", + "requestBody":{ + "description":"Create Account Request", + "title": "CreateAccountRequest", + "required":true, + "content":{ + "application/vnd.api+json":{ + "schema": { + "$ref": "createAccount.json" + } + } + } + }, + "responses":{ + "201":{ + "description":"Successful Response", + "content":{ + "application/vnd.api+json; charset=utf-8":{ + "schema":{ + "$ref":"#/UnitAccountResponse" + } + } + } }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "account_paths.json#/UnitAccountResponse" - } - } - } - }, - "default": { - "$ref": "types.json#/definitions/unitError" - } + "default":{ + "$ref":"types.json#/definitions/unitError" } - } - }, - "get_account_limits": { - "get": { - "tags": [ - "Get Account Limits" - ], - "operationId": "execute", - "parameters": [ - { - "schema": { - "type": "string" - }, - "name": "accountId", - "in": "path", - "required": true, - "description": "ID of the account to get" - } - ], - "summary": "Get Account Limits by Id", - "description": "Get Account Limits from API ", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/vnd.api+json; charset=utf-8": { - "schema": { - "type": "object", - "title": "UnitGetAccountLimitsResponse", - "properties": { - "data": { - "$ref": "types.json#/definitions/limits" - } - } - } - } - } - } + } + } + }, + "account":{ + "get":{ + "tags":[ + "Get Account" + ], + "operationId":"execute", + "parameters":[ + { + "schema":{ + "type":"string" + }, + "name":"accountId", + "in":"path", + "required":true, + "description":"ID of the account to get" + }, + { + "name":"include", + "in":"query", + "schema":{ + "type":"string" + } } - } - }, - "unfreeze_account": { - "post": { - "tags": [ - "Unfreeze Account" - ], - "operationId": "execute", - "parameters": [ - { - "schema": { - "type": "string" - }, - "name": "accountId", - "in": "path", - "required": true, - "description": "ID of the account to get" - } - ], - "summary": "Unfreeze Account by Id", - "description": "Unfreeze an Account via API ", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/vnd.api+json; charset=utf-8": { - "schema": { - "$ref": "account_paths.json#/UnitAccountResponse" - } - } - } - }, - "default": { - "$ref": "types.json#/definitions/unitError" - } + ], + "summary":"Get Account by Id", + "description":"Get an Account from API ", + "responses":{ + "200":{ + "description":"Successful Response", + "content":{ + "application/vnd.api+json; charset=utf-8":{ + "schema":{ + "$ref":"account_paths.json#/UnitAccountResponseWithIncluded" + } + } + } } - } - }, - "freeze_account": { - "post": { - "tags": [ - "Freeze an Account" - ], - "operationId": "execute", - "summary": "Freeze an Account by Id", - "description": "Freeze an Account via API ", - "parameters": [ - { - "schema": { - "type": "string" - }, - "name": "accountId", - "in": "path", - "required": true, - "description": "ID of the account to freeze" - } - ], - "requestBody": { - "description": "Freeze Account Request", - "required": true, - "content": { - "application/vnd.api+json": { - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "types.json#/definitions/freezeAccountRequest" - } - } - } - } - } + } + }, + "patch":{ + "tags":[ + "Update Account" + ], + "operationId":"execute", + "summary":"Update Account", + "description":"Update an Account via API ", + "parameters":[ + { + "schema":{ + "type":"string" + }, + "name":"accountId", + "in":"path", + "required":true, + "description":"ID of the account to update" + } + ], + "requestBody":{ + "description":"Update Account Request", + "title": "UpdateAccountRequest", + "required":true, + "content":{ + "application/vnd.api+json":{ + "schema":{ + "$ref":"patch_account.json" + } + } + } + }, + "responses":{ + "200":{ + "description":"Successful Response", + "content":{ + "application/vnd.api+json":{ + "schema":{ + "$ref":"account_paths.json#/UnitAccountResponse" + } + } + } }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/vnd.api+json; charset=utf-8": { - "schema": { - "$ref": "account_paths.json#/UnitAccountResponse" - } - } - } - }, - "default": { - "$ref": "types.json#/definitions/unitError" - } + "default":{ + "$ref":"types.json#/definitions/unitError" + } + } + } + }, + "get_account_limits":{ + "get":{ + "tags":[ + "Get Account Limits" + ], + "operationId":"execute", + "parameters":[ + { + "schema":{ + "type":"string" + }, + "name":"accountId", + "in":"path", + "required":true, + "description":"ID of the account to get" } - } - }, - "close_account": { - "post": { - "tags": [ - "Close an Account" - ], - "operationId": "execute", - "summary": "Close an Account by Id", - "description": "Close an Account via API ", - "parameters": [ - { - "schema": { - "type": "string" - }, - "name": "accountId", - "in": "path", - "required": true, - "description": "ID of the account to close" - } - ], - "requestBody": { - "description": "Close Account Request", - "required": true, - "content": { - "application/vnd.api+json": { - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "types.json#/definitions/closeAccountRequest" - } - } + ], + "summary":"Get Account Limits by Id", + "description":"Get Account Limits from API ", + "responses":{ + "200":{ + "description":"Successful Response", + "content":{ + "application/vnd.api+json; charset=utf-8":{ + "schema":{ + "type":"object", + "title":"UnitGetAccountLimitsResponse", + "properties":{ + "data":{ + "$ref":"types.json#/definitions/limits" + } } - } - } + } + } + } + } + } + } + }, + "unfreeze_account":{ + "post":{ + "tags":[ + "Unfreeze Account" + ], + "operationId":"execute", + "parameters":[ + { + "schema":{ + "type":"string" + }, + "name":"accountId", + "in":"path", + "required":true, + "description":"ID of the account to get" + } + ], + "summary":"Unfreeze Account by Id", + "description":"Unfreeze an Account via API ", + "responses":{ + "200":{ + "description":"Successful Response", + "content":{ + "application/vnd.api+json; charset=utf-8":{ + "schema":{ + "$ref":"account_paths.json#/UnitAccountResponse" + } + } + } }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/vnd.api+json; charset=utf-8": { - "schema": { - "$ref": "account_paths.json#/UnitAccountResponse" - } - } - } - }, - "default": { - "$ref": "types.json#/definitions/unitError" - } + "default":{ + "$ref":"types.json#/definitions/unitError" } - } - }, - "reopen_account": { - "post": { - "tags": [ - "Reopen an Account" - ], - "operationId": "execute", - "summary": "Reopen an Account by Id", - "description": "Reopen an Account via API ", - "parameters": [ - { - "schema": { - "type": "string" - }, - "name": "accountId", - "in": "path", - "required": true, - "description": "ID of the account to close" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/vnd.api+json; charset=utf-8": { - "schema": { - "$ref": "account_paths.json#/UnitAccountResponse" - } - } - } - }, - "default": { - "$ref": "types.json#/definitions/unitError" - } + } + } + }, + "freeze_account":{ + "post":{ + "tags":[ + "Freeze an Account" + ], + "operationId":"execute", + "summary":"Freeze Account by Id", + "description":"Freeze Account via API ", + "parameters":[ + { + "schema":{ + "type":"string" + }, + "name":"accountId", + "in":"path", + "required":true, + "description":"ID of the account to freeze" } - } - }, - "enter_daca": { - "post": { - "tags": [ - "Enter Control Agreement for Account" - ], - "operationId": "execute", - "summary": "Enter Account Control Agreement by Id", - "description": "Enter Control Agreement for Account via API ", - "parameters": [ - { - "schema": { - "type": "string" - }, - "name": "accountId", - "in": "path", - "required": true, - "description": "ID of the account" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/vnd.api+json; charset=utf-8": { - "schema": { - "$ref": "account_paths.json#/UnitAccountResponse" - } + ], + "requestBody":{ + "description":"Freeze Account Request", + "title": "FreezeAccountRequest", + "required":true, + "content":{ + "application/vnd.api+json":{ + "schema":{ + "type":"object", + "title": "FreezeAccountRequest", + "properties":{ + "data":{ + "$ref":"types.json#/definitions/freezeAccountRequest" } - } - }, - "default": { - "$ref": "types.json#/definitions/unitError" - } + } + } + } } - } - }, - "activate_daca": { - "post": { - "tags": [ - "Activate Control Agreement for Account" - ], - "operationId": "execute", - "summary": "Activate Account Control Agreement by Id", - "description": "Activate Control Agreement for Account via API ", - "parameters": [ - { - "schema": { - "type": "string" - }, - "name": "accountId", - "in": "path", - "required": true, - "description": "ID of the account" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/vnd.api+json; charset=utf-8": { - "schema": { - "$ref": "account_paths.json#/UnitAccountResponse" - } - } - } - }, - "default": { - "$ref": "types.json#/definitions/unitError" - } + }, + "responses":{ + "200":{ + "description":"Successful Response", + "content":{ + "application/vnd.api+json; charset=utf-8":{ + "schema":{ + "$ref":"account_paths.json#/UnitAccountResponse" + } + } + } + }, + "default":{ + "$ref":"types.json#/definitions/unitError" } - } - }, - "deactivate_daca": { - "post": { - "tags": [ - "Deactivate Control Agreement for Account" - ], - "operationId": "execute", - "summary": "Deactivate Account Control Agreement by Id", - "description": "Deactivate Control Agreement for Account via API", - "parameters": [ - { - "schema": { - "type": "string" - }, - "name": "accountId", - "in": "path", - "required": true, - "description": "ID of the account" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/vnd.api+json; charset=utf-8": { - "schema": { - "$ref": "account_paths.json#/UnitAccountResponse" - } + } + } + }, + "close_account":{ + "post":{ + "tags":[ + "Close an Account" + ], + "operationId":"execute", + "summary":"Close an Account by Id", + "description":"Close an Account via API ", + "parameters":[ + { + "schema":{ + "type":"string" + }, + "name":"accountId", + "in":"path", + "required":true, + "description":"ID of the account to close" + } + ], + "requestBody":{ + "description":"Close Account Request", + "title": "CloseAccountRequest", + "required":true, + "content":{ + "application/vnd.api+json":{ + "schema":{ + "type":"object", + "title": "CloseAccountRequest", + "properties":{ + "data":{ + "$ref":"types.json#/definitions/closeAccountRequest" } - } - }, - "404": { - "$ref": "types.json#/definitions/unitError" - } + } + } + } + } + }, + "responses":{ + "200":{ + "description":"Successful Response", + "content":{ + "application/vnd.api+json; charset=utf-8":{ + "schema":{ + "$ref":"account_paths.json#/UnitAccountResponse" + } + } + } + }, + "default":{ + "$ref":"types.json#/definitions/unitError" + } + } + } + }, + "reopen_account":{ + "post":{ + "tags":[ + "Reopen an Account" + ], + "operationId":"execute", + "summary":"Reopen an Account by Id", + "description":"Reopen an Account via API ", + "parameters":[ + { + "schema":{ + "type":"string" + }, + "name":"accountId", + "in":"path", + "required":true, + "description":"ID of the account to close" + } + ], + "responses":{ + "200":{ + "description":"Successful Response", + "content":{ + "application/vnd.api+json; charset=utf-8":{ + "schema":{ + "$ref":"account_paths.json#/UnitAccountResponse" + } + } + } + }, + "default":{ + "$ref":"types.json#/definitions/unitError" + } + } + } + }, + "enter_daca":{ + "post":{ + "tags":[ + "Enter Control Agreement for Account" + ], + "operationId":"execute", + "summary":"Enter Account Control Agreement by Id", + "description":"Enter Control Agreement for Account via API ", + "parameters":[ + { + "schema":{ + "type":"string" + }, + "name":"accountId", + "in":"path", + "required":true, + "description":"ID of the account" } - } - }, - "get_account_end_of_day": { - "get": { - "tags": [ - "Get list account end-of-day balances history" - ], - "operationId": "execute", - "summary": "Get AccountEndOfDay List", - "description": "Get AccountEndOfDay List from API ", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/vnd.api+json; charset=utf-8": { - "schema": { - "type": "object", - "title": "UnitGetAccountEndOfDayListResponse", - "properties": { - "data": { - "$ref": "account_end_of_day.json" - } - } - } + ], + "responses":{ + "200":{ + "description":"Successful Response", + "content":{ + "application/vnd.api+json; charset=utf-8":{ + "schema":{ + "$ref":"account_paths.json#/UnitAccountResponse" + } + } + } + }, + "default":{ + "$ref":"types.json#/definitions/unitError" + } + } + } + }, + "activate_daca":{ + "post":{ + "tags":[ + "Activate Control Agreement for Account" + ], + "operationId":"execute", + "summary":"Activate Account Control Agreement by Id", + "description":"Activate Control Agreement for Account via API ", + "parameters":[ + { + "schema":{ + "type":"string" + }, + "name":"accountId", + "in":"path", + "required":true, + "description":"ID of the account" + } + ], + "responses":{ + "200":{ + "description":"Successful Response", + "content":{ + "application/vnd.api+json; charset=utf-8":{ + "schema":{ + "$ref":"account_paths.json#/UnitAccountResponse" + } + } + } + }, + "default":{ + "$ref":"types.json#/definitions/unitError" + } + } + } + }, + "deactivate_daca":{ + "post":{ + "tags":[ + "Deactivate Control Agreement for Account" + ], + "operationId":"execute", + "summary":"Deactivate Account Control Agreement by Id", + "description":"Deactivate Control Agreement for Account via API", + "parameters":[ + { + "schema":{ + "type":"string" + }, + "name":"accountId", + "in":"path", + "required":true, + "description":"ID of the account" + } + ], + "responses":{ + "200":{ + "description":"Successful Response", + "content":{ + "application/vnd.api+json; charset=utf-8":{ + "schema":{ + "$ref":"account_paths.json#/UnitAccountResponse" + } + } + } + }, + "404":{ + "$ref":"types.json#/definitions/unitError" + } + } + } + }, + "get_account_end_of_day":{ + "get":{ + "tags":[ + "Get list account end-of-day balances history" + ], + "operationId":"execute", + "summary":"Get AccountEndOfDay List", + "description":"Get AccountEndOfDay List from API ", + "responses":{ + "200":{ + "description":"Successful Response", + "content":{ + "application/vnd.api+json; charset=utf-8":{ + "schema":{ + "type":"object", + "title":"UnitGetAccountEndOfDayListResponse", + "properties":{ + "data":{ + "$ref":"account_end_of_day.json" + } } - } - }, - "default": { - "$ref": "types.json#/definitions/unitError" - } + } + } + } + }, + "default":{ + "$ref":"types.json#/definitions/unitError" } - } - } + } + } + } } \ No newline at end of file diff --git a/schemas_with_one_of/accounts.json b/schemas_with_one_of/accounts.json deleted file mode 100644 index 91f0ede..0000000 --- a/schemas_with_one_of/accounts.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "accounts.json", - "title": "Accounts Document", - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "account.json#/definitions/account" - } - } - }, - "required": [ - "data" - ] -} \ No newline at end of file diff --git a/schemas_with_one_of/api_token.json b/schemas_with_one_of/api_token.json index 8489d89..b2d7464 100644 --- a/schemas_with_one_of/api_token.json +++ b/schemas_with_one_of/api_token.json @@ -31,16 +31,8 @@ } }, "required": [ - "createdAt", - "description", - "expiration" + "createdAt" ] } - }, - "required": [ - "type", - "id", - "attributes" - ], - "additionalProperties": false + } } \ No newline at end of file diff --git a/schemas_with_one_of/application.json b/schemas_with_one_of/application.json index 0410cfa..6c920a0 100644 --- a/schemas_with_one_of/application.json +++ b/schemas_with_one_of/application.json @@ -240,7 +240,7 @@ } } }, - "additionalProperties": false, + "additionalProperties": true, "required": [ "data" ] diff --git a/schemas_with_one_of/application_form.json b/schemas_with_one_of/application_form.json index 2d1ac11..bb5fa6d 100644 --- a/schemas_with_one_of/application_form.json +++ b/schemas_with_one_of/application_form.json @@ -27,6 +27,123 @@ }, "required": [], "additionalProperties": false + }, + "ApplicationFormPrefill": { + "title": "Application Form Prefilled", + "type": "object", + "properties": { + "applicationType": { + "type": "string", + "enum": [ + "Individual", + "Business", + "SoleProprietorship" + ] + }, + "fullName": { + "$ref": "types.json#/definitions/fullName" + }, + "ssn": { + "type": "string", + "pattern": "^\\d{9}$" + }, + "passport": { + "type": "string" + }, + "nationality": { + "$ref": "types.json#/definitions/country" + }, + "dateOfBirth": { + "type": "string", + "format": "date" + }, + "email": { + "$ref": "types.json#/definitions/email" + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "stateOfIncorporation": { + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "entityType": { + "$ref": "types.json#/definitions/entityType" + }, + "contact": { + "$ref": "types.json#/definitions/contact" + }, + "officer": { + "$ref": "createApplication.json#/definitions/createOfficer" + }, + "beneficialOwners": { + "type": "array", + "items": { + "$ref": "createApplication.json#/definitions/createBeneficialOwner" + } + }, + "website": { + "type": "string" + }, + "phone": { + "$ref": "types.json#/definitions/phone" + }, + "address": { + "$ref": "types.json#/definitions/address" + }, + "dba": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "ein": { + "type": "string", + "pattern": "^\\d{9}$" + }, + "jwtSubject": { + "$ref": "types.json#/definitions/jwtSubject" + }, + "industry": { + "$ref": "types.json#/definitions/industry" + } + }, + "additionalProperties": false + }, + "ApplicationFormSettingsOverride": { + "type": "object", + "properties": { + "redirectUrl": { + "$ref": "types.json#/definitions/url" + }, + "privacyPolicyUrl": { + "$ref": "types.json#/definitions/url" + }, + "electronicDisclosuresUrl": { + "$ref": "types.json#/definitions/url" + }, + "depositTermsUrl": { + "$ref": "types.json#/definitions/url" + }, + "clientTermsUrl": { + "$ref": "types.json#/definitions/url" + }, + "cardholderTermsUrl": { + "$ref": "types.json#/definitions/url" + }, + "cashAdvancedTermsUrl": { + "$ref": "types.json#/definitions/url" + }, + "debitCardDisclosureUrl": { + "$ref": "types.json#/definitions/url" + }, + "additionalDisclosures": { + "$ref": "org_settings.json#/definitions/applicationFormAdditionalDisclosures" + } + }, + "additionalProperties": false } }, "title": "Application Form", @@ -49,13 +166,29 @@ "type": "string" }, "stage": { - "type": "string" + "type": "string", + "enum": [ + "ChooseBusinessOrIndividual", + "EnterIndividualInformation", + "IndividualPhoneVerification", + "IndividualApplicationCreated", + "EnterBusinessInformation", + "EnterBusinessAdditionalInformation", + "EnterOfficerInformation", + "BusinessPhoneVerification", + "EnterBeneficialOwnersInformation", + "BusinessApplicationCreated", + "EnterSoleProprietorshipInformation", + "EnterSoleProprietorshipBusinessInformation", + "SoleProprietorshipPhoneVerification", + "SoleProprietorshipApplicationCreated" + ] }, "applicantDetails": { - "$ref": "createApplicationForm.json#/definitions/prefilled" + "$ref": "#/definitions/ApplicationFormPrefill" }, "settingsOverride": { - "$ref": "createApplicationForm.json#/definitions/settingsOverride" + "$ref": "#/definitions/ApplicationFormSettingsOverride" }, "tags": { "$ref": "tags.json#/definitions/tags" @@ -79,13 +212,8 @@ }, "relationships": { "$ref": "#/definitions/applicationFormRelationships" - }, - "officerIsBeneficialOwner": { - "type": "boolean", - "default": false } }, - "additionalProperties": false, "required": [ "type", "id", diff --git a/schemas_with_one_of/application_paths.json b/schemas_with_one_of/application_paths.json index fe7e757..6b5606e 100644 --- a/schemas_with_one_of/application_paths.json +++ b/schemas_with_one_of/application_paths.json @@ -19,16 +19,13 @@ }, "UnitApplicationResponseWithIncluded":{ "type":"object", - "title":"UnitApplicationResponse", + "title":"UnitApplicationResponseWithIncluded", "properties": { "data": { "$ref": "application.json" }, "included": { - "type": "array", - "items": { - "$ref": "openapi_types.json#/IncludedResource" - } + "$ref": "openapi_types.json#/IncludedResource" } } }, @@ -110,7 +107,7 @@ "content":{ "application/vnd.api+json; charset=utf-8":{ "schema":{ - "$ref":"application_paths.json#/UnitApplicationResponse" + "$ref":"application_paths.json#/UnitApplicationResponseWithIncluded" } } } @@ -144,6 +141,7 @@ "application/vnd.api+json":{ "schema":{ "type":"object", + "title": "CancelApplicationRequest", "properties":{ "data":{ "type":"object", @@ -240,7 +238,10 @@ "type":"string" }, "tags":{ - "type":"object" + "type": "object", + "additionalProperties":{ + "type": "string" + } } } } @@ -268,8 +269,8 @@ "$ref":"application.json" } }, - "meta":{ - "$ref":"types.json#/definitions/paginationMeta" + "meta": { + "$ref": "types.json#/definitions/paginationMeta" } } } @@ -298,15 +299,11 @@ "requestBody":{ "description":"Create Application Request", "required": true, + "title": "CreateApplicationRequest", "content":{ "application/vnd.api+json":{ - "schema":{ - "type":"object", - "properties":{ - "data":{ - "$ref":"createApplication.json" - } - } + "schema": { + "$ref": "createApplication.json" } } } @@ -378,7 +375,10 @@ "type": "string" }, "tags": { - "type": "object" + "type": "object", + "additionalProperties":{ + "type": "string" + } } } } @@ -425,13 +425,8 @@ "required": true, "content":{ "application/vnd.api+json":{ - "schema":{ - "type":"object", - "properties":{ - "data":{ - "$ref":"createApplicationForm.json" - } - } + "schema": { + "$ref": "createApplicationForm.json" } } } @@ -505,7 +500,7 @@ } } }, - "upload_pdf_file":{ + "upload_pdf_file": { "put":{ "tags":[ "Upload a PDF Document for an Application" @@ -550,7 +545,60 @@ "content":{ "application/vnd.api+json; charset=utf-8":{ "schema":{ - "$ref": "#/UnitDocumentResponse" + "$ref": "application_paths.json#/UnitDocumentResponse" + } + } + } + } + } + } + }, + "upload_pdf_file_back":{ + "put":{ + "tags":[ + "Upload a PDF Document for an Application - Back Side" + ], + "operationId":"execute", + "parameters":[ + { + "schema":{ + "type":"string" + }, + "name":"applicationId", + "in":"path", + "required":true, + "description":"ID of the application to upload a file to" + }, + { + "schema":{ + "type":"string" + }, + "name":"documentId", + "in":"path", + "required":true, + "description":"ID of the document to upload a file for" + } + ], + "summary":"Upload a PDF document - Back Side", + "description":"Upload a PDF file via API - Back Side", + "requestBody":{ + "description":"Upload PDF File - Back Side", + "required": true, + "content":{ + "application/pdf":{ + "schema":{ + "type": "object" + } + } + } + }, + "responses":{ + "200":{ + "description":"Successful Response", + "content":{ + "application/vnd.api+json; charset=utf-8":{ + "schema":{ + "$ref": "application_paths.json#/UnitDocumentResponse" } } } @@ -603,7 +651,60 @@ "content":{ "application/vnd.api+json; charset=utf-8":{ "schema":{ - "$ref": "#/UnitDocumentResponse" + "$ref": "application_paths.json#/UnitDocumentResponse" + } + } + } + } + } + } + }, + "upload_png_file_back":{ + "put":{ + "tags":[ + "Upload a PNG Document for an Application - Back Side" + ], + "operationId":"execute", + "parameters":[ + { + "schema":{ + "type":"string" + }, + "name":"applicationId", + "in":"path", + "required":true, + "description":"ID of the application to upload a file to" + }, + { + "schema":{ + "type":"string" + }, + "name":"documentId", + "in":"path", + "required":true, + "description":"ID of the document to upload a file for" + } + ], + "summary":"Upload a PNG document - Back Side", + "description":"Upload a PNG file via API - Back Side", + "requestBody":{ + "description":"Upload PNG File - Back Side", + "required": true, + "content":{ + "image/png":{ + "schema":{ + "type": "object" + } + } + } + }, + "responses":{ + "200":{ + "description":"Successful Response", + "content":{ + "application/vnd.api+json; charset=utf-8":{ + "schema":{ + "$ref": "application_paths.json#/UnitDocumentResponse" } } } @@ -656,7 +757,278 @@ "content":{ "application/vnd.api+json; charset=utf-8":{ "schema":{ - "$ref": "#/UnitDocumentResponse" + "$ref": "application_paths.json#/UnitDocumentResponse" + } + } + } + } + } + } + }, + "upload_jpg_file_back":{ + "put":{ + "tags":[ + "Upload a JPEG Document for an Application - Back Side" + ], + "operationId":"execute", + "parameters":[ + { + "schema":{ + "type":"string" + }, + "name":"applicationId", + "in":"path", + "required":true, + "description":"ID of the application to upload a file to" + }, + { + "schema":{ + "type":"string" + }, + "name":"documentId", + "in":"path", + "required":true, + "description":"ID of the document to upload a file for" + } + ], + "summary":"Upload a JPEG document - Back Side", + "description":"Upload a JPEG file via API - Back Side", + "requestBody":{ + "description":"Upload JPEG File - Back Side", + "required": true, + "content":{ + "image/jpeg":{ + "schema":{ + "type": "object" + } + } + } + }, + "responses":{ + "200":{ + "description":"Successful Response", + "content":{ + "application/vnd.api+json; charset=utf-8":{ + "schema":{ + "$ref": "application_paths.json#/UnitDocumentResponse" + } + } + } + } + } + } + }, + "documents":{ + "get":{ + "tags":[ + "Get List of Documents" + ], + "operationId":"execute", + "parameters":[ + { + "schema":{ + "type":"string" + }, + "name":"applicationId", + "in":"path", + "required":true, + "description":"ID of the application to get documents for" + } + ], + "summary":"Get List of Documents", + "description":"Get List of Documents via API ", + "responses":{ + "200":{ + "description": "Successful Response", + "content": { + "application/vnd.api+json; charset=utf-8":{ + "schema": { + "type": "object", + "title": "UnitListDocumentsResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "document.json" + } + } + } + } + } + } + } + } + }, + "post":{ + "tags":[ + "Create a Document for an Application" + ], + "operationId":"execute", + "parameters":[ + { + "schema":{ + "type":"string" + }, + "name":"applicationId", + "in":"path", + "required":true, + "description":"ID of the application to create a file for" + } + ], + "summary":"Create a document", + "description":"Create a document via API ", + "responses":{ + "200":{ + "description":"Successful Response", + "content":{ + "application/vnd.api+json; charset=utf-8":{ + "schema":{ + "$ref": "application_paths.json#/UnitDocumentResponse" + } + } + } + } + } + } + }, + "verify_document":{ + "put":{ + "tags":[ + "Verify a Document for an Application" + ], + "operationId":"execute", + "parameters":[ + { + "schema":{ + "type":"string" + }, + "name":"applicationId", + "in":"path", + "required":true, + "description":"ID of the application to verify a file for" + }, + { + "schema":{ + "type":"string" + }, + "name":"documentId", + "in":"path", + "required":true, + "description":"ID of the document to verify" + } + ], + "summary":"Verify a document", + "description":"Verify a document via API ", + "requestBody":{ + "description":"Verify Document", + "required": true, + "content":{ + "application/json":{ + "schema":{ + "type": "object", + "title": "VerifyDocument", + "properties": { + "jobId": { + "type": "string" + } + } + } + } + } + }, + "responses":{ + "200":{ + "description":"Successful Response", + "content":{ + "application/vnd.api+json; charset=utf-8":{ + "schema":{ + "$ref": "application_paths.json#/UnitDocumentResponse" + } + } + } + } + } + } + }, + "download_document": { + "get":{ + "tags":[ + "Download a Document" + ], + "operationId":"execute", + "parameters":[ + { + "schema":{ + "type":"string" + }, + "name":"applicationId", + "in":"path", + "required":true, + "description":"ID of the application" + }, + { + "schema":{ + "type":"string" + }, + "name":"documentId", + "in":"path", + "required":true, + "description":"ID of the document to download" + } + ], + "summary":"Download a Document", + "description":"Download a Document via API ", + "responses":{ + "200":{ + "description": "Successful Response", + "content": { + "application/octet-stream":{ + "schema":{ + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "download_back_side_document": { + "get":{ + "tags":[ + "Download a Document - Back Side" + ], + "operationId":"execute", + "parameters":[ + { + "schema":{ + "type":"string" + }, + "name":"applicationId", + "in":"path", + "required":true, + "description":"ID of the application" + }, + { + "schema":{ + "type":"string" + }, + "name":"documentId", + "in":"path", + "required":true, + "description":"ID of the document to download" + } + ], + "summary":"Download a Document - Back Side", + "description":"Download a Document - Back Side via API", + "responses":{ + "200":{ + "description": "Successful Response", + "content": { + "application/octet-stream":{ + "schema":{ + "type": "string", + "format": "binary" } } } diff --git a/schemas_with_one_of/atm_location.json b/schemas_with_one_of/atm_location.json new file mode 100644 index 0000000..fbcf7fd --- /dev/null +++ b/schemas_with_one_of/atm_location.json @@ -0,0 +1,41 @@ +{ + "title": "AtmLocation", + "type": "object", + "properties": { + "type": { + "type": "string", + "default": "atmLocation" + }, + "attributes": { + "type": "object", + "properties": { + "network": { + "type": "string" + }, + "locationName": { + "type": "string" + }, + "coordinates": { + "$ref": "types.json#/definitions/coordinates" + }, + "address": { + "$ref": "types.json#/definitions/address" + }, + "distance": { + "type": "integer" + }, + "surchargeFree": { + "type": "boolean" + }, + "acceptDeposits": { + "type": "boolean" + } + } + } + }, + "required": [ + "type", + "attributes" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/schemas_with_one_of/atm_location_paths.json b/schemas_with_one_of/atm_location_paths.json index cdc8e71..d402c47 100644 --- a/schemas_with_one_of/atm_location_paths.json +++ b/schemas_with_one_of/atm_location_paths.json @@ -8,13 +8,6 @@ "summary": "Get List ATM Locations", "description": "Get List ATM Locations from API ", "parameters": [ - { - "name": "page", - "in": "query", - "schema": { - "$ref": "types.json#/definitions/listPageParametersObject" - } - }, { "name": "filter", "in": "query", @@ -23,34 +16,20 @@ "schema": { "type": "object", "properties": { - "query": { - "type": "string" + "coordinates": { + "type": "object" }, - "status": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "Pending", - "Approved" - ] - } + "searchRadius": { + "type": "integer" }, - "email": { + "postalCode": { "type": "string" }, - "tags": { + "address": { "type": "object" } } } - }, - { - "name": "sort", - "in": "query", - "schema": { - "type": "string" - } } ], "responses": { @@ -62,7 +41,7 @@ "type": "array", "title": "UnitAtmLocationsListResponse", "items": { - "type": "object" + "$ref": "atm_location.json" } } } diff --git a/schemas_with_one_of/authorization_paths.json b/schemas_with_one_of/authorization_paths.json index 886c884..a08aa51 100644 --- a/schemas_with_one_of/authorization_paths.json +++ b/schemas_with_one_of/authorization_paths.json @@ -26,38 +26,47 @@ "accountId": { "type": "string" }, - "customerId": { - "type": "string" - }, - "cardId": { + "accountType": { "type": "string" }, - "since": { + "customerId": { "type": "string" }, - "until": { + "cardId": { "type": "string" }, "includeNonAuthorized": { "type": "boolean" }, - "status": { - "type": "string", - "enum": [ - "Authorized", "Completed", "Canceled", "Declined" - ] - }, "merchantCategoryCode": { "type": "array", "items": { "type": "string" } }, + "since": { + "type": "string" + }, + "until": { + "type": "string" + }, "fromAmount": { "type": "integer" }, "toAmount": { "type": "integer" + }, + "status": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Authorized", + "Completed", + "Canceled", + "Declined" + ] + } } } } @@ -77,6 +86,7 @@ "application/vnd.api+json; charset=utf-8": { "schema": { "type": "object", + "title": "UnitListAuthorizationsResponse", "properties": { "data": { "type": "array", @@ -190,6 +200,8 @@ "content": { "application/vnd.api+json; charset=utf-8": { "schema": { + "type": "object", + "title": "UnitListAuthorizationRequestsResponse", "properties": { "data": { "type": "array", @@ -264,12 +276,13 @@ "summary": "Approve Authorization Request by Id", "description": "Approve a Authorization Request via API ", "requestBody":{ - "description":"Approve Authorization Request Request", + "description":"Approve Authorization Request", "required": true, "content":{ "application/vnd.api+json":{ "schema":{ "type":"object", + "title": "ApproveAuthorizationRequest", "properties":{ "data":{ "$ref":"authorization_request.json#/definitions/approveAuthorizationRequest" @@ -319,12 +332,13 @@ "summary": "Decline Authorization Request", "description": "Decline Authorization Request via API ", "requestBody":{ - "description":"Decline Authorization Request Request", + "description":"Decline Authorization Request", "required": true, "content":{ "application/vnd.api+json":{ "schema":{ "type":"object", + "title": "DeclineAuthorizationRequest", "properties":{ "data":{ "$ref":"authorization_request.json#/definitions/declineAuthorizationRequest" diff --git a/schemas_with_one_of/card_paths.json b/schemas_with_one_of/card_paths.json index ce00b41..72fb65b 100644 --- a/schemas_with_one_of/card_paths.json +++ b/schemas_with_one_of/card_paths.json @@ -45,7 +45,10 @@ "type":"string" }, "tags":{ - "type":"object" + "type": "object", + "additionalProperties":{ + "type": "string" + } } } } @@ -105,13 +108,8 @@ "required":true, "content":{ "application/vnd.api+json":{ - "schema":{ - "type":"object", - "properties":{ - "data":{ - "$ref":"createCard.json" - } - } + "schema": { + "$ref": "createCard.json" } } } diff --git a/schemas_with_one_of/check_deposit.json b/schemas_with_one_of/check_deposit.json index c2686a3..29d376a 100644 --- a/schemas_with_one_of/check_deposit.json +++ b/schemas_with_one_of/check_deposit.json @@ -51,7 +51,7 @@ "required": [ "data" ], - "additionalProperties": false + "additionalProperties": true }, "customer": { "type": "object", diff --git a/schemas_with_one_of/check_deposit_paths.json b/schemas_with_one_of/check_deposit_paths.json index 56ca0a5..3f73c37 100644 --- a/schemas_with_one_of/check_deposit_paths.json +++ b/schemas_with_one_of/check_deposit_paths.json @@ -30,7 +30,29 @@ "type": "string" }, "tags": { - "type": "object" + "type": "object", + "additionalProperties":{ + "type": "string" + } + }, + "status": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "AwaitingImages", + "AwaitingFrontImage", + "AwaitingBackImage", + "Pending", + "PendingReview", + "Rejected", + "Clearing", + "Sent", + "Canceled", + "Returned", + "AwaitingCustomerConfirmation" + ] + } } } } @@ -56,9 +78,15 @@ "content": { "application/vnd.api+json; charset=utf-8": { "schema": { - "type": "array", - "items": { - "$ref": "check_deposit.json" + "type": "object", + "title": "UnitListCheckDepositsResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "check_deposit.json" + } + } } } } @@ -79,12 +107,7 @@ "content": { "application/vnd.api+json": { "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "createCheckDeposit.json" - } - } + "$ref": "createCheckDeposit.json" } } } diff --git a/schemas_with_one_of/check_payment_paths.json b/schemas_with_one_of/check_payment_paths.json index 8dfe85d..166dfa3 100644 --- a/schemas_with_one_of/check_payment_paths.json +++ b/schemas_with_one_of/check_payment_paths.json @@ -1,6 +1,23 @@ { "components": { "schemas": { + "returnReason": { + "type": "string", + "enum": [ + "InsufficientFunds", + "AccountClosed", + "AlteredCheck", + "ForgedSignature", + "PostdatedCheck", + "StopPaymentOrder", + "UnauthorizedDebit", + "WrongAmount", + "DuplicatePayment", + "MissingSignature", + "IrregularEndorsement", + "Other" + ] + }, "CheckPayment": { "title": "Check Payment Resource", "type": "object", @@ -40,6 +57,58 @@ "PendingReview" ] }, + "memo": { + "type": "string" + }, + "deliveryStatus": { + "type": "string", + "enum": [ + "Mailed", + "InLocalArea", + "Delivered", + "Rerouted", + "ReturnedToSender" + ] + }, + "sendAt": { + "type": "string", + "format": "date-time" + }, + "counterparty": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "address": { + "$ref": "types.json#/definitions/address" + }, + "counterpartyMoved": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "trackedAt": { + "type": "string", + "format": "date-time" + }, + "postalCode": { + "type": "string" + }, "expectedDelivery": { + "type": "string", + "format": "date" + }, + "originated": { + "type": "boolean" + }, + "expirationDate": { + "type": "string", + "format": "date" + }, + "rejectReason": { + "type": "string" + }, "tags": { "$ref": "tags.json#/definitions/tags" }, @@ -47,7 +116,7 @@ "type": "string" }, "returnReason": { - "type": "string" + "$ref": "#/components/schemas/returnReason" }, "pendingReviewReasons": { "type": "array", @@ -85,8 +154,7 @@ "updatedAt", "amount", "status", - "returnCutoffTime", - "additionalVerificationStatus" + "originated" ], "additionalProperties": false }, @@ -183,8 +251,7 @@ } }, "required": [ - "account", - "customer" + "account" ] } }, @@ -195,6 +262,15 @@ "attributes", "relationships" ] + }, + "UnitCheckPaymentResponse": { + "type": "object", + "title": "UnitCheckPaymentResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/CheckPayment" + } + } } } }, @@ -220,7 +296,10 @@ "schema": { "type": "object", "properties": { - "query": { + "accountId": { + "type": "string" + }, + "customerId": { "type": "string" }, "status": { @@ -228,16 +307,42 @@ "items": { "type": "string", "enum": [ + "New", + "Pending", + "Canceled", + "Rejected", + "InDelivery", + "InProduction", + "Delivered", + "ReturnedToSender", "Pending", - "Approved" + "Processed", + "PendingReview", + "MarkedForReturn", + "Returned" ] } }, - "email": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "since": { "type": "string" }, - "tags": { - "type": "object" + "until": { + "type": "string" + }, + "fromAmount": { + "type": "integer" + }, + "toAmount": { + "type": "integer" + }, + "checkNumber": { + "type": "string" } } } @@ -248,6 +353,13 @@ "schema": { "type": "string" } + }, + { + "name": "include", + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -257,6 +369,7 @@ "application/vnd.api+json; charset=utf-8": { "schema": { "type": "object", + "title": "UnitListCheckPaymentsResponse", "properties": { "data": { "type": "array", @@ -270,6 +383,37 @@ } } } + }, + "post": { + "tags": [ + "Create Check Payment" + ], + "operationId": "execute", + "summary": "Create Check Payment", + "description": "Create Check Payment via API ", + "requestBody": { + "description": "Create Check Payment Request", + "required": true, + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "createCheckPayment.json" + } + } + } + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/UnitCheckPaymentResponse" + } + } + } + } + } } }, "check_payment": { @@ -297,13 +441,7 @@ "content": { "application/vnd.api+json; charset=utf-8": { "schema": { - "type": "object", - "title": "UnitCheckPaymentResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/CheckPayment" - } - } + "$ref": "#/components/schemas/UnitCheckPaymentResponse" } } } @@ -328,6 +466,29 @@ "description": "ID of the check payment to approve" } ], + "requestBody": { + "description": "Approve Check Payment Request", + "required": true, + "content": { + "application/vnd.api+json": { + "schema": { + "type": "object", + "title": "ApproveCheckPaymentRequest", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "default": "additionalVerification" + } + } + } + } + } + } + } + }, "summary": "Approve Check Payment by Id", "description": "Approve a Check Payment via API ", "responses": { @@ -336,17 +497,176 @@ "content": { "application/vnd.api+json; charset=utf-8": { "schema": { - "type": "object", - "title": "UnitCheckPaymentResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/CheckPayment" + "$ref": "#/components/schemas/UnitCheckPaymentResponse" + } + } + } + } + } + } + }, + "check_payment_return": { + "post": { + "tags": [ + "Return Check Payment" + ], + "operationId": "execute", + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "checkPaymentId", + "in": "path", + "required": true, + "description": "ID of the check payment to return" + } + ], + "requestBody": { + "description": "Return Check Payment Request", + "required": true, + "content": { + "application/vnd.api+json": { + "schema": { + "type": "object", + "title": "ReturnCheckPaymentRequest", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "default": "checkPaymentReturn" + }, + "attributes": { + "type": "object", + "properties": { + "reason": { + "$ref": "#/components/schemas/returnReason" + } + } + } } } } } } } + }, + "summary": "Return Check Payment by Id", + "description": "Return a Check Payment via API ", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/vnd.api+json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/UnitCheckPaymentResponse" + } + } + } + } + } + } + }, + "check_payment_cancel": { + "post": { + "tags": [ + "Cancel Check Payment" + ], + "operationId": "execute", + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "checkPaymentId", + "in": "path", + "required": true, + "description": "ID of the check payment to cancel" + } + ], + "summary": "Cancel Check Payment by Id", + "description": "Cancel a Check Payment via API ", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/vnd.api+json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/UnitCheckPaymentResponse" + } + } + } + } + } + } + }, + "get_check_payment_front": { + "get": { + "tags": [ + "Get a front image" + ], + "operationId": "execute", + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "checkPaymentId", + "in": "path", + "required": true, + "description": "ID of the check payment" + } + ], + "summary": "Get front image", + "description": "Get front image via API ", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "image/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "get_check_payment_back": { + "get": { + "tags": [ + "Get a back image" + ], + "operationId": "execute", + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "checkPaymentId", + "in": "path", + "required": true, + "description": "ID of the check payment" + } + ], + "summary": "Get back image", + "description": "Get back image via API ", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "image/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } } } } diff --git a/schemas_with_one_of/counterparty_paths.json b/schemas_with_one_of/counterparty_paths.json index ea1e2ac..630ee4d 100644 --- a/schemas_with_one_of/counterparty_paths.json +++ b/schemas_with_one_of/counterparty_paths.json @@ -7,6 +7,59 @@ "operationId": "execute", "summary": "Get Counterparties List", "description": "Get Counterparties List from API ", + "parameters":[ + { + "name":"page", + "in":"query", + "schema":{ + "$ref":"types.json#/definitions/listPageParametersObject" + } + }, + { + "name":"filter", + "in":"query", + "style":"deepObject", + "allowReserved":true, + "schema": { + "type": "object", + "properties": { + "customerId": { + "type": "string" + }, + "accountNumber": { + "type": "string" + }, + "routingNumber": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "CreditOnly", + "DebitOnly", + "CreditAndDebit" + ] + } + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + { + "name":"sort", + "in":"query", + "schema":{ + "type":"string" + } + } + ], "responses": { "200": { "description": "Successful Response", @@ -39,12 +92,7 @@ "content": { "application/vnd.api+json": { "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "createCounterparty.json" - } - } + "$ref": "createCounterparty.json" } } } diff --git a/schemas_with_one_of/createAccount.json b/schemas_with_one_of/createAccount.json index 134b58c..000222f 100644 --- a/schemas_with_one_of/createAccount.json +++ b/schemas_with_one_of/createAccount.json @@ -87,14 +87,19 @@ "additionalProperties": false } }, - "title": "Create Account", "type": "object", - "oneOf": [ - { - "$ref": "#/definitions/CreateCreditAccount" - }, - { - "$ref": "#/definitions/CreateDepositAccount" + "properties": { + "data": { + "oneOf": [ + { + "$ref": "#/definitions/CreateCreditAccount" + }, + { + "$ref": "#/definitions/CreateDepositAccount" + } + ] } - ] + }, + "additionalProperties": false, + "required": [ "data" ] } \ No newline at end of file diff --git a/schemas_with_one_of/createApiToken.json b/schemas_with_one_of/createApiToken.json index 584c84a..cc8a476 100644 --- a/schemas_with_one_of/createApiToken.json +++ b/schemas_with_one_of/createApiToken.json @@ -2,59 +2,64 @@ "title": "Create API Token", "type": "object", "properties": { - "type": { - "type": "string", - "default": "apiToken" - }, - "attributes": { + "data": { "type": "object", "properties": { - "scope": { - "type": "string" - }, - "description": { - "type": "string" - }, - "expiration": { + "type": { "type": "string", - "format": "date-time" - }, - "sourceIp": { - "type": "string" + "default": "apiToken" }, - "resources": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "card", - "account" - ] - }, - "ids": { - "type": "array", - "items": { - "$ref": "types.json#/definitions/identifier" + "attributes": { + "type": "object", + "properties": { + "scope": { + "type": "string" + }, + "description": { + "type": "string" + }, + "expiration": { + "type": "string", + "format": "date-time" + }, + "sourceIp": { + "type": "string" + }, + "resources": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "card", + "account" + ] + }, + "ids": { + "type": "array", + "items": { + "$ref": "types.json#/definitions/identifier" + } + } } } } - } + }, + "additionalProperties": false, + "required": [ + "description", + "expiration" + ] } }, "additionalProperties": false, "required": [ - "description", - "expiration" + "type", + "attributes" ] } - }, - "additionalProperties": false, - "required": [ - "type", - "attributes" - ] + } } \ No newline at end of file diff --git a/schemas_with_one_of/createApplication.json b/schemas_with_one_of/createApplication.json index d0d5148..25bee2a 100644 --- a/schemas_with_one_of/createApplication.json +++ b/schemas_with_one_of/createApplication.json @@ -68,7 +68,7 @@ "dateOfBirth" ] }, - "officer": { + "createOfficer": { "title": "CreateOfficer", "type": "object", "properties": { @@ -122,6 +122,15 @@ }, "evaluationParams": { "$ref": "#/definitions/evaluationParams" + }, + "occupation": { + "$ref": "types.json#/definitions/occupation" + }, + "annualIncome": { + "$ref": "types.json#/definitions/annualIncome" + }, + "sourceOfIncome": { + "$ref": "types.json#/definitions/sourceOfIncome" } }, "additionalProperties": false, @@ -130,7 +139,8 @@ "email", "phone", "address", - "dateOfBirth" + "dateOfBirth", + "occupation" ] }, "createBeneficialOwner": { @@ -173,7 +183,10 @@ }, "evaluationParams": { "$ref": "#/definitions/evaluationParams" - } + }, + "occupation": { "$ref": "types.json#/definitions/occupation" }, + "annualIncome": { "$ref": "types.json#/definitions/annualIncome" }, + "sourceOfIncome": { "$ref": "types.json#/definitions/sourceOfIncome" } }, "additionalProperties": false, "required": [ @@ -231,16 +244,7 @@ "format": "date" }, "ip": { - "oneOf": [ - { - "type": "string", - "format": "ipv4" - }, - { - "type": "string", - "format": "ipv6" - } - ] + "type": "string" }, "tags": { "$ref": "tags.json#/definitions/tags" @@ -355,16 +359,7 @@ "pattern": "^\\d{9}$" }, "ip": { - "oneOf": [ - { - "type": "string", - "format": "ipv4" - }, - { - "type": "string", - "format": "ipv6" - } - ] + "type": "string" }, "soleProprietorship": { "type": "boolean", @@ -487,19 +482,10 @@ "$ref": "types.json#/definitions/contact" }, "officer": { - "$ref": "#/definitions/officer" + "$ref": "#/definitions/createOfficer" }, "ip": { - "oneOf": [ - { - "type": "string", - "format": "ipv4" - }, - { - "type": "string", - "format": "ipv6" - } - ] + "type": "string" }, "website": { "type": "string" @@ -627,16 +613,7 @@ "$ref": "types.json#/definitions/trustContact" }, "ip": { - "oneOf": [ - { - "type": "string", - "format": "ipv4" - }, - { - "type": "string", - "format": "ipv6" - } - ] + "type": "string" }, "tags": { "$ref": "tags.json#/definitions/tags" @@ -675,20 +652,25 @@ ] } }, - "title": "Create Application", "type": "object", - "oneOf": [ - { - "$ref": "#/definitions/CreateIndividualApplication" - }, - { - "$ref": "#/definitions/CreateSoleProprietorApplication" - }, - { - "$ref": "#/definitions/CreateBusinessApplication" - }, - { - "$ref": "#/definitions/CreateTrustApplication" + "properties": { + "data": { + "oneOf": [ + { + "$ref": "#/definitions/CreateIndividualApplication" + }, + { + "$ref": "#/definitions/CreateSoleProprietorApplication" + }, + { + "$ref": "#/definitions/CreateBusinessApplication" + }, + { + "$ref": "#/definitions/CreateTrustApplication" + } + ] } - ] + }, + "additionalProperties": false, + "required": [ "data" ] } \ No newline at end of file diff --git a/schemas_with_one_of/createApplicationForm.json b/schemas_with_one_of/createApplicationForm.json index 45ff1cc..c756035 100644 --- a/schemas_with_one_of/createApplicationForm.json +++ b/schemas_with_one_of/createApplicationForm.json @@ -1,125 +1,5 @@ { "definitions": { - "prefilled": { - "title": "Application Form Prefilled", - "type": "object", - "properties": { - "applicationType": { - "type": "string", - "enum": [ - "Individual", - "Business", - "SoleProprietorship" - ] - }, - "fullName": { - "$ref": "types.json#/definitions/fullName" - }, - "ssn": { - "type": "string", - "pattern": "^\\d{9}$" - }, - "passport": { - "type": "string" - }, - "nationality": { - "$ref": "types.json#/definitions/country" - }, - "dateOfBirth": { - "type": "string", - "format": "date" - }, - "email": { - "$ref": "types.json#/definitions/email" - }, - "name": { - "type": "string", - "minLength": 1, - "maxLength": 255 - }, - "stateOfIncorporation": { - "type": "string", - "minLength": 2, - "maxLength": 2 - }, - "entityType": { - "$ref": "types.json#/definitions/entityType" - }, - "contact": { - "$ref": "types.json#/definitions/contact" - }, - "officer": { - "$ref": "createApplication.json#/definitions/officer" - }, - "beneficialOwners": { - "type": "array", - "items": { - "$ref": "createApplication.json#/definitions/createBeneficialOwner" - } - }, - "website": { - "type": "string" - }, - "phone": { - "$ref": "types.json#/definitions/phone" - }, - "address": { - "$ref": "types.json#/definitions/address" - }, - "dba": { - "type": "string", - "minLength": 1, - "maxLength": 255 - }, - "ein": { - "type": "string", - "pattern": "^\\d{9}$" - }, - "jwtSubject": { - "$ref": "types.json#/definitions/jwtSubject" - }, - "industry": { - "$ref": "types.json#/definitions/industry" - } - }, - "additionalProperties": false - }, - "settingsOverride": { - "type": "object", - "properties": { - "redirectUrl": { - "$ref": "types.json#/definitions/url" - }, - "privacyPolicyUrl": { - "$ref": "types.json#/definitions/url" - }, - "electronicDisclosuresUrl": { - "$ref": "types.json#/definitions/url" - }, - "depositTermsUrl": { - "$ref": "types.json#/definitions/url" - }, - "clientTermsUrl": { - "$ref": "types.json#/definitions/url" - }, - "cardholderTermsUrl": { - "$ref": "types.json#/definitions/url" - }, - "cashAdvancedTermsUrl": { - "$ref": "types.json#/definitions/url" - }, - "debitCardDisclosureUrl": { - "$ref": "types.json#/definitions/url" - }, - "additionalDisclosures": { - "$ref": "org_settings.json#/definitions/applicationFormAdditionalDisclosures" - }, - "validatePhoneNumber": { - "$ref": "org_settings.json#/definitions/applicationFormValidatePhoneNumber" - } - }, - "additionalProperties": false - }, "requireIdVerification": { "type": "object", "properties": { @@ -139,69 +19,70 @@ "additionalProperties": false } }, - "title": "Create Application Form", "type": "object", "properties": { - "type": { - "type": "string", - "default": "applicationForm" - }, - "attributes": { + "data": { "type": "object", "properties": { - "email": { - "$ref": "types.json#/definitions/email" - }, - "tags": { - "$ref": "tags.json#/definitions/tags" - }, - "applicantDetails": { - "$ref": "#/definitions/prefilled" - }, - "settingsOverride": { - "$ref": "#/definitions/settingsOverride" - }, - "requireIdVerification": { - "$ref": "#/definitions/requireIdVerification" - }, - "allowedApplicationTypes": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "Individual", - "Business", - "SoleProprietorship" - ] - } - }, - "lang": { + "type": { "type": "string", - "enum": [ - "en", - "es" - ] - }, - "hideApplicationProgressTracker": { - "type": "boolean" + "default": "applicationForm" + }, + "attributes": { + "type": "object", + "properties": { + "tags": { + "$ref": "tags.json#/definitions/tags" + }, + "applicantDetails": { + "$ref": "application_form.json#/definitions/ApplicationFormPrefill" + }, + "settingsOverride": { + "$ref": "application_form.json#/definitions/ApplicationFormSettingsOverride" + }, + "requireIdVerification": { + "$ref": "#/definitions/requireIdVerification" + }, + "allowedApplicationTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Individual", + "Business", + "SoleProprietorship" + ] + } + }, + "lang": { + "type": "string", + "enum": [ + "en", + "es" + ] + }, + "hideApplicationProgressTracker": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "relationships": { + "type": "object", + "title": "createApplicationFormRelationships", + "properties": { + "application": { + "$ref": "types.json#/definitions/Relationship" + } + }, + "required": [], + "additionalProperties": false } }, - "additionalProperties": false - }, - "relationships": { - "type": "object", - "title": "createApplicationFormRelationships", - "properties": { - "application": { - "$ref": "types.json#/definitions/Relationship" - } - }, - "required": [], - "additionalProperties": false + "additionalProperties": false, + "required": [ + "type" + ] } - }, - "additionalProperties": false, - "required": [ - "type" - ] + } } \ No newline at end of file diff --git a/schemas_with_one_of/createCard.json b/schemas_with_one_of/createCard.json index ea742b7..046bdbd 100644 --- a/schemas_with_one_of/createCard.json +++ b/schemas_with_one_of/createCard.json @@ -494,26 +494,29 @@ ] } }, - "title":"Create Card", "type":"object", - "oneOf":[ - { - "$ref":"#/definitions/CreateIndividualDebitCard" - }, - { - "$ref":"#/definitions/CreateBusinessDebitCard" - }, - { - "$ref":"#/definitions/CreateBusinessCreditCard" - }, - { - "$ref":"#/definitions/CreateIndividualVirtualDebitCard" - }, - { - "$ref":"#/definitions/CreateBusinessVirtualDebitCard" - }, - { - "$ref":"#/definitions/CreateBusinessVirtualCreditCard" + "properties": { + "data": { + "oneOf": [ + { + "$ref": "#/definitions/CreateIndividualDebitCard" + }, + { + "$ref": "#/definitions/CreateBusinessDebitCard" + }, + { + "$ref": "#/definitions/CreateBusinessCreditCard" + }, + { + "$ref": "#/definitions/CreateIndividualVirtualDebitCard" + }, + { + "$ref": "#/definitions/CreateBusinessVirtualDebitCard" + }, + { + "$ref": "#/definitions/CreateBusinessVirtualCreditCard" + } + ] } - ] + } } \ No newline at end of file diff --git a/schemas_with_one_of/createCheckDeposit.json b/schemas_with_one_of/createCheckDeposit.json index 86d0bcf..f7fb759 100644 --- a/schemas_with_one_of/createCheckDeposit.json +++ b/schemas_with_one_of/createCheckDeposit.json @@ -13,50 +13,54 @@ "additionalProperties": false } }, - "title": "Check Deposit", "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "checkDeposit" - ] - }, - "attributes": { + "data": { "type": "object", "properties": { - "amount": { - "type": "integer", - "minimum": 1 - }, - "description": { + "type": { "type": "string", - "minLength": 1, - "maxLength": 50 + "enum": [ + "checkDeposit" + ], + "default": "checkDeposit" }, - "idempotencyKey": { - "type": "string", - "minLength": 1, - "maxLength": 255 + "attributes": { + "type": "object", + "properties": { + "amount": { + "type": "integer", + "minimum": 1 + }, + "description": { + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "idempotencyKey": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "tags": { + "$ref": "tags.json#/definitions/tags" + } + }, + "required": [ + "amount", + "description" + ], + "additionalProperties": false }, - "tags": { - "$ref": "tags.json#/definitions/tags" + "relationships": { + "$ref": "#/definitions/createCheckDepositRelationships" } }, "required": [ - "amount", - "description" - ], - "additionalProperties": false - }, - "relationships": { - "$ref": "#/definitions/createCheckDepositRelationships" + "type", + "attributes", + "relationships" + ] } - }, - "required": [ - "type", - "attributes", - "relationships" - ], - "additionalProperties": false + } } \ No newline at end of file diff --git a/schemas_with_one_of/createCheckPayment.json b/schemas_with_one_of/createCheckPayment.json new file mode 100644 index 0000000..a6def60 --- /dev/null +++ b/schemas_with_one_of/createCheckPayment.json @@ -0,0 +1,151 @@ +{ + "definitions": { + "relationships": { + "type": "object", + "properties": { + "account": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "account", + "depositAccount" + ] + }, + "id": { + "$ref": "types.json#/definitions/identifier" + } + }, + "required": [ + "type", + "id" + ] + } + } + }, + "customer": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "businessCustomer", + "individualCustomer" + ] + }, + "id": { + "$ref": "types.json#/definitions/identifier" + } + }, + "required": [ + "type", + "id" + ], + "additionalProperties": false + } + }, + "required": [ + "data" + ], + "additionalProperties": false + } + }, + "required": [ + "account", + "customer" + ] + }, + "checkPayment": { + "title": "Check Payment", + "type": "object", + "properties": { + "type": { + "type": "string", + "default": "checkPayment" + }, + "attributes": { + "type": "object", + "properties": { + "counterparty": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 40 + }, + "address": { + "$ref": "types.json#/definitions/address" + }, + "counterpartyMoved": { + "type": "boolean" + } + }, + "required": [ + "name", + "address" + ], + "additionalProperties": false + }, + "amount": { + "type": "integer", + "minimum": 1 + }, + "idempotencyKey": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "sendDate": { + "type": "string", + "format": "date" + }, + "memo": { + "type": "string" + }, + "description": { + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "tags": { + "$ref": "tags.json#/definitions/tags" + } + }, + "required": [ + "counterparty", + "amount", + "idempotencyKey", + "description" + ], + "additionalProperties": false + }, + "relationships": { + "$ref": "#/definitions/relationships" + } + }, + "required": [ + "type", + "attributes", + "relationships" + ], + "additionalProperties": false + } + }, + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/checkPayment" + } + }, + "additionalProperties": false, + "required": [ + "data" + ] +} \ No newline at end of file diff --git a/schemas_with_one_of/createCounterparty.json b/schemas_with_one_of/createCounterparty.json index e0506a9..a75d7df 100644 --- a/schemas_with_one_of/createCounterparty.json +++ b/schemas_with_one_of/createCounterparty.json @@ -143,14 +143,17 @@ ] } }, - "title":"Create Counterparty", "type":"object", - "oneOf":[ - { - "$ref":"#/definitions/CreateAchCounterparty" - }, - { - "$ref":"#/definitions/CreatePlaidCounterparty" + "properties": { + "data": { + "oneOf": [ + { + "$ref": "#/definitions/CreateAchCounterparty" + }, + { + "$ref": "#/definitions/CreatePlaidCounterparty" + } + ] } - ] + } } \ No newline at end of file diff --git a/schemas_with_one_of/createCustomer.json b/schemas_with_one_of/createCustomer.json index e3b7209..d80a9fe 100644 --- a/schemas_with_one_of/createCustomer.json +++ b/schemas_with_one_of/createCustomer.json @@ -185,8 +185,9 @@ ] } }, - "title": "Create Customer", "type": "object", + "properties": { + "data": { "oneOf": [ { "$ref": "#/definitions/CreateBusinessCustomer" @@ -194,5 +195,7 @@ { "$ref": "#/definitions/CreateIndividualCustomer" } - ] + ] + } + } } \ No newline at end of file diff --git a/schemas_with_one_of/createCustomerToken.json b/schemas_with_one_of/createCustomerToken.json index 02f8906..c89f997 100644 --- a/schemas_with_one_of/createCustomerToken.json +++ b/schemas_with_one_of/createCustomerToken.json @@ -1,47 +1,55 @@ { "type": "object", "properties": { - "type": { - "type": "string", - "default": "customerToken" - }, - "attributes": { + "data": { "type": "object", "properties": { - "scope": { - "type": "string" + "type": { + "type": "string", + "default": "customerToken" }, - "verificationToken": { - "type": "string" - }, - "jwtToken": { - "type": "string" - }, - "expiresIn": { - "type": "integer" - }, - "verificationCode": { - "type": "string" - }, - "resources": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "card", - "account" - ] - }, - "ids": { - "type": "array", - "items": { - "$ref": "types.json#/definitions/identifier" + "attributes": { + "type": "object", + "properties": { + "scope": { + "type": "string" + }, + "verificationToken": { + "type": "string" + }, + "jwtToken": { + "type": "string" + }, + "expiresIn": { + "type": "integer" + }, + "verificationCode": { + "type": "string" + }, + "resources": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "card", + "account" + ] + }, + "ids": { + "type": "array", + "items": { + "$ref": "types.json#/definitions/identifier" + } + } } } + }, + "upgradableScope": { + "type": "string" } } } diff --git a/schemas_with_one_of/createCustomerTokenVerification.json b/schemas_with_one_of/createCustomerTokenVerification.json index 86e037c..5f8a0f0 100644 --- a/schemas_with_one_of/createCustomerTokenVerification.json +++ b/schemas_with_one_of/createCustomerTokenVerification.json @@ -1,84 +1,89 @@ { "type": "object", "properties": { - "type": { - "type": "string", - "default": "customerTokenVerification" - }, - "attributes": { + "data": { "type": "object", "properties": { - "channel": { + "type": { "type": "string", - "enum": [ - "sms", - "call" - ] + "default": "customerTokenVerification" }, - "phone": { - "$ref": "types.json#/definitions/phone" - }, - "appHash": { - "type": "string", - "minLength": 11, - "maxLength": 11 - }, - "language": { - "type": "string", - "enum": [ - "en", - "af", - "ar", - "ca", - "zh", - "zh-CN", - "zh-HK", - "hr", - "cs", - "da", - "nl", - "en-GB", - "et", - "fi", - "fr", - "de", - "el", - "he", - "hi", - "hu", - "id", - "it", - "ja", - "kn", - "ko", - "ms", - "mr", - "nb", - "pl", - "pt-BR", - "pt", - "ro", - "ru", - "sk", - "es", - "sv", - "tl", - "te", - "th", - "tr", - "vi" - ] + "attributes": { + "type": "object", + "properties": { + "channel": { + "type": "string", + "enum": [ + "sms", + "call" + ] + }, + "phone": { + "$ref": "types.json#/definitions/phone" + }, + "appHash": { + "type": "string", + "minLength": 11, + "maxLength": 11 + }, + "language": { + "type": "string", + "enum": [ + "en", + "af", + "ar", + "ca", + "zh", + "zh-CN", + "zh-HK", + "hr", + "cs", + "da", + "nl", + "en-GB", + "et", + "fi", + "fr", + "de", + "el", + "he", + "hi", + "hu", + "id", + "it", + "ja", + "kn", + "ko", + "ms", + "mr", + "nb", + "pl", + "pt-BR", + "pt", + "ro", + "ru", + "sk", + "es", + "sv", + "tl", + "te", + "th", + "tr", + "vi" + ] + } + }, + "required": [ + "channel" + ], + "additionalProperties": false } }, + "additionalProperties": false, "required": [ - "channel" - ], - "additionalProperties": false + "type", + "attributes" + ] } - }, - "additionalProperties": false, - "required": [ - "type", - "attributes" - ] + } } \ No newline at end of file diff --git a/schemas_with_one_of/createFee.json b/schemas_with_one_of/createFee.json index 4a3d8dc..3b961e5 100644 --- a/schemas_with_one_of/createFee.json +++ b/schemas_with_one_of/createFee.json @@ -13,49 +13,52 @@ "additionalProperties": false } }, - "title": "Fee", "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "fee" - ] - }, - "attributes": { - "type": "object", - "properties": { - "amount": { - "type": "integer", - "minimum": 1 - }, - "description": { - "type": "string", - "maxLength": 50 - }, - "tags": { - "$ref": "tags.json#/definitions/tags" + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "fee" + ], + "default": "fee" + }, + "attributes": { + "type": "object", + "properties": { + "amount": { + "type": "integer", + "minimum": 1 + }, + "description": { + "type": "string", + "maxLength": 50 + }, + "tags": { + "$ref": "tags.json#/definitions/tags" + }, + "idempotencyKey": { + "type": "string", + "minLength": 1, + "maxLength": 255 + } }, - "idempotencyKey": { - "type": "string", - "minLength": 1, - "maxLength": 255 - } + "required": [ + "amount", + "description" + ], + "additionalProperties": false }, - "required": [ - "amount", - "description" - ], - "additionalProperties": false + "relationships": { + "$ref": "#/definitions/createFeeRelationships" + } }, - "relationships": { - "$ref": "#/definitions/createFeeRelationships" - } - }, - "required": [ - "type", - "attributes", - "relationships" - ], - "additionalProperties": false + "required": [ + "type", + "attributes", + "relationships" + ], + "additionalProperties": false + } } \ No newline at end of file diff --git a/schemas_with_one_of/createPayment.json b/schemas_with_one_of/createPayment.json index 91d0e3b..0f5c26d 100644 --- a/schemas_with_one_of/createPayment.json +++ b/schemas_with_one_of/createPayment.json @@ -91,12 +91,13 @@ "additionalProperties": false }, "CreateAchPayment": { - "title": "Create ACH Payment", + "title": "Create ACH Payment to inline Counterparty", "type": "object", "properties": { "type": { - "type": "string" - }, + "type": "string", + "default": "achPayment" + }, "attributes": { "type": "object", "properties": { @@ -165,423 +166,432 @@ ] }, "CreateAchPaymentCounterparty": { - "title": "Create ACH Payment", + "title": "Create ACH Payment to linked Counterparty", "type": "object", + "properties": { + "type": { + "type": "string", + "default": "achPayment" + }, + "attributes": { + "type": "object", "properties": { - "type": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "amount": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "addenda": { - "type": "string" - }, - "direction": { - "type": "string", - "enum": [ - "Debit", - "Credit" - ] - }, - "sameDay": { - "type": "boolean" - }, - "idempotencyKey": { - "type": "string" - }, - "tags": { - "$ref": "tags.json#/definitions/tags" - }, - "verifyCounterpartyBalance": { - "type": "boolean", - "default": false - }, - "secCode": { - "type": "string", - "enum": [ - "WEB", - "CCD", - "PPD" - ] - } - }, - "required": [ - "amount", - "description", - "direction" - ], - "additionalProperties": false + "amount": { + "type": "integer" }, - "relationships": { - "type": "object", - "properties": { - "account": { - "$ref": "#/definitions/accountRelationship" - }, - "counterparty": { - "$ref": "#/definitions/counterpartyRelationship" - } - }, - "required": [ - "account", - "counterparty" - ], - "additionalProperties": false + "description": { + "type": "string" + }, + "addenda": { + "type": "string" + }, + "direction": { + "type": "string", + "enum": [ + "Debit", + "Credit" + ] + }, + "sameDay": { + "type": "boolean" + }, + "idempotencyKey": { + "type": "string" + }, + "tags": { + "$ref": "tags.json#/definitions/tags" + }, + "verifyCounterpartyBalance": { + "type": "boolean", + "default": false + }, + "secCode": { + "type": "string", + "enum": [ + "WEB", + "CCD", + "PPD" + ] } }, - "additionalProperties": false, "required": [ - "attributes", - "relationships" - ] + "amount", + "description", + "direction" + ], + "additionalProperties": false + }, + "relationships": { + "type": "object", + "properties": { + "account": { + "$ref": "#/definitions/accountRelationship" + }, + "counterparty": { + "$ref": "#/definitions/counterpartyRelationship" + } + }, + "required": [ + "account", + "counterparty" + ], + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "attributes", + "relationships" + ] }, "CreateAchPaymentPlaid": { - "title": "Create ACH Payment", + "title": "Create ACH Payment with Plaid token", "type": "object", + "properties": { + "type": { + "type": "string", + "default": "achPayment" + }, + "attributes": { + "type": "object", "properties": { - "type": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "amount": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "addenda": { - "type": "string" - }, - "direction": { - "type": "string", - "enum": [ - "Debit", - "Credit" - ] - }, - "idempotencyKey": { - "type": "string" - }, - "tags": { - "$ref": "tags.json#/definitions/tags" - }, - "plaidProcessorToken": { - "type": "string", - "pattern": "^processor-.*$" - }, - "counterpartyName": { - "type": "string" - }, - "sameDay": { - "type": "boolean" - }, - "verifyCounterpartyBalance": { - "type": "boolean", - "default": false - }, - "secCode": { - "type": "string", - "enum": [ - "WEB", - "CCD", - "PPD" - ] - } - }, - "required": [ - "amount", - "description", - "direction", - "plaidProcessorToken" - ], - "additionalProperties": false + "amount": { + "type": "integer" }, - "relationships": { - "type": "object", - "properties": { - "account": { - "$ref": "#/definitions/accountRelationship" - } - }, - "required": [ - "account" - ], - "additionalProperties": false + "description": { + "type": "string" + }, + "addenda": { + "type": "string" + }, + "direction": { + "type": "string", + "enum": [ + "Debit", + "Credit" + ] + }, + "idempotencyKey": { + "type": "string" + }, + "tags": { + "$ref": "tags.json#/definitions/tags" + }, + "plaidProcessorToken": { + "type": "string", + "pattern": "^processor-.*$" + }, + "counterpartyName": { + "type": "string" + }, + "sameDay": { + "type": "boolean" + }, + "verifyCounterpartyBalance": { + "type": "boolean", + "default": false + }, + "secCode": { + "type": "string", + "enum": [ + "WEB", + "CCD", + "PPD" + ] } }, - "additionalProperties": false, "required": [ - "attributes", - "relationships" - ] + "amount", + "description", + "direction", + "plaidProcessorToken" + ], + "additionalProperties": false + }, + "relationships": { + "type": "object", + "properties": { + "account": { + "$ref": "#/definitions/accountRelationship" + } + }, + "required": [ + "account" + ], + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "attributes", + "relationships" + ] }, "CreateBookPayment": { "title": "Create Book Payment", "type": "object", + "properties": { + "type": { + "type": "string", + "default": "bookPayment" + }, + "attributes": { + "type": "object", "properties": { - "type": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "amount": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "idempotencyKey": { - "type": "string" - }, - "tags": { - "$ref": "tags.json#/definitions/tags" - }, - "transactionSummaryOverride": { - "type": "string" - } - }, - "required": [ - "amount", - "description" - ], - "additionalProperties": false + "amount": { + "type": "integer" }, - "relationships": { - "type": "object", - "properties": { - "account": { - "$ref": "#/definitions/accountRelationship" - }, - "counterpartyAccount": { - "$ref": "#/definitions/counterpartyAccountRelationship" - } - }, - "required": [ - "account", - "counterpartyAccount" - ], - "additionalProperties": false + "description": { + "type": "string" + }, + "idempotencyKey": { + "type": "string" + }, + "tags": { + "$ref": "tags.json#/definitions/tags" + }, + "transactionSummaryOverride": { + "type": "string" } }, - "additionalProperties": false, "required": [ - "attributes", - "relationships" - ] + "amount", + "description" + ], + "additionalProperties": false + }, + "relationships": { + "type": "object", + "properties": { + "account": { + "$ref": "#/definitions/accountRelationship" + }, + "counterpartyAccount": { + "$ref": "#/definitions/counterpartyAccountRelationship" + } + }, + "required": [ + "account", + "counterpartyAccount" + ], + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "attributes", + "relationships" + ] }, "CreateWirePayment": { "title": "Create Wire Payment", "type": "object", + "properties": { + "type": { + "type": "string", + "default": "wirePayment" + }, + "attributes": { + "type": "object", "properties": { - "type": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "amount": { - "type": "integer" - }, - "direction": { - "type": "string", - "enum": [ - "Credit" - ] - }, - "description": { - "type": "string" - }, - "counterparty": { - "$ref": "payment.json#/definitions/wireCounterparty" - }, - "idempotencyKey": { - "type": "string" - }, - "tags": { - "$ref": "tags.json#/definitions/tags" - } - }, - "required": [ - "amount", - "description", - "counterparty" - ], - "additionalProperties": false + "amount": { + "type": "integer" }, - "relationships": { - "type": "object", - "properties": { - "account": { - "$ref": "#/definitions/accountRelationship" - } - }, - "required": [ - "account" - ], - "additionalProperties": false + "direction": { + "type": "string", + "enum": [ + "Credit" + ] + }, + "description": { + "type": "string" + }, + "counterparty": { + "$ref": "payment.json#/definitions/wireCounterparty" + }, + "idempotencyKey": { + "type": "string" + }, + "tags": { + "$ref": "tags.json#/definitions/tags" } }, - "additionalProperties": false, "required": [ - "attributes", - "relationships" - ] + "amount", + "description", + "counterparty" + ], + "additionalProperties": false + }, + "relationships": { + "type": "object", + "properties": { + "account": { + "$ref": "#/definitions/accountRelationship" + } + }, + "required": [ + "account" + ], + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "attributes", + "relationships" + ] }, "CreateBillPayment": { "title": "Create Bill Payment", "type": "object", + "properties": { + "type": { + "type": "string", + "default": "billPayment" + }, + "attributes": { + "type": "object", "properties": { - "type": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "billerId": { - "type": "string" - }, - "accountNumber": { - "type": "string" - }, - "amount": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "idempotencyKey": { - "type": "string" - }, - "tags": { - "$ref": "tags.json#/definitions/tags" - }, - "fullName": { - "$ref": "types.json#/definitions/fullName" - }, - "dateOfBirth": { - "type": "string", - "format": "date" - } - }, - "required": [ - "billerId", - "accountNumber", - "amount", - "description" - ], - "additionalProperties": false + "billerId": { + "type": "string" }, - "relationships": { - "type": "object", - "properties": { - "account": { - "$ref": "#/definitions/accountRelationship" - } - }, - "required": [ - "account" - ], - "additionalProperties": false + "accountNumber": { + "type": "string" + }, + "amount": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "idempotencyKey": { + "type": "string" + }, + "tags": { + "$ref": "tags.json#/definitions/tags" + }, + "fullName": { + "$ref": "types.json#/definitions/fullName" + }, + "dateOfBirth": { + "type": "string", + "format": "date" } }, - "additionalProperties": false, "required": [ - "attributes", - "relationships" - ] + "billerId", + "accountNumber", + "amount", + "description" + ], + "additionalProperties": false + }, + "relationships": { + "type": "object", + "properties": { + "account": { + "$ref": "#/definitions/accountRelationship" + } + }, + "required": [ + "account" + ], + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "attributes", + "relationships" + ] }, "CreatePushToCardPayment": { "title": "Create Push To Card Payment", "type": "object", + "properties": { + "type": { + "type": "string", + "default": "pushToCardPayment" + }, + "attributes": { + "type": "object", "properties": { - "type": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "amount": { - "type": "integer" - }, - "idempotencyKey": { - "type": "string" - }, - "tags": { - "$ref": "tags.json#/definitions/tags" - }, - "description": { - "type": "string" - }, - "configuration": { - "type": "object", - "properties": { - "astra": { - "$ref": "payment.json#/definitions/astra" - } - } - } - }, - "required": [ - "amount", - "description", - "configuration" - ], - "additionalProperties": false + "amount": { + "type": "integer" }, - "relationships": { + "idempotencyKey": { + "type": "string" + }, + "tags": { + "$ref": "tags.json#/definitions/tags" + }, + "description": { + "type": "string" + }, + "configuration": { "type": "object", "properties": { - "account": { - "$ref": "createPayment.json#/definitions/accountRelationship" + "astra": { + "$ref": "payment.json#/definitions/astra" } - }, - "required": [ - "account" - ], - "additionalProperties": false + } } }, - "additionalProperties": false, "required": [ - "attributes", - "relationships" - ] + "amount", + "description", + "configuration" + ], + "additionalProperties": false + }, + "relationships": { + "type": "object", + "properties": { + "account": { + "$ref": "createPayment.json#/definitions/accountRelationship" + } + }, + "required": [ + "account" + ], + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "attributes", + "relationships" + ] }, "additionalProperties": false }, - "title": "Create Payment", "type": "object", - "oneOf": [ - { - "$ref": "#/definitions/CreateAchPayment" - }, - { - "$ref": "#/definitions/CreateAchPaymentCounterparty" - }, - { - "$ref": "#/definitions/CreateAchPaymentPlaid" - }, - { - "$ref": "#/definitions/CreateBookPayment" - }, - { - "$ref": "#/definitions/CreateWirePayment" - }, - { - "$ref": "#/definitions/CreateBillPayment" - }, - { - "$ref": "#/definitions/CreatePushToCardPayment" + "properties": { + "data": { + "oneOf": [ + { + "$ref": "#/definitions/CreateAchPayment" + }, + { + "$ref": "#/definitions/CreateAchPaymentCounterparty" + }, + { + "$ref": "#/definitions/CreateAchPaymentPlaid" + }, + { + "$ref": "#/definitions/CreateBookPayment" + }, + { + "$ref": "#/definitions/CreateWirePayment" + }, + { + "$ref": "#/definitions/CreateBillPayment" + }, + { + "$ref": "#/definitions/CreatePushToCardPayment" + } + ] } - ] + } } \ No newline at end of file diff --git a/schemas_with_one_of/createPayments.json b/schemas_with_one_of/createPayments.json index d2c4d04..35c258c 100644 --- a/schemas_with_one_of/createPayments.json +++ b/schemas_with_one_of/createPayments.json @@ -1,33 +1,31 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "createPayments.json", - "title": "Create Payments In Bulk", - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "createPayment.json#/definitions/createAchPayment" - }, - { - "$ref": "createPayment.json#/definitions/createAchPaymentCounterparty" - }, - { - "$ref": "createPayment.json#/definitions/createAchPaymentPlaid" - }, - { - "$ref": "createPayment.json#/definitions/createBookPayment" - }, - { - "$ref": "createPayment.json#/definitions/createWirePayment" - } - ] - } - } - }, - "required": [ - "data" - ] + "title": "Create Payments In Bulk", + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "createPayment.json#/definitions/createAchPayment" + }, + { + "$ref": "createPayment.json#/definitions/createAchPaymentCounterparty" + }, + { + "$ref": "createPayment.json#/definitions/createAchPaymentPlaid" + }, + { + "$ref": "createPayment.json#/definitions/createBookPayment" + }, + { + "$ref": "createPayment.json#/definitions/createWirePayment" + } + ] + } + } + }, + "required": [ + "data" + ] } \ No newline at end of file diff --git a/schemas_with_one_of/createRecurringPayment.json b/schemas_with_one_of/createRecurringPayment.json index 92c55ad..552bdc6 100644 --- a/schemas_with_one_of/createRecurringPayment.json +++ b/schemas_with_one_of/createRecurringPayment.json @@ -1,270 +1,276 @@ { - "definitions": { - "createRecurringCreditAchPayment": { - "title": "Create Recurring Credit ACH Payment", - "type": "object", - "allOf": [ - { - "$ref": "createRecurringPayment.json" - }, - { - "type": "object", - "properties": { - "attributes": { - "type": "object", - "properties": { - "amount": { - "type": "integer", - "minimum": 1 - }, - "description": { - "type": "string", - "minLength": 1, - "maxLength": 10 - }, - "addenda": { - "type": "string", - "minLength": 1, - "maxLength": 80 - }, - "idempotencyKey": { - "type": "string", - "minLength": 1, - "maxLength": 255 - }, - "tags": { - "$ref": "tags.json#/definitions/tags" - }, - "schedule": { - "$ref": "#/definitions/schedule" - } - }, - "required": [ - "amount", - "description", - "schedule" - ], - "additionalProperties": false - }, - "relationships": { - "type": "object", - "properties": { - "account": { - "$ref": "createPayment.json#/definitions/accountRelationship" - }, - "counterparty": { - "$ref": "createPayment.json#/definitions/counterpartyRelationship" - } - }, - "required": [ - "account", - "counterparty" - ], - "additionalProperties": false - } - }, - "additionalProperties": false, - "required": [ - "attributes", - "relationships" - ] - } - ] + "definitions": { + "createRecurringCreditAchPayment": { + "title": "Create Recurring Credit ACH Payment", + "type": "object", + "properties": { + "type": { + "type": "string", + "default": "recurringCreditAchPayment" }, - "createRecurringDebitAchPayment": { - "title": "Create Recurring Debit ACH Payment", - "type": "object", - "allOf": [ - { - "$ref": "createRecurringPayment.json" - }, - { - "type": "object", - "properties": { - "attributes": { - "type": "object", - "properties": { - "amount": { - "type": "integer", - "minimum": 1 - }, - "description": { - "type": "string", - "minLength": 1, - "maxLength": 10 - }, - "addenda": { - "type": "string", - "minLength": 1, - "maxLength": 80 - }, - "idempotencyKey": { - "type": "string", - "minLength": 1, - "maxLength": 255 - }, - "sameDay": { - "type": "boolean", - "default": false - }, - "verifyCounterpartyBalance": { - "type": "boolean", - "default": false - }, - "tags": { - "$ref": "tags.json#/definitions/tags" - }, - "schedule": { - "$ref": "#/definitions/schedule" - } - }, - "required": [ - "amount", - "description", - "schedule" - ], - "additionalProperties": false - }, - "relationships": { - "type": "object", - "properties": { - "account": { - "$ref": "createPayment.json#/definitions/accountRelationship" - }, - "counterparty": { - "$ref": "createPayment.json#/definitions/counterpartyRelationship" - } - }, - "required": [ - "account", - "counterparty" - ], - "additionalProperties": false - } - }, - "additionalProperties": false, - "required": [ - "attributes", - "relationships" - ] - } - ] + "attributes": { + "type": "object", + "properties": { + "amount": { + "type": "integer", + "minimum": 1 + }, + "description": { + "type": "string", + "minLength": 1, + "maxLength": 10 + }, + "addenda": { + "type": "string", + "minLength": 1, + "maxLength": 80 + }, + "idempotencyKey": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "tags": { + "$ref": "tags.json#/definitions/tags" + }, + "schedule": { + "$ref": "#/definitions/schedule" + } + }, + "required": [ + "amount", + "description", + "schedule" + ], + "additionalProperties": false }, - "createRecurringCreditBookPayment": { - "title": "Create Recurring Credit Book Payment", - "type": "object", - "allOf": [ - { - "$ref": "createRecurringPayment.json" - }, - { - "type": "object", - "properties": { - "attributes": { - "type": "object", - "properties": { - "amount": { - "type": "integer", - "minimum": 1 - }, - "description": { - "type": "string", - "minLength": 1, - "maxLength": 80 - }, - "idempotencyKey": { - "type": "string", - "minLength": 1, - "maxLength": 255 - }, - "tags": { - "$ref": "tags.json#/definitions/tags" - }, - "transactionSummaryOverride": { - "type": "string", - "minLength": 1, - "maxLength": 100 - }, - "schedule": { - "$ref": "#/definitions/schedule" - } - }, - "required": [ - "amount", - "description", - "schedule" - ], - "additionalProperties": false - }, - "relationships": { - "type": "object", - "properties": { - "account": { - "$ref": "createPayment.json#/definitions/accountRelationship" - }, - "counterpartyAccount": { - "$ref": "createPayment.json#/definitions/counterpartyAccountRelationship" - } - }, - "required": [ - "account", - "counterpartyAccount" - ], - "additionalProperties": false - } - }, - "additionalProperties": false, - "required": [ - "attributes", - "relationships" - ] - } - ] + "relationships": { + "type": "object", + "properties": { + "account": { + "$ref": "createPayment.json#/definitions/accountRelationship" + }, + "counterparty": { + "$ref": "createPayment.json#/definitions/counterpartyRelationship" + } + }, + "required": [ + "account", + "counterparty" + ], + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "type", + "attributes", + "relationships" + ] + }, + "createRecurringDebitAchPayment": { + "title": "Create Recurring Debit ACH Payment", + "type": "object", + "properties": { + "type": { + "type": "string", + "default": "recurringDebitAchPayment" }, - "schedule": { - "title": "schedule", - "properties": { - "$ref": "#/definitions/monthlySchedule" + "attributes": { + "type": "object", + "properties": { + "amount": { + "type": "integer", + "minimum": 1 + }, + "description": { + "type": "string", + "minLength": 1, + "maxLength": 10 + }, + "addenda": { + "type": "string", + "minLength": 1, + "maxLength": 80 + }, + "idempotencyKey": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "sameDay": { + "type": "boolean", + "default": false + }, + "verifyCounterpartyBalance": { + "type": "boolean", + "default": false + }, + "tags": { + "$ref": "tags.json#/definitions/tags" + }, + "schedule": { + "$ref": "#/definitions/schedule" + }, + "clearingDaysOverride": { + "type": "integer", + "minimum": 0 } + }, + "required": [ + "amount", + "description", + "schedule" + ], + "additionalProperties": false }, - "monthlySchedule": { - "title": "Create Monthly Schedule", - "type": "object", - "properties": { - "startTime": { - "type": "string", - "format": "date" - }, - "endTime": { - "type": "string", - "format": "date" - }, - "dayOfMonth": { - "type": "integer", - "minimum": -5, - "maximum": 28 - }, - "interval": { - "type": "string", - "default": "Monthly" - }, - "totalNumberOfPayments": { - "type": "integer", - "minimum": 1 - } + "relationships": { + "type": "object", + "properties": { + "account": { + "$ref": "createPayment.json#/definitions/accountRelationship" }, - "required": [ - "interval", - "dayOfMonth" - ], - "additionalProperties": false + "counterparty": { + "$ref": "createPayment.json#/definitions/counterpartyRelationship" + } + }, + "required": [ + "account", + "counterparty" + ], + "additionalProperties": false } + }, + "additionalProperties": false, + "required": [ + "type", + "attributes", + "relationships" + ] }, - "title": "Create Recurring Payment", - "type": "object", - "properties": { + "createRecurringCreditBookPayment": { + "title": "Create Recurring Credit Book Payment", + "type": "object", + "properties": { "type": { - "type": "string" + "type": "string", + "default": "recurringCreditBookPayment" + }, + "attributes": { + "type": "object", + "properties": { + "amount": { + "type": "integer", + "minimum": 1 + }, + "description": { + "type": "string", + "minLength": 1, + "maxLength": 80 + }, + "idempotencyKey": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "tags": { + "$ref": "tags.json#/definitions/tags" + }, + "transactionSummaryOverride": { + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "schedule": { + "$ref": "#/definitions/schedule" + } + }, + "required": [ + "amount", + "description", + "schedule"], + "additionalProperties": false + }, + "relationships": { + "type": "object", + "properties": { + "account": { + "$ref": "createPayment.json#/definitions/accountRelationship" + }, + "counterpartyAccount": { + "$ref": "createPayment.json#/definitions/counterpartyAccountRelationship" + } + }, + "required": [ + "account", + "counterpartyAccount" + ], + "additionalProperties": false } + }, + "additionalProperties": false, + "required": [ + "type", + "attributes", + "relationships" + ] + }, + "schedule": { + "title": "schedule", + "oneOf": [ + { + "$ref": "#/definitions/monthlySchedule" + } + ] + }, + "monthlySchedule": { + "title": "Create Monthly Schedule", + "type": "object", + "properties": { + "startTime": { + "type": "string", + "format": "date" + }, + "endTime": { + "type": "string", + "format": "date" + }, + "dayOfMonth": { + "type": "integer", + "minimum": -5, + "maximum": 28 + }, + "dayOfWeek": { + "type": "string", + "enum": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] + }, + "interval": { + "type": "string", + "enum": ["Monthly", "Weekly"] + }, + "totalNumberOfPayments": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "interval" + ], + "additionalProperties": false + } + }, + "type": "object", + "properties": { + "data": { + "oneOf": [ + { "$ref": "#/definitions/createRecurringCreditAchPayment" }, + { "$ref": "#/definitions/createRecurringDebitAchPayment" }, + { "$ref": "#/definitions/createRecurringCreditBookPayment" } + ] } + }, + "additionalProperties": false, + "required": [ + "data" + ] } \ No newline at end of file diff --git a/schemas_with_one_of/createRepayment.json b/schemas_with_one_of/createRepayment.json index 55a595f..fc215e6 100644 --- a/schemas_with_one_of/createRepayment.json +++ b/schemas_with_one_of/createRepayment.json @@ -140,7 +140,6 @@ ] } }, - "title": "Create Repayment", "type": "object", "properties": { "data": { diff --git a/schemas_with_one_of/createReward.json b/schemas_with_one_of/createReward.json index 866c49a..68f63be 100644 --- a/schemas_with_one_of/createReward.json +++ b/schemas_with_one_of/createReward.json @@ -42,47 +42,51 @@ "additionalProperties": false } }, - "title": "Reward", "type": "object", "properties": { - "type": { - "type": "string", - "default": "reward" - }, - "attributes": { + "data": { "type": "object", "properties": { - "amount": { - "type": "integer", - "minimum": 1 - }, - "description": { + "type": { "type": "string", - "maxLength": 50 + "default": "reward" }, - "idempotencyKey": { - "type": "string", - "minLength": 1, - "maxLength": 255 + "attributes": { + "type": "object", + "properties": { + "amount": { + "type": "integer", + "minimum": 1 + }, + "description": { + "type": "string", + "maxLength": 50 + }, + "idempotencyKey": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "tags": { + "$ref": "tags.json#/definitions/tags" + } + }, + "required": [ + "amount", + "description" + ], + "additionalProperties": false }, - "tags": { - "$ref": "tags.json#/definitions/tags" + "relationships": { + "$ref": "#/definitions/createRewardRelationships" } }, "required": [ - "amount", - "description" + "type", + "attributes", + "relationships" ], "additionalProperties": false - }, - "relationships": { - "$ref": "#/definitions/createRewardRelationships" } - }, - "required": [ - "type", - "attributes", - "relationships" - ], - "additionalProperties": false + } } \ No newline at end of file diff --git a/schemas_with_one_of/createStopPayment.json b/schemas_with_one_of/createStopPayment.json new file mode 100644 index 0000000..97cd004 --- /dev/null +++ b/schemas_with_one_of/createStopPayment.json @@ -0,0 +1,98 @@ +{ + "definitions": { + "relationships": { + "type": "object", + "properties": { + "account": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "account", + "depositAccount", + "financialBusinessFBOAccount" + ] + }, + "id": { + "$ref": "types.json#/definitions/identifier" + } + }, + "required": [ + "type", + "id" + ], + "additionalProperties": false + } + }, + "required": [ + "data" + ], + "additionalProperties": false + } + }, + "required": [ + "account" + ], + "additionalProperties": false + }, + "stopPayment": { + "title": "Stop Payment", + "type": "object", + "properties": { + "type": { + "type": "string", + "default": "stopPayment" + }, + "attributes": { + "type": "object", + "properties": { + "amount": { + "type": "integer", + "minimum": 1 + }, + "checkNumber": { + "type": "string", + "maxLength": 12 + }, + "tags": { + "$ref": "tags.json#/definitions/tags" + }, + "idempotencyKey": { + "type": "string", + "minLength": 1, + "maxLength": 255 + } + }, + "required": [ + "amount", + "checkNumber" + ], + "additionalProperties": false + }, + "relationships": { + "$ref": "#/definitions/relationships" + } + }, + "required": [ + "type", + "attributes", + "relationships" + ], + "additionalProperties": false + } + }, + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/stopPayment" + } + }, + "additionalProperties": false, + "required": [ + "data" + ] +} \ No newline at end of file diff --git a/schemas_with_one_of/customer.json b/schemas_with_one_of/customer.json index 4e60ef8..7848ca0 100644 --- a/schemas_with_one_of/customer.json +++ b/schemas_with_one_of/customer.json @@ -11,7 +11,7 @@ "$ref": "types.json#/definitions/Relationship" } }, - "additionalProperties": false + "additionalProperties": true }, "IndividualCustomer": { "title": "IndividualCustomer", diff --git a/schemas_with_one_of/customer_paths.json b/schemas_with_one_of/customer_paths.json index a6bf047..81424aa 100644 --- a/schemas_with_one_of/customer_paths.json +++ b/schemas_with_one_of/customer_paths.json @@ -70,12 +70,12 @@ } }, "responses": { - "201": { + "200": { "description": "Successful Response", "content": { "application/vnd.api+json": { "schema": { - "$ref": "customer_paths.json#/UnitCustomerResponse" + "$ref": "#/UnitCustomerResponse" } } } @@ -91,6 +91,55 @@ "operationId": "execute", "summary": "Get Customers List", "description": "Get Customers List from API ", + "parameters":[ + { + "name":"page", + "in":"query", + "schema":{ + "$ref":"types.json#/definitions/listPageParametersObject" + } + }, + { + "name":"filter", + "in":"query", + "style":"deepObject", + "allowReserved":true, + "schema":{ + "type":"object", + "properties":{ + "query":{ + "type":"string" + }, + "status":{ + "type":"array", + "items":{ + "type":"string", + "enum":[ + "Active", + "Archived" + ] + } + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + { + "name":"sort", + "in":"query", + "schema":{ + "type":"string" + } + } + ], "responses": { "200": { "description": "Successful Response", @@ -135,12 +184,13 @@ } ], "requestBody": { - "description": "Update Payment Request", + "description": "Archive Customer Request", "required": true, "content": { "application/vnd.api+json": { "schema": { "type": "object", + "title": "ArchiveCustomerRequest", "properties": { "type": { "type": "string", diff --git a/schemas_with_one_of/customer_token.json b/schemas_with_one_of/customer_token.json index 7f8f23c..81b5676 100644 --- a/schemas_with_one_of/customer_token.json +++ b/schemas_with_one_of/customer_token.json @@ -6,9 +6,6 @@ "type": "string", "default": "customerToken" }, - "id": { - "$ref": "types.json#/definitions/identifier" - }, "attributes": { "type": "object", "properties": { @@ -23,7 +20,6 @@ }, "required": [ "type", - "id", "attributes" ], "additionalProperties": false diff --git a/schemas_with_one_of/customer_token_verification.json b/schemas_with_one_of/customer_token_verification.json index 3306499..ff7bc31 100644 --- a/schemas_with_one_of/customer_token_verification.json +++ b/schemas_with_one_of/customer_token_verification.json @@ -6,9 +6,6 @@ "type": "string", "default": "customerTokenVerification" }, - "id": { - "$ref": "types.json#/definitions/identifier" - }, "attributes": { "type": "object", "properties": { diff --git a/schemas_with_one_of/customers.json b/schemas_with_one_of/customers.json index 6e16670..e95e9f1 100644 --- a/schemas_with_one_of/customers.json +++ b/schemas_with_one_of/customers.json @@ -17,10 +17,7 @@ } }, "meta": { - "type": "object", - "items": { - "$ref": "types.json#/definitions/paginationMeta" - } + "$ref": "types.json#/definitions/paginationMeta" } }, "required": [ diff --git a/schemas_with_one_of/event_paths.json b/schemas_with_one_of/event_paths.json index 67fdb82..f79aa59 100644 --- a/schemas_with_one_of/event_paths.json +++ b/schemas_with_one_of/event_paths.json @@ -16,6 +16,38 @@ "operationId": "execute", "summary": "Get Events List", "description": "Get Events List from API ", + "parameters": [ + { + "name": "page", + "in": "query", + "schema": { + "$ref": "types.json#/definitions/listPageParametersObject" + } + }, + { + "name": "filter", + "in": "query", + "style": "deepObject", + "allowReserved": true, + "schema": { + "type": "object", + "properties": { + "since": { + "type": "string" + }, + "until": { + "type": "string" + }, + "type": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + ], "responses": { "200": { "description": "Successful Response", diff --git a/schemas_with_one_of/fee_paths.json b/schemas_with_one_of/fee_paths.json index f5654f8..f838cfb 100644 --- a/schemas_with_one_of/fee_paths.json +++ b/schemas_with_one_of/fee_paths.json @@ -13,12 +13,7 @@ "content": { "application/vnd.api+json": { "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "createFee.json" - } - } + "$ref": "createFee.json" } } } diff --git a/schemas_with_one_of/org_settings.json b/schemas_with_one_of/org_settings.json index 7e40a48..1ca1dbc 100644 --- a/schemas_with_one_of/org_settings.json +++ b/schemas_with_one_of/org_settings.json @@ -315,10 +315,7 @@ "$ref": "#/definitions/orgSettings" }, "meta": { - "type": "object", - "items": { - "$ref": "types.json#/definitions/paginationMeta" - } + "$ref": "types.json#/definitions/paginationMeta" } }, "additionalProperties": false, diff --git a/schemas_with_one_of/patch_account.json b/schemas_with_one_of/patch_account.json index 4cebf83..965d3c1 100644 --- a/schemas_with_one_of/patch_account.json +++ b/schemas_with_one_of/patch_account.json @@ -9,31 +9,15 @@ "default": "depositAccount" }, "attributes": { - "anyOf": [ - { - "type": "object", - "properties": { - "tags": { - "$ref": "tags.json#/definitions/tagsPatch" - } - } + "type": "object", + "properties": { + "tags": { + "$ref": "tags.json#/definitions/tagsPatch" }, - { - "type": "object", - "properties": { - "depositProduct": { - "type": "string" - }, - "name": { - "type": "string" - }, - "overdraftLimit": { - "type": "integer", - "minimum": 0 - } - } + "depositProduct": { + "type": "string" } - ] + } } }, "additionalProperties": false, @@ -51,24 +35,15 @@ "default": "creditAccount" }, "attributes": { - "anyOf": [ - { - "type": "object", - "properties": { - "tags": { - "$ref": "tags.json#/definitions/tagsPatch" - } - } + "type": "object", + "properties": { + "tags": { + "$ref": "tags.json#/definitions/tagsPatch" }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } + "creditLimit": { + "type": "integer" } - ] + } } }, "additionalProperties": false, @@ -82,7 +57,10 @@ "type": "object", "properties": { "data": { - "oneOf": [{ "$ref": "#/definitions/updateDepositAccount" }, { "$ref": "#/definitions/updateCreditAccount" }] + "oneOf": [ + { "$ref": "#/definitions/updateDepositAccount" }, + { "$ref": "#/definitions/updateCreditAccount" } + ] } }, "additionalProperties": false, diff --git a/schemas_with_one_of/payment.json b/schemas_with_one_of/payment.json index cdc1b84..6ae5cc3 100644 --- a/schemas_with_one_of/payment.json +++ b/schemas_with_one_of/payment.json @@ -6,40 +6,43 @@ "account": { "$ref": "types.json#/definitions/Relationship" }, - "counterparty": { - "$ref": "types.json#/definitions/Relationship" - }, - "counterpartyAccount": { + "customer": { "$ref": "types.json#/definitions/Relationship" }, - "transaction": { + "customers": { "type": "object", - "title": "transactionRelationship", "properties": { "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "default": "transaction" - }, - "id": { - "$ref": "types.json#/definitions/identifier" + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "$ref": "types.json#/definitions/identifier" + }, + "type": { + "type": "string", + "default": "org" + } } - }, - "required": [ - "type", - "id" - ], - "additionalProperties": false + } } - }, - "required": [ - "data" - ], - "additionalProperties": false + } + }, + "counterparty": { + "$ref": "types.json#/definitions/Relationship" + }, + "counterpartyAccount": { + "$ref": "types.json#/definitions/Relationship" + }, + "transaction": { + "$ref": "types.json#/definitions/Relationship" + }, + "recurringPayment": { + "$ref": "types.json#/definitions/Relationship" } - } + }, + "additionalProperties": true }, "AchPayment": { "title": "ACH Payment", diff --git a/schemas_with_one_of/payments_paths.json b/schemas_with_one_of/payments_paths.json index 299fbd7..b13ce8b 100644 --- a/schemas_with_one_of/payments_paths.json +++ b/schemas_with_one_of/payments_paths.json @@ -1,4 +1,31 @@ { + "UnitPaymentResponse": { + "type": "object", + "title": "UnitPaymentResponse", + "properties": { + "data": { + "$ref": "payment.json" + } + } + }, + "UnitReceivedPaymentResponse": { + "type": "object", + "title": "UnitReceivedPaymentResponse", + "properties": { + "data": { + "$ref": "received_payment.json" + } + } + }, + "UnitRecurringPaymentResponse": { + "type": "object", + "title": "UnitRecurringPaymentResponse", + "properties": { + "data": { + "$ref": "recurring_payment.json" + } + } + }, "get_and_create_payments": { "get": { "tags": [ @@ -37,8 +64,13 @@ "items": { "type": "string", "enum": [ + "Rejected", "Pending", - "Approved" + "Canceled", + "Pending Review", + "Clearing", + "Sent", + "Returned" ] } }, @@ -89,7 +121,10 @@ } }, "tags": { - "type": "object" + "type": "object", + "additionalProperties": { + "type": "string" + } } } } @@ -115,7 +150,7 @@ "content": { "application/vnd.api+json; charset=utf-8": { "schema": { - "title": "UnitPaymentListResponse", + "title": "UnitPaymentsListResponse", "type": "object", "properties": { "data": { @@ -125,10 +160,10 @@ } }, "included": { - "type": "array", - "items": { - "$ref": "openapi_types.json#/IncludedResource" - } + "$ref": "openapi_types.json#/IncludedResource" + }, + "meta": { + "$ref":"types.json#/definitions/paginationMeta" } } } @@ -150,12 +185,7 @@ "content": { "application/vnd.api+json": { "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "createPayment.json" - } - } + "$ref": "createPayment.json" } } } @@ -166,13 +196,7 @@ "content": { "application/vnd.api+json; charset=utf-8": { "schema": { - "type": "object", - "title": "UnitPaymentResponse", - "properties": { - "data": { - "$ref": "payment.json" - } - } + "$ref": "#/UnitPaymentResponse" } } } @@ -212,11 +236,14 @@ "content": { "application/vnd.api+json; charset=utf-8": { "schema": { + "title": "UnitPaymentResponseWithIncluded", "type": "object", - "title": "UnitPaymentResponse", "properties": { "data": { "$ref": "payment.json" + }, + "included": { + "$ref": "openapi_types.json#/IncludedResource" } } } @@ -260,13 +287,7 @@ "content": { "application/vnd.api+json": { "schema": { - "type": "object", - "title": "UnitPaymentResponse", - "properties": { - "data": { - "$ref": "payment.json" - } - } + "$ref": "#/UnitPaymentResponse" } } } @@ -299,13 +320,7 @@ "content": { "application/vnd.api+json; charset=utf-8": { "schema": { - "type": "object", - "title": "UnitPaymentResponse", - "properties": { - "data": { - "$ref": "payment.json" - } - } + "$ref": "#/UnitPaymentResponse" } } } @@ -337,11 +352,20 @@ "application/vnd.api+json; charset=utf-8": { "schema": { "type": "object", - "title": "UnitPaymentResponse", + "title": "UnitReceivedPaymentListResponse", "properties": { "data": { - "$ref": "payment.json" - } + "type": "array", + "items": { + "$ref": "received_payment.json" + } + }, + "included": { + "$ref": "openapi_types.json#/IncludedResource" + }, + "meta": { + "$ref":"types.json#/definitions/paginationMeta" + } } } } @@ -383,7 +407,7 @@ "application/vnd.api+json; charset=utf-8": { "schema": { "type": "object", - "title": "UnitPaymentResponse", + "title": "UnitReceivedPaymentResponseWithIncluded", "properties": { "data": { "$ref": "received_payment.json" @@ -433,13 +457,7 @@ "content": { "application/vnd.api+json": { "schema": { - "type": "object", - "title": "UnitPaymentResponse", - "properties": { - "data": { - "$ref": "received_payment.json" - } - } + "$ref": "#/UnitReceivedPaymentResponse" } } } @@ -472,13 +490,7 @@ "content": { "application/vnd.api+json; charset=utf-8": { "schema": { - "type": "object", - "title": "UnitPaymentResponse", - "properties": { - "data": { - "$ref": "received_payment.json" - } - } + "$ref": "#/UnitReceivedPaymentResponse" } } } @@ -494,6 +506,68 @@ "operationId": "execute", "summary": "Get Recurring Payments List", "description": "Get Recurring Payments List from API ", + "parameters": [ + { + "name": "page", + "in": "query", + "schema": { + "$ref": "types.json#/definitions/listPageParametersObject" + } + }, + { + "name": "filter", + "in": "query", + "style": "deepObject", + "allowReserved": true, + "schema": { + "type": "object", + "properties": { + "accountId": { + "type": "string" + }, + "customerId": { + "type": "string" + }, + "status": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "recurringCreditAchPayment", + "recurringDebitAchPayment", + "recurringCreditBookPayment" + ] + } + }, + "fromStartTime": { + "type": "string" + }, + "toStartTime": { + "type": "string" + }, + "fromEndTime": { + "type": "string" + }, + "toEndTime": { + "type": "string" + } + } + } + }, + { + "name": "sort", + "in": "query", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "Successful Response", @@ -501,10 +575,16 @@ "application/vnd.api+json; charset=utf-8": { "schema": { "type": "object", - "title": "UnitPaymentResponse", + "title": "UnitRecurringPaymentListResponse", "properties": { "data": { - "$ref": "recurring_payment.json" + "type": "array", + "items": { + "$ref": "recurring_payment.json" + } + }, + "meta": { + "$ref": "types.json#/definitions/paginationMeta" } } } @@ -526,12 +606,7 @@ "content": { "application/vnd.api+json": { "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "createRecurringPayment.json" - } - } + "$ref": "createRecurringPayment.json" } } } @@ -542,13 +617,7 @@ "content": { "application/vnd.api+json": { "schema": { - "type": "object", - "title": "UnitPaymentResponse", - "properties": { - "data": { - "$ref": "recurring_payment.json" - } - } + "$ref": "#/UnitRecurringPaymentResponse" } } } @@ -581,13 +650,7 @@ "content": { "application/vnd.api+json; charset=utf-8": { "schema": { - "type": "object", - "title": "UnitPaymentResponse", - "properties": { - "data": { - "$ref": "recurring_payment.json" - } - } + "$ref": "#/UnitRecurringPaymentResponse" } } } @@ -620,13 +683,7 @@ "content": { "application/vnd.api+json; charset=utf-8": { "schema": { - "type": "object", - "title": "UnitPaymentResponse", - "properties": { - "data": { - "$ref": "recurring_payment.json" - } - } + "$ref": "#/UnitRecurringPaymentResponse" } } } @@ -659,13 +716,7 @@ "content": { "application/vnd.api+json; charset=utf-8": { "schema": { - "type": "object", - "title": "UnitPaymentResponse", - "properties": { - "data": { - "$ref": "recurring_payment.json" - } - } + "$ref": "#/UnitRecurringPaymentResponse" } } } diff --git a/schemas_with_one_of/received_payment.json b/schemas_with_one_of/received_payment.json index 9b06d5b..a6844d9 100644 --- a/schemas_with_one_of/received_payment.json +++ b/schemas_with_one_of/received_payment.json @@ -138,11 +138,11 @@ "additionalProperties": false } }, + "additionalProperties": true, "required": [ "account", "customer" - ], - "additionalProperties": false + ] } }, "title": "Received Payment Resource", @@ -177,9 +177,19 @@ "completionDate": { "type": "string" }, + "direction": { + "type": "string", + "enum": ["Debit", "Credit"] + }, "wasAdvanced": { "type": "boolean" }, + "isAdvanceable": { + "type": "boolean" + }, + "isAdvaceable": { + "type": "boolean" + }, "companyName": { "type": "string" }, @@ -203,6 +213,9 @@ "returnReason": { "type": "string" }, + "receivingEntityName": { + "type": "string" + }, "tags": { "$ref": "tags.json#/definitions/tags" } @@ -216,9 +229,10 @@ "companyName", "counterpartyRoutingNumber", "traceNumber", + "wasAdvanced", + "direction", "secCode" - ], - "additionalProperties": false + ] }, "relationships": { "$ref": "#/definitions/receivedPaymentRelationships" diff --git a/schemas_with_one_of/repayment_paths.json b/schemas_with_one_of/repayment_paths.json index 7cba5d3..24dac4d 100644 --- a/schemas_with_one_of/repayment_paths.json +++ b/schemas_with_one_of/repayment_paths.json @@ -109,12 +109,7 @@ "content": { "application/vnd.api+json": { "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "createRepayment.json" - } - } + "$ref": "createRepayment.json" } } } diff --git a/schemas_with_one_of/reward_paths.json b/schemas_with_one_of/reward_paths.json index b890126..0361cb1 100644 --- a/schemas_with_one_of/reward_paths.json +++ b/schemas_with_one_of/reward_paths.json @@ -13,12 +13,7 @@ "content": { "application/vnd.api+json": { "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "createReward.json" - } - } + "$ref": "createReward.json" } } } @@ -90,7 +85,10 @@ "type": "string" }, "tags": { - "type": "object" + "type": "object", + "additionalProperties": { + "type": "string" + } } } } diff --git a/schemas_with_one_of/stop_payment.json b/schemas_with_one_of/stop_payment.json new file mode 100644 index 0000000..5d10811 --- /dev/null +++ b/schemas_with_one_of/stop_payment.json @@ -0,0 +1,152 @@ +{ + "title": "Stop Payment", + "type": "object", + "properties": { + "type": { + "type": "string", + "default": "stopPayment" + }, + "id": { + "$ref": "types.json#/definitions/identifier" + }, + "attributes": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "amount": { + "type": "integer", + "minimum": 1 + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Disabled" + ] + }, + "tags": { + "$ref": "tags.json#/definitions/tags" + }, + "checkNumber": { + "type": "string" + } + }, + "required": [ + "createdAt", + "updatedAt", + "amount", + "checkNumber" + ], + "additionalProperties": false + }, + "relationships": { + "type": "object", + "properties": { + "account": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "depositAccount", + "account" + ] + }, + "id": { + "$ref": "types.json#/definitions/identifier" + } + }, + "required": [ + "type", + "id" + ], + "additionalProperties": false + } + }, + "required": [ + "data" + ], + "additionalProperties": false + }, + "customer": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "businessCustomer", + "individualCustomer", + "customer" + ] + }, + "id": { + "$ref": "types.json#/definitions/identifier" + } + }, + "required": [ + "type", + "id" + ], + "additionalProperties": false + } + }, + "required": [ + "data" + ], + "additionalProperties": false + }, + "customers": { + "$ref": "types.json#/definitions/customersRelationship" + }, + "checkPayments": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "$ref": "types.json#/definitions/identifier" + }, + "type": { + "type": "string", + "default": "checkPayment" + } + } + } + } + }, + "required": [ + "data" + ], + "additionalProperties": false + } + }, + "required": [ + "account", + "customer" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "id", + "attributes", + "relationships" + ] + } \ No newline at end of file diff --git a/schemas_with_one_of/stop_payment_paths.json b/schemas_with_one_of/stop_payment_paths.json index f123351..0e258a3 100644 --- a/schemas_with_one_of/stop_payment_paths.json +++ b/schemas_with_one_of/stop_payment_paths.json @@ -1,181 +1,11 @@ { "components": { "schemas": { - "StopPayment": { - "type": "object", - "properties": { - "id": { - "$ref": "types.json#/definitions/identifier" - }, - "type": { - "type": "string", - "enum": [ - "stopPayment" - ] - }, - "attributes": { - "type": "object", - "properties": { - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "amount": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "Active", - "Disabled" - ] - }, - "checkNumber": { - "type": "string" - }, - "tags": { - "$ref": "tags.json#/definitions/tags" - } - }, - "required": [ - "createdAt", - "updatedAt", - "amount", - "checkNumber" - ], - "additionalProperties": false - }, - "relationships": { - "type": "object", - "properties": { - "account": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "depositAccount", - "account" - ] - }, - "id": { - "$ref": "types.json#/definitions/identifier" - } - }, - "required": [ - "type", - "id" - ], - "additionalProperties": false - } - }, - "required": [ - "data" - ], - "additionalProperties": false - }, - "customer": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "businessCustomer", - "individualCustomer", - "customer" - ] - }, - "id": { - "$ref": "types.json#/definitions/identifier" - } - }, - "required": [ - "type", - "id" - ], - "additionalProperties": false - } - }, - "required": [ - "data" - ], - "additionalProperties": false - }, - "customers": { - "$ref": "types.json#/definitions/customersRelationship" - }, - "checkPayments": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "$ref": "types.json#/definitions/identifier" - }, - "type": { - "type": "string", - "default": "checkPayment" - } - } - } - } - }, - "required": [ - "data" - ], - "additionalProperties": false - } - }, - "required": [ - "account", - "customer" - ] - } - }, - "additionalProperties": false, - "required": [ - "type", - "id", - "attributes", - "relationships" - ] - }, - "StopPaymentRequest": { - "type": "object", - "properties": { - "account_id": { - "type": "string" - }, - "amount": { - "type": "number" - }, - "description": { - "type": "string" - } - }, - "required": [ - "account_id", - "amount" - ] - }, "StopPaymentResponse": { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/StopPayment" + "$ref": "stop_payment.json" } } }, @@ -185,33 +15,23 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/StopPayment" + "$ref": "stop_payment.json" } } } - }, - "DisableStopPaymentRequest": { - "type": "object", - "properties": { - "stop_payment_id": { - "type": "string" - } - }, - "required": [ - "stop_payment_id" - ] } } }, "stop_payments": { "post": { - "summary": "Create a new stop payment", + "summary": "Create Stop Payment", + "operationId":"execute", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StopPaymentRequest" + "$ref": "createStopPayment.json" } } } @@ -231,20 +51,64 @@ }, "get": { "summary": "Get a list of stop payments", + "operationId":"execute", "parameters": [ { - "name": "account_id", + "name": "page", "in": "query", - "description": "ID of the account", - "required": true, "schema": { - "type": "string" + "$ref": "types.json#/definitions/listPageParametersObject" } }, { - "name": "status", + "name": "filter", + "in": "query", + "schema": { + "type": "object", + "properties": { + "accountId": { + "type": "string" + }, + "customerId": { + "type": "string" + }, + "status": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Active", + "Disabled" + ] + } + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "since": { + "type": "string" + }, + "until": { + "type": "string" + }, + "fromAmount": { + "type": "integer" + }, + "toAmount": { + "type": "integer" + }, + "checkNumber": { + "type": "string" + } + } + } + }, + { + "name": "sort", "in": "query", - "description": "Status of the stop payments", "schema": { "type": "string" } @@ -267,6 +131,7 @@ "stop_payment": { "get": { "summary": "Get details of a specific stop payment", + "operationId":"execute", "parameters": [ { "name": "stop_payment_id", @@ -296,6 +161,7 @@ }, "delete": { "summary": "Cancel a stop payment", + "operationId":"execute", "parameters": [ { "name": "stop_payment_id", @@ -320,16 +186,18 @@ "disable_stop_payment": { "post": { "summary": "Disable a stop payment", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DisableStopPaymentRequest" - } + "operationId":"execute", + "parameters": [ + { + "name": "stop_payment_id", + "in": "path", + "description": "ID of the stop payment", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "OK", diff --git a/schemas_with_one_of/token_paths.json b/schemas_with_one_of/token_paths.json index b708a38..c1de934 100644 --- a/schemas_with_one_of/token_paths.json +++ b/schemas_with_one_of/token_paths.json @@ -1,77 +1,46 @@ { - "list_tokens": { + "api_tokens": { "get": { "tags": [ "Get List Org API Tokens" ], "operationId": "execute", "summary": "Get List Org API Tokens", - "description": "Get List Org API Tokens from API ", "parameters": [ { - "name": "page", - "in": "query", - "schema": { - "$ref": "types.json#/definitions/listPageParametersObject" - } - }, - { - "name": "filter", - "in": "query", - "style": "deepObject", - "allowReserved": true, - "schema": { - "type": "object", - "properties": { - "query": { - "type": "string" - }, - "status": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "Pending", - "Approved" - ] - } - }, - "email": { - "type": "string" - }, - "tags": { - "type": "object" - } - } - } - }, - { - "name": "sort", - "in": "query", "schema": { "type": "string" - } + }, + "name": "userId", + "in": "path", + "required": true, + "description": "ID of the user to revoke token" } ], + "description": "Get List Org API Tokens from API ", "responses": { "200": { "description": "Successful Response", "content": { "application/vnd.api+json; charset=utf-8": { "schema": { - "type": "array", - "items": { - "$ref": "api_token.json" + "title": "UnitOrgApiTokensListResponse", + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "api_token.json" + } + } } } } } } } - } - }, - "create_token": { - "post": { + }, + "post": { "tags": [ "Create Org Api Token" ], @@ -95,12 +64,7 @@ "content": { "application/vnd.api+json": { "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "createApiToken.json" - } - } + "$ref": "createApiToken.json" } } } @@ -198,12 +162,7 @@ "content": { "application/vnd.api+json": { "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "createCustomerToken.json" - } - } + "$ref": "createCustomerToken.json" } } } @@ -215,10 +174,10 @@ "application/vnd.api+json; charset=utf-8": { "schema": { "type": "object", - "title": "UnitCustomerTokenVerificationResponse", + "title": "UnitCustomerTokenResponse", "properties": { "data": { - "$ref": "customer_token_verification.json" + "$ref": "customer_token.json" } } } @@ -253,12 +212,7 @@ "content": { "application/vnd.api+json": { "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "createCustomerTokenVerification.json" - } - } + "$ref": "createCustomerTokenVerification.json" } } } diff --git a/schemas_with_one_of/transaction_paths.json b/schemas_with_one_of/transaction_paths.json index eb06bd0..380e085 100644 --- a/schemas_with_one_of/transaction_paths.json +++ b/schemas_with_one_of/transaction_paths.json @@ -33,7 +33,10 @@ "type": "string" }, "tags": { - "type": "object" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "since": { "type": "string" @@ -47,12 +50,6 @@ "excludeFees": { "type": "boolean" }, - "status": { - "type": "string", - "enum": [ - "Authorized", "Completed", "Canceled", "Declined" - ] - }, "type": { "type": "array", "items": { @@ -71,6 +68,9 @@ }, "toAmount": { "type": "integer" + }, + "accountType": { + "type": "string" } } } @@ -107,6 +107,9 @@ }, "included": { "$ref": "openapi_types.json#/IncludedResource" + }, + "meta": { + "$ref": "types.json#/definitions/paginationMeta" } } } diff --git a/schemas_with_one_of/types.json b/schemas_with_one_of/types.json index 4fcc7f1..808a304 100644 --- a/schemas_with_one_of/types.json +++ b/schemas_with_one_of/types.json @@ -141,43 +141,6 @@ "format":"date" } }, - "oneOf":[ - { - "properties":{ - "ssn":{ - "type":"string", - "pattern":"^\\d{9}$" - } - }, - "required":[ - "ssn" - ] - }, - { - "properties":{ - "passport":{ - "type":"string" - }, - "nationality":{ - "$ref":"types.json#/definitions/country" - } - }, - "required":[ - "passport", - "nationality" - ] - }, - { - "properties":{ - "matriculaConsular":{ - "type":"string" - } - }, - "required":[ - "matriculaConsular" - ] - } - ], "additionalProperties":false, "required":[ "fullName", @@ -237,43 +200,6 @@ "pattern":"^\\*{5}\\d{4}$" } }, - "oneOf":[ - { - "properties":{ - "ssn":{ - "type":"string", - "pattern":"^\\d{9}$" - } - }, - "required":[ - "ssn" - ] - }, - { - "properties":{ - "passport":{ - "type":"string" - }, - "nationality":{ - "$ref":"types.json#/definitions/country" - } - }, - "required":[ - "passport", - "nationality" - ] - }, - { - "properties":{ - "matriculaConsular":{ - "type":"string" - } - }, - "required":[ - "matriculaConsular" - ] - } - ], "additionalProperties":false, "required":[ "fullName", @@ -583,13 +509,13 @@ "type":"object", "properties":{ "limit":{ - "type":"string" + "type":"integer" }, "offset":{ - "type":"string" + "type":"integer" }, "total":{ - "type":"string" + "type":"integer" } } } @@ -722,43 +648,6 @@ "maximum":100 } }, - "oneOf":[ - { - "properties":{ - "ssn":{ - "type":"string", - "pattern":"^\\d{9}$" - } - }, - "required":[ - "ssn" - ] - }, - { - "properties":{ - "passport":{ - "type":"string" - }, - "nationality":{ - "$ref":"types.json#/definitions/country" - } - }, - "required":[ - "passport", - "nationality" - ] - }, - { - "properties":{ - "matriculaConsular":{ - "type":"string" - } - }, - "required":[ - "matriculaConsular" - ] - } - ], "additionalProperties":false, "required":[ "fullName", @@ -916,6 +805,7 @@ }, "closeAccountRequest":{ "type":"object", + "title": "CloseAccountRequest", "properties":{ "type":{ "type":"string", @@ -1063,6 +953,10 @@ "soleProprietorshipNumberOfEmployees": { "type": "string", "enum": ["One", "Between2And5", "Between5And10", "Over10"] }, "businessNumberOfEmployees": { "type": "string", "enum": ["UpTo10", "Between10And50", "Between50And100", "Between100And500", "Over500"] }, "entityType": { "type": "string", "enum": [ "Corporation", "LLC", "Partnership", "PubliclyTradedCorporation", "PrivatelyHeldCorporation", "NotForProfitOrganization" ]}, - "disputeType": {"type": "string", "enum": [ "Issuer", "Fraud", "NonFraud" ]} + "disputeType": {"type": "string", "enum": [ "Issuer", "Fraud", "NonFraud" ]}, + "responseContact": { + "allOf": [{ "$ref": "#/definitions/contact" }], + "required": [ "fullName" ] + } } } \ No newline at end of file diff --git a/schemas_with_one_of/update_application.json b/schemas_with_one_of/update_application.json index 7676733..e10d981 100644 --- a/schemas_with_one_of/update_application.json +++ b/schemas_with_one_of/update_application.json @@ -49,15 +49,34 @@ "title": "Beneficial Owner", "type": "object", "properties": { - "ssn": { "$ref": "types.json#/definitions/ssn" }, - "passport": { "type": "string" }, - "nationality": { "$ref": "types.json#/definitions/country" }, - "matriculaConsular" : {"type": "string"}, - "address": { "$ref": "types.json#/definitions/address" }, - "dateOfBirth": { "type": "string", "format": "date" }, - "occupation": { "$ref": "types.json#/definitions/occupation" }, - "annualIncome": { "$ref": "types.json#/definitions/annualIncome" }, - "sourceOfIncome": { "$ref": "types.json#/definitions/sourceOfIncome" } + "ssn": { + "$ref": "types.json#/definitions/ssn" + }, + "passport": { + "type": "string" + }, + "nationality": { + "$ref": "types.json#/definitions/country" + }, + "matriculaConsular": { + "type": "string" + }, + "address": { + "$ref": "types.json#/definitions/address" + }, + "dateOfBirth": { + "type": "string", + "format": "date" + }, + "occupation": { + "$ref": "types.json#/definitions/occupation" + }, + "annualIncome": { + "$ref": "types.json#/definitions/annualIncome" + }, + "sourceOfIncome": { + "$ref": "types.json#/definitions/sourceOfIncome" + } }, "additionalProperties": false }, @@ -72,11 +91,7 @@ "tags": { "$ref": "tags.json#/definitions/tagsPatch" }, "occupation": { "$ref": "types.json#/definitions/occupation" }, "annualIncome": { "$ref": "types.json#/definitions/annualIncome" }, - "sourceOfIncome": { "$ref": "types.json#/definitions/sourceOfIncome" }, - "annualRevenue": { "$ref": "types.json#/definitions/soleProprietorshipAnnualRevenue" }, - "numberOfEmployees": { "$ref": "types.json#/definitions/soleProprietorshipNumberOfEmployees" }, - "businessVertical": { "$ref": "types.json#/definitions/businessVertical"}, - "website": { "type": "string" } + "sourceOfIncome": { "$ref": "types.json#/definitions/sourceOfIncome" } }, "additionalProperties": false } @@ -95,8 +110,6 @@ "attributes": { "type": "object", "properties": { - "officer": { "$ref": "#/definitions/officer" }, - "beneficialOwners": { "type": "array", "items": { "$ref": "#/definitions/beneficialOwner" } }, "tags": { "$ref": "tags.json#/definitions/tagsPatch" }, "annualRevenue": { "$ref": "types.json#/definitions/businessAnnualRevenue" }, "numberOfEmployees": { "$ref": "types.json#/definitions/businessNumberOfEmployees" }, @@ -104,6 +117,7 @@ "yearOfIncorporation": { "$ref": "types.json#/definitions/year" }, "countriesOfOperation": {"type": "array", "items": {"$ref": "types.json#/definitions/country"}, "minItems": 1}, "stockSymbol": {"type": "string"}, + "website": {"type": "string"}, "businessVertical": { "$ref": "types.json#/definitions/businessVertical"} }, "additionalProperties": false @@ -115,6 +129,67 @@ "attributes" ] }, + "patchBusinessApplicationOfficer": { + "title": "Patch Business Application", + "type": "object", + "properties": { + "type": { "type": "string", "default": "businessApplication" }, + "attributes": { + "type": "object", + "properties": { + "officer": { + "type": "object", + "properties": { + "occupation": { "$ref": "types.json#/definitions/occupation" }, + "annualIncome": { "$ref": "types.json#/definitions/annualIncome" }, + "sourceOfIncome": { "$ref": "types.json#/definitions/sourceOfIncome" } + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "type", + "attributes" + ] + }, + "patchBusinessApplicationBeneficialOwner": { + "title": "Patch Business Application", + "type": "object", + "properties": { + "type": { "type": "string", "default": "beneficialOwner" }, + "attributes": { + "type": "object", + "properties": { + "occupation": { + "$ref": "types.json#/definitions/occupation" + }, + "annualIncome": { + "$ref": "types.json#/definitions/annualIncome" + }, + "sourceOfIncome": { + "$ref": "types.json#/definitions/sourceOfIncome" + } + }, + "relationships": { + "type": "object", + "properties": { + "application": { + "$ref": "types.json#/definitions/Relationship" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "type", + "attributes" + ] + }, "patchTrustApplication": { "title": "Patch Trust Application", "type": "object", @@ -133,6 +208,39 @@ "type", "attributes" ] + }, + "patchSoleProprietorApplication": { + "title": "Patch Individual Application", + "type": "object", + "properties": { + "type": { "type": "string", "default": "individualApplication" }, + "attributes": { + "type": "object", + "properties": { + "tags": { + "$ref": "tags.json#/definitions/tagsPatch" + }, + "annualRevenue": { + "$ref": "types.json#/definitions/soleProprietorshipAnnualRevenue" + }, + "numberOfEmployees": { + "$ref": "types.json#/definitions/soleProprietorshipNumberOfEmployees" + }, + "businessVertical": { + "$ref": "types.json#/definitions/businessVertical" + }, + "website": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "type", + "attributes" + ] } }, "title": "Patch Application", @@ -141,6 +249,9 @@ "data": { "oneOf": [ { "$ref": "#/definitions/patchBusinessApplication" }, + { "$ref": "#/definitions/patchBusinessApplicationOfficer" }, + { "$ref": "#/definitions/patchBusinessApplicationBeneficialOwner" }, + { "$ref": "#/definitions/patchSoleProprietorApplication" }, { "$ref": "#/definitions/patchIndividualApplication" }, { "$ref": "#/definitions/patchTrustApplication" } ] diff --git a/schemas_with_one_of/update_customer.json b/schemas_with_one_of/update_customer.json index a45a408..131eeed 100644 --- a/schemas_with_one_of/update_customer.json +++ b/schemas_with_one_of/update_customer.json @@ -27,148 +27,143 @@ "updateIndividualCustomer": { "title": "UpdateIndividualCustomer", "type": "object", - "allOf": [ - { - "$ref": "updateCustomer.json" + "properties": { + "type": { + "type": "string" }, - { + "attributes": { "type": "object", "properties": { - "attributes": { - "type": "object", - "properties": { - "email": { - "$ref": "types.json#/definitions/email", - "nullable": true - }, - "phone": { - "$ref": "types.json#/definitions/phone", - "nullable": true - }, - "address": { - "$ref": "types.json#/definitions/address", - "nullable": true - }, - "dba": { - "type": "string", - "nullable": true - }, - "tags": { - "$ref": "tags.json#/definitions/tags" - }, - "authorizedUsers": { - "type": "array", - "items": { - "$ref": "types.json#/definitions/authorizedUser" - }, - "nullable": true - }, - "jwtSubject": { - "$ref": "types.json#/definitions/jwtSubject", - "nullable": true - } + "email": { + "$ref": "types.json#/definitions/email", + "nullable": true + }, + "phone": { + "$ref": "types.json#/definitions/phone", + "nullable": true + }, + "address": { + "$ref": "types.json#/definitions/address", + "nullable": true + }, + "dba": { + "type": "string", + "nullable": true + }, + "tags": { + "$ref": "tags.json#/definitions/tags" + }, + "authorizedUsers": { + "type": "array", + "items": { + "$ref": "types.json#/definitions/authorizedUser" }, - "additionalProperties": false + "nullable": true + }, + "jwtSubject": { + "$ref": "types.json#/definitions/jwtSubject", + "nullable": true } }, "additionalProperties": false } - ] + }, + "additionalProperties": false }, "updateBusinessCustomer": { "title": "UpdateBusinessCustomer", "type": "object", - "allOf": [ - { - "$ref": "updateCustomer.json" + "properties": { + "type": { + "type": "string" }, - { + "attributes": { "type": "object", "properties": { - "attributes": { - "type": "object", - "properties": { - "dba": { - "type": "string", - "nullable": true - }, - "ein": { - "type": "string", - "pattern": "^\\d{9}$" - }, - "phone": { - "$ref": "types.json#/definitions/phone", - "nullable": true - }, - "address": { - "$ref": "types.json#/definitions/address", - "nullable": true - }, - "contact": { - "$ref": "types.json#/definitions/responseContact", - "nullable": true - }, - "tags": { - "$ref": "tags.json#/definitions/tags", - "nullable": true - }, - "authorizedUsers": { - "type": "array", - "items": { - "$ref": "types.json#/definitions/authorizedUser" - }, - "nullable": true - } + "dba": { + "type": "string", + "nullable": true + }, + "ein": { + "type": "string", + "pattern": "^\\d{9}$" + }, + "phone": { + "$ref": "types.json#/definitions/phone", + "nullable": true + }, + "address": { + "$ref": "types.json#/definitions/address", + "nullable": true + }, + "contact": { + "$ref": "types.json#/definitions/responseContact", + "nullable": true + }, + "tags": { + "$ref": "tags.json#/definitions/tags", + "nullable": true + }, + "authorizedUsers": { + "type": "array", + "items": { + "$ref": "types.json#/definitions/authorizedUser" }, - "additionalProperties": false + "nullable": true } - } + }, + "additionalProperties": false } - ], + }, "additionalProperties": false }, "updateTrustCustomer": { "title": "UpdateTrustCustomer", "type": "object", - "allOf": [ - { - "$ref": "updateCustomer.json" + "properties": { + "type": { + "type": "string" }, - { + "attributes": { "type": "object", "properties": { - "attributes": { - "type": "object", - "properties": { - "contact": { - "$ref": "types.json#/definitions/trustContact", - "nullable": true - }, - "tags": { - "$ref": "tags.json#/definitions/tags", - "nullable": true - }, - "authorizedUsers": { - "type": "array", - "items": { - "$ref": "types.json#/definitions/authorizedUser" - }, - "nullable": true - } + "contact": { + "$ref": "types.json#/definitions/trustContact", + "nullable": true + }, + "tags": { + "$ref": "tags.json#/definitions/tags", + "nullable": true + }, + "authorizedUsers": { + "type": "array", + "items": { + "$ref": "types.json#/definitions/authorizedUser" }, - "additionalProperties": false + "nullable": true } }, "additionalProperties": false } - ] + }, + "additionalProperties": false } }, - "title": "Update Customer Document", + "title": "Patch Customer", "type": "object", "properties": { - "type": { - "type": "string" + "data": { + "oneOf": [ + { + "$ref": "#/definitions/updateIndividualCustomer" + }, + { + "$ref": "#/definitions/updateBusinessCustomer" + }, + { + "$ref": "#/definitions/updateTrustCustomer" + } + ] } } } \ No newline at end of file diff --git a/schemas_with_one_of/webhook.json b/schemas_with_one_of/webhook.json index bd0de64..38ba290 100644 --- a/schemas_with_one_of/webhook.json +++ b/schemas_with_one_of/webhook.json @@ -16,7 +16,7 @@ "type": "string", "format": "date-time" }, - "lebel": { + "label": { "type": "string" }, "url": { @@ -41,6 +41,9 @@ }, "token": { "type": "string" + }, + "subscriptionType": { + "type": "string" } } } diff --git a/schemas_with_one_of/webhook_paths.json b/schemas_with_one_of/webhook_paths.json index c65a05b..3cfef8d 100644 --- a/schemas_with_one_of/webhook_paths.json +++ b/schemas_with_one_of/webhook_paths.json @@ -23,24 +23,17 @@ "schema": { "type": "object", "properties": { - "query": { + "since": { "type": "string" }, - "status": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "Pending", - "Approved" - ] - } - }, - "email": { + "until": { "type": "string" }, - "tags": { - "type": "object" + "fromId": { + "type": "integer" + }, + "toId": { + "type": "integer" } } }