Skip to content

Latest commit

 

History

History
185 lines (132 loc) · 7.73 KB

ScheduledTransactionsApi.md

File metadata and controls

185 lines (132 loc) · 7.73 KB

ynab_api.ScheduledTransactionsApi

All URIs are relative to https://api.youneedabudget.com/v1

Method HTTP request Description
get_scheduled_transaction_by_id GET /budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id} Single scheduled transaction
get_scheduled_transactions GET /budgets/{budget_id}/scheduled_transactions List scheduled transactions

get_scheduled_transaction_by_id

ScheduledTransactionResponse get_scheduled_transaction_by_id(budget_id, scheduled_transaction_id)

Single scheduled transaction

Returns a single scheduled transaction

Example

  • Api Key Authentication (bearer):
import time
import ynab_api
from ynab_api.api import scheduled_transactions_api
from ynab_api.model.error_response import ErrorResponse
from ynab_api.model.scheduled_transaction_response import ScheduledTransactionResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api.youneedabudget.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = ynab_api.Configuration(
    host = "https://api.youneedabudget.com/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: bearer
configuration.api_key['bearer'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['bearer'] = 'Bearer'

# Enter a context with an instance of the API client
with ynab_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = scheduled_transactions_api.ScheduledTransactionsApi(api_client)
    budget_id = "budget_id_example" # str, none_type | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
    scheduled_transaction_id = "scheduled_transaction_id_example" # str, none_type | The id of the scheduled transaction

    # example passing only required values which don't have defaults set
    try:
        # Single scheduled transaction
        api_response = api_instance.get_scheduled_transaction_by_id(budget_id, scheduled_transaction_id)
        pprint(api_response)
    except ynab_api.ApiException as e:
        print("Exception when calling ScheduledTransactionsApi->get_scheduled_transaction_by_id: %s\n" % e)

Parameters

Name Type Description Notes
budget_id str, none_type The id of the budget. "last-used" can be used to specify the last used budget and "default" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
scheduled_transaction_id str, none_type The id of the scheduled transaction

Return type

ScheduledTransactionResponse

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The requested Scheduled Transaction -
404 The scheduled transaction was not found -
0 An error occurred -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_scheduled_transactions

ScheduledTransactionsResponse get_scheduled_transactions(budget_id)

List scheduled transactions

Returns all scheduled transactions

Example

  • Api Key Authentication (bearer):
import time
import ynab_api
from ynab_api.api import scheduled_transactions_api
from ynab_api.model.error_response import ErrorResponse
from ynab_api.model.scheduled_transactions_response import ScheduledTransactionsResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api.youneedabudget.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = ynab_api.Configuration(
    host = "https://api.youneedabudget.com/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: bearer
configuration.api_key['bearer'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['bearer'] = 'Bearer'

# Enter a context with an instance of the API client
with ynab_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = scheduled_transactions_api.ScheduledTransactionsApi(api_client)
    budget_id = "budget_id_example" # str, none_type | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
    last_knowledge_of_server = 1 # int, none_type | The starting server knowledge.  If provided, only entities that have changed since `last_knowledge_of_server` will be included. (optional)

    # example passing only required values which don't have defaults set
    try:
        # List scheduled transactions
        api_response = api_instance.get_scheduled_transactions(budget_id)
        pprint(api_response)
    except ynab_api.ApiException as e:
        print("Exception when calling ScheduledTransactionsApi->get_scheduled_transactions: %s\n" % e)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # List scheduled transactions
        api_response = api_instance.get_scheduled_transactions(budget_id, last_knowledge_of_server=last_knowledge_of_server)
        pprint(api_response)
    except ynab_api.ApiException as e:
        print("Exception when calling ScheduledTransactionsApi->get_scheduled_transactions: %s\n" % e)

Parameters

Name Type Description Notes
budget_id str, none_type The id of the budget. "last-used" can be used to specify the last used budget and "default" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
last_knowledge_of_server int, none_type The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included. [optional]

Return type

ScheduledTransactionsResponse

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The list of requested scheduled transactions -
404 No scheduled transactions were found -
0 An error occurred -

[Back to top] [Back to API list] [Back to Model list] [Back to README]