Class: YNAB::Overrides::TransactionsApi

Inherits:
TransactionsApi show all
Defined in:
lib/ynab/overrides/transactions_api.rb

Instance Attribute Summary

Attributes inherited from TransactionsApi

#api_client

Instance Method Summary collapse

Methods inherited from TransactionsApi

#create_transaction, #create_transaction_with_http_info, #delete_transaction, #delete_transaction_with_http_info, #get_transaction_by_id, #get_transaction_by_id_with_http_info, #get_transactions, #get_transactions_by_account, #get_transactions_by_account_with_http_info, #get_transactions_by_category, #get_transactions_by_category_with_http_info, #get_transactions_by_month, #get_transactions_by_month_with_http_info, #get_transactions_by_payee, #get_transactions_by_payee_with_http_info, #get_transactions_with_http_info, #import_transactions, #import_transactions_with_http_info, #update_transaction, #update_transaction_with_http_info, #update_transactions, #update_transactions_with_http_info

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ TransactionsApi

Returns a new instance of TransactionsApi.



7
8
9
# File 'lib/ynab/overrides/transactions_api.rb', line 7

def initialize(api_client = ApiClient.default)
  super(api_client)
end

Instance Method Details

#bulk_create_transactions(budget_id, transactions, opts = {}) ⇒ BulkResponse

Bulk create transactions Creates multiple transactions

Parameters:

  • budget_id

    The id of the budget ("last-used" can also be used to specify the last used budget)

  • transactions

    The list of transactions to create

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



27
28
29
# File 'lib/ynab/overrides/transactions_api.rb', line 27

def bulk_create_transactions(budget_id, transactions, opts = {})
  DeprecatedApi.new(@api_client).bulk_create_transactions(budget_id, transactions, opts)
end

#create_transactions(budget_id, data, opts = {}) ⇒ SaveTransactionsResponse

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.

Parameters:

  • budget_id

    The id of the budget ("last-used" can also be used to specify the last used budget)

  • data

    The transaction or transactions to create

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



16
17
18
19
# File 'lib/ynab/overrides/transactions_api.rb', line 16

def create_transactions(budget_id, data, opts = {})
  data, _status_code, _headers = create_transaction_with_http_info(budget_id, data, opts)
  data
end