ynab: go.bmvs.io/ynab/api/payee Index | Examples | Files

package payee

import "go.bmvs.io/ynab/api/payee"

Package payee implements payee entities and services



Package Files

entity.go service.go

type Location Uses

type Location struct {
    ID      string `json:"id"`
    PayeeID string `json:"payee_id"`
    // Deleted Deleted payees will only be included in delta requests
    Deleted bool `json:"deleted"`

    Latitude  *float64 `json:"latitude,string"`
    Longitude *float64 `json:"longitude,string"`

Location represents a location for a payee When a transaction is saved with an specified payee on the YNAB mobile apps, the GPS coordinates for that location are stored, so that the next time the user is in the same place (like the Grocery store) YNAB can pre-populate nearby payees for you. Locations will not be available for all payees.

type Payee Uses

type Payee struct {
    ID   string `json:"id"`
    Name string `json:"name"`
    // Deleted Deleted payees will only be included in delta requests
    Deleted bool `json:"deleted"`

    // TransferAccountID If a transfer payee, the account_id to which this
    // payee transfers to
    TransferAccountID *string `json:"transfer_account_id"`

Payee represents a payee for a budget

type SearchResultSnapshot Uses

type SearchResultSnapshot struct {
    Payees          []*Payee
    ServerKnowledge uint64

SearchResultSnapshot represents a versioned snapshot for a payee search

type Service Uses

type Service struct {
    // contains filtered or unexported fields

Service wraps YNAB payee API endpoints

func NewService Uses

func NewService(c api.ClientReader) *Service

NewService facilitates the creation of a new payee service instance

func (*Service) GetPayee Uses

func (s *Service) GetPayee(budgetID, payeeID string) (*Payee, error)

GetPayee fetches a specific payee from a budget https://api.youneedabudget.com/v1#/Payees/getPayeeById


c := ynab.NewClient("<valid_ynab_access_token>")
p, _ := c.Payee().GetPayee("<valid_budget_id>", "<valid_payee_id>")



func (*Service) GetPayeeLocation Uses

func (s *Service) GetPayeeLocation(budgetID, payeeLocationID string) (*Location, error)

GetPayeeLocation fetches a specific payee location from a budget https://api.youneedabudget.com/v1#/Payee_Locations/getPayeeLocationById


c := ynab.NewClient("<valid_ynab_access_token>")
l, _ := c.Payee().GetPayeeLocation("<valid_budget_id>", "<valid_payee_location_id>")



func (*Service) GetPayeeLocations Uses

func (s *Service) GetPayeeLocations(budgetID string) ([]*Location, error)

GetPayeeLocations fetches the list of payee locations from a budget https://api.youneedabudget.com/v1#/Payee_Locations/getPayeeLocations


c := ynab.NewClient("<valid_ynab_access_token>")
locations, _ := c.Payee().GetPayeeLocations("<valid_budget_id>")



func (*Service) GetPayeeLocationsByPayee Uses

func (s *Service) GetPayeeLocationsByPayee(budgetID, payeeID string) ([]*Location, error)

GetPayeeLocationsByPayee fetches the list of locations of a specific payee from a budget https://api.youneedabudget.com/v1#/Payee_Locations/getPayeeLocationsByPayee


c := ynab.NewClient("<valid_ynab_access_token>")
locations, _ := c.Payee().GetPayeeLocationsByPayee("<valid_budget_id>", "<valid_payee_id>")



func (*Service) GetPayees Uses

func (s *Service) GetPayees(budgetID string, f *api.Filter) (*SearchResultSnapshot, error)

GetPayees fetches the list of payees from a budget https://api.youneedabudget.com/v1#/Payees/getPayees


c := ynab.NewClient("<valid_ynab_access_token>")
f := &api.Filter{LastKnowledgeOfServer: 10}
payees, _ := c.Payee().GetPayees("<valid_budget_id>", f)



Package payee imports 2 packages (graph) and is imported by 2 packages. Updated 2019-03-11. Refresh now. Tools for package owners.