Skip to content

Latest commit

 

History

History
207 lines (152 loc) · 7.84 KB

File metadata and controls

207 lines (152 loc) · 7.84 KB

ynab.PayeeLocationsApi

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

Method HTTP request Description
get_payee_location_by_id GET /budgets/{budget_id}/payee_locations/{payee_location_id} Single payee location
get_payee_locations GET /budgets/{budget_id}/payee_locations List payee locations
get_payee_locations_by_payee GET /budgets/{budget_id}/payees/{payee_id}/payee_locations List locations for a payee

get_payee_location_by_id

PayeeLocationResponse get_payee_location_by_id(budget_id, payee_location_id)

Single payee location

Returns a single payee location

Example

  • Api Key Authentication (bearer):
from __future__ import print_function
import time
import ynab
from ynab.rest import ApiException
from pprint import pprint
configuration = ynab.Configuration()
# Configure API key authorization: bearer
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# Defining host is optional and default to https://api.youneedabudget.com/v1
configuration.host = "https://api.youneedabudget.com/v1"
# Create an instance of the API class
api_instance = ynab.PayeeLocationsApi(ynab.ApiClient(configuration))
budget_id = 'budget_id_example' # str | 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)
payee_location_id = 'payee_location_id_example' # str | id of payee location

try:
    # Single payee location
    api_response = api_instance.get_payee_location_by_id(budget_id, payee_location_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PayeeLocationsApi->get_payee_location_by_id: %s\n" % e)

Parameters

Name Type Description Notes
budget_id str 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)
payee_location_id str id of payee location

Return type

PayeeLocationResponse

Authorization

bearer

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The payee location -
404 The payee location was not found -
0 An error occurred -

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

get_payee_locations

PayeeLocationsResponse get_payee_locations(budget_id)

List payee locations

Returns all payee locations

Example

  • Api Key Authentication (bearer):
from __future__ import print_function
import time
import ynab
from ynab.rest import ApiException
from pprint import pprint
configuration = ynab.Configuration()
# Configure API key authorization: bearer
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# Defining host is optional and default to https://api.youneedabudget.com/v1
configuration.host = "https://api.youneedabudget.com/v1"
# Create an instance of the API class
api_instance = ynab.PayeeLocationsApi(ynab.ApiClient(configuration))
budget_id = 'budget_id_example' # str | 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)

try:
    # List payee locations
    api_response = api_instance.get_payee_locations(budget_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PayeeLocationsApi->get_payee_locations: %s\n" % e)

Parameters

Name Type Description Notes
budget_id str 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)

Return type

PayeeLocationsResponse

Authorization

bearer

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The list of payee locations -
404 No payees locations were found -
0 An error occurred -

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

get_payee_locations_by_payee

PayeeLocationsResponse get_payee_locations_by_payee(budget_id, payee_id)

List locations for a payee

Returns all payee locations for the specified payee

Example

  • Api Key Authentication (bearer):
from __future__ import print_function
import time
import ynab
from ynab.rest import ApiException
from pprint import pprint
configuration = ynab.Configuration()
# Configure API key authorization: bearer
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# Defining host is optional and default to https://api.youneedabudget.com/v1
configuration.host = "https://api.youneedabudget.com/v1"
# Create an instance of the API class
api_instance = ynab.PayeeLocationsApi(ynab.ApiClient(configuration))
budget_id = 'budget_id_example' # str | 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)
payee_id = 'payee_id_example' # str | id of payee

try:
    # List locations for a payee
    api_response = api_instance.get_payee_locations_by_payee(budget_id, payee_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PayeeLocationsApi->get_payee_locations_by_payee: %s\n" % e)

Parameters

Name Type Description Notes
budget_id str 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)
payee_id str id of payee

Return type

PayeeLocationsResponse

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 payee locations -
404 No payees locations were found -
0 An error occurred -

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