/
entity.go
33 lines (28 loc) · 1.26 KB
/
entity.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (c) 2018, Bruno M V Souza <github@b.bmvs.io>. All rights reserved.
// Use of this source code is governed by a BSD-2-Clause license that can be
// found in the LICENSE file.
// Package payee implements payee entities and services
package payee // import "go.bmvs.io/ynab/api/payee"
// Payee represents a payee for a budget
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"`
}
// 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 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"`
}