Documentation
¶
Index ¶
- Constants
- func New(httpClient *http.Client, opts ...Option) *client
- func UnmarshalError(status int, body []byte) error
- type Account
- type AccountID
- type CategoryID
- type Client
- type CounterPartyID
- type Direction
- type Error
- type ErrorMessage
- type FeedItem
- type FeedItemID
- type FetchTransactionOptions
- type Option
- type RoundUp
- type SavingsGoal
- type SavingsGoalID
- type Status
Constants ¶
View Source
const ( DirectionIN Direction = "IN" DirectionOUT Direction = "OUT" StatusUpcoming Status = "UPCOMING" StatusUpcomingCancelled Status = "UPCOMING_CANCELLED" StatusPending Status = "PENDING" StatusReversed Status = "REVERSED" StatusSettled Status = "SETTLED" StatusDeclined Status = "DECLINED" StatusRefunded Status = "REFUNDED" StatusRetrying Status = "RETRYING" StatusAccountCheck Status = "ACCOUNT_CHECK" )
Variables ¶
This section is empty.
Functions ¶
func UnmarshalError ¶
Types ¶
type AccountID ¶
func (*AccountID) UnmarshalJSON ¶
type CategoryID ¶
func (CategoryID) String ¶
func (c CategoryID) String() string
func (*CategoryID) UnmarshalJSON ¶
func (c *CategoryID) UnmarshalJSON(data []byte) error
type Client ¶
type Client interface {
FetchTransactionsSince(ctx context.Context, opts FetchTransactionOptions) ([]*FeedItem, error)
FetchFeedItem(ctx context.Context, accountID AccountID, categoryID CategoryID, feedItemID FeedItemID) (*FeedItem, error)
FetchAccounts(ctx context.Context) ([]*Account, error)
FetchSavingsGoals(ctx context.Context, accountID AccountID) ([]*SavingsGoal, error)
}
type CounterPartyID ¶
func (CounterPartyID) String ¶
func (c CounterPartyID) String() string
func (*CounterPartyID) UnmarshalJSON ¶
func (c *CounterPartyID) UnmarshalJSON(data []byte) error
type Error ¶
type Error struct {
HTTPStatus int
Code string `json:"error"`
Message string `json:"error_description"`
Success bool `json:"success"`
ErrorMessages []ErrorMessage `json:"errors"`
}
type ErrorMessage ¶
type ErrorMessage struct {
Message string `json:"message"`
}
type FeedItem ¶
type FeedItem struct {
ID FeedItemID `json:"feedItemUid"`
Amount domain.Money `json:"amount"` // Amount in the account's currency
TransactedAt time.Time `json:"transactionTime"`
SettledAt *time.Time `json:"settlementTime"`
CategoryID CategoryID `json:"categoryUid"`
CategoryName string `json:"spendingCategory"`
Description string `json:"reference"`
Status Status `json:"status"`
UserNote string `json:"userNote"`
Direction Direction `json:"direction"` // Direction of payment, e.g. IN or OUT
Source string `json:"source"` // e.g. MASTED_CARD
SourceSubType string `json:"sourceSubType"` // e.g. Online, ATM, Deposit
CounterPartyType string `json:"counterPartyType"` // e.g. STARLING, MERCHANT
CounterPartyID CounterPartyID `json:"counterPartyUid"`
CounterPartySubEntityID string `json:"counterPartySubEntityUid"`
CounterPartyName string `json:"counterPartyName"`
RoundUp *RoundUp `json:"roundUp"`
}
type FeedItemID ¶
func (FeedItemID) String ¶
func (f FeedItemID) String() string
func (*FeedItemID) UnmarshalJSON ¶
func (f *FeedItemID) UnmarshalJSON(data []byte) error
type FetchTransactionOptions ¶
type RoundUp ¶
type RoundUp struct {
GoalCategoryID CategoryID `json:"goalCategoryUid"`
Amount domain.Money `json:"amount"`
}
type SavingsGoal ¶
type SavingsGoalID ¶
func (SavingsGoalID) String ¶
func (s SavingsGoalID) String() string
func (*SavingsGoalID) UnmarshalJSON ¶
func (s *SavingsGoalID) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.