diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 12c9c5e..44ff6a3 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -108,7 +108,6 @@ pyproject.toml requirements.txt test-requirements.txt test/__init__.py -test/test_put_scheduled_transaction_wrapper.py tox.ini ynab/__init__.py ynab/api/__init__.py diff --git a/docs/ScheduledTransactionsApi.md b/docs/ScheduledTransactionsApi.md index 79e0e7b..7a252f1 100644 --- a/docs/ScheduledTransactionsApi.md +++ b/docs/ScheduledTransactionsApi.md @@ -5,10 +5,10 @@ All URIs are relative to *https://api.ynab.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_scheduled_transaction**](ScheduledTransactionsApi.md#create_scheduled_transaction) | **POST** /budgets/{budget_id}/scheduled_transactions | Create a single scheduled transaction -[**delete_scheduled_transaction**](ScheduledTransactionsApi.md#delete_scheduled_transaction) | **DELETE** /budgets/{budget_id}/scheduled_transactions | Deletes an existing scheduled transaction +[**delete_scheduled_transaction**](ScheduledTransactionsApi.md#delete_scheduled_transaction) | **DELETE** /budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id} | Deletes an existing scheduled transaction [**get_scheduled_transaction_by_id**](ScheduledTransactionsApi.md#get_scheduled_transaction_by_id) | **GET** /budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id} | Single scheduled transaction [**get_scheduled_transactions**](ScheduledTransactionsApi.md#get_scheduled_transactions) | **GET** /budgets/{budget_id}/scheduled_transactions | List scheduled transactions -[**update_scheduled_transaction**](ScheduledTransactionsApi.md#update_scheduled_transaction) | **PUT** /budgets/{budget_id}/scheduled_transactions | Updates an existing scheduled transaction +[**update_scheduled_transaction**](ScheduledTransactionsApi.md#update_scheduled_transaction) | **PUT** /budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id} | Updates an existing scheduled transaction # **create_scheduled_transaction** diff --git a/open_api_spec.yaml b/open_api_spec.yaml index 8e990c3..e5496d2 100644 --- a/open_api_spec.yaml +++ b/open_api_spec.yaml @@ -1580,12 +1580,13 @@ paths: schema: $ref: "#/components/schemas/ErrorResponse" x-codegen-request-body-name: data - put: + /budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}: + get: tags: - Scheduled Transactions - summary: Updates an existing scheduled transaction - description: Updates a single scheduled transaction - operationId: updateScheduledTransaction + summary: Single scheduled transaction + description: Returns a single scheduled transaction + operationId: getScheduledTransactionById parameters: - name: budget_id in: path @@ -1602,34 +1603,31 @@ paths: required: true schema: type: string - requestBody: - description: The scheduled transaction to update - content: - "application/json": - schema: - $ref: "#/components/schemas/PutScheduledTransactionWrapper" - required: true responses: "200": - description: The scheduled transaction was successfully updated + description: The requested Scheduled Transaction content: application/json: schema: $ref: "#/components/schemas/ScheduledTransactionResponse" - "400": - description: >- - The request could not be understood due to malformed syntax or - validation error(s) + "404": + description: The scheduled transaction was not found content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" - delete: + default: + description: An error occurred + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + put: tags: - Scheduled Transactions - summary: Deletes an existing scheduled transaction - description: Deletes a scheduled transaction - operationId: deleteScheduledTransaction + summary: Updates an existing scheduled transaction + description: Updates a single scheduled transaction + operationId: updateScheduledTransaction parameters: - name: budget_id in: path @@ -1646,26 +1644,34 @@ paths: required: true schema: type: string + requestBody: + description: The scheduled transaction to update + content: + "application/json": + schema: + $ref: "#/components/schemas/PutScheduledTransactionWrapper" + required: true responses: "200": - description: The scheduled transaction was successfully deleted + description: The scheduled transaction was successfully updated content: application/json: schema: $ref: "#/components/schemas/ScheduledTransactionResponse" - "404": - description: The scheduled transaction was not found + "400": + description: >- + The request could not be understood due to malformed syntax or + validation error(s) content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" - /budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}: - get: + delete: tags: - Scheduled Transactions - summary: Single scheduled transaction - description: Returns a single scheduled transaction - operationId: getScheduledTransactionById + summary: Deletes an existing scheduled transaction + description: Deletes a scheduled transaction + operationId: deleteScheduledTransaction parameters: - name: budget_id in: path @@ -1684,7 +1690,7 @@ paths: type: string responses: "200": - description: The requested Scheduled Transaction + description: The scheduled transaction was successfully deleted content: application/json: schema: @@ -1695,12 +1701,6 @@ paths: application/json: schema: $ref: "#/components/schemas/ErrorResponse" - default: - description: An error occurred - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" components: schemas: ErrorResponse: diff --git a/openapi-generator-config.yaml b/openapi-generator-config.yaml index 82071b6..4c0b211 100644 --- a/openapi-generator-config.yaml +++ b/openapi-generator-config.yaml @@ -1,5 +1,5 @@ packageName: ynab -packageVersion: 1.2.0 +packageVersion: 1.3.0 packageDescription: Official Python client for the YNAB API. API documentation available at https://api.ynab.com. licenseInfo: name: Apache-2.0 diff --git a/pyproject.toml b/pyproject.toml index ee171e9..bea8eaf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "ynab" -version = "1.2.0" +version = "1.3.0" description = "Official Python client for the YNAB API. API documentation available at https://api.ynab.com. Generated from server specification version 1.74.0" authors = ["YNAB"] license = "Apache-2.0" diff --git a/ynab/__init__.py b/ynab/__init__.py index e33aea5..41da39d 100644 --- a/ynab/__init__.py +++ b/ynab/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "1.2.0" +__version__ = "1.3.0" # import apis into sdk package from ynab.api.accounts_api import AccountsApi diff --git a/ynab/api/scheduled_transactions_api.py b/ynab/api/scheduled_transactions_api.py index bc549e4..56e3f18 100644 --- a/ynab/api/scheduled_transactions_api.py +++ b/ynab/api/scheduled_transactions_api.py @@ -597,7 +597,7 @@ def _delete_scheduled_transaction_serialize( return self.api_client.param_serialize( method='DELETE', - resource_path='/budgets/{budget_id}/scheduled_transactions', + resource_path='/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1464,7 +1464,7 @@ def _update_scheduled_transaction_serialize( return self.api_client.param_serialize( method='PUT', - resource_path='/budgets/{budget_id}/scheduled_transactions', + resource_path='/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/ynab/api_client.py b/ynab/api_client.py index 9f00082..5b3bfd2 100644 --- a/ynab/api_client.py +++ b/ynab/api_client.py @@ -90,7 +90,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.2.0/python' + self.user_agent = 'OpenAPI-Generator/1.3.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/ynab/configuration.py b/ynab/configuration.py index 026d197..b8d8a42 100644 --- a/ynab/configuration.py +++ b/ynab/configuration.py @@ -510,7 +510,7 @@ def to_debug_report(self) -> str: "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 1.74.0\n"\ - "SDK Package Version: 1.2.0".\ + "SDK Package Version: 1.3.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: