diff --git a/generate.rb b/generate.rb index b04a2f4..2a155a7 100644 --- a/generate.rb +++ b/generate.rb @@ -14,7 +14,7 @@ def replace_paths_with_one_of(openapi_file, new_paths) file.write(JSON.pretty_generate(openapi_data)) end - puts "OpenAPI file updated successfully." + puts 'OpenAPI file updated successfully.' rescue => e puts "An error occurred: #{e.message}" end @@ -23,306 +23,324 @@ def replace_paths_with_one_of(openapi_file, new_paths) # New paths referencing 'schemas_with_one_of' new_paths = { "/applications/{applicationId}": { - "$ref": "./schemas_with_one_of/application_paths.json#/application" + "$ref": './schemas_with_one_of/application_paths.json#/application' }, "/applications/{applicationId}/cancel": { - "$ref": "./schemas_with_one_of/application_paths.json#/cancel_application" + "$ref": './schemas_with_one_of/application_paths.json#/cancel_application' }, "/applications": { - "$ref": "./schemas_with_one_of/application_paths.json#/applications" + "$ref": './schemas_with_one_of/application_paths.json#/applications' }, "/application-forms": { - "$ref": "./schemas_with_one_of/application_paths.json#/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" + "$ref": './schemas_with_one_of/application_paths.json#/upload_pdf_file' }, "/applications/{applicationId}/documents/{documentId}/": { - "$ref": "./schemas_with_one_of/application_paths.json#/upload_png_file" + "$ref": './schemas_with_one_of/application_paths.json#/upload_png_file' }, "/applications/{applicationId}/documents/{documentId}/?": { - "$ref": "./schemas_with_one_of/application_paths.json#/upload_jpg_file" + "$ref": './schemas_with_one_of/application_paths.json#/upload_jpg_file' }, "/applications/{applicationId}/documents/{documentId}/back": { - "$ref": "./schemas_with_one_of/application_paths.json#/upload_pdf_file_back" + "$ref": './schemas_with_one_of/application_paths.json#/upload_pdf_file_back' }, "/applications/{applicationId}/documents/{documentId}/back/": { - "$ref": "./schemas_with_one_of/application_paths.json#/upload_png_file_back" + "$ref": './schemas_with_one_of/application_paths.json#/upload_png_file_back' }, "/applications/{applicationId}/documents/{documentId}/back/?": { - "$ref": "./schemas_with_one_of/application_paths.json#/upload_jpg_file_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" + "$ref": './schemas_with_one_of/application_paths.json#/documents' }, "/applications/{applicationId}/documents/{documentId}/verify": { - "$ref": "./schemas_with_one_of/application_paths.json#/verify_document" + "$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" + "$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" + "$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" + "$ref": './schemas_with_one_of/application_paths.json#/application_form' }, "/accounts": { - "$ref": "./schemas_with_one_of/account_paths.json#/accounts" + "$ref": './schemas_with_one_of/account_paths.json#/accounts' }, "/accounts/{accountId}": { - "$ref": "./schemas_with_one_of/account_paths.json#/account" + "$ref": './schemas_with_one_of/account_paths.json#/account' }, "/accounts/{accountId}/limits": { - "$ref": "./schemas_with_one_of/account_paths.json#/get_account_limits" + "$ref": './schemas_with_one_of/account_paths.json#/get_account_limits' }, "/accounts/{accountId}/unfreeze": { - "$ref": "./schemas_with_one_of/account_paths.json#/unfreeze_account" + "$ref": './schemas_with_one_of/account_paths.json#/unfreeze_account' }, "/accounts/{accountId}/freeze": { - "$ref": "./schemas_with_one_of/account_paths.json#/freeze_account" + "$ref": './schemas_with_one_of/account_paths.json#/freeze_account' }, "/accounts/{accountId}/close": { - "$ref": "./schemas_with_one_of/account_paths.json#/close_account" + "$ref": './schemas_with_one_of/account_paths.json#/close_account' }, "/accounts/{accountId}/reopen": { - "$ref": "./schemas_with_one_of/account_paths.json#/reopen_account" + "$ref": './schemas_with_one_of/account_paths.json#/reopen_account' }, "/accounts/{accountId}/enter-daca": { - "$ref": "./schemas_with_one_of/account_paths.json#/enter_daca" + "$ref": './schemas_with_one_of/account_paths.json#/enter_daca' }, "/accounts/{accountId}/activate-daca": { - "$ref": "./schemas_with_one_of/account_paths.json#/activate_daca" + "$ref": './schemas_with_one_of/account_paths.json#/activate_daca' }, "/accounts/{accountId}/deactivate-daca": { - "$ref": "./schemas_with_one_of/account_paths.json#/deactivate_daca" + "$ref": './schemas_with_one_of/account_paths.json#/deactivate_daca' }, "/account-end-of-day": { - "$ref": "./schemas_with_one_of/account_paths.json#/get_account_end_of_day" + "$ref": './schemas_with_one_of/account_paths.json#/get_account_end_of_day' }, "/customers/{customerId}": { - "$ref": "./schemas_with_one_of/customer_paths.json#/customer" + "$ref": './schemas_with_one_of/customer_paths.json#/customer' }, "/customers": { - "$ref": "./schemas_with_one_of/customer_paths.json#/list_customers" + "$ref": './schemas_with_one_of/customer_paths.json#/list_customers' }, "/customers/{customerId}/archive": { - "$ref": "./schemas_with_one_of/customer_paths.json#/archive_customer" + "$ref": './schemas_with_one_of/customer_paths.json#/archive_customer' }, "/payments": { - "$ref": "./schemas_with_one_of/payments_paths.json#/get_and_create_payments" + "$ref": './schemas_with_one_of/payments_paths.json#/get_and_create_payments' }, "/payments/{paymentId}": { - "$ref": "./schemas_with_one_of/payments_paths.json#/get_and_patch_payment" + "$ref": './schemas_with_one_of/payments_paths.json#/get_and_patch_payment' }, "/payments/{paymentId}/cancel": { - "$ref": "./schemas_with_one_of/payments_paths.json#/cancel_payment" + "$ref": './schemas_with_one_of/payments_paths.json#/cancel_payment' }, "/received-payments": { - "$ref": "./schemas_with_one_of/payments_paths.json#/list_received_payments" + "$ref": './schemas_with_one_of/payments_paths.json#/list_received_payments' }, "/received-payments/{paymentId}": { - "$ref": "./schemas_with_one_of/payments_paths.json#/received_payments" + "$ref": './schemas_with_one_of/payments_paths.json#/received_payments' }, "/received-payments/{paymentId}/advance": { - "$ref": "./schemas_with_one_of/payments_paths.json#/advance_received_payment" + "$ref": './schemas_with_one_of/payments_paths.json#/advance_received_payment' }, "/counterparties": { - "$ref": "./schemas_with_one_of/counterparty_paths.json#/counterparties" + "$ref": './schemas_with_one_of/counterparty_paths.json#/counterparties' }, "/counterparties/{counterpartyId}": { - "$ref": "./schemas_with_one_of/counterparty_paths.json#/counterparty" + "$ref": './schemas_with_one_of/counterparty_paths.json#/counterparty' }, "/counterparties/{counterpartyId}/balance": { - "$ref": "./schemas_with_one_of/counterparty_paths.json#/counterparty_balance" + "$ref": './schemas_with_one_of/counterparty_paths.json#/counterparty_balance' }, "/recurring-payments": { - "$ref": "./schemas_with_one_of/payments_paths.json#/recurring_payments" + "$ref": './schemas_with_one_of/payments_paths.json#/recurring_payments' }, "/recurring-payments/{paymentId}": { - "$ref": "./schemas_with_one_of/payments_paths.json#/get_recurring_payment" + "$ref": './schemas_with_one_of/payments_paths.json#/get_recurring_payment' }, "/recurring-payments/{paymentId}/disable": { - "$ref": "./schemas_with_one_of/payments_paths.json#/disable_recurring_payment" + "$ref": './schemas_with_one_of/payments_paths.json#/disable_recurring_payment' }, "/recurring-payments/{paymentId}/enable": { - "$ref": "./schemas_with_one_of/payments_paths.json#/enable_recurring_payment" + "$ref": './schemas_with_one_of/payments_paths.json#/enable_recurring_payment' }, "/cards": { - "$ref": "./schemas_with_one_of/card_paths.json#/cards" + "$ref": './schemas_with_one_of/card_paths.json#/cards' }, "/cards/{cardId}": { - "$ref": "./schemas_with_one_of/card_paths.json#/card" + "$ref": './schemas_with_one_of/card_paths.json#/card' }, "/cards/{cardId}/secure-data/pin/status": { - "$ref": "./schemas_with_one_of/card_paths.json#/card_pin_status" + "$ref": './schemas_with_one_of/card_paths.json#/card_pin_status' }, "/cards/{cardId}/report-stolen": { - "$ref": "./schemas_with_one_of/card_paths.json#/report_stolen_card" + "$ref": './schemas_with_one_of/card_paths.json#/report_stolen_card' }, "/cards/{cardId}/report-lost": { - "$ref": "./schemas_with_one_of/card_paths.json#/report_lost_card" + "$ref": './schemas_with_one_of/card_paths.json#/report_lost_card' }, "/cards/{cardId}/close": { - "$ref": "./schemas_with_one_of/card_paths.json#/close_card" + "$ref": './schemas_with_one_of/card_paths.json#/close_card' }, "/cards/{cardId}/freeze": { - "$ref": "./schemas_with_one_of/card_paths.json#/freeze_card" + "$ref": './schemas_with_one_of/card_paths.json#/freeze_card' }, "/cards/{cardId}/unfreeze": { - "$ref": "./schemas_with_one_of/card_paths.json#/unfreeze_card" + "$ref": './schemas_with_one_of/card_paths.json#/unfreeze_card' }, "/cards/{cardId}/limits": { - "$ref": "./schemas_with_one_of/card_paths.json#/card_limits" + "$ref": './schemas_with_one_of/card_paths.json#/card_limits' }, "/authorizations": { - "$ref": "./schemas_with_one_of/authorization_paths.json#/authorizations" + "$ref": './schemas_with_one_of/authorization_paths.json#/authorizations' }, "/authorizations/{authorizationId}": { - "$ref": "./schemas_with_one_of/authorization_paths.json#/get_authorization" + "$ref": './schemas_with_one_of/authorization_paths.json#/get_authorization' }, "/authorization-requests": { - "$ref": "./schemas_with_one_of/authorization_paths.json#/get_authorizations_requests" + "$ref": './schemas_with_one_of/authorization_paths.json#/get_authorizations_requests' }, "/authorization-requests/{authorizationId}": { - "$ref": "./schemas_with_one_of/authorization_paths.json#/get_authorization_requests" + "$ref": './schemas_with_one_of/authorization_paths.json#/get_authorization_requests' }, "/authorization-requests/{authorizationId}/approve": { - "$ref": "./schemas_with_one_of/authorization_paths.json#/approve_authorization_requests" + "$ref": './schemas_with_one_of/authorization_paths.json#/approve_authorization_requests' }, "/authorization-requests/{authorizationId}/decline": { - "$ref": "./schemas_with_one_of/authorization_paths.json#/decline_authorization_requests" + "$ref": './schemas_with_one_of/authorization_paths.json#/decline_authorization_requests' }, "/statements": { - "$ref": "./schemas_with_one_of/statement_paths.json#/get_statements" + "$ref": './schemas_with_one_of/statement_paths.json#/get_statements' }, "/statements/{statementId}/html": { - "$ref": "./schemas_with_one_of/statement_paths.json#/get_statement_html" + "$ref": './schemas_with_one_of/statement_paths.json#/get_statement_html' }, "/statements/{statementId}/pdf": { - "$ref": "./schemas_with_one_of/statement_paths.json#/get_statement_pdf" + "$ref": './schemas_with_one_of/statement_paths.json#/get_statement_pdf' }, "/statements/{accountId}/bank/pdf": { - "$ref": "./schemas_with_one_of/statement_paths.json#/get_statement_bank_pdf" + "$ref": './schemas_with_one_of/statement_paths.json#/get_statement_bank_pdf' }, "/rewards": { - "$ref": "./schemas_with_one_of/reward_paths.json#/rewards" + "$ref": './schemas_with_one_of/reward_paths.json#/rewards' }, "/rewards/{rewardId}": { - "$ref": "./schemas_with_one_of/reward_paths.json#/get_reward" + "$ref": './schemas_with_one_of/reward_paths.json#/get_reward' }, "/events": { - "$ref": "./schemas_with_one_of/event_paths.json#/list_events" + "$ref": './schemas_with_one_of/event_paths.json#/list_events' }, "/events/{eventId}": { - "$ref": "./schemas_with_one_of/event_paths.json#/event" + "$ref": './schemas_with_one_of/event_paths.json#/event' }, "/institutions/{routingNumber}": { - "$ref": "./schemas_with_one_of/institution_paths.json#/get_institution" + "$ref": './schemas_with_one_of/institution_paths.json#/get_institution' }, "/fees": { - "$ref": "./schemas_with_one_of/fee_paths.json#/create_fee" + "$ref": './schemas_with_one_of/fee_paths.json#/create_fee' }, "/check-deposits": { - "$ref": "./schemas_with_one_of/check_deposit_paths.json#/check_deposits" + "$ref": './schemas_with_one_of/check_deposit_paths.json#/check_deposits' }, "/check-deposits/{checkDepositId}": { - "$ref": "./schemas_with_one_of/check_deposit_paths.json#/check_deposit" + "$ref": './schemas_with_one_of/check_deposit_paths.json#/check_deposit' }, "/check-deposits/{checkDepositId}/confirm": { - "$ref": "./schemas_with_one_of/check_deposit_paths.json#/confirm_check_deposit" + "$ref": './schemas_with_one_of/check_deposit_paths.json#/confirm_check_deposit' }, "/check-deposits/{checkDepositId}/front": { - "$ref": "./schemas_with_one_of/check_deposit_paths.json#/get_front_check_deposit" + "$ref": './schemas_with_one_of/check_deposit_paths.json#/get_front_check_deposit' }, "/check-deposits/{checkDepositId}/back": { - "$ref": "./schemas_with_one_of/check_deposit_paths.json#/get_back_check_deposit" + "$ref": './schemas_with_one_of/check_deposit_paths.json#/get_back_check_deposit' + }, + "/store-locations": { + "$ref": './schemas/cash_deposit_paths.json#/cash_deposits' + }, + "/cash-deposits/barcodes": { + "$ref": './schemas/cash_deposit_paths.json#/generate_cash_deposit_barcode' + }, + "/cash-deposits/barcodes/{barcodeNumber}/image": { + "$ref": './schemas/cash_deposit_paths.json#/cash_deposit_barcode' + }, + "/tax-forms/{taxFormId}": { + "$ref": './schemas/tax_form_paths.json#/tax_form' + }, + "/tax-forms": { + "$ref": './schemas/tax_form_paths.json#/tax_forms' + }, + "/tax-forms/{taxFormId}/pdf": { + "$ref": './schemas/tax_form_paths.json#/get_tax_form_pdf' }, "/users/{userId}/api-tokens": { - "$ref": "./schemas_with_one_of/token_paths.json#/api_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" + "$ref": './schemas_with_one_of/token_paths.json#/delete_token' }, "/customers/{customerId}/token": { - "$ref": "./schemas_with_one_of/token_paths.json#/create_customer_token" + "$ref": './schemas_with_one_of/token_paths.json#/create_customer_token' }, "/customers/{customerId}/token/verification": { - "$ref": "./schemas_with_one_of/token_paths.json#/create_customer_token_verification" + "$ref": './schemas_with_one_of/token_paths.json#/create_customer_token_verification' }, "/webhooks": { - "$ref": "./schemas_with_one_of/webhook_paths.json#/webhooks" + "$ref": './schemas_with_one_of/webhook_paths.json#/webhooks' }, "/webhooks/{webhookId}": { - "$ref": "./schemas_with_one_of/webhook_paths.json#/webhook" + "$ref": './schemas_with_one_of/webhook_paths.json#/webhook' }, "/webhooks/{webhookId}/enable": { - "$ref": "./schemas_with_one_of/webhook_paths.json#/enable_webhook" + "$ref": './schemas_with_one_of/webhook_paths.json#/enable_webhook' }, "/webhooks/{webhookId}/disable": { - "$ref": "./schemas_with_one_of/webhook_paths.json#/disable_webhook" + "$ref": './schemas_with_one_of/webhook_paths.json#/disable_webhook' }, "/atm-locations": { - "$ref": "./schemas_with_one_of/atm_location_paths.json#/list_atm_locations" + "$ref": './schemas_with_one_of/atm_location_paths.json#/list_atm_locations' }, "/accounts/{accountId}/transactions/{transactionId}": { - "$ref": "./schemas_with_one_of/transaction_paths.json#/transaction" + "$ref": './schemas_with_one_of/transaction_paths.json#/transaction' }, "/transactions": { - "$ref": "./schemas_with_one_of/transaction_paths.json#/list_transactions" + "$ref": './schemas_with_one_of/transaction_paths.json#/list_transactions' }, "/disputes": { - "$ref": "./schemas_with_one_of/dispute_paths.json#/list_disputes" + "$ref": './schemas_with_one_of/dispute_paths.json#/list_disputes' }, "/disputes/{disputeId}": { - "$ref": "./schemas_with_one_of/dispute_paths.json#/get_dispute" + "$ref": './schemas_with_one_of/dispute_paths.json#/get_dispute' }, "/repayments": { - "$ref": "./schemas_with_one_of/repayment_paths.json#/repayments" + "$ref": './schemas_with_one_of/repayment_paths.json#/repayments' }, "/repayments/{repaymentId}": { - "$ref": "./schemas_with_one_of/repayment_paths.json#/repayment" + "$ref": './schemas_with_one_of/repayment_paths.json#/repayment' }, "/check-payments": { - "$ref": "./schemas_with_one_of/check_payment_paths.json#/check_payments" + "$ref": './schemas_with_one_of/check_payment_paths.json#/check_payments' }, "/check-payments/{checkPaymentId}": { - "$ref": "./schemas_with_one_of/check_payment_paths.json#/check_payment" + "$ref": './schemas_with_one_of/check_payment_paths.json#/check_payment' }, "/check-payments/{checkPaymentId}/approve": { - "$ref": "./schemas_with_one_of/check_payment_paths.json#/check_payment_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" + "$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" + "$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" + "$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" + "$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" + "$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" + "$ref": './schemas_with_one_of/stop_payment_paths.json#/stop_payment' }, "/stop-payments/{stop_payment_id}/disable": { - "$ref": "./schemas_with_one_of/stop_payment_paths.json#/disable_stop_payment" + "$ref": './schemas_with_one_of/stop_payment_paths.json#/disable_stop_payment' } } -replace_paths_with_one_of("openapi.json", new_paths) +replace_paths_with_one_of('openapi.json', new_paths) # Generate the Ruby SDK using openapi-generator-cli -command = "openapi-generator-cli generate -g ruby -i openapi.json -o unit/e2e_tests/ruby" +command = 'openapi-generator-cli generate -g ruby -i openapi.json -o unit/e2e_tests/ruby' stdout, stderr, status = Open3.capture3(command) if status.success? - puts "SDK generated successfully." + puts 'SDK generated successfully.' else puts "Error generating SDK: #{stderr}" -end +end \ No newline at end of file diff --git a/openapi.json b/openapi.json index ca8a023..59a86a7 100644 --- a/openapi.json +++ b/openapi.json @@ -1,320 +1,338 @@ -{ - "openapi": "3.0.2", - "info": { - "title": "Unit OpenAPI specifications", - "description": "An OpenAPI specifications for unit-sdk clients", - "version": "0.0.2" - }, - "servers": [ - { - "url": "https://api.s.unit.sh" - } - ], - "paths": { - "/applications/{applicationId}": { - "$ref": "./schemas/application_paths.json#/application" - }, - "/applications/{applicationId}/cancel": { - "$ref": "./schemas/application_paths.json#/cancel_application" - }, - "/applications": { - "$ref": "./schemas/application_paths.json#/applications" - }, - "/application-forms": { - "$ref": "./schemas/application_paths.json#/application_forms" - }, - "/applications/{applicationId}/documents/{documentId}": { - "$ref": "./schemas/application_paths.json#/upload_pdf_file" - }, - "/applications/{applicationId}/documents/{documentId}/": { - "$ref": "./schemas/application_paths.json#/upload_png_file" - }, - "/applications/{applicationId}/documents/{documentId}/?": { - "$ref": "./schemas/application_paths.json#/upload_jpg_file" - }, - "/applications/{applicationId}/documents/{documentId}/back": { - "$ref": "./schemas/application_paths.json#/upload_pdf_file_back" - }, - "/applications/{applicationId}/documents/{documentId}/back/": { - "$ref": "./schemas/application_paths.json#/upload_png_file_back" - }, - "/applications/{applicationId}/documents/{documentId}/back/?": { - "$ref": "./schemas/application_paths.json#/upload_jpg_file_back" - }, - "/applications/{applicationId}/documents": { - "$ref": "./schemas/application_paths.json#/documents" - }, - "/applications/{applicationId}/documents/{documentId}/verify": { - "$ref": "./schemas/application_paths.json#/verify_document" - }, - "/applications/{applicationId}/documents/{documentId}/download": { - "$ref": "./schemas/application_paths.json#/download_document" - }, - "/applications/{applicationId}/documents/{documentId}/download/back": { - "$ref": "./schemas/application_paths.json#/download_back_side_document" - }, - "/application-forms/{applicationFormId}": { - "$ref": "./schemas/application_paths.json#/application_form" - }, - "/accounts": { - "$ref": "./schemas/account_paths.json#/accounts" - }, - "/accounts/{accountId}": { - "$ref": "./schemas/account_paths.json#/account" - }, - "/accounts/{accountId}/limits": { - "$ref": "./schemas/account_paths.json#/get_account_limits" - }, - "/accounts/{accountId}/unfreeze": { - "$ref": "./schemas/account_paths.json#/unfreeze_account" - }, - "/accounts/{accountId}/freeze": { - "$ref": "./schemas/account_paths.json#/freeze_account" - }, - "/accounts/{accountId}/close": { - "$ref": "./schemas/account_paths.json#/close_account" - }, - "/accounts/{accountId}/reopen": { - "$ref": "./schemas/account_paths.json#/reopen_account" - }, - "/accounts/{accountId}/enter-daca": { - "$ref": "./schemas/account_paths.json#/enter_daca" - }, - "/accounts/{accountId}/activate-daca": { - "$ref": "./schemas/account_paths.json#/activate_daca" - }, - "/accounts/{accountId}/deactivate-daca": { - "$ref": "./schemas/account_paths.json#/deactivate_daca" - }, - "/account-end-of-day": { - "$ref": "./schemas/account_paths.json#/get_account_end_of_day" - }, - "/customers/{customerId}": { - "$ref": "./schemas/customer_paths.json#/customer" - }, - "/customers": { - "$ref": "./schemas/customer_paths.json#/list_customers" - }, - "/customers/{customerId}/archive": { - "$ref": "./schemas/customer_paths.json#/archive_customer" - }, - "/payments": { - "$ref": "./schemas/payments_paths.json#/get_and_create_payments" - }, - "/payments/{paymentId}": { - "$ref": "./schemas/payments_paths.json#/get_and_patch_payment" - }, - "/payments/{paymentId}/cancel": { - "$ref": "./schemas/payments_paths.json#/cancel_payment" - }, - "/received-payments": { - "$ref": "./schemas/payments_paths.json#/list_received_payments" - }, - "/received-payments/{paymentId}": { - "$ref": "./schemas/payments_paths.json#/received_payments" - }, - "/received-payments/{paymentId}/advance": { - "$ref": "./schemas/payments_paths.json#/advance_received_payment" - }, - "/counterparties": { - "$ref": "./schemas/counterparty_paths.json#/counterparties" - }, - "/counterparties/{counterpartyId}": { - "$ref": "./schemas/counterparty_paths.json#/counterparty" - }, - "/counterparties/{counterpartyId}/balance": { - "$ref": "./schemas/counterparty_paths.json#/counterparty_balance" - }, - "/recurring-payments": { - "$ref": "./schemas/payments_paths.json#/recurring_payments" - }, - "/recurring-payments/{paymentId}": { - "$ref": "./schemas/payments_paths.json#/get_recurring_payment" - }, - "/recurring-payments/{paymentId}/disable": { - "$ref": "./schemas/payments_paths.json#/disable_recurring_payment" - }, - "/recurring-payments/{paymentId}/enable": { - "$ref": "./schemas/payments_paths.json#/enable_recurring_payment" - }, - "/cards": { - "$ref": "./schemas/card_paths.json#/cards" - }, - "/cards/{cardId}": { - "$ref": "./schemas/card_paths.json#/card" - }, - "/cards/{cardId}/secure-data/pin/status": { - "$ref": "./schemas/card_paths.json#/card_pin_status" - }, - "/cards/{cardId}/report-stolen": { - "$ref": "./schemas/card_paths.json#/report_stolen_card" - }, - "/cards/{cardId}/report-lost": { - "$ref": "./schemas/card_paths.json#/report_lost_card" - }, - "/cards/{cardId}/close": { - "$ref": "./schemas/card_paths.json#/close_card" - }, - "/cards/{cardId}/freeze": { - "$ref": "./schemas/card_paths.json#/freeze_card" - }, - "/cards/{cardId}/unfreeze": { - "$ref": "./schemas/card_paths.json#/unfreeze_card" - }, - "/cards/{cardId}/limits": { - "$ref": "./schemas/card_paths.json#/card_limits" - }, - "/authorizations": { - "$ref": "./schemas/authorization_paths.json#/authorizations" - }, - "/authorizations/{authorizationId}": { - "$ref": "./schemas/authorization_paths.json#/get_authorization" - }, - "/authorization-requests": { - "$ref": "./schemas/authorization_paths.json#/get_authorizations_requests" - }, - "/authorization-requests/{authorizationId}": { - "$ref": "./schemas/authorization_paths.json#/get_authorization_requests" - }, - "/authorization-requests/{authorizationId}/approve": { - "$ref": "./schemas/authorization_paths.json#/approve_authorization_requests" - }, - "/authorization-requests/{authorizationId}/decline": { - "$ref": "./schemas/authorization_paths.json#/decline_authorization_requests" - }, - "/statements": { - "$ref": "./schemas/statement_paths.json#/get_statements" - }, - "/statements/{statementId}/html": { - "$ref": "./schemas/statement_paths.json#/get_statement_html" - }, - "/statements/{statementId}/pdf": { - "$ref": "./schemas/statement_paths.json#/get_statement_pdf" - }, - "/statements/{accountId}/bank/pdf": { - "$ref": "./schemas/statement_paths.json#/get_statement_bank_pdf" - }, - "/rewards": { - "$ref": "./schemas/reward_paths.json#/rewards" - }, - "/rewards/{rewardId}": { - "$ref": "./schemas/reward_paths.json#/get_reward" - }, - "/events": { - "$ref": "./schemas/event_paths.json#/list_events" - }, - "/events/{eventId}": { - "$ref": "./schemas/event_paths.json#/event" - }, - "/institutions/{routingNumber}": { - "$ref": "./schemas/institution_paths.json#/get_institution" - }, - "/fees": { - "$ref": "./schemas/fee_paths.json#/create_fee" - }, - "/check-deposits": { - "$ref": "./schemas/check_deposit_paths.json#/check_deposits" - }, - "/check-deposits/{checkDepositId}": { - "$ref": "./schemas/check_deposit_paths.json#/check_deposit" - }, - "/check-deposits/{checkDepositId}/confirm": { - "$ref": "./schemas/check_deposit_paths.json#/confirm_check_deposit" - }, - "/check-deposits/{checkDepositId}/front": { - "$ref": "./schemas/check_deposit_paths.json#/get_front_check_deposit" - }, - "/check-deposits/{checkDepositId}/back": { - "$ref": "./schemas/check_deposit_paths.json#/get_back_check_deposit" - }, - "/users/{userId}/api-tokens": { - "$ref": "./schemas/token_paths.json#/api_tokens" - }, - "/users/{userId}/api-tokens/{tokenId}": { - "$ref": "./schemas/token_paths.json#/delete_token" - }, - "/customers/{customerId}/token": { - "$ref": "./schemas/token_paths.json#/create_customer_token" - }, - "/customers/{customerId}/token/verification": { - "$ref": "./schemas/token_paths.json#/create_customer_token_verification" - }, - "/webhooks": { - "$ref": "./schemas/webhook_paths.json#/webhooks" - }, - "/webhooks/{webhookId}": { - "$ref": "./schemas/webhook_paths.json#/webhook" - }, - "/webhooks/{webhookId}/enable": { - "$ref": "./schemas/webhook_paths.json#/enable_webhook" - }, - "/webhooks/{webhookId}/disable": { - "$ref": "./schemas/webhook_paths.json#/disable_webhook" - }, - "/atm-locations": { - "$ref": "./schemas/atm_location_paths.json#/list_atm_locations" - }, - "/accounts/{accountId}/transactions/{transactionId}": { - "$ref": "./schemas/transaction_paths.json#/transaction" - }, - "/transactions": { - "$ref": "./schemas/transaction_paths.json#/list_transactions" - }, - "/disputes": { - "$ref": "./schemas/dispute_paths.json#/list_disputes" - }, - "/disputes/{disputeId}": { - "$ref": "./schemas/dispute_paths.json#/get_dispute" - }, - "/repayments": { - "$ref": "./schemas/repayment_paths.json#/repayments" - }, - "/repayments/{repaymentId}": { - "$ref": "./schemas/repayment_paths.json#/repayment" - }, - "/check-payments": { - "$ref": "./schemas/check_payment_paths.json#/check_payments" - }, - "/check-payments/{checkPaymentId}": { - "$ref": "./schemas/check_payment_paths.json#/check_payment" - }, - "/check-payments/{checkPaymentId}/approve": { - "$ref": "./schemas/check_payment_paths.json#/check_payment_approve" - }, - "/check-payments/{checkPaymentId}/cancel": { - "$ref": "./schemas/check_payment_paths.json#/check_payment_cancel" - }, - "/check-payments/{checkPaymentId}/return": { - "$ref": "./schemas/check_payment_paths.json#/check_payment_return" - }, - "/check-payments/{checkPaymentId}/front": { - "$ref": "./schemas/check_payment_paths.json#/get_check_payment_front" - }, - "/check-payments/{checkPaymentId}/back": { - "$ref": "./schemas/check_payment_paths.json#/get_check_payment_back" - }, - "/stop-payments": { - "$ref": "./schemas/stop_payment_paths.json#/stop_payments" - }, - "/stop-payments/{stop_payment_id}": { - "$ref": "./schemas/stop_payment_paths.json#/stop_payment" - }, - "/stop-payments/{stop_payment_id}/disable": { - "$ref": "./schemas/stop_payment_paths.json#/disable_stop_payment" - } - }, - "components": { - "securitySchemes": { - "bearerAuth": { - "type": "http", - "scheme": "bearer", - "bearerFormat": "JWT" - } - } - }, - "security": [ - { - "bearerAuth": [] - } - ] +{ + "openapi": "3.0.2", + "info": { + "title": "Unit OpenAPI specifications", + "description": "An OpenAPI specifications for unit-sdk clients", + "version": "0.0.2" + }, + "servers": [ + { + "url": "https://api.s.unit.sh" + } + ], + "paths": { + "/applications/{applicationId}": { + "$ref": "./schemas/application_paths.json#/application" + }, + "/applications/{applicationId}/cancel": { + "$ref": "./schemas/application_paths.json#/cancel_application" + }, + "/applications": { + "$ref": "./schemas/application_paths.json#/applications" + }, + "/application-forms": { + "$ref": "./schemas/application_paths.json#/application_forms" + }, + "/applications/{applicationId}/documents/{documentId}": { + "$ref": "./schemas/application_paths.json#/upload_pdf_file" + }, + "/applications/{applicationId}/documents/{documentId}/": { + "$ref": "./schemas/application_paths.json#/upload_png_file" + }, + "/applications/{applicationId}/documents/{documentId}/?": { + "$ref": "./schemas/application_paths.json#/upload_jpg_file" + }, + "/applications/{applicationId}/documents/{documentId}/back": { + "$ref": "./schemas/application_paths.json#/upload_pdf_file_back" + }, + "/applications/{applicationId}/documents/{documentId}/back/": { + "$ref": "./schemas/application_paths.json#/upload_png_file_back" + }, + "/applications/{applicationId}/documents/{documentId}/back/?": { + "$ref": "./schemas/application_paths.json#/upload_jpg_file_back" + }, + "/applications/{applicationId}/documents": { + "$ref": "./schemas/application_paths.json#/documents" + }, + "/applications/{applicationId}/documents/{documentId}/verify": { + "$ref": "./schemas/application_paths.json#/verify_document" + }, + "/applications/{applicationId}/documents/{documentId}/download": { + "$ref": "./schemas/application_paths.json#/download_document" + }, + "/applications/{applicationId}/documents/{documentId}/download/back": { + "$ref": "./schemas/application_paths.json#/download_back_side_document" + }, + "/application-forms/{applicationFormId}": { + "$ref": "./schemas/application_paths.json#/application_form" + }, + "/accounts": { + "$ref": "./schemas/account_paths.json#/accounts" + }, + "/accounts/{accountId}": { + "$ref": "./schemas/account_paths.json#/account" + }, + "/accounts/{accountId}/limits": { + "$ref": "./schemas/account_paths.json#/get_account_limits" + }, + "/accounts/{accountId}/unfreeze": { + "$ref": "./schemas/account_paths.json#/unfreeze_account" + }, + "/accounts/{accountId}/freeze": { + "$ref": "./schemas/account_paths.json#/freeze_account" + }, + "/accounts/{accountId}/close": { + "$ref": "./schemas/account_paths.json#/close_account" + }, + "/accounts/{accountId}/reopen": { + "$ref": "./schemas/account_paths.json#/reopen_account" + }, + "/accounts/{accountId}/enter-daca": { + "$ref": "./schemas/account_paths.json#/enter_daca" + }, + "/accounts/{accountId}/activate-daca": { + "$ref": "./schemas/account_paths.json#/activate_daca" + }, + "/accounts/{accountId}/deactivate-daca": { + "$ref": "./schemas/account_paths.json#/deactivate_daca" + }, + "/account-end-of-day": { + "$ref": "./schemas/account_paths.json#/get_account_end_of_day" + }, + "/customers/{customerId}": { + "$ref": "./schemas/customer_paths.json#/customer" + }, + "/customers": { + "$ref": "./schemas/customer_paths.json#/list_customers" + }, + "/customers/{customerId}/archive": { + "$ref": "./schemas/customer_paths.json#/archive_customer" + }, + "/payments": { + "$ref": "./schemas/payments_paths.json#/get_and_create_payments" + }, + "/payments/{paymentId}": { + "$ref": "./schemas/payments_paths.json#/get_and_patch_payment" + }, + "/payments/{paymentId}/cancel": { + "$ref": "./schemas/payments_paths.json#/cancel_payment" + }, + "/received-payments": { + "$ref": "./schemas/payments_paths.json#/list_received_payments" + }, + "/received-payments/{paymentId}": { + "$ref": "./schemas/payments_paths.json#/received_payments" + }, + "/received-payments/{paymentId}/advance": { + "$ref": "./schemas/payments_paths.json#/advance_received_payment" + }, + "/counterparties": { + "$ref": "./schemas/counterparty_paths.json#/counterparties" + }, + "/counterparties/{counterpartyId}": { + "$ref": "./schemas/counterparty_paths.json#/counterparty" + }, + "/counterparties/{counterpartyId}/balance": { + "$ref": "./schemas/counterparty_paths.json#/counterparty_balance" + }, + "/recurring-payments": { + "$ref": "./schemas/payments_paths.json#/recurring_payments" + }, + "/recurring-payments/{paymentId}": { + "$ref": "./schemas/payments_paths.json#/get_recurring_payment" + }, + "/recurring-payments/{paymentId}/disable": { + "$ref": "./schemas/payments_paths.json#/disable_recurring_payment" + }, + "/recurring-payments/{paymentId}/enable": { + "$ref": "./schemas/payments_paths.json#/enable_recurring_payment" + }, + "/cards": { + "$ref": "./schemas/card_paths.json#/cards" + }, + "/cards/{cardId}": { + "$ref": "./schemas/card_paths.json#/card" + }, + "/cards/{cardId}/secure-data/pin/status": { + "$ref": "./schemas/card_paths.json#/card_pin_status" + }, + "/cards/{cardId}/report-stolen": { + "$ref": "./schemas/card_paths.json#/report_stolen_card" + }, + "/cards/{cardId}/report-lost": { + "$ref": "./schemas/card_paths.json#/report_lost_card" + }, + "/cards/{cardId}/close": { + "$ref": "./schemas/card_paths.json#/close_card" + }, + "/cards/{cardId}/freeze": { + "$ref": "./schemas/card_paths.json#/freeze_card" + }, + "/cards/{cardId}/unfreeze": { + "$ref": "./schemas/card_paths.json#/unfreeze_card" + }, + "/cards/{cardId}/limits": { + "$ref": "./schemas/card_paths.json#/card_limits" + }, + "/authorizations": { + "$ref": "./schemas/authorization_paths.json#/authorizations" + }, + "/authorizations/{authorizationId}": { + "$ref": "./schemas/authorization_paths.json#/get_authorization" + }, + "/authorization-requests": { + "$ref": "./schemas/authorization_paths.json#/get_authorizations_requests" + }, + "/authorization-requests/{authorizationId}": { + "$ref": "./schemas/authorization_paths.json#/get_authorization_requests" + }, + "/authorization-requests/{authorizationId}/approve": { + "$ref": "./schemas/authorization_paths.json#/approve_authorization_requests" + }, + "/authorization-requests/{authorizationId}/decline": { + "$ref": "./schemas/authorization_paths.json#/decline_authorization_requests" + }, + "/statements": { + "$ref": "./schemas/statement_paths.json#/get_statements" + }, + "/statements/{statementId}/html": { + "$ref": "./schemas/statement_paths.json#/get_statement_html" + }, + "/statements/{statementId}/pdf": { + "$ref": "./schemas/statement_paths.json#/get_statement_pdf" + }, + "/statements/{accountId}/bank/pdf": { + "$ref": "./schemas/statement_paths.json#/get_statement_bank_pdf" + }, + "/rewards": { + "$ref": "./schemas/reward_paths.json#/rewards" + }, + "/rewards/{rewardId}": { + "$ref": "./schemas/reward_paths.json#/get_reward" + }, + "/events": { + "$ref": "./schemas/event_paths.json#/list_events" + }, + "/events/{eventId}": { + "$ref": "./schemas/event_paths.json#/event" + }, + "/institutions/{routingNumber}": { + "$ref": "./schemas/institution_paths.json#/get_institution" + }, + "/fees": { + "$ref": "./schemas/fee_paths.json#/create_fee" + }, + "/check-deposits": { + "$ref": "./schemas/check_deposit_paths.json#/check_deposits" + }, + "/check-deposits/{checkDepositId}": { + "$ref": "./schemas/check_deposit_paths.json#/check_deposit" + }, + "/check-deposits/{checkDepositId}/confirm": { + "$ref": "./schemas/check_deposit_paths.json#/confirm_check_deposit" + }, + "/check-deposits/{checkDepositId}/front": { + "$ref": "./schemas/check_deposit_paths.json#/get_front_check_deposit" + }, + "/check-deposits/{checkDepositId}/back": { + "$ref": "./schemas/check_deposit_paths.json#/get_back_check_deposit" + }, + "/store-locations": { + "$ref": "./schemas/cash_deposit_paths.json#/cash_deposits" + }, + "/cash-deposits/barcodes": { + "$ref": "./schemas/cash_deposit_paths.json#/generate_cash_deposit_barcode" + }, + "/cash-deposits/barcodes/{barcodeNumber}/image": { + "$ref": "./schemas/cash_deposit_paths.json#/cash_deposit_barcode" + }, + "/tax-forms/{taxFormId}": { + "$ref": "./schemas/tax_form_paths.json#/tax_form" + }, + "/tax-forms": { + "$ref": "./schemas/tax_form_paths.json#/tax_forms" + }, + "/tax-forms/{taxFormId}/pdf": { + "$ref": "./schemas/tax_form_paths.json#/get_tax_form_pdf" + }, + "/users/{userId}/api-tokens": { + "$ref": "./schemas/token_paths.json#/api_tokens" + }, + "/users/{userId}/api-tokens/{tokenId}": { + "$ref": "./schemas/token_paths.json#/delete_token" + }, + "/customers/{customerId}/token": { + "$ref": "./schemas/token_paths.json#/create_customer_token" + }, + "/customers/{customerId}/token/verification": { + "$ref": "./schemas/token_paths.json#/create_customer_token_verification" + }, + "/webhooks": { + "$ref": "./schemas/webhook_paths.json#/webhooks" + }, + "/webhooks/{webhookId}": { + "$ref": "./schemas/webhook_paths.json#/webhook" + }, + "/webhooks/{webhookId}/enable": { + "$ref": "./schemas/webhook_paths.json#/enable_webhook" + }, + "/webhooks/{webhookId}/disable": { + "$ref": "./schemas/webhook_paths.json#/disable_webhook" + }, + "/atm-locations": { + "$ref": "./schemas/atm_location_paths.json#/list_atm_locations" + }, + "/accounts/{accountId}/transactions/{transactionId}": { + "$ref": "./schemas/transaction_paths.json#/transaction" + }, + "/transactions": { + "$ref": "./schemas/transaction_paths.json#/list_transactions" + }, + "/disputes": { + "$ref": "./schemas/dispute_paths.json#/list_disputes" + }, + "/disputes/{disputeId}": { + "$ref": "./schemas/dispute_paths.json#/get_dispute" + }, + "/repayments": { + "$ref": "./schemas/repayment_paths.json#/repayments" + }, + "/repayments/{repaymentId}": { + "$ref": "./schemas/repayment_paths.json#/repayment" + }, + "/check-payments": { + "$ref": "./schemas/check_payment_paths.json#/check_payments" + }, + "/check-payments/{checkPaymentId}": { + "$ref": "./schemas/check_payment_paths.json#/check_payment" + }, + "/check-payments/{checkPaymentId}/approve": { + "$ref": "./schemas/check_payment_paths.json#/check_payment_approve" + }, + "/check-payments/{checkPaymentId}/cancel": { + "$ref": "./schemas/check_payment_paths.json#/check_payment_cancel" + }, + "/check-payments/{checkPaymentId}/return": { + "$ref": "./schemas/check_payment_paths.json#/check_payment_return" + }, + "/check-payments/{checkPaymentId}/front": { + "$ref": "./schemas/check_payment_paths.json#/get_check_payment_front" + }, + "/check-payments/{checkPaymentId}/back": { + "$ref": "./schemas/check_payment_paths.json#/get_check_payment_back" + }, + "/stop-payments": { + "$ref": "./schemas/stop_payment_paths.json#/stop_payments" + }, + "/stop-payments/{stop_payment_id}": { + "$ref": "./schemas/stop_payment_paths.json#/stop_payment" + }, + "/stop-payments/{stop_payment_id}/disable": { + "$ref": "./schemas/stop_payment_paths.json#/disable_stop_payment" + } + }, + "components": { + "securitySchemes": { + "bearerAuth": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT" + } + } + }, + "security": [ + { + "bearerAuth": [] + } + ] } \ No newline at end of file diff --git a/schemas/cash_deposit_barcode.json b/schemas/cash_deposit_barcode.json new file mode 100644 index 0000000..a6d4a51 --- /dev/null +++ b/schemas/cash_deposit_barcode.json @@ -0,0 +1,108 @@ +{ + "definitions": { + "cashDepositRelationships": { + "type": "object", + "title": "cashDepositRelationships", + "properties": { + "account": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "account", + "depositAccount", + "batchAccount" + ] + }, + "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 + } + }, + "required": [ + "account", + "customer" + ], + "additionalProperties": false + } + }, + "title": "CashDepositBarcodeResource", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["cashDepositBarcode"] + }, + "id": { + "$ref": "types.json#/definitions/identifier" + }, + "attributes": { + "type": "object", + "properties": { + "barcodeNumber": { + "type": "string" + }, + "expiration": { + "type": "string", + "format": "date-time"}, + "storeId": { + "type": "string" + }, + "retailerName": { + "type": "string"} + }, + "required": ["barcodeNumber", "expiration", "storeId", "retailerName"] + }, + "relationships": { + "$ref": "#/definitions/cashDepositRelationships" + } + }, + "additionalProperties": false, + "required": ["type", "attributes", "relationships"] +} diff --git a/schemas/cash_deposit_paths.json b/schemas/cash_deposit_paths.json new file mode 100644 index 0000000..a37e2c7 --- /dev/null +++ b/schemas/cash_deposit_paths.json @@ -0,0 +1,139 @@ +{ + "cash_deposits": { + "get": { + "tags": [ + "Get List Store Locations" + ], + "operationId": "execute", + "summary": "Get List Cash Deposits", + "description": "Get List Cash Deposits from API ", + "parameters": [ + { + "name": "page", + "in": "query", + "style": "deepObject", + "allowReserved": true, + "schema": { + "$ref": "types.json#/definitions/listPageParametersObject" + } + }, + { + "name": "filter", + "in": "query", + "style": "deepObject", + "allowReserved": true, + "schema": { + "type": "object", + "properties": { + "coordinates": { + "$ref": "types.json#/definitions/coordinates" + }, + "postalCode": { + "type": "string" + }, + "serviceType": { + "type": "string" + } + } + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/vnd.api+json; charset=utf-8": { + "schema": { + "type": "array", + "title": "UnitCashDepositsListResponse", + "items": { + "$ref": "store_location.json" + } + } + } + } + } + } + } + }, + "cash_deposit_barcode": { + "get": { + "tags": [ + "Retrieve Barcode Image" + ], + "operationId": "execute", + "description": "Retrieves a cash deposit barcode image using the unique barcode number provided by the Generate Barcode endpoint.", + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "barcodeNumber", + "in": "path", + "description": "The unique identifier of a barcode, obtained from Generate Barcode endpoint.", + "required": true + } + ], + "summary": "Get Barcode Image", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/pdf": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "generate_cash_deposit_barcode": { + "post": { + "tags": [ + "Generate Barcode" + ], + "operationId": "execute", + "summary": "Create Check Deposit", + "description": "Create a Check Deposit via API ", + "requestBody": { + "description": "Create Check Deposit Request", + "required": true, + "content": { + "application/vnd.api+json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "generateBarcode.json" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/vnd.api+json; charset=utf-8": { + "schema": { + "type": "object", + "title": "UnitCashDepositResponse", + "properties": { + "data": { + "$ref": "cash_deposit_barcode.json" + } + } + } + } + } + } + } + } + } +} + + diff --git a/schemas/generateBarcode.json b/schemas/generateBarcode.json new file mode 100644 index 0000000..0c001df --- /dev/null +++ b/schemas/generateBarcode.json @@ -0,0 +1,52 @@ +{ + "definitions": { + "createCashDepositRelationships": { + "type": "object", + "properties": { + "account": { + "$ref": "types.json#/definitions/Relationship" + }, + "customer": { + "$ref": "types.json#/definitions/customersRelationship" + } + }, + "required": [ + "account", + "customer" + ], + "additionalProperties": false + } + }, + "title": "Cash Deposit Barcode", + "type": "object", + "properties": { + "type": { + "type": "string", + "default": "cashDepositBarcode", + "enum": [ + "cashDepositBarcode" + ] + }, + "attributes": { + "type": "object", + "properties": { + "storeId": { + "type": "string" + } + }, + "required": [ + "storeId" + ], + "additionalProperties": false + }, + "relationships": { + "$ref": "#/definitions/createCashDepositRelationships" + } + }, + "required": [ + "type", + "attributes", + "relationships" + ], + "additionalProperties": false + } diff --git a/schemas/store_location.json b/schemas/store_location.json new file mode 100644 index 0000000..6eeb414 --- /dev/null +++ b/schemas/store_location.json @@ -0,0 +1,52 @@ +{ + "title": "Store Location", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "storeLocation" + ] + }, + "id": { + "$ref": "types.json#/definitions/identifier" + }, + "attributes": { + "type": "object", + "properties": { + "storeId": { + "type": "string" + }, + "retailerName": { + "type": "string" + }, + "phone": { + "$ref": "types.json#/definitions/phone" + }, + "address":{ + "$ref":"types.json#/definitions/address" + }, + "coordinates": { + "$ref": "types.json#/definitions/coordinates" + }, + "distance": { + "type": "number" + } + }, + "required": [ + "storeId", + "retailerName", + "phone", + "address", + "coordinates" + ], + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "type", + "id", + "attributes" + ] +} diff --git a/schemas/tax_form.json b/schemas/tax_form.json new file mode 100644 index 0000000..070b1b3 --- /dev/null +++ b/schemas/tax_form.json @@ -0,0 +1,56 @@ +{ + "definitions": { + "taxFormRelationships": { + "type": "object", + "properties": { + "account": { + "$ref": "types.json#/definitions/Relationship" + }, + "customer": { + "$ref": "types.json#/definitions/customersRelationship" + } + }, + "required": [ + "account", + "customer" + ], + "additionalProperties": false + } + }, + "title": "TaxFormResource", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["taxForm"] + }, + "id": { + "$ref": "types.json#/definitions/identifier" + }, + "attributes": { + "type": "object", + "properties": { + "formType": { + "type": "string" + }, + "taxYear": { + "type": "string", + "description": "The tax year for the form" + } + }, + "required": [ + "taxYear" + ] + }, + "relationships": { + "$ref": "#/definitions/taxFormRelationships" + } + }, + "additionalProperties": false, + "required": [ + "type", + "id", + "attributes", + "relationships" + ] + } \ No newline at end of file diff --git a/schemas/tax_form_paths.json b/schemas/tax_form_paths.json new file mode 100644 index 0000000..b16d9ac --- /dev/null +++ b/schemas/tax_form_paths.json @@ -0,0 +1,137 @@ +{ + "tax_forms": { + "get": { + "tags": [ + "Get List Tax Form" + ], + "operationId": "execute", + "summary": "Get List Tax Forms", + "description": "Get List Tax Forms", + "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" + }, + "accountId": { + "type": "string" + }, + "taxYears": { + "type": "string" + }, + "taxFormTypes": { + "type": "string" + } + } + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/vnd.api+json; charset=utf-8": { + "schema": { + "type": "array", + "title": "UnitTaxFormListResponse", + "items": { + "$ref": "tax_form.json" + } + } + } + } + } + } + } + }, + "tax_form": { + "get": { + "tags": [ + "Get Tax Form" + ], + "operationId": "execute", + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "taxFormId", + "in": "path", + "required": true, + "description": "The tax form id." + }, + { + "name": "included", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/vnd.api+json; charset=utf-8": { + "schema": { + "title": "UnitTaxFormResponse", + "type": "object", + "properties": { + "data": { + "$ref": "tax_form.json" + } + } + } + } + } + } + } + } + }, + "get_tax_form_pdf": { + "get": { + "tags": [ + "Get Tax Form PDF" + ], + "operationId": "execute", + "parameters": [ + { + "name": "taxFormId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "summary": "Get Tax Form PDF", + "description": "Returns the tax form PDF for the specified tax form id.", + "responses": { + "200": { + "description": "Successful response with tax form PDF", + "content": { + "application/pdf": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + } + }