Documentation ¶
Index ¶
- Constants
- func AccountEndpoint(a string, endpoint string) string
- func BaseEndpoint(endpoint string) string
- type Account
- type AccountHolder
- type AccountHolderName
- type AccountIdentifier
- type AccountIdentifiers
- type Accounts
- type Address
- type Addresses
- type Amount
- type AssociatedFeedRoundUp
- type Balance
- type BatchPaymentDetails
- type Card
- type Cards
- type Client
- func (c *Client) GetAccountBalance(a *Account) (Balance, error)
- func (c *Client) GetAccountHolder() (AccountHolder, error)
- func (c *Client) GetAccountHolderName() (AccountHolderName, error)
- func (c *Client) GetAccountIdentifiers(a *Account) (AccountIdentifiers, error)
- func (c *Client) GetAccounts() ([]Account, error)
- func (c *Client) GetAddresses() (Addresses, error)
- func (c *Client) GetCards() ([]Card, error)
- func (c *Client) GetConfirmationOfFunds(a *Account, amountMinorUnits int64) (ConfirmationOfFunds, error)
- func (c *Client) GetDirectDebitMandates() ([]DirectDebitMandate, error)
- func (c *Client) GetFeedItems(a *Account, t0 time.Time) ([]FeedItem, error)
- func (c *Client) GetRecurringPayments(a *Account) ([]RecurringCardPayment, error)
- func (c *Client) GetSpaces(a *Account) (Spaces, error)
- func (c *Client) Request(method string, url string, body string) (val []byte, err error)
- func (c *Client) UpdateUserNote(a *Account, categoryUid string, itemUid string, note string) error
- type ConfirmationOfFunds
- type Currency
- type CurrencyAndAmount
- type CurrencyFlag
- type DateOnly
- type DateTime
- type DirectDebitMandate
- type DirectDebitMandates
- type ErrorResponse
- type FeedItem
- type FeedItems
- type JointAccount
- type LastPayment
- type NextPayment
- type RecurrenceRule
- type RecurringCardPayment
- type RecurringCardPayments
- type SavingGoalOrdered
- type ScheduleSavingPayment
- type ScheduledPayment
- type ScheduledPaymentResponse
- type SignedCurrencyAndAmount
- type Spaces
- type SpendingSpace
- type StandingOrder
- type StandingOrderRecurrence
Constants ¶
View Source
const ( BaseUrlProd = "https://api.starlingbank.com/api/v2" // BaseUrlSb = "https://api-sandbox.starlingbank.com/api/v2" AccountHolderEndpoint = "account-holder" AccountsEndpoint = "accounts" AddressesEndpoint = "addresses" BalanceEndpoint = "balance" ConfirmationOfFundsEndpoint = "confirmation-of-funds" IdentifiersEndpoint = "identifiers" CardsEndpoint = "cards" DirectDebitsEndpoint = "direct-debit/mandates" RecurringPaymentsEndpoint = "recurring-payment" SpacesEndpoint = "spaces" )
View Source
const ( DateTimeFormat = "2006-01-02T15:04:05Z" DateOnlyFormat = "2006-01-02" )
View Source
const RateLimit = 5
RateLimit because PAT has a rate limit of 5 requests per second
Variables ¶
This section is empty.
Functions ¶
func AccountEndpoint ¶
func BaseEndpoint ¶
Types ¶
type AccountHolder ¶
type AccountHolderName ¶
type AccountHolderName struct {
AccountHolderName string `json:"accountHolderName"`
}
type AccountIdentifier ¶
type AccountIdentifiers ¶
type AccountIdentifiers struct { AccountIdentifier string `json:"accountIdentifier"` BankIdentifier string `json:"bankIdentifier"` IBAN string `json:"iban"` BIC string `json:"bic"` AccountIdentifiers []AccountIdentifier `json:"accountIdentifiers"` }
type AssociatedFeedRoundUp ¶
type AssociatedFeedRoundUp struct { GoalCategoryUid string `json:"goalCategoryUid"` Amount CurrencyAndAmount `json:"amount"` }
type Balance ¶
type Balance struct { ClearedBalance SignedCurrencyAndAmount `json:"clearedBalance"` EffectiveBalance SignedCurrencyAndAmount `json:"effectiveBalance"` PendingTransactions SignedCurrencyAndAmount `json:"pendingTransactions"` AcceptedOverdraft SignedCurrencyAndAmount `json:"acceptedOverdraft"` Amount SignedCurrencyAndAmount `json:"amount"` TotalClearedBalance SignedCurrencyAndAmount `json:"totalClearedBalance"` TotalEffectiveBalance SignedCurrencyAndAmount `json:"totalEffectiveBalance"` }
type BatchPaymentDetails ¶
type Card ¶
type Card struct { CardUid string `json:"cardUid"` PublicToken string `json:"publicToken"` Enabled bool `json:"enabled"` WalletNotificationEnabled bool `json:"walletNotificationEnabled"` POSEnabled bool `json:"posEnabled"` ATMEnabled bool `json:"atmEnabled"` OnlineEnabled bool `json:"onlineEnabled"` MobileWalletEnabled bool `json:"mobileWalletEnabled"` GamblingEnabled bool `json:"gamblingEnabled"` MagStripeEnabled bool `json:"magStripeEnabled"` Cancelled bool `json:"cancelled"` ActivationRequested bool `json:"activationRequested"` Activated bool `json:"activated"` EndOfCardNumber string `json:"endOfCardNumber"` CurrencyFlags []CurrencyFlag `json:"currencyFlag"` CardAssociationUid string `json:"cardAssociationUid"` GamblingToBeEnabledAt string `json:"gamblingToBeEnabledAt"` }
type Client ¶
type Client struct {
Token string
}
func (*Client) GetAccountHolder ¶
func (c *Client) GetAccountHolder() (AccountHolder, error)
func (*Client) GetAccountHolderName ¶
func (c *Client) GetAccountHolderName() (AccountHolderName, error)
func (*Client) GetAccountIdentifiers ¶
func (c *Client) GetAccountIdentifiers(a *Account) (AccountIdentifiers, error)
func (*Client) GetAccounts ¶
func (*Client) GetAddresses ¶
func (*Client) GetConfirmationOfFunds ¶
func (c *Client) GetConfirmationOfFunds(a *Account, amountMinorUnits int64) (ConfirmationOfFunds, error)
func (*Client) GetDirectDebitMandates ¶
func (c *Client) GetDirectDebitMandates() ([]DirectDebitMandate, error)
func (*Client) GetFeedItems ¶
func (*Client) GetRecurringPayments ¶
func (c *Client) GetRecurringPayments(a *Account) ([]RecurringCardPayment, error)
type ConfirmationOfFunds ¶
type Currency ¶
func (*Currency) UnmarshalJSON ¶
type CurrencyAndAmount ¶
type CurrencyFlag ¶
type DateOnly ¶
func (*DateOnly) UnmarshalJSON ¶
type DateTime ¶
func (*DateTime) UnmarshalJSON ¶
type DirectDebitMandate ¶
type DirectDebitMandate struct { UID string `json:"uid"` Reference string `json:"reference"` Status string `json:"status"` Source string `json:"source"` Created DateTime `json:"created"` Cancelled DateTime `json:"cancelled"` LastDate DateOnly `json:"lastDate"` OriginatorName string `json:"originatorName"` OriginatorUID string `json:"originatorUid"` MerchantUID string `json:"merchantUid"` LastPayment LastPayment `json:"lastPayment"` AccountUID string `json:"accountUid"` CategoryUID string `json:"categoryUid"` }
type DirectDebitMandates ¶
type DirectDebitMandates struct {
Mandates []DirectDebitMandate `json:"mandates"`
}
type ErrorResponse ¶
type FeedItem ¶
type FeedItem struct { FeedItemUID string `json:"feedItemUid"` CategoryUID string `json:"categoryUid"` Amount CurrencyAndAmount `json:"amount"` SourceAmount CurrencyAndAmount `json:"sourceAmount"` Direction string `json:"direction"` UpdatedAt DateTime `json:"updatedAt"` TransactionTime DateTime `json:"transactionTime"` SettlementTime DateTime `json:"settlementTime"` RetryAllocationUntilTime DateTime `json:"retryAllocationUntilTime"` Source string `json:"source"` SourceSubType string `json:"sourceSubType"` Status string `json:"status"` TransactingApplicationUserUID string `json:"transactingApplicationUserUid"` CounterPartyType string `json:"counterPartyType"` CounterPartyUID string `json:"counterPartyUid"` CounterPartyName string `json:"counterPartyName"` CounterPartySubEntityUID string `json:"counterPartySubEntityUid"` CounterPartySubEntityName string `json:"counterPartySubEntityName"` CounterPartySubEntityIdentifier string `json:"counterPartySubEntityIdentifier"` CounterPartySubEntitySubIdentifier string `json:"counterPartySubEntitySubIdentifier"` ExchangeRate float64 `json:"exchangeRate"` TotalFees float64 `json:"totalFees"` TotalFeeAmount CurrencyAndAmount `json:"totalFeeAmount"` Reference string `json:"reference"` Country string `json:"country"` SpendingCategory string `json:"spendingCategory"` UserNote string `json:"userNote"` RoundUp AssociatedFeedRoundUp `json:"roundUp"` HasAttachment bool `json:"hasAttachment"` HasReceipt bool `json:"hasReceipt"` BatchPaymentDetails BatchPaymentDetails `json:"batchPaymentDetails"` }
type JointAccount ¶
type JointAccount struct { AccountHolderUid string `json:"accountHolderUid"` PersonOne struct { Title string `json:"title"` FirstName string `json:"firstName"` LastName string `json:"lastName"` DateOfBirth string `json:"dateOfBirth"` Email string `json:"email"` Phone string `json:"phone"` } `json:"personOne"` PersonTwo struct { Title string `json:"title"` FirstName string `json:"firstName"` LastName string `json:"lastName"` DateOfBirth string `json:"dateOfBirth"` Email string `json:"email"` Phone string `json:"phone"` } `json:"personTwo"` }
type LastPayment ¶
type LastPayment struct { LastDate DateOnly `json:"lastDate"` LastAmount CurrencyAndAmount `json:"lastAmount"` }
type NextPayment ¶
type RecurrenceRule ¶
type RecurrenceRule struct { StartDate string `json:"startDate"` Frequency string `json:"frequency"` Interval int `json:"interval"` Count int `json:"count"` UntilDate string `json:"untilDate"` WeekStart string `json:"weekStart"` Days []string `json:"days"` MonthDay int `json:"monthDay"` MonthWeek int `json:"monthWeek"` }
type RecurringCardPayment ¶
type RecurringCardPayment struct { FeedItemUID string `json:"feedItemUid"` RecurringPaymentUID string `json:"recurringPaymentUid"` AccountUID string `json:"accountUid"` CounterPartyUID string `json:"counterPartyUid"` CounterPartyName string `json:"counterPartyName"` Status string `json:"status"` LatestFeedItemUID string `json:"latestFeedItemUid"` LatestPaymentDate string `json:"latestPaymentDate"` LatestPaymentAmount CurrencyAndAmount `json:"latestPaymentAmount"` }
type RecurringCardPayments ¶
type RecurringCardPayments struct {
RecurringPayments []RecurringCardPayment `json:"recurringPayments"`
}
type SavingGoalOrdered ¶
type SavingGoalOrdered struct { SavingGoalUID string `json:"savingsGoalUid"` Name string `json:"name"` Target CurrencyAndAmount `json:"target"` TotalSaved CurrencyAndAmount `json:"totalSaved"` SavedPercentage int `json:"savedPercentage"` SortOrder int `json:"sortOrder"` State string `json:"state"` }
type ScheduleSavingPayment ¶
type ScheduleSavingPayment struct { TransferUid string `json:"transferUid"` RecurrenceRule RecurrenceRule `json:"recurrenceRule"` CurrencyAndAmount CurrencyAndAmount `json:"currencyAndAmount"` NextPaymentDate string `json:"nextPaymentDate"` }
type ScheduledPayment ¶
type ScheduledPayment struct { AccountHolderUid string `json:"accountHolderUid"` PaymentOrderUid string `json:"paymentOrderUid"` CategoryUid string `json:"categoryUid"` NextPaymentAmount NextPayment `json:"nextPaymentAmount"` Reference string `json:"reference"` PayeeUid string `json:"payeeUid"` PayeeAccountUid string `json:"payeeAccountUid"` RecipientName string `json:"recipientName"` RecurrenceRule RecurrenceRule `json:"recurrenceRule"` StartDate string `json:"startDate"` NextDate string `json:"nextDate"` EndDate string `json:"endDate"` PaymentType string `json:"paymentType"` SpendingCategory string `json:"spendingCategory"` }
type ScheduledPaymentResponse ¶
type ScheduledPaymentResponse struct {
ScheduledPayments []ScheduledPayment `json:"scheduledPayments"`
}
type SignedCurrencyAndAmount ¶
type Spaces ¶
type Spaces struct { SavingGoals []SavingGoalOrdered `json:"savingGoals"` SpendingSpaces []SpendingSpace `json:"spendingSpaces"` }
type SpendingSpace ¶
type StandingOrder ¶
type StandingOrder struct { Description string `json:"description"` PaymentOrderUid string `json:"paymentOrderUid"` Amount CurrencyAndAmount `json:"amount"` Reference string `json:"reference"` PayeeUid string `json:"payeeUid"` PayeeAccountUid string `json:"payeeAccountUid"` StandingOrderRecurrence StandingOrderRecurrence `json:"standingOrderRecurrence"` NextDate string `json:"nextDate"` CancelledAt string `json:"cancelledAt"` UpdatedAt string `json:"updatedAt"` SpendingCategory string `json:"spendingCategory"` CategoryUid string `json:"categoryUid"` }
Source Files ¶
- accounts.go
- addresses.go
- balances.go
- cards.go
- confirmation_of_funds.go
- direct_debits.go
- endpoints.go
- errors.go
- feed_items.go
- http_client.go
- main.go
- monetary.go
- notes.go
- payees.go
- payments.go
- receipts.go
- recurring_payments.go
- scheduled_payments.go
- spaces.go
- standing_orders.go
- timestamps.go
- withdrawals.go
Click to show internal directories.
Click to hide internal directories.