do not export what's not required

This commit is contained in:
2024-03-23 19:00:30 -06:00
parent 92a6246052
commit e35f0ef659
2 changed files with 16 additions and 16 deletions

View File

@@ -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)
}