Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ynab

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ynab

  • 4.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

YNAB API Ruby Library

Continuous Integration Gem Version

This is the Ruby client for the YNAB API.

Please read the YNAB API documentation for an overview of using the API and a complete list of available resources.

This client is generated using the OpenAPI Generator.

Installation

gem install ynab

Note: The current version of this gem (3.0.0) requires Ruby version 3.3 or later. If you are using an older version of Ruby, you can install version 2.1 of this gem.

Usage

To use this client you must obtain an access token from your Account Settings page of the YNAB web app.

require 'ynab'

access_token = ENV['YNAB_ACCESS_TOKEN']
ynab_api = YNAB::API.new(access_token)

budget_response = ynab_api.budgets.get_budgets
budgets = budget_response.data.budgets

budgets.each do |budget|
  puts "Budget Name: #{budget.name}"
end

Examples

See the examples folder for example usage scenarios.

Methods

The following methods are available in this library.

MethodDescription
Useruser.get_user()Returns authenticated user information
Budgetsbudgets.get_budgets()Returns budgets list with summary information
budgets.get_budget_by_id(budget_id)Returns a single budget with all related entities
budgets.get_budget_settings_by_id(budget_id)Returns settings for a budget
Accountsaccounts.get_accounts(budget_id)Returns all accounts
accounts.get_account_by_id(budget_id, account_id)Returns a single account
Categoriescategories.get_categories(budget_id)Returns all categories grouped by category group.
categories.get_category_by_id(budget_id, category_id)Returns a single category
categories.get_month_category_by_id(budget_id, month, category_id)Returns a single category for a specific budget month
Payeespayees.get_payees(budget_id)Returns all payees
payees.get_payee_by_id(budget_id, payee_id)Returns single payee
Payee Locationspayee_locations.get_payee_locations(budget_id)Returns all payee locations
payee_locations.get_payee_location_by_id(budget_id, payee_location_id)Returns a single payee location
payee_locations.get_payee_locations_by_payee(budget_id, payee_id)Returns all payee locations for the specified payee
Monthsmonths.get_budget_months(budget_id)Returns all budget months
months.get_budget_month(budget_id, month)Returns a single budget month
months.update_month_category(budget_id, month, category_id, month_category)Update an existing month category
Transactionstransactions.get_transactions(budget_id)Returns budget transactions
transactions.get_transactions_by_account(budget_id, account_id)Returns all transactions for a specified account
transactions.get_transactions_by_category(budget_id, category_id)Returns all transactions for a specified category
transactions.get_transaction_by_id(budget_id, transaction_id)Returns a single transaction
transactions.create_transaction(budget_id, data)Creates a single transaction
transactions.create_transactions(budget_id, data)Creates multiple transactions
transactions.update_transaction(budget_id, id, data)Updates a single transaction
transactions.update_transactions(budget_id, data)Updates multiple transactions
transactions.delete_transaction(budget_id, transaction_id)Deletes a single transaction
transactions.import_transactions(budget_id)Imports transactions
Scheduled Transactionsscheduled_transactions.get_scheduled_transactions(budget_id)Returns all scheduled transactions
scheduled_transactions.get_scheduled_transaction_by_id(budget_id, scheduled_transaction_id)Returns a single scheduled transaction

License

Copyright (c) 2024 You Need A Budget, LLC

Licensed under the Apache-2.0 license

FAQs

Package last updated on 23 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc