Documentation ¶
Index ¶
- type Card
- type CardGrants
- type CardHolder
- type CardImageDetails
- type CardLinks
- type CardListOptions
- type CardStatus
- type CardSwitch
- type CardType
- type Client
- func (client *Client) Do(ctx context.Context, request *http.Request, responseBody interface{}) (*http.Response, error)
- func (client *Client) GetUser(ctx context.Context) (*User, error)
- func (client *Client) ListAllTransactions(ctx context.Context, card string) ([]Transaction, error)
- func (client *Client) ListAllTransactionsOpts(ctx context.Context, card string, listOptions ListOptions) ([]Transaction, error)
- func (client *Client) ListCards(ctx context.Context, cardListOptions CardListOptions) (*[]Card, error)
- func (client *Client) ListTransactions(ctx context.Context, card string, listOptions ListOptions) (*Transactions, error)
- func (client *Client) NewRequest(path string, method string, requestBody interface{}) (*http.Request, error)
- type ListOptions
- type MockedVisecaAPI
- type PFMCategory
- type Transaction
- type TransactionLinks
- type Transactions
- type User
- type VisecaAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Card ¶ added in v0.2.0
type Card struct { ID string `json:"cardId"` CardSwitch CardSwitch `json:"switch"` MaskedCardNumber string `json:"maskedCardNumber"` CardAccountNr string `json:"cardAccountNr"` CardHolder CardHolder `json:"cardHolder"` CardStatus CardStatus `json:"cardStatus"` CardName string `json:"cardName"` CardDescription string `json:"cardDescription"` ExpirationDate string `json:"expirationDate"` ProductType string `json:"productType"` ProductLine string `json:"productLine"` CreditIndicator string `json:"creditIndicator"` AvailableReplacementReasons []string `json:"availableReplacementReasons"` BonusProgram []string `json:"bonusProgram"` MainBonusProgram string `json:"mainBonusProgram"` Currency string `json:"currency"` CardLimit float32 `json:"cardLimit"` ActiveCurrency string `json:"activeCurrency"` ActiveLimit float32 `json:"activeLimit"` IsSelfIssued bool `json:"isSelfIssued"` CardScheme string `json:"cardScheme"` EmbossingLine string `json:"embossingLine"` CardType CardType `json:"cardType"` CallCenter string `json:"callCenter"` CardImageDetails CardImageDetails `json:"cardImageDetails"` CardLinks CardLinks `json:"links"` CardGrants CardGrants `json:"grants"` }
type CardGrants ¶ added in v0.2.0
type CardGrants struct { CanSurprizeRead bool `json:"canSurprizeRead"` CanAccountDetailsRead bool `json:"canAccountDetailsRead"` CanStatementSettingsRead bool `json:"canStatementSettingsRead"` CanStatementSettingsUpdate bool `json:"canStatementSettingsUpdate"` CanStatementDetailRead bool `json:"canStatementDetailRead"` CanTransactionNotificationRead bool `json:"canTransactionNotificationRead"` CanTransactionNotificationUpdate bool `json:"canTransactionNotificationUpdate"` CanMasterpassRead bool `json:"canMasterpassRead"` CanMasterpassUpdate bool `json:"canMasterpassUpdate"` CanCardFreeze bool `json:"canCardFreeze"` CanCardPINRequest bool `json:"canCardPINRequest"` CanSmsSettingsRead bool `json:"canSmsSettingsRead"` CanSmsSettingsUpdate bool `json:"canSmsSettingsUpdate"` CanReplaceCard bool `json:"canReplaceCard"` CanCardControlsRead bool `json:"canCardControlsRead"` CanCardControlsUpdate bool `json:"canCardControlsUpdate"` CanCouponsRead bool `json:"canCouponsRead"` CanPanCvvPinRead bool `json:"canPanCvvPinRead"` }
type CardHolder ¶ added in v0.2.0
type CardImageDetails ¶ added in v0.2.0
type CardImageDetails struct { URL string `json:"url"` TemplateName string `json:"templateName"` Category string `json:"category"` Status string `json:"status"` DenialReason string `json:"denialReason"` ReplacementAvailability string `json:"replacementAvailability"` UploadContext string `json:"uploadContext"` LastStatusUpdate string `json:"lastStatusUpdate"` }
type CardListOptions ¶ added in v0.2.0
type CardListOptions struct {
CreditIndicators []string
}
CardListOptions known CreditIndicators are "credit" and "debit".
func NewDefaultCardListOptions ¶ added in v0.2.0
func NewDefaultCardListOptions() CardListOptions
NewDefaultCardListOptions creates new default CardListOptions.
type CardStatus ¶ added in v0.2.0
type CardSwitch ¶ added in v0.2.0
type CardSwitch struct {
Reason string `json:"reason"`
}
type Client ¶
Client represents an API client.
func (*Client) Do ¶
func (client *Client) Do(ctx context.Context, request *http.Request, responseBody interface{}) (*http.Response, error)
Do returns the HTTP response and decodes the JSON response body into responseBody.
func (*Client) ListAllTransactions ¶
ListAllTransactions lists all transactions for the given card.
func (*Client) ListAllTransactionsOpts ¶
func (client *Client) ListAllTransactionsOpts(ctx context.Context, card string, listOptions ListOptions) ([]Transaction, error)
ListAllTransactions lists all transactions for the given card and options.
func (*Client) ListCards ¶ added in v0.2.0
func (client *Client) ListCards(ctx context.Context, cardListOptions CardListOptions) (*[]Card, error)
ListCards returns all cards for the given CardListOptions.
func (*Client) ListTransactions ¶
func (client *Client) ListTransactions(ctx context.Context, card string, listOptions ListOptions) (*Transactions, error)
ListTransactions returns the transactions for the given card and listOptions.
type ListOptions ¶
type ListOptions struct { Offset int PageSize int StateType string DateTo time.Time DateFrom time.Time }
ListOptions holds the options for list actions.
func NewDefaultListOptions ¶
func NewDefaultListOptions() ListOptions
NewDefaultListOptions creates new default ListOptions.
type MockedVisecaAPI ¶
func (*MockedVisecaAPI) ListAllTransactions ¶
func (m *MockedVisecaAPI) ListAllTransactions(ctx context.Context, card string, listOptions ListOptions) (*Transactions, error)
type PFMCategory ¶
type Transaction ¶
type Transaction struct { TransactionID string `json:"transactionId"` CardID string `json:"cardId"` MaskedCardNumber string `json:"maskedCardNumber"` CardName string `json:"cardName"` Date string `json:"date"` ShowTimestamp bool `json:"showTimestamp"` Amount float64 `json:"amount"` Currency string `json:"currency"` OriginalAmount float64 `json:"originalAmount"` OriginalCurrency string `json:"originalCurrency"` MerchantName string `json:"merchantName"` PrettyName string `json:"prettyName"` MerchantPlace string `json:"merchantPlace"` IsOnline bool `json:"isOnline"` PFMCategory PFMCategory `json:"pfmCategory"` StateType string `json:"stateType"` Details string `json:"details"` Type string `json:"type"` IsBilled bool `json:"isBilled"` Links TransactionLinks `json:"links"` }
type TransactionLinks ¶
type TransactionLinks struct {
Transactiondetails string `json:"transactiondetails"`
}
type Transactions ¶
type Transactions struct { TotalCount int `json:"totalCount"` Transactions []Transaction `json:"list"` }
type User ¶ added in v0.2.0
type User struct { VisecaOneID string `json:"visecaOneId"` Email string `json:"email"` EmailStatus string `json:"emailStatus"` Language string `json:"language"` FirstName string `json:"firstName"` LastName string `json:"lastName"` Gender string `json:"gender"` MaskedPhoneNumber string `json:"maskedPhoneNumber"` LastLoginDate string `json:"lastLoginDate"` LastLogoutType string `json:"lastLogoutType"` DefaultChannelType string `json:"defaultChannelType"` AppDescription string `json:"appDescription"` AppRegistrationDate string `json:"appRegistrationDate"` }
type VisecaAPI ¶
type VisecaAPI interface { // ListTransactions returns the transactions for the given card. ListTransactions(ctx context.Context, card string, listOptions ListOptions) (*Transactions, error) }
VisecaAPI provides an interface to a subset of the Viseca API