Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate latest from spec version 1.72.0 #80

Merged
merged 5 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ docs/PayeesApi.md
docs/PayeesResponse.md
docs/PayeesResponseData.md
docs/PostAccountWrapper.md
docs/PostScheduledTransactionWrapper.md
docs/PostTransactionsWrapper.md
docs/PutTransactionWrapper.md
docs/SaveAccount.md
Expand All @@ -72,13 +73,15 @@ docs/SaveMonthCategory.md
docs/SavePayee.md
docs/SavePayeeResponse.md
docs/SavePayeeResponseData.md
docs/SaveScheduledTransaction.md
docs/SaveSubTransaction.md
docs/SaveTransactionWithIdOrImportId.md
docs/SaveTransactionWithOptionalFields.md
docs/SaveTransactionsResponse.md
docs/SaveTransactionsResponseData.md
docs/ScheduledSubTransaction.md
docs/ScheduledTransactionDetail.md
docs/ScheduledTransactionFrequency.md
docs/ScheduledTransactionResponse.md
docs/ScheduledTransactionResponseData.md
docs/ScheduledTransactionSummary.md
Expand Down Expand Up @@ -169,6 +172,7 @@ lib/ynab/models/payee_response_data.rb
lib/ynab/models/payees_response.rb
lib/ynab/models/payees_response_data.rb
lib/ynab/models/post_account_wrapper.rb
lib/ynab/models/post_scheduled_transaction_wrapper.rb
lib/ynab/models/post_transactions_wrapper.rb
lib/ynab/models/put_transaction_wrapper.rb
lib/ynab/models/save_account.rb
Expand All @@ -179,13 +183,15 @@ lib/ynab/models/save_month_category.rb
lib/ynab/models/save_payee.rb
lib/ynab/models/save_payee_response.rb
lib/ynab/models/save_payee_response_data.rb
lib/ynab/models/save_scheduled_transaction.rb
lib/ynab/models/save_sub_transaction.rb
lib/ynab/models/save_transaction_with_id_or_import_id.rb
lib/ynab/models/save_transaction_with_optional_fields.rb
lib/ynab/models/save_transactions_response.rb
lib/ynab/models/save_transactions_response_data.rb
lib/ynab/models/scheduled_sub_transaction.rb
lib/ynab/models/scheduled_transaction_detail.rb
lib/ynab/models/scheduled_transaction_frequency.rb
lib/ynab/models/scheduled_transaction_response.rb
lib/ynab/models/scheduled_transaction_response_data.rb
lib/ynab/models/scheduled_transaction_summary.rb
Expand Down
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.6.0
7.7.0
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ The following methods are available in this library.
| | [transactions.import_transactions(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#import_transactions) | Imports transactions |
| **Scheduled Transactions** | [scheduled_transactions.get_scheduled_transactions(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/ScheduledTransactionsApi.md#get_scheduled_transactions) | Returns all scheduled transactions |
| | [scheduled_transactions.get_scheduled_transaction_by_id(budget_id, scheduled_transaction_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/ScheduledTransactionsApi.md#get_scheduled_transaction_by_id) | Returns a single scheduled transaction |
| | [scheduled_transactions.create_scheduled_transaction(budget_id, data)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/ScheduledTransactionsApi.md#create_scheduled_transaction) | Creates a single scheduled transaction |
bradymholt marked this conversation as resolved.
Show resolved Hide resolved

## License

Expand Down
4 changes: 1 addition & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ end

task :default => [:spec]

REQUIRED_RUBY_VERSION = ">= 3.3"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved some config to config.yaml to centralize it.


desc "Run OpenAPI Generator to update the client from the spec"
task :generate do
spec_filename = 'open_api_spec.yaml'
Expand All @@ -22,7 +20,7 @@ task :generate do
# Remove existing generated files to ensure old files are not included in the gem
sh "rm -r docs/ lib/ynab/models/"
# Generate the client
sh "openapi-generator generate -i ./#{spec_filename} -g ruby --additional-properties=gemRequiredRubyVersion='#{REQUIRED_RUBY_VERSION}' -c config.json -t ./templates -o ./"
sh "openapi-generator generate -i ./#{spec_filename} -g ruby -c config.yaml -o ./"
end

task :get_current_version do
Expand Down
11 changes: 11 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
gemName: ynab
moduleName: YNAB
gemSummary: YNAB API Client for Ruby
gemDescription: Ruby gem wrapper for the YNAB API.
bradymholt marked this conversation as resolved.
Show resolved Hide resolved
gemHomepage: https://github.com/ynab/ynab-sdk-ruby
gemLicense: Apache-2.0
gemAuthor: YNAB
gemAuthorEmail: [email protected]
templateDir: ./templates
additionalProperties:
gemRequiredRubyVersion: ">= 3.3"
2 changes: 1 addition & 1 deletion docs/ExistingTransaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
| **account_id** | **String** | | [optional] |
| **date** | **Date** | The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored. | [optional] |
| **amount** | **Integer** | The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. | [optional] |
| **payee_id** | **String** | The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `tranfer_payee_id` on the account resource. | [optional] |
| **payee_id** | **String** | The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `transfer_payee_id` on the account resource. | [optional] |
| **payee_name** | **String** | The payee name. If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a matching payee rename rule (only if `import_id` is also specified) or (2) a payee with the same name or (3) creation of a new payee. | [optional] |
| **category_id** | **String** | The category for the transaction. To configure a split transaction, you can specify null for `category_id` and provide a `subtransactions` array as part of the transaction object. If an existing transaction is a split, the `category_id` cannot be changed. Credit Card Payment categories are not permitted and will be ignored if supplied. | [optional] |
| **memo** | **String** | | [optional] |
Expand Down
2 changes: 1 addition & 1 deletion docs/NewTransaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
| **account_id** | **String** | | [optional] |
| **date** | **Date** | The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored. | [optional] |
| **amount** | **Integer** | The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. | [optional] |
| **payee_id** | **String** | The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `tranfer_payee_id` on the account resource. | [optional] |
| **payee_id** | **String** | The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `transfer_payee_id` on the account resource. | [optional] |
| **payee_name** | **String** | The payee name. If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a matching payee rename rule (only if `import_id` is also specified) or (2) a payee with the same name or (3) creation of a new payee. | [optional] |
| **category_id** | **String** | The category for the transaction. To configure a split transaction, you can specify null for `category_id` and provide a `subtransactions` array as part of the transaction object. If an existing transaction is a split, the `category_id` cannot be changed. Credit Card Payment categories are not permitted and will be ignored if supplied. | [optional] |
| **memo** | **String** | | [optional] |
Expand Down
8 changes: 8 additions & 0 deletions docs/PostScheduledTransactionWrapper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# YNAB::PostScheduledTransactionWrapper

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **scheduled_transaction** | [**SaveScheduledTransaction**](SaveScheduledTransaction.md) | | |

16 changes: 16 additions & 0 deletions docs/SaveScheduledTransaction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# YNAB::SaveScheduledTransaction

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **account_id** | **String** | | |
| **date** | **Date** | The scheduled transaction date in ISO format (e.g. 2016-12-01). | |
| **amount** | **Integer** | The scheduled transaction amount in milliunits format. | [optional] |
| **payee_id** | **String** | The payee for the scheduled transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `transfer_payee_id` on the account resource. | [optional] |
| **payee_name** | **String** | The payee name for the the scheduled transaction. If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a payee with the same name or (2) creation of a new payee. | [optional] |
| **category_id** | **String** | The category for the scheduled transaction. Credit Card Payment categories are not permitted. Creating a split scheduled transaction is not currently supported. | [optional] |
| **memo** | **String** | | [optional] |
| **flag_color** | [**TransactionFlagColor**](TransactionFlagColor.md) | | [optional] |
| **frequency** | [**ScheduledTransactionFrequency**](ScheduledTransactionFrequency.md) | | [optional] |

2 changes: 1 addition & 1 deletion docs/SaveTransactionWithIdOrImportId.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
| **account_id** | **String** | | [optional] |
| **date** | **Date** | The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored. | [optional] |
| **amount** | **Integer** | The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. | [optional] |
| **payee_id** | **String** | The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `tranfer_payee_id` on the account resource. | [optional] |
| **payee_id** | **String** | The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `transfer_payee_id` on the account resource. | [optional] |
| **payee_name** | **String** | The payee name. If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a matching payee rename rule (only if `import_id` is also specified) or (2) a payee with the same name or (3) creation of a new payee. | [optional] |
| **category_id** | **String** | The category for the transaction. To configure a split transaction, you can specify null for `category_id` and provide a `subtransactions` array as part of the transaction object. If an existing transaction is a split, the `category_id` cannot be changed. Credit Card Payment categories are not permitted and will be ignored if supplied. | [optional] |
| **memo** | **String** | | [optional] |
Expand Down
2 changes: 1 addition & 1 deletion docs/SaveTransactionWithOptionalFields.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
| **account_id** | **String** | | [optional] |
| **date** | **Date** | The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored. | [optional] |
| **amount** | **Integer** | The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. | [optional] |
| **payee_id** | **String** | The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `tranfer_payee_id` on the account resource. | [optional] |
| **payee_id** | **String** | The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `transfer_payee_id` on the account resource. | [optional] |
| **payee_name** | **String** | The payee name. If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a matching payee rename rule (only if `import_id` is also specified) or (2) a payee with the same name or (3) creation of a new payee. | [optional] |
| **category_id** | **String** | The category for the transaction. To configure a split transaction, you can specify null for `category_id` and provide a `subtransactions` array as part of the transaction object. If an existing transaction is a split, the `category_id` cannot be changed. Credit Card Payment categories are not permitted and will be ignored if supplied. | [optional] |
| **memo** | **String** | | [optional] |
Expand Down
7 changes: 7 additions & 0 deletions docs/ScheduledTransactionFrequency.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# YNAB::ScheduledTransactionFrequency

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |

bradymholt marked this conversation as resolved.
Show resolved Hide resolved
21 changes: 21 additions & 0 deletions docs/ScheduledTransactionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,31 @@ 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 |
| [**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 |


## create_scheduled_transaction

> <ScheduledTransactionResponse> create_scheduled_transaction(budget_id, data)

Create a single scheduled transaction

Creates a single scheduled transaction.

### Parameters

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **budget_id** | **String** | The id of the budget. \&quot;last-used\&quot; can be used to specify the last used budget and \&quot;default\&quot; can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). | |
| **data** | [**PostScheduledTransactionWrapper**](PostScheduledTransactionWrapper.md) | The scheduled transaction to create | |

### Return type

[**ScheduledTransactionResponse**](ScheduledTransactionResponse.md)


## get_scheduled_transaction_by_id

> <ScheduledTransactionResponse> get_scheduled_transaction_by_id(budget_id, scheduled_transaction_id)
Expand Down
2 changes: 1 addition & 1 deletion docs/TransactionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ All URIs are relative to *https://api.ynab.com/v1*

Create a single transaction or multiple transactions

Creates a single transaction or multiple transactions. If you provide a body containing a `transaction` object, a single transaction will be created and if you provide a body containing a `transactions` array, multiple transactions will be created. Scheduled transactions cannot be created on this endpoint.
Creates a single transaction or multiple transactions. If you provide a body containing a `transaction` object, a single transaction will be created and if you provide a body containing a `transactions` array, multiple transactions will be created. Scheduled transactions (transactions with a future date) cannot be created on this endpoint.

### Parameters

Expand Down
3 changes: 3 additions & 0 deletions lib/ynab.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
require 'ynab/models/payees_response'
require 'ynab/models/payees_response_data'
require 'ynab/models/post_account_wrapper'
require 'ynab/models/post_scheduled_transaction_wrapper'
require 'ynab/models/post_transactions_wrapper'
require 'ynab/models/put_transaction_wrapper'
require 'ynab/models/save_account'
Expand All @@ -80,13 +81,15 @@
require 'ynab/models/save_payee'
require 'ynab/models/save_payee_response'
require 'ynab/models/save_payee_response_data'
require 'ynab/models/save_scheduled_transaction'
require 'ynab/models/save_sub_transaction'
require 'ynab/models/save_transaction_with_id_or_import_id'
require 'ynab/models/save_transaction_with_optional_fields'
require 'ynab/models/save_transactions_response'
require 'ynab/models/save_transactions_response_data'
require 'ynab/models/scheduled_sub_transaction'
require 'ynab/models/scheduled_transaction_detail'
require 'ynab/models/scheduled_transaction_frequency'
require 'ynab/models/scheduled_transaction_response'
require 'ynab/models/scheduled_transaction_response_data'
require 'ynab/models/scheduled_transaction_summary'
Expand Down
Loading