PocketsmithClient - the Ruby gem for the PocketSmith
The PocketSmith API
This SDK is automatically generated by the OpenAPI Generator project:
- API version: 2.0
- Package version: 1.0.0
- Generator version: 7.12.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
To build the Ruby code into a gem:
gem build pocketsmith_ruby_client.gemspecThen either install the gem locally:
gem install ./pocketsmith_ruby_client-1.0.0.gem(for development, run gem install --dev ./pocketsmith_ruby_client-1.0.0.gem to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'pocketsmith_ruby_client', '~> 1.0.0'
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'pocketsmith_ruby_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly using -I as follows:
ruby -Ilib script.rbPlease follow the installation procedure and then run the following code:
# Load the gem
require 'pocketsmith_ruby_client'
# Setup authorization
PocketsmithClient.configure do |config|
# Configure API key authorization: developerKey
config.api_key['X-Developer-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-Developer-Key'] = 'Bearer'
end
api_instance = PocketsmithClient::AccountsApi.new
id = 42 # Integer | The unique identifier of the account.
begin
#Delete account
api_instance.accounts_id_delete(id)
rescue PocketsmithClient::ApiError => e
puts "Exception when calling AccountsApi->accounts_id_delete: #{e}"
endAll URIs are relative to https://api.pocketsmith.com/v2
| Class | Method | HTTP request | Description |
|---|---|---|---|
| PocketsmithClient::AccountsApi | accounts_id_delete | DELETE /accounts/{id} | Delete account |
| PocketsmithClient::AccountsApi | accounts_id_get | GET /accounts/{id} | Get account |
| PocketsmithClient::AccountsApi | accounts_id_put | PUT /accounts/{id} | Update account |
| PocketsmithClient::AccountsApi | institutions_id_accounts_get | GET /institutions/{id}/accounts | List accounts in institution |
| PocketsmithClient::AccountsApi | users_id_accounts_get | GET /users/{id}/accounts | List accounts in user |
| PocketsmithClient::AccountsApi | users_id_accounts_post | POST /users/{id}/accounts | Create an account in user |
| PocketsmithClient::AccountsApi | users_id_accounts_put | PUT /users/{id}/accounts | Update the display order of accounts in user |
| PocketsmithClient::AttachmentsApi | attachments_id_delete | DELETE /attachments/{id} | Delete attachment |
| PocketsmithClient::AttachmentsApi | attachments_id_get | GET /attachments/{id} | Get attachment |
| PocketsmithClient::AttachmentsApi | attachments_id_put | PUT /attachments/{id} | Update attachment |
| PocketsmithClient::AttachmentsApi | transactions_id_attachments_get | GET /transactions/{id}/attachments | List attachments in transaction |
| PocketsmithClient::AttachmentsApi | transactions_id_attachments_post | POST /transactions/{id}/attachments | Assigns attachment to transaction |
| PocketsmithClient::AttachmentsApi | transactions_transaction_id_attachments_attachment_id_delete | DELETE /transactions/{transaction_id}/attachments/{attachment_id} | Unassigns attachment in transaction |
| PocketsmithClient::AttachmentsApi | users_id_attachments_get | GET /users/{id}/attachments | Lists attachments in user |
| PocketsmithClient::AttachmentsApi | users_id_attachments_post | POST /users/{id}/attachments | Create attachment in user |
| PocketsmithClient::BudgetingApi | users_id_budget_get | GET /users/{id}/budget | List budget for user |
| PocketsmithClient::BudgetingApi | users_id_budget_summary_get | GET /users/{id}/budget_summary | Get budget summary for user |
| PocketsmithClient::BudgetingApi | users_id_forecast_cache_delete | DELETE /users/{id}/forecast_cache | Delete forecast cache for user |
| PocketsmithClient::BudgetingApi | users_id_trend_analysis_get | GET /users/{id}/trend_analysis | Get trend analysis for user |
| PocketsmithClient::CategoriesApi | categories_id_delete | DELETE /categories/{id} | Delete category |
| PocketsmithClient::CategoriesApi | categories_id_get | GET /categories/{id} | Get category |
| PocketsmithClient::CategoriesApi | categories_id_put | PUT /categories/{id} | Update category |
| PocketsmithClient::CategoriesApi | users_id_categories_get | GET /users/{id}/categories | List categories in user |
| PocketsmithClient::CategoriesApi | users_id_categories_post | POST /users/{id}/categories | Create category in user |
| PocketsmithClient::CategoryRulesApi | categories_id_category_rules_post | POST /categories/{id}/category_rules | Create category rule in category |
| PocketsmithClient::CategoryRulesApi | users_id_category_rules_get | GET /users/{id}/category_rules | List category rules in user |
| PocketsmithClient::CurrenciesApi | currencies_get | GET /currencies | List currencies |
| PocketsmithClient::CurrenciesApi | currencies_id_get | GET /currencies/{id} | Get currency |
| PocketsmithClient::EventsApi | events_id_delete | DELETE /events/{id} | Delete event |
| PocketsmithClient::EventsApi | events_id_get | GET /events/{id} | Get event |
| PocketsmithClient::EventsApi | events_id_put | PUT /events/{id} | Update event |
| PocketsmithClient::EventsApi | scenarios_id_events_get | GET /scenarios/{id}/events | List events in scenario. |
| PocketsmithClient::EventsApi | scenarios_id_events_post | POST /scenarios/{id}/events | Create event in scenario |
| PocketsmithClient::EventsApi | users_id_events_get | GET /users/{id}/events | List events in user. |
| PocketsmithClient::InstitutionsApi | institutions_id_delete | DELETE /institutions/{id} | Delete institution |
| PocketsmithClient::InstitutionsApi | institutions_id_get | GET /institutions/{id} | Get institution |
| PocketsmithClient::InstitutionsApi | institutions_id_put | PUT /institutions/{id} | Update institution |
| PocketsmithClient::InstitutionsApi | users_id_institutions_get | GET /users/{id}/institutions | List institutions in user |
| PocketsmithClient::InstitutionsApi | users_id_institutions_post | POST /users/{id}/institutions | Create institution in user |
| PocketsmithClient::LabelsApi | users_id_labels_get | GET /users/{id}/labels | List labels in user |
| PocketsmithClient::SavedSearchesApi | users_id_saved_searches_get | GET /users/{id}/saved_searches | List saved searches in user |
| PocketsmithClient::TimeZonesApi | time_zones_get | GET /time_zones | List time zones |
| PocketsmithClient::TransactionAccountsApi | transaction_accounts_id_get | GET /transaction_accounts/{id} | Get transaction account |
| PocketsmithClient::TransactionAccountsApi | transaction_accounts_id_put | PUT /transaction_accounts/{id} | Update transaction account |
| PocketsmithClient::TransactionAccountsApi | users_id_transaction_accounts_get | GET /users/{id}/transaction_accounts | List transaction accounts in user |
| PocketsmithClient::TransactionsApi | accounts_id_transactions_get | GET /accounts/{id}/transactions | List transactions in account |
| PocketsmithClient::TransactionsApi | categories_id_transactions_get | GET /categories/{id}/transactions | List transactions in categories |
| PocketsmithClient::TransactionsApi | transaction_accounts_id_transactions_get | GET /transaction_accounts/{id}/transactions | List transactions in transaction account |
| PocketsmithClient::TransactionsApi | transaction_accounts_id_transactions_post | POST /transaction_accounts/{id}/transactions | Create a transaction in transaction account |
| PocketsmithClient::TransactionsApi | transactions_id_delete | DELETE /transactions/{id} | Delete transaction |
| PocketsmithClient::TransactionsApi | transactions_id_get | GET /transactions/{id} | Get a transaction |
| PocketsmithClient::TransactionsApi | transactions_id_put | PUT /transactions/{id} | Update a transaction |
| PocketsmithClient::TransactionsApi | users_id_transactions_get | GET /users/{id}/transactions | List transactions in user |
| PocketsmithClient::UsersApi | me_get | GET /me | Get the authorised user |
| PocketsmithClient::UsersApi | users_id_get | GET /users/{id} | Get user |
| PocketsmithClient::UsersApi | users_id_put | PUT /users/{id} | Update user |
- PocketsmithClient::Account
- PocketsmithClient::AccountsIdPutRequest
- PocketsmithClient::Attachment
- PocketsmithClient::AttachmentContentTypeMeta
- PocketsmithClient::AttachmentVariants
- PocketsmithClient::AttachmentsIdPutRequest
- PocketsmithClient::BudgetAnalysis
- PocketsmithClient::BudgetAnalysisPackage
- PocketsmithClient::CategoriesIdCategoryRulesPostRequest
- PocketsmithClient::CategoriesIdPutRequest
- PocketsmithClient::Category
- PocketsmithClient::CategoryRule
- PocketsmithClient::Currency
- PocketsmithClient::CurrencySeparators
- PocketsmithClient::Error
- PocketsmithClient::Event
- PocketsmithClient::EventsIdPutRequest
- PocketsmithClient::Institution
- PocketsmithClient::InstitutionsIdPutRequest
- PocketsmithClient::Period
- PocketsmithClient::SavedSearch
- PocketsmithClient::Scenario
- PocketsmithClient::ScenariosIdEventsPostRequest
- PocketsmithClient::TimeZone
- PocketsmithClient::Transaction
- PocketsmithClient::TransactionAccount
- PocketsmithClient::TransactionAccountsIdPutRequest
- PocketsmithClient::TransactionAccountsIdTransactionsPostRequest
- PocketsmithClient::TransactionsIdAttachmentsPostRequest
- PocketsmithClient::TransactionsIdPutRequest
- PocketsmithClient::User
- PocketsmithClient::UsersIdAccountsPostRequest
- PocketsmithClient::UsersIdAccountsPutRequest
- PocketsmithClient::UsersIdAttachmentsPostRequest
- PocketsmithClient::UsersIdCategoriesPostRequest
- PocketsmithClient::UsersIdInstitutionsPostRequest
- PocketsmithClient::UsersIdPutRequest
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: X-Developer-Key
- Location: HTTP header
- Type: OAuth
- Flow: accessCode
- Authorization URL: https://my.pocketsmith.com/oauth/authorize
- Scopes:
- user.read: Access the user's details and preferences
- user.write: Access to change the user's details and preferences
- accounts.read: Access to list and view transaction accounts
- accounts.write: Access to update and delete transaction accounts
- transactions.read: Access to list and view accounts and transactions
- transactions.write: Access to create, update and delete transactions
- categories.read: Access to view categories
- categories.write: Ability to edit and delete categories
- attachments.read: Access to view attachments
- attachments.write: Ability to create, update and delete attachments
- events.read: Access to view events
- events.write: Ability to create, update and delete events