Update comments
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Steven Polley 2023-11-12 13:06:39 -07:00
parent c139d7b713
commit 1ca36eaba9

View File

@ -31,7 +31,7 @@ type BaseTransaction struct {
Deleted bool `json:"deleted,omitempty"`
}
// Used for single transaction requests / responses
// Used for single transaction responses
type Transaction struct {
Data struct {
TransactionIDs []string `json:"transaction_ids,omitempty"`
@ -40,6 +40,7 @@ type Transaction struct {
}
}
// Used for single transaction requests
type TransactionRequest struct {
Transaction BaseTransaction `json:"transaction,omitempty"`
}
@ -104,7 +105,7 @@ func (c *Client) CreateTodayYNABCapitalGainsTransaction(accountID string, amount
return nil
}
// Accepts a YNAB account ID and transaction amount and creates a new YNAB transaction
// Accepts a YNAB account ID, transaction ID and transaction amount and updates the YNAB transaction with the matching ID
func (c *Client) UpdateTodayYNABCapitalGainsTransaction(accountID string, transactionID string, amount int) error {
transaction := TransactionRequest{}
transaction.Transaction.AccountID = accountID