Skip to content

Latest commit

 

History

History
180 lines (131 loc) · 5.43 KB

PayeeLocationsApi.md

File metadata and controls

180 lines (131 loc) · 5.43 KB

PayeeLocationsApi

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

Method HTTP request Description
getPayeeLocationById GET /budgets/{budget_id}/payee_locations/{payee_location_id} Single payee location
getPayeeLocations GET /budgets/{budget_id}/payee_locations List payee locations
getPayeeLocationsByPayee GET /budgets/{budget_id}/payees/{payee_id}/payee_locations List locations for a payee

getPayeeLocationById

PayeeLocationResponse getPayeeLocationById(budgetId, payeeLocationId)

Single payee location

Returns a single payee location

Example

// Import classes:
//import ynab.client.invoker.ApiClient;
//import ynab.client.invoker.ApiException;
//import ynab.client.invoker.Configuration;
//import ynab.client.invoker.auth.*;
//import ynab.client.api.PayeeLocationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearer
ApiKeyAuth bearer = (ApiKeyAuth) defaultClient.getAuthentication("bearer");
bearer.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.setApiKeyPrefix("Token");

PayeeLocationsApi apiInstance = new PayeeLocationsApi();
UUID budgetId = new UUID(); // UUID | The ID of the Budget.
UUID payeeLocationId = new UUID(); // UUID | ID of payee location
try {
    PayeeLocationResponse result = apiInstance.getPayeeLocationById(budgetId, payeeLocationId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PayeeLocationsApi#getPayeeLocationById");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
budgetId UUID The ID of the Budget.
payeeLocationId UUID ID of payee location

Return type

PayeeLocationResponse

Authorization

bearer

HTTP request headers

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

getPayeeLocations

PayeeLocationsResponse getPayeeLocations(budgetId)

List payee locations

Returns all payee locations

Example

// Import classes:
//import ynab.client.invoker.ApiClient;
//import ynab.client.invoker.ApiException;
//import ynab.client.invoker.Configuration;
//import ynab.client.invoker.auth.*;
//import ynab.client.api.PayeeLocationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearer
ApiKeyAuth bearer = (ApiKeyAuth) defaultClient.getAuthentication("bearer");
bearer.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.setApiKeyPrefix("Token");

PayeeLocationsApi apiInstance = new PayeeLocationsApi();
UUID budgetId = new UUID(); // UUID | The ID of the Budget.
try {
    PayeeLocationsResponse result = apiInstance.getPayeeLocations(budgetId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PayeeLocationsApi#getPayeeLocations");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
budgetId UUID The ID of the Budget.

Return type

PayeeLocationsResponse

Authorization

bearer

HTTP request headers

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

getPayeeLocationsByPayee

PayeeLocationsResponse getPayeeLocationsByPayee(budgetId, payeeId)

List locations for a payee

Returns all payee locations for the specified payee

Example

// Import classes:
//import ynab.client.invoker.ApiClient;
//import ynab.client.invoker.ApiException;
//import ynab.client.invoker.Configuration;
//import ynab.client.invoker.auth.*;
//import ynab.client.api.PayeeLocationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearer
ApiKeyAuth bearer = (ApiKeyAuth) defaultClient.getAuthentication("bearer");
bearer.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.setApiKeyPrefix("Token");

PayeeLocationsApi apiInstance = new PayeeLocationsApi();
UUID budgetId = new UUID(); // UUID | The ID of the Budget.
UUID payeeId = new UUID(); // UUID | ID of payee
try {
    PayeeLocationsResponse result = apiInstance.getPayeeLocationsByPayee(budgetId, payeeId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PayeeLocationsApi#getPayeeLocationsByPayee");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
budgetId UUID The ID of the Budget.
payeeId UUID ID of payee

Return type

PayeeLocationsResponse

Authorization

bearer

HTTP request headers

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