add support for bitcoin
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -70,7 +70,7 @@ func (c *Client) GetAccountTransactions(accountID string, sinceDate time.Time) (
|
||||
|
||||
// Accepts a YNAB account ID and returns the transaction ID, amount and an error for the
|
||||
// the first transaction found with Payee Name "Capital Gains or Losses"
|
||||
func (c *Client) GetTodayYnabCapitalGainsTransaction(accountID string) (string, int, error) {
|
||||
func (c *Client) getTodayYnabCapitalGainsTransaction(accountID string) (string, int, error) {
|
||||
ynabTransactions, err := c.GetAccountTransactions(accountID, time.Now())
|
||||
if err != nil {
|
||||
return "", 0, fmt.Errorf("failed to get ynab transactions: %v", err)
|
||||
@@ -87,7 +87,7 @@ func (c *Client) GetTodayYnabCapitalGainsTransaction(accountID string) (string,
|
||||
}
|
||||
|
||||
// Accepts a YNAB account ID and transaction amount and creates a new YNAB transaction
|
||||
func (c *Client) CreateTodayYNABCapitalGainsTransaction(accountID string, amount int) error {
|
||||
func (c *Client) createTodayYNABCapitalGainsTransaction(accountID string, amount int) error {
|
||||
transaction := TransactionRequest{}
|
||||
transaction.Transaction.AccountID = accountID
|
||||
transaction.Transaction.Amount = amount
|
||||
@@ -106,7 +106,7 @@ func (c *Client) CreateTodayYNABCapitalGainsTransaction(accountID string, amount
|
||||
}
|
||||
|
||||
// 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 {
|
||||
func (c *Client) updateTodayYNABCapitalGainsTransaction(accountID string, transactionID string, amount int) error {
|
||||
transaction := TransactionRequest{}
|
||||
transaction.Transaction.AccountID = accountID
|
||||
transaction.Transaction.ID = transactionID
|
||||
|
Reference in New Issue
Block a user