Documentation
Overview ¶
Package payee implements payee entities and services
Index ¶
- type Location
- type Payee
- type Service
- func (s *Service) GetPayee(budgetID, payeeID string) (*Payee, error)
- func (s *Service) GetPayeeLocation(budgetID, payeeLocationID string) (*Location, error)
- func (s *Service) GetPayeeLocations(budgetID string) ([]*Location, error)
- func (s *Service) GetPayeeLocationsByPayee(budgetID, payeeID string) ([]*Location, error)
- func (s *Service) GetPayees(budgetID string) ([]*Payee, error)
Examples ¶
Constants ¶
Variables ¶
Functions ¶
Types ¶
type Location ¶
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 ¶
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 Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service wraps YNAB payee API endpoints
func NewService ¶
func NewService(c api.ClientReader) *Service
NewService facilitates the creation of a new payee service instance
func (*Service) GetPayee ¶
GetPayee fetches a specific payee from a budget https://api.youneedabudget.com/v1#/Payees/getPayeeById
func (*Service) GetPayeeLocation ¶
GetPayeeLocation fetches a specific payee location from a budget https://api.youneedabudget.com/v1#/Payee_Locations/getPayeeLocationById
func (*Service) GetPayeeLocations ¶
GetPayeeLocations fetches the list of payee locations from a budget https://api.youneedabudget.com/v1#/Payee_Locations/getPayeeLocations
func (*Service) GetPayeeLocationsByPayee ¶
GetPayeeLocationsByPayee fetches the list of locations of a specific payee from a budget https://api.youneedabudget.com/v1#/Payee_Locations/getPayeeLocationsByPayee