Skip to content

Latest commit

 

History

History
120 lines (84 loc) · 3.29 KB

PayeesApi.md

File metadata and controls

120 lines (84 loc) · 3.29 KB

ynab.PayeesApi

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

Method HTTP request Description
get_payee_by_id GET /budgets/{budget_id}/payees/{payee_id} Single payee
get_payees GET /budgets/{budget_id}/payees List payees

get_payee_by_id

PayeeResponse get_payee_by_id(budget_id, payee_id)

Single payee

Returns single payee

Example

from __future__ import print_function
import time
import ynab
from ynab.rest import ApiException
from pprint import pprint

# Configure API key authorization: bearer
configuration = ynab.Configuration()
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'

# create an instance of the API class
api_instance = ynab.PayeesApi(ynab.ApiClient(configuration))
budget_id = 'budget_id_example' # str | The ID of the Budget.
payee_id = 'payee_id_example' # str | The ID of the Payee.

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

Parameters

Name Type Description Notes
budget_id str The ID of the Budget.
payee_id str The ID of the Payee.

Return type

PayeeResponse

Authorization

bearer

HTTP request headers

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

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

get_payees

PayeesResponse get_payees(budget_id)

List payees

Returns all payees

Example

from __future__ import print_function
import time
import ynab
from ynab.rest import ApiException
from pprint import pprint

# Configure API key authorization: bearer
configuration = ynab.Configuration()
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'

# create an instance of the API class
api_instance = ynab.PayeesApi(ynab.ApiClient(configuration))
budget_id = 'budget_id_example' # str | The ID of the Budget.

try:
    # List payees
    api_response = api_instance.get_payees(budget_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PayeesApi->get_payees: %s\n" % e)

Parameters

Name Type Description Notes
budget_id str The ID of the Budget.

Return type

PayeesResponse

Authorization

bearer

HTTP request headers

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

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