do not export what's not required
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
// Reference: https://api.ynab.com/v1#/Accounts/
|
||||
|
||||
type Accounts struct {
|
||||
type accounts struct {
|
||||
Data struct {
|
||||
Account struct {
|
||||
ID string `json:"id"`
|
||||
@@ -29,8 +29,8 @@ type Accounts struct {
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
func (c *Client) GetAccount(accountID string) (*Accounts, error) {
|
||||
response := Accounts{}
|
||||
func (c *Client) getAccount(accountID string) (*accounts, error) {
|
||||
response := accounts{}
|
||||
|
||||
err := c.get(fmt.Sprintf("/accounts/%s", accountID), &response, url.Values{})
|
||||
if err != nil {
|
||||
@@ -49,7 +49,7 @@ func (c *Client) SetAccountBalance(accountID string, balance int) error {
|
||||
return fmt.Errorf("failed to get ynab capital gains transaction ID: %v", err)
|
||||
}
|
||||
|
||||
ynabAccount, err := c.GetAccount(accountID)
|
||||
ynabAccount, err := c.getAccount(accountID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get ynab account with id '%s': %v", accountID, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user