import "code.bankrs.com/bosgo"
Package bosgo provides a Go client for accessing the Bankrs OS API.
app.go applicationkeys.go credentials.go developer.go req.go service.go stats.go types.go user.go webhooks.go
const ( // Version is the current version of the bosgo library. Version = "0.1" // DefaultUserAgent is the default user agent header used by the bosgo library. DefaultUserAgent = "bosgo-bankrs-os-client/" + Version )
const ( SandboxAddr = "api.sandbox.bankrs.com" ProductionAddr = "api.bankrs.com" )
type Access struct { ID int64 `json:"id"` Name string `json:"name"` Enabled bool `json:"enabled"` AuthPossible bool `json:"auth_possible"` ProviderID string `json:"provider_id"` Accounts []Account `json:"accounts,omitempty"` Capabilities AccessCapabilities `json:"capabilities"` Beneficiaries []Beneficiary `json:"beneficiaries,omitempty"` ConsentExpiration time.Time `json:"consent_expiration,omitempty"` // Personal information of the user, just for this access UserInfo UserInfo `json:"user_info,omitempty"` }
type AccessCapabilities struct { RecurringTransfer RecurringTransferCapabilities `json:"recurring_transfer"` ScheduledTransfer ScheduledTransferCapabilities `json:"scheduled_transfer"` Trading bool `json:"trading"` }
type AccessesService struct {
// contains filtered or unexported fields
}
AccessesService provides access to bank access related API services.
func NewAccessesService(u *UserClient) *AccessesService
func (a *AccessesService) Add(providerID string) *AddAccessReq
func (a *AccessesService) Delete(id int64) *DeleteAccessReq
func (a *AccessesService) Get(id int64) *GetAccessReq
Get prepares and returns a request to fetch data about a bank access associated with the user.
func (a *AccessesService) List() *ListAccessesReq
func (a *AccessesService) Refresh(id int64) *RefreshAccessReq
Refresh prepares and returns a request to refresh the data for a bank access associated with the user. The request returns a job which may be used to track the progress of the refresh.
func (a *AccessesService) RefreshAll() *RefreshAllAccessesReq
RefreshAll prepares and returns a request to refresh all data for all accesses associated with the user. The request returns one job per access.
func (a *AccessesService) Update(id int64) *UpdateAccessReq
Update prepares and returns a request to update the stored answers for a bank access associated with the user.
type Account struct { ID int64 `json:"id"` ProviderID string `json:"provider_id"` BankAccessID int64 `json:"bank_access_id"` Name string `json:"name"` Type AccountType `json:"type"` Holder string `json:"holder,omitempty"` Number string `json:"number"` Balance string `json:"balance"` BalanceDate time.Time `json:"balance_date"` AvailableBalance string `json:"available_balance"` CreditLine string `json:"credit_line"` Removed bool `json:"removed"` Currency string `json:"currency"` IBAN string `json:"iban"` Alias string `json:"alias"` Capabilities AccountCapabilities `json:"capabilities"` Bin string `json:"bin"` Beneficiaries []int64 `json:"beneficiaries,omitempty"` }
type AccountCapabilities struct { AccountStatement []string `json:"account_statement"` Transfer []string `json:"transfer"` RecurringTransfer []string `json:"recurring_transfer"` }
type AccountRef struct { ProviderID string `json:"provider_id"` IBAN string `json:"iban,omitempty"` Label string `json:"label,omitempty"` Number string `json:"id,omitempty"` Type string `json:"type,omitempty"` }
const ( AccountTypeCurrent AccountType = "current" AccountTypeSavings AccountType = "savings" AccountTypeCreditCard AccountType = "creditcard" AccountTypeLoan AccountType = "loan" )
type AccountsService struct {
// contains filtered or unexported fields
}
AccountsService provides access to account related API services.
func NewAccountsService(u *UserClient) *AccountsService
func (a *AccountsService) Get(id string) *GetAccountReq
func (a *AccountsService) List() *ListAccountsReq
type AddAccessReq struct {
// contains filtered or unexported fields
}
func (r *AddAccessReq) ChallengeAnswer(answer ChallengeAnswer) *AddAccessReq
ChallengeAnswer adds an answer to one of the authorisation challenges required to complete addition of the access.
func (r *AddAccessReq) ClientID(id string) *AddAccessReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *AddAccessReq) Context(ctx context.Context) *AddAccessReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *AddAccessReq) Send() (*Job, error)
type AppClient struct { Providers *ProvidersService Users *AppUsersService IBAN *IBANService // contains filtered or unexported fields }
AppClient is a client used for interacting with services in the context of a registered application without a valid user or developer session. It is safe for concurrent use by multiple goroutines.
NewAppClient creates a new client that may be used to interact with services that require a specific application context.
func (a *AppClient) WithUserIDAndUserToken(userID, token string) *UserClient
WithUserToken creates a UserClient with the supplied user token and application ID, copying options set on the receiver.
type AppUsersService struct {
// contains filtered or unexported fields
}
AppUsersService provides access to application user related API services.
func NewAppUsersService(c *AppClient) *AppUsersService
func (a *AppUsersService) Create(username, password string) *UserCreateReq
Create returns a request that may be used to create a user with the given username and password.
func (a *AppUsersService) Login(username, password string) *UserLoginReq
Login returns a request that may be used to login a user with the given username and password.
func (a *AppUsersService) ResetPassword(username, password string) *ResetUserPasswordReq
ResetPassword prepares and returns a request to reset a user's password.
type ApplicationKey struct { Key string `json:"key,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` }
type ApplicationKeyPage struct { Keys []ApplicationKey `json:"keys,omitempty"` }
type ApplicationKeysService struct {
// contains filtered or unexported fields
}
ApplicationKeysService provides access to application key related API services that also require an authenticated developer session.
func NewApplicationKeysService(c *DevClient) *ApplicationKeysService
func (d *ApplicationKeysService) Delete(applicationKey string) *DeleteAppKeyReq
Delete returns a request that may be used to remove the specified key from application.
type ApplicationMetadata struct { ApplicationID string `json:"id,omitempty"` Label string `json:"label,omitempty"` }
type ApplicationPage struct { Applications []ApplicationMetadata `json:"applications,omitempty"` }
type ApplicationsService struct {
// contains filtered or unexported fields
}
ApplicationsService provides access to application related API services that also require an authenticated developer session.
func NewApplicationsService(c *DevClient) *ApplicationsService
func (d *ApplicationsService) Create(label string) *CreateApplicationsReq
func (d *ApplicationsService) CreateCredential(applicationID, provider string, credentials map[string]string) *CreateCredentialReq
CreateCredential returns a request that may be used to create a set of developer credentials.
func (d *ApplicationsService) CreateKey(applicationID string) *CreateAppKeyReq
func (d *ApplicationsService) Delete(applicationID string) *DeleteApplicationsReq
func (d *ApplicationsService) List() *ListApplicationsReq
func (d *ApplicationsService) ListCredentials(applicationID string) *ListCredentialsReq
ListCredentials returns a request that may be used to list all developer credentials associated with an application.
func (d *ApplicationsService) ListKeys(applicationID string) *ListAppKeysReq
func (d *ApplicationsService) ListUsers(applicationKey string) *ListDevUsersReq
func (d *ApplicationsService) ResetUsers(applicationKey string, usernames []string) *ResetDevUsersReq
ResetUsers prepares and returns a request to reset user data.
func (d *ApplicationsService) Settings(applicationID string) *GetApplicationSettingsReq
Settings prepares and returns a request to retrieve an application's configuration settings.
func (d *ApplicationsService) Update(applicationID string, label string) *UpdateApplicationReq
func (d *ApplicationsService) UpdateSettings(applicationID string) *UpdateApplicationSettingsReq
UpdateSettings prepares and returns a request to update an application's configuration settings.
func (d *ApplicationsService) UserInfo(applicationKey, id string) *DevUserInfoReq
UserInfo prepares and returns a request to lookup information about a user.
type Beneficiary struct { ID int64 `json:"id"` RemoteAcc AccountRef `json:"remote_account"` Reference string `json:"reference,omitempty"` }
type CancelRecurringTransferReq struct {
// contains filtered or unexported fields
}
func (r *CancelRecurringTransferReq) ClientID(id string) *CancelRecurringTransferReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *CancelRecurringTransferReq) Context(ctx context.Context) *CancelRecurringTransferReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *CancelRecurringTransferReq) Send() (*RecurringTransfer, error)
Send sends the request to update a money transfer.
type CancelTransferReq struct {
// contains filtered or unexported fields
}
func (r *CancelTransferReq) ClientID(id string) *CancelTransferReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *CancelTransferReq) Context(ctx context.Context) *CancelTransferReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *CancelTransferReq) Send() (*Transfer, error)
Send sends the request to update a money transfer.
type Category struct { ID int64 `json:"id"` Names map[string]string `json:"names"` Group string `json:"group"` }
type Challenge struct { NextChallenges []ChallengeField `json:"next_challenges"` LastProblems []Problem `json:"last_problems"` }
type ChallengeAnswer struct { ID string `json:"id"` Value string `json:"value"` Store bool `json:"store"` ValidUntil time.Time `json:"valid_until"` }
type ChallengeAnswerList []ChallengeAnswer
type ChallengeAnswerMap map[string]ChallengeAnswer
type ChallengeField struct { ID string `json:"id"` Description string `json:"description"` ChallengeType string `json:"type"` Previous string `json:"previous"` Stored bool `json:"stored"` Reset bool `json:"reset"` Secure bool `json:"secure"` Optional bool `json:"optional"` UnStoreable bool `json:"unstoreable"` Transient bool `json:"transient"` MinLen int `json:"minLen"` Methods []string `json:"methods"` Info map[string]string `json:"info"` }
type ChallengeSpec struct { ID string `json:"id"` Description string `json:"description"` Type ChallengeType `json:"type"` Secure bool `json:"secure"` UnStoreable bool `json:"unstoreable"` Optional bool `json:"optional"` Methods []string `json:"methods,omitempty"` Info map[string]string `json:"info,omitempty"` }
const ( ChallengeTypeAlpha ChallengeType = "alpha" ChallengeTypeNumeric ChallengeType = "numeric" ChallengeTypeAlphaNumeric ChallengeType = "alphanumeric" )
type Client struct {
// contains filtered or unexported fields
}
Client is the base client used for interacting with services that do not require authentication. Use Login to initiate a developer session. It is safe for concurrent use by multiple goroutines.
New creates a new client that will use the supplied HTTP client and connect via the specified API host address.
func (c *Client) CreateDeveloper(email, password string) *DeveloperCreateReq
CreateDeveloper prepares and returns a request to create a developer account for the Bankrs API. Sending a successful request will return a new client that allows access to services requiring a valid developer session.
func (c *Client) Login(email, password string) *DeveloperLoginReq
Login prepares and returns a request to log a developer into the Bankrs API. Sending a successful request will return a new client that allows access to services requiring a valid developer session.
func (c *Client) LostPassword(email string) *LostPasswordReq
LostPassword prepares and returns a request to start the lost password process.
func (c *Client) ResetPassword(password string, token string) *ResetPasswordReq
ResetPassword prepares and returns a request to reset a lost password.
WithApplicationKey creates an AppClient with the supplied application ID, copying options set on the receiver.
WithDeveloperToken creates a DevClient with the supplied developer token, copying options set on the receiver.
func Environment(environment string) ClientOption
Environment is a client option that may be used to set the X-Environment header used by the client.
func UserAgent(ua string) ClientOption
UserAgent is a client option that may be used to add information to the user agent header used by the client.
func WithRetryPolicy(policy RetryPolicy) ClientOption
WithRetryPolicy is a client option that may be used to set the retry policy used by the client.
type Consent struct { ID string `json:"id"` ObjectType ConsentObjectType `json:"object_type"` ObjectID string `json:"object_id"` Status ConsentStatus `json:"status"` StatusChangeTime time.Time `json:"status_change_time"` Expiration time.Time `json:"expiration"` AuthMethod ConsentAuthMethod `json:"auth_method"` AuthURL string `json:"auth_url"` AuthMessage string `json:"auth_message"` }
const ( OAuth ConsentAuthMethod = "oauth" Redirect ConsentAuthMethod = "redirect" External ConsentAuthMethod = "external" Login ConsentAuthMethod = "login" )
type ConsentGetReq struct {
// contains filtered or unexported fields
}
func (r *ConsentGetReq) ClientID(id string) *ConsentGetReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *ConsentGetReq) Context(ctx context.Context) *ConsentGetReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *ConsentGetReq) Send() (*Consent, error)
Send sends the request to get details of a consent.
const ( ObjectTypeAccess ConsentObjectType = "access" ObjectTypeTransfer ConsentObjectType = "transfer" )
const ( AwaitingAuthorisation ConsentStatus = "awaiting_authorisation" Authorised ConsentStatus = "authorised" Rejected ConsentStatus = "rejected" Revoked ConsentStatus = "revoked" Consumed ConsentStatus = "consumed" )
type ConsentsService struct {
// contains filtered or unexported fields
}
ConsentsService provides access to consent related API services.
func NewConsentsService(u *UserClient) *ConsentsService
func (j *ConsentsService) Get(id string) *ConsentGetReq
Get returns a request that may be used to get the details of a consent.
type Counterparty struct { Name string `json:"name"` Account AccountRef `json:"account,omitempty"` Merchant *Merchant `json:"merchant,omitempty"` }
type CreateAppKeyReq struct {
// contains filtered or unexported fields
}
func (r *CreateAppKeyReq) ClientID(id string) *CreateAppKeyReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *CreateAppKeyReq) Context(ctx context.Context) *CreateAppKeyReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *CreateAppKeyReq) Send() (*ApplicationKey, error)
type CreateApplicationsReq struct {
// contains filtered or unexported fields
}
func (r *CreateApplicationsReq) ClientID(id string) *CreateApplicationsReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *CreateApplicationsReq) Context(ctx context.Context) *CreateApplicationsReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *CreateApplicationsReq) Send() (*ApplicationMetadata, error)
type CreateCredentialReq struct {
// contains filtered or unexported fields
}
func (r *CreateCredentialReq) ClientID(id string) *CreateCredentialReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *CreateCredentialReq) Context(ctx context.Context) *CreateCredentialReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *CreateCredentialReq) Send() (string, error)
type CreateRecurringTransferReq struct {
// contains filtered or unexported fields
}
func (r *CreateRecurringTransferReq) ChallengeAnswer(answer ChallengeAnswer) *CreateRecurringTransferReq
ChallengeAnswer adds an answer to one of the authorisation challenges required to complete the transfer.
func (r *CreateRecurringTransferReq) ClientID(id string) *CreateRecurringTransferReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *CreateRecurringTransferReq) Context(ctx context.Context) *CreateRecurringTransferReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *CreateRecurringTransferReq) Description(s string) *CreateRecurringTransferReq
Description sets a human readable description for the transfer.
func (r *CreateRecurringTransferReq) EntryDate(date time.Time) *CreateRecurringTransferReq
EntryDate sets the desired date for the transfer to be placed. It cannot be a date in the past.
func (r *CreateRecurringTransferReq) Send() (*RecurringTransfer, error)
Send sends the request to create a money transfer.
type CreateTransferReq struct {
// contains filtered or unexported fields
}
func (r *CreateTransferReq) ChallengeAnswer(answer ChallengeAnswer) *CreateTransferReq
ChallengeAnswer adds an answer to one of the authorisation challenges required to complete the transfer.
func (r *CreateTransferReq) ClientID(id string) *CreateTransferReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *CreateTransferReq) Context(ctx context.Context) *CreateTransferReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *CreateTransferReq) Description(s string) *CreateTransferReq
Description sets a human readable description for the transfer.
func (r *CreateTransferReq) EntryDate(date time.Time) *CreateTransferReq
EntryDate sets the desired date for the transfer to be placed. It cannot be a date in the past.
func (r *CreateTransferReq) Send() (*Transfer, error)
Send sends the request to create a money transfer.
type CreateWebhookReq struct {
// contains filtered or unexported fields
}
func (r *CreateWebhookReq) ClientID(id string) *CreateWebhookReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *CreateWebhookReq) Context(ctx context.Context) *CreateWebhookReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *CreateWebhookReq) Send() (string, error)
type Credential struct { ID string `json:"id"` Provider string `json:"provider"` CreatedAt time.Time `json:"created_at"` Credentials map[string]string `json:"keys"` }
type CredentialEntry struct { ID string `json:"id"` Provider string `json:"provider"` CreatedAt time.Time `json:"created_at"` }
type CredentialProviderPage struct { Providers []CredentialProvider `json:"providers"` }
type CredentialsPage struct { Entries []CredentialEntry `json:"entries,omitempty"` }
type CredentialsService struct {
// contains filtered or unexported fields
}
CredentialsService provides access to credential related API services that also require an authenticated developer session.
func NewCredentialsService(c *DevClient) *CredentialsService
func (d *CredentialsService) Delete(credentialID string) *DeleteCredentialReq
Delete returns a request that may be used to get a delete a set of stored credentials.
func (d *CredentialsService) Get(credentialID string) *GetCredentialReq
Get returns a request that may be used to get a set of stored credentials.
func (d *CredentialsService) ListProviders() *ListCredentialProvidersReq
ListProviders returns a request that may be used to get a list of supported providers for credential sets.
func (d *CredentialsService) Update(credentialID string, credentials map[string]string) *UpdateCredentialReq
Update returns a request that may be used to update a set of stored credentials.
type DailyRequestsStats struct { Date string `json:"date"` RequestsTotal int64 `json:"requests_total"` }
type DailyTransfersStats struct { Date string `json:"date"` Out []StatsMoneyAmount `json:"out"` }
type DeleteAccessReq struct {
// contains filtered or unexported fields
}
func (r *DeleteAccessReq) ClientID(id string) *DeleteAccessReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *DeleteAccessReq) Context(ctx context.Context) *DeleteAccessReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *DeleteAccessReq) Send() (int64, error)
Send sends the request to get details of a bank access.
type DeleteAppKeyReq struct {
// contains filtered or unexported fields
}
func (r *DeleteAppKeyReq) ClientID(id string) *DeleteAppKeyReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *DeleteAppKeyReq) Context(ctx context.Context) *DeleteAppKeyReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *DeleteAppKeyReq) Send() error
type DeleteApplicationsReq struct {
// contains filtered or unexported fields
}
func (r *DeleteApplicationsReq) ClientID(id string) *DeleteApplicationsReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *DeleteApplicationsReq) Context(ctx context.Context) *DeleteApplicationsReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *DeleteApplicationsReq) Send() error
type DeleteCredentialReq struct {
// contains filtered or unexported fields
}
func (r *DeleteCredentialReq) ClientID(id string) *DeleteCredentialReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *DeleteCredentialReq) Context(ctx context.Context) *DeleteCredentialReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *DeleteCredentialReq) Send() error
type DeleteRepeatedTransactionReq struct {
// contains filtered or unexported fields
}
func (r *DeleteRepeatedTransactionReq) ChallengeAnswer(answer ChallengeAnswer) *DeleteRepeatedTransactionReq
ChallengeAnswer adds an answer to one of the authorisation challenges required to complete the deletion.
func (r *DeleteRepeatedTransactionReq) ClientID(id string) *DeleteRepeatedTransactionReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *DeleteRepeatedTransactionReq) Context(ctx context.Context) *DeleteRepeatedTransactionReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *DeleteRepeatedTransactionReq) Send() (*RecurringTransfer, error)
Send sends the request to delete a repeated transaction. It returns information about the long running recurring transfer job that may be used to track and progress the deletion. TODO: This looks wrong
type DeleteWebhookReq struct {
// contains filtered or unexported fields
}
func (r *DeleteWebhookReq) ClientID(id string) *DeleteWebhookReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *DeleteWebhookReq) Context(ctx context.Context) *DeleteWebhookReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *DeleteWebhookReq) Send() error
type DevClient struct { Applications *ApplicationsService ApplicationKeys *ApplicationKeysService Stats *StatsService Webhooks *WebhooksService Credentials *CredentialsService // contains filtered or unexported fields }
DevClient is a client used for interacting with services that require a valid developer session. It is safe for concurrent use by multiple goroutines.
NewDevClient creates a new developer client, ready to use.
func (d *DevClient) ChangePassword(old, new string) *DeveloperChangePasswordReq
ChangePassword prepares and returns a request to change a developer's password.
func (d *DevClient) Delete() *DeveloperDeleteReq
Delete prepares and returns a request to delete the developer account and all it's associated data in all environments. Once this request has been sent the client is no longer valid and should not be used.
func (d *DevClient) Logout() *DeveloperLogoutReq
Logout prepares and returns a request to log a developer out of the Bankrs API. Once this request has been sent the client is no longer valid and should not be used.
func (d *DevClient) Profile() *DeveloperProfileReq
Profile retrieves the developer's profile.
SessionToken returns the current session token.
func (d *DevClient) SetProfile(profile *DeveloperProfile) *DeveloperSetProfileReq
SetProfile sets the developer's profile.
type DevUserInfoReq struct {
// contains filtered or unexported fields
}
func (r *DevUserInfoReq) ClientID(id string) *DevUserInfoReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *DevUserInfoReq) Context(ctx context.Context) *DevUserInfoReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *DevUserInfoReq) Send() (*DevUserInfo, error)
type DeveloperChangePasswordReq struct {
// contains filtered or unexported fields
}
func (r *DeveloperChangePasswordReq) ClientID(id string) *DeveloperChangePasswordReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *DeveloperChangePasswordReq) Context(ctx context.Context) *DeveloperChangePasswordReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *DeveloperChangePasswordReq) Send() error
Send sends the request to change the developer's password.
type DeveloperCreateReq struct {
// contains filtered or unexported fields
}
func (r *DeveloperCreateReq) ClientID(id string) *DeveloperCreateReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *DeveloperCreateReq) Context(ctx context.Context) *DeveloperCreateReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *DeveloperCreateReq) Send() (*DevClient, error)
Send sends the create request and returns a client that can be used to access services within the developer's session.
type DeveloperCredentials struct { Email string `json:"email"` Password string `json:"password"` OTP string `json:"otp"` }
type DeveloperDeleteReq struct {
// contains filtered or unexported fields
}
func (r *DeveloperDeleteReq) ClientID(id string) *DeveloperDeleteReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *DeveloperDeleteReq) Context(ctx context.Context) *DeveloperDeleteReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *DeveloperDeleteReq) Send() error
Send sends the request to delete developer. Once this request has been sent the developer client should not be used again.
type DeveloperLoginReq struct {
// contains filtered or unexported fields
}
func (r *DeveloperLoginReq) ClientID(id string) *DeveloperLoginReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *DeveloperLoginReq) Context(ctx context.Context) *DeveloperLoginReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *DeveloperLoginReq) Send() (*DevClient, error)
Send sends the login request and returns a client that can be used to access services within the developer's session.
type DeveloperLogoutReq struct {
// contains filtered or unexported fields
}
func (r *DeveloperLogoutReq) ClientID(id string) *DeveloperLogoutReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *DeveloperLogoutReq) Context(ctx context.Context) *DeveloperLogoutReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *DeveloperLogoutReq) Send() error
Send sends the request to log the developer out and end the session. Once this request has been sent the developer client should not be used again.
type DeveloperProfile struct { Company string `json:"company"` HasProductionAccess bool `json:"has_production_access"` Confirmed bool `json:"confirmed"` ExpiresAt string `json:"expires_at,omitempty"` LinkedAccounts []LinkedAccount `json:"linked_accounts,omitempty"` LinkedTeam []LinkedTeam `json:"linked_teams,omitempty"` }
type DeveloperProfileReq struct {
// contains filtered or unexported fields
}
func (r *DeveloperProfileReq) ClientID(id string) *DeveloperProfileReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *DeveloperProfileReq) Context(ctx context.Context) *DeveloperProfileReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *DeveloperProfileReq) Send() (*DeveloperProfile, error)
Send sends the request to retrieve the developer's profile.
type DeveloperSetProfileReq struct {
// contains filtered or unexported fields
}
func (r *DeveloperSetProfileReq) ClientID(id string) *DeveloperSetProfileReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *DeveloperSetProfileReq) Context(ctx context.Context) *DeveloperSetProfileReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *DeveloperSetProfileReq) Send() error
Send sends the request to retrieve the developer's profile.
type Error struct { Errors []ErrorItem `json:"errors"` // error messages reported by the service StatusCode int // the HTTP status code from the service response Status string // the HTTP status line from the service response Header http.Header // the HTTP headers from the service response RequestID string // the ID of the request that generated the error URL string // the request URL }
Error contains an error response from a service.
type ErrorItem struct { Code string `json:"code"` // standard error code Message string `json:"message"` // additional information about the error Payload map[string][]string `json:"payload,omitempty"` }
ErrorItem is a detailed error code & message.
const ( FrequencyOnce Frequency = "once" FrequencyDaily Frequency = "daily" FrequencyWeekly Frequency = "weekly" FrequencyMonthly Frequency = "monthly" FrequencyYearly Frequency = "yearly" )
type GetAccessReq struct {
// contains filtered or unexported fields
}
func (r *GetAccessReq) ClientID(id string) *GetAccessReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *GetAccessReq) Context(ctx context.Context) *GetAccessReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *GetAccessReq) Send() (*Access, error)
Send sends the request to get details of a bank access.
type GetAccountReq struct {
// contains filtered or unexported fields
}
func (r *GetAccountReq) ClientID(id string) *GetAccountReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *GetAccountReq) Context(ctx context.Context) *GetAccountReq
func (r *GetAccountReq) Send() (*Account, error)
type GetApplicationSettingsReq struct {
// contains filtered or unexported fields
}
func (r *GetApplicationSettingsReq) ClientID(id string) *GetApplicationSettingsReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *GetApplicationSettingsReq) Context(ctx context.Context) *GetApplicationSettingsReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *GetApplicationSettingsReq) Send() (*ApplicationSettings, error)
Send sends the request to retrieve the developer's profile.
type GetCredentialReq struct {
// contains filtered or unexported fields
}
func (r *GetCredentialReq) ClientID(id string) *GetCredentialReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *GetCredentialReq) Context(ctx context.Context) *GetCredentialReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *GetCredentialReq) Send() (*Credential, error)
type GetRepeatedTransactionReq struct {
// contains filtered or unexported fields
}
func (r *GetRepeatedTransactionReq) ClientID(id string) *GetRepeatedTransactionReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *GetRepeatedTransactionReq) Context(ctx context.Context) *GetRepeatedTransactionReq
func (r *GetRepeatedTransactionReq) Send() (*RepeatedTransaction, error)
type GetScheduledTransactionReq struct {
// contains filtered or unexported fields
}
func (r *GetScheduledTransactionReq) ClientID(id string) *GetScheduledTransactionReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *GetScheduledTransactionReq) Context(ctx context.Context) *GetScheduledTransactionReq
func (r *GetScheduledTransactionReq) Send() (*Transaction, error)
type GetTransactionReq struct {
// contains filtered or unexported fields
}
func (r *GetTransactionReq) ClientID(id string) *GetTransactionReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *GetTransactionReq) Context(ctx context.Context) *GetTransactionReq
func (r *GetTransactionReq) Send() (*Transaction, error)
type GetWebhookReq struct {
// contains filtered or unexported fields
}
func (r *GetWebhookReq) ClientID(id string) *GetWebhookReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *GetWebhookReq) Context(ctx context.Context) *GetWebhookReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *GetWebhookReq) Send() (*Webhook, error)
type IBANAccount struct { IBAN string `json:"IBAN"` // the validated IBAN Provider string `json:"provider"` // the authoritative provider, IBO for IBANs }
type IBANBank struct { ID string `json:"id"` // the bank identity assigned by the identity provider Label string `json:"label"` // the bank name Country string `json:"country"` // the country (e.g. DE) Provider string `json:"provider"` // the identity provider (e.g. BIC) ServiceContext string `json:"service_context"` // the service context, (e.g. SEPA) }
type IBANDetails struct { Account IBANAccount `json:"acc_ref"` Banks []IBANBank `json:"fis"` }
type IBANService struct {
// contains filtered or unexported fields
}
IBANService provides access to IBAN related API services.
func NewIBANService(c *AppClient) *IBANService
func (a *IBANService) Validate(iban string) *ValidateIBANReq
Validate returns a request that may be used to validate an IBAN.
type JobAccess struct { ID int64 `json:"id,omitempty"` ProviderID string `json:"provider_id,omitempty"` Name string `json:"name,omitempty"` Accounts []JobAccount `json:"accounts,omitempty"` }
type JobAccount struct { ID int64 `json:"id,omitempty"` Name string `json:"name"` Number string `json:"number"` IBAN string `json:"iban"` ProviderID string `json:"provider_id,omitempty"` Errors []Problem `json:"errors"` }
type JobAnswerReq struct {
// contains filtered or unexported fields
}
func (r *JobAnswerReq) ChallengeAnswer(answer ChallengeAnswer) *JobAnswerReq
ChallengeAnswer adds an answer to one of the authorisation challenges required to complete the job.
func (r *JobAnswerReq) ClientID(id string) *JobAnswerReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *JobAnswerReq) Context(ctx context.Context) *JobAnswerReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *JobAnswerReq) Send() error
Send sends the request to get answer a challenge needed by a job.
type JobCancelReq struct {
// contains filtered or unexported fields
}
func (r *JobCancelReq) ClientID(id string) *JobCancelReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *JobCancelReq) Context(ctx context.Context) *JobCancelReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *JobCancelReq) Send() error
Send sends the request to cancel a job.
type JobConsent struct { ID string `json:"id,omitempty"` AuthURL string `json:"auth_url,omitempty"` AuthMessage string `json:"auth_message,omitempty"` }
type JobGetReq struct {
// contains filtered or unexported fields
}
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
Send sends the request to get details of a job.
const ( JobStageUnauthenticated JobStage = "unauthenticated" JobStageAuthenticated JobStage = "authenticated" JobStageChallenge JobStage = "challenge" JobStageImported JobStage = "imported" JobStageCancelled JobStage = "cancelled" JobStageProblem JobStage = "problem" JobStageConsent JobStage = "consent" )
type JobStatus struct { Finished bool `json:"finished"` Stage JobStage `json:"stage"` Challenge *Challenge `json:"challenge,omitempty"` URI string `json:"uri,omitempty"` Errors []Problem `json:"errors,omitempty"` Access *JobAccess `json:"access,omitempty"` Consent *JobConsent `json:"consent,omitempty"` }
type JobsService struct {
// contains filtered or unexported fields
}
JobsService provides access to jobs related API services.
func NewJobsService(u *UserClient) *JobsService
func (j *JobsService) Answer(uri string) *JobAnswerReq
Answer returns a request that may be used to answer a challenge needed by a job
func (j *JobsService) Cancel(uri string) *JobCancelReq
Cancel returns a request that may be used to cancel a job.
func (j *JobsService) Get(uri string) *JobGetReq
Get returns a request that may be used to get the details of a job.
type LinkedAccount struct { Type LinkedAccountType `json:"type"` ID string `json:"id"` Title string `json:"title"` UserName string `json:"user_name"` SyncTime string `json:"sync_time"` }
const ( LinkedAccountTypeRegular LinkedAccountType = 0 LinkedAccountTypeAuthorization LinkedAccountType = 1 )
type LinkedTeam struct { ID string `json:"id"` Name string `json:"name"` Active bool `json:"active"` Owner bool `json:"owner"` }
type ListAccessesReq struct {
// contains filtered or unexported fields
}
func (r *ListAccessesReq) ClientID(id string) *ListAccessesReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *ListAccessesReq) Context(ctx context.Context) *ListAccessesReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *ListAccessesReq) Send() (*AccessPage, error)
type ListAccountsReq struct {
// contains filtered or unexported fields
}
func (r *ListAccountsReq) ClientID(id string) *ListAccountsReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *ListAccountsReq) Context(ctx context.Context) *ListAccountsReq
func (r *ListAccountsReq) Send() (*AccountPage, error)
type ListAppKeysReq struct {
// contains filtered or unexported fields
}
func (r *ListAppKeysReq) ClientID(id string) *ListAppKeysReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *ListAppKeysReq) Context(ctx context.Context) *ListAppKeysReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *ListAppKeysReq) Send() (*ApplicationKeyPage, error)
type ListApplicationsReq struct {
// contains filtered or unexported fields
}
func (r *ListApplicationsReq) ClientID(id string) *ListApplicationsReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *ListApplicationsReq) Context(ctx context.Context) *ListApplicationsReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *ListApplicationsReq) Send() (*ApplicationPage, error)
type ListCredentialProvidersReq struct {
// contains filtered or unexported fields
}
func (r *ListCredentialProvidersReq) ClientID(id string) *ListCredentialProvidersReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *ListCredentialProvidersReq) Context(ctx context.Context) *ListCredentialProvidersReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *ListCredentialProvidersReq) Send() (*CredentialProviderPage, error)
type ListCredentialsReq struct {
// contains filtered or unexported fields
}
func (r *ListCredentialsReq) ClientID(id string) *ListCredentialsReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *ListCredentialsReq) Context(ctx context.Context) *ListCredentialsReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *ListCredentialsReq) Send() (*CredentialsPage, error)
type ListDevUsersReq struct {
// contains filtered or unexported fields
}
func (r *ListDevUsersReq) ClientID(id string) *ListDevUsersReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *ListDevUsersReq) Context(ctx context.Context) *ListDevUsersReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *ListDevUsersReq) Cursor(cursor string) *ListDevUsersReq
func (r *ListDevUsersReq) Limit(v int) *ListDevUsersReq
func (r *ListDevUsersReq) Send() (*UserListPage, error)
type ListRepeatedTransactionsReq struct {
// contains filtered or unexported fields
}
func (r *ListRepeatedTransactionsReq) AccessID(id int64) *ListRepeatedTransactionsReq
func (r *ListRepeatedTransactionsReq) AccountID(id int64) *ListRepeatedTransactionsReq
func (r *ListRepeatedTransactionsReq) ClientID(id string) *ListRepeatedTransactionsReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *ListRepeatedTransactionsReq) Context(ctx context.Context) *ListRepeatedTransactionsReq
func (r *ListRepeatedTransactionsReq) Limit(limit int) *ListRepeatedTransactionsReq
func (r *ListRepeatedTransactionsReq) Offset(offset int) *ListRepeatedTransactionsReq
func (r *ListRepeatedTransactionsReq) Send() (*RepeatedTransactionPage, error)
type ListScheduledTransactionsReq struct {
// contains filtered or unexported fields
}
func (r *ListScheduledTransactionsReq) AccessID(id int64) *ListScheduledTransactionsReq
func (r *ListScheduledTransactionsReq) AccountID(id int64) *ListScheduledTransactionsReq
func (r *ListScheduledTransactionsReq) ClientID(id string) *ListScheduledTransactionsReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *ListScheduledTransactionsReq) Context(ctx context.Context) *ListScheduledTransactionsReq
func (r *ListScheduledTransactionsReq) Send() ([]Transaction, error)
type ListTransactionsReq struct {
// contains filtered or unexported fields
}
func (r *ListTransactionsReq) AccessID(id int64) *ListTransactionsReq
func (r *ListTransactionsReq) AccountID(id int64) *ListTransactionsReq
func (r *ListTransactionsReq) ClientID(id string) *ListTransactionsReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *ListTransactionsReq) Context(ctx context.Context) *ListTransactionsReq
func (r *ListTransactionsReq) Limit(limit int) *ListTransactionsReq
func (r *ListTransactionsReq) Offset(offset int) *ListTransactionsReq
func (r *ListTransactionsReq) Send() (*TransactionPage, error)
func (r *ListTransactionsReq) Since(t time.Time) *ListTransactionsReq
type ListWebhookReq struct {
// contains filtered or unexported fields
}
func (r *ListWebhookReq) ClientID(id string) *ListWebhookReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *ListWebhookReq) Context(ctx context.Context) *ListWebhookReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *ListWebhookReq) Send() (*WebhookPage, error)
type LostPasswordReq struct {
// contains filtered or unexported fields
}
func (r *LostPasswordReq) ClientID(id string) *LostPasswordReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *LostPasswordReq) Context(ctx context.Context) *LostPasswordReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *LostPasswordReq) Send() error
Send sends the lost password request.
type MerchantsStats struct { From string `json:"from_date"` To string `json:"to_date"` Domain string `json:"domain"` Stats []DailyMerchantsStats `json:"stats"` }
type OriginalAmount struct { Value *MoneyAmount `json:"value"` ExchangeRate string `json:"exchange_rate"` }
type Problem struct { Domain string `json:"domain"` Code string `json:"code"` Info map[string]interface{} `json:"info"` ContainsPrivateInformation bool `json:"contains_private_information"` }
type ProcessRecurringTransferReq struct {
// contains filtered or unexported fields
}
func (r *ProcessRecurringTransferReq) ChallengeAnswer(answer ChallengeAnswer) *ProcessRecurringTransferReq
ChallengeAnswer adds an answer to one of the authorisation challenges required to complete the transfer.
func (r *ProcessRecurringTransferReq) ClientID(id string) *ProcessRecurringTransferReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *ProcessRecurringTransferReq) Confirm(confirm bool) *ProcessRecurringTransferReq
Confirm sets whether the user has confirmed a transfer that appears to be similar to another that was recently sent.
func (r *ProcessRecurringTransferReq) Context(ctx context.Context) *ProcessRecurringTransferReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *ProcessRecurringTransferReq) Send() (*RecurringTransfer, error)
Send sends the request to update information and answer challenges for a transfer.
type ProcessTransferReq struct {
// contains filtered or unexported fields
}
func (r *ProcessTransferReq) ChallengeAnswer(answer ChallengeAnswer) *ProcessTransferReq
ChallengeAnswer adds an answer to one of the authorisation challenges required to complete the transfer.
func (r *ProcessTransferReq) ClientID(id string) *ProcessTransferReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *ProcessTransferReq) Confirm(confirm bool) *ProcessTransferReq
Confirm sets whether the user has confirmed a transfer that appears to be similar to another that was recently sent.
func (r *ProcessTransferReq) Context(ctx context.Context) *ProcessTransferReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *ProcessTransferReq) Send() (*Transfer, error)
Send sends the request to update information and answer challenges for a transfer.
type Provider struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Country string `json:"country"` URL string `json:"url"` Address string `json:"address"` PostalCode string `json:"postal_code"` Operations ProviderOperations `json:"operations"` Challenges []ChallengeSpec `json:"challenges"` }
type ProviderAllowedOperations struct { PaymentTransfer bool `json:"transfer"` AccountStatement bool `json:"statement"` AccountBalance bool `json:"balance"` CreditCardStatement bool `json:"-"` CreditCardBalance bool `json:"-"` CreateRecTrf bool `json:"create_recurring_transfer"` ReadRecTrf bool `json:"read_recurring_transfer"` UpdateRecTrf bool `json:"update_recurring_transfer"` DeleteRecTrf bool `json:"delete_recurring_transfer"` ReadBeneficiaries bool `json:"beneficiaries"` }
type ProviderOperations struct { Adapter string `json:"adapter"` AllowedOperations ProviderAllowedOperations `json:"allowed_operations,omitempty" ` }
type ProviderSearchResult struct { Score float64 `json:"score"` Provider Provider `json:"provider"` }
type ProviderSearchResults []ProviderSearchResult
type ProvidersGetReq struct {
// contains filtered or unexported fields
}
func (r *ProvidersGetReq) ClientID(id string) *ProvidersGetReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *ProvidersGetReq) Context(ctx context.Context) *ProvidersGetReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *ProvidersGetReq) Send() (*Provider, error)
Send sends the request to get a single financial provider.
type ProvidersSearchReq struct {
// contains filtered or unexported fields
}
func (r *ProvidersSearchReq) ClientID(id string) *ProvidersSearchReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *ProvidersSearchReq) Context(ctx context.Context) *ProvidersSearchReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *ProvidersSearchReq) Send() (*ProviderSearchResults, error)
Send sends the request to search providers.
type ProvidersService struct {
// contains filtered or unexported fields
}
ProvidersService provides access to financial provider related API services.
func NewProvidersService(a *AppClient) *ProvidersService
func (c *ProvidersService) Get(id string) *ProvidersGetReq
Get returns a request that may be used to get the details of a single financial provider.
func (c *ProvidersService) Search(query string) *ProvidersSearchReq
Search returns a request that may be used to search the list of financial providers.
type ProvidersStats struct { From string `json:"from_date"` To string `json:"to_date"` Domain string `json:"domain"` Stats []DailyProvidersStats `json:"stats"` }
type RecurrenceRule struct { Start time.Time `json:"start"` Until time.Time `json:"until"` Frequency Frequency `json:"frequency"` Interval int `json:"interval"` ByDay int `json:"by_day"` }
type RecurringTransfer struct { ID string `json:"id"` From TransferAddress `json:"from"` To TransferAddress `json:"to"` Amount MoneyAmount `json:"amount"` Usage string `json:"usage"` Version int `json:"version"` Step TransferStep `json:"step"` State TransferState `json:"state"` Schedule *RecurrenceRule `json:"schedule,omitempty"` Created time.Time `json:"created,omitempty"` Updated time.Time `json:"updated,omitempty"` RemoteID string `json:"remote_id"` Errors []Problem `json:"errors,omitempty"` Consent *TransferConsent `json:"consent,omitempty"` }
type RecurringTransferCapabilities struct { Periods []Period `json:"periods"` MinimumLeadTimeCreate int `json:"minimum_lead_time_create"` MaximumLeadTimeCreate int `json:"maximum_lead_time_create"` MinimumLeadTimeEdit int `json:"minimum_lead_time_edit"` MaximumLeadTimeEdit int `json:"maximum_lead_time_edit"` MinimumLeadTimeDelete int `json:"minimum_lead_time_delete"` MaximumLeadTimeDelete int `json:"maximum_lead_time_delete"` LastDayOfMonthEnabled bool `json:"last_day_of_month_enabled"` FirstScheduledDateModifiable bool `json:"first_scheduled_date_modifiable"` TimeUnitModifiable bool `json:"time_unit_modifiable"` PeriodLengthModifiable bool `json:"period_length_modifiable"` ScheduledDateModifiable bool `json:"scheduled_date_modifiable"` LastScheduleDateModifiable bool `json:"last_schedule_date_modifiable"` }
type RecurringTransfersService struct {
// contains filtered or unexported fields
}
RecurringTransfersService provides access to recurring money transfer related API services.
func NewRecurringTransfersService(u *UserClient) *RecurringTransfersService
func (t *RecurringTransfersService) Cancel(id string, version int) *CancelRecurringTransferReq
Cancel returns a request that may be used to cancel an ongoing money transfer.
func (t *RecurringTransfersService) Create(from int64, to TransferAddress, amount MoneyAmount, rule RecurrenceRule, usage string) *CreateRecurringTransferReq
Create returns a request that may be used to create a money transfer. from is an account id belonging to the user.
func (t *RecurringTransfersService) Process(id string, intent TransferIntent, version int) *ProcessRecurringTransferReq
Process returns a request that may be used to update information and answer challenges for a transfer.
type RefreshAccessReq struct {
// contains filtered or unexported fields
}
func (r *RefreshAccessReq) ClientID(id string) *RefreshAccessReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *RefreshAccessReq) Context(ctx context.Context) *RefreshAccessReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *RefreshAccessReq) Send() (*Job, error)
type RefreshAllAccessesReq struct {
// contains filtered or unexported fields
}
func (r *RefreshAllAccessesReq) ClientID(id string) *RefreshAllAccessesReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *RefreshAllAccessesReq) Context(ctx context.Context) *RefreshAllAccessesReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *RefreshAllAccessesReq) Send() ([]Job, error)
type RepeatedTransaction struct { ID int64 `json:"id"` AccessID int64 `json:"user_bank_access_id,omitempty"` UserAccountID int64 `json:"user_bank_account_id,omitempty"` UserAccount AccountRef `json:"user_account"` RemoteAccount AccountRef `json:"remote_account"` RemoteID string `json:"remote_id"` Schedule RecurrenceRule `json:"schedule"` Amount *MoneyAmount `json:"amount"` Usage string `json:"usage"` }
type RepeatedTransactionPage struct { Transactions []RepeatedTransaction `json:"data"` Total int `json:"total"` Limit int `json:"limit"` Offset int `json:"offset"` }
type RepeatedTransactionsService struct {
// contains filtered or unexported fields
}
RepeatedTransactionsService provides access to repeated transaction related API services.
func NewRepeatedTransactionsService(u *UserClient) *RepeatedTransactionsService
func (r *RepeatedTransactionsService) Delete(id string) *DeleteRepeatedTransactionReq
Delete returns a request that may be used to delete a repeated transaction.
func (r *RepeatedTransactionsService) Get(id string) *GetRepeatedTransactionReq
func (r *RepeatedTransactionsService) List() *ListRepeatedTransactionsReq
func (r *RepeatedTransactionsService) Update(id string, to TransferAddress, amount MoneyAmount, usage string) *UpdateRepeatedTransactionReq
Update returns a request that may be used to update a repeated transaction.
type RequestsStats struct { From string `json:"from_date"` To string `json:"to_date"` Domain string `json:"domain"` RequestsTotal StatsValueChange `json:"requests_total"` RequestsToday StatsValueChange `json:"requests_today"` Stats []DailyRequestsStats `json:"stats"` }
type ResetDevUsersReq struct {
// contains filtered or unexported fields
}
func (r *ResetDevUsersReq) ClientID(id string) *ResetDevUsersReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *ResetDevUsersReq) Context(ctx context.Context) *ResetDevUsersReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *ResetDevUsersReq) Send() (*ResetUsersResponse, error)
Send sends the request to reset user data.
type ResetPasswordReq struct {
// contains filtered or unexported fields
}
func (r *ResetPasswordReq) ClientID(id string) *ResetPasswordReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *ResetPasswordReq) Context(ctx context.Context) *ResetPasswordReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *ResetPasswordReq) Send() error
Send sends the reset password request.
type ResetUserOutcome struct { Username string `json:"username"` Problems []Problem `json:"problems"` }
type ResetUserPasswordReq struct {
// contains filtered or unexported fields
}
func (r *ResetUserPasswordReq) ClientID(id string) *ResetUserPasswordReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *ResetUserPasswordReq) Context(ctx context.Context) *ResetUserPasswordReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *ResetUserPasswordReq) Send() error
Send sends the request to reset a user's password.
type ResetUsersResponse struct { Users []ResetUserOutcome `json:"users"` }
type RetryPolicy struct { // MaxRetries is the maximum number of requests that will be made after the original request. MaxRetries int // Wait is the base time to wait between attempts. Wait time.Duration // MaxWait is the maximum length of time to wait between retries. MaxWait time.Duration // Multiplier is the multiplier applied to Wait on each retry after the first. Set to zero // to implement a linear backoff. Multiplier float64 // Jitter controls the amount of randomness applied to each wait period. A // random amount of time up to +/- Jitter is added to the period. Jitter time.Duration }
func (r RetryPolicy) NextWait(requestsAttempted int) time.Duration
type ScheduledTransactionsService struct {
// contains filtered or unexported fields
}
ScheduledTransactionsService provides access to scheduled transaction related API services.
func NewScheduledTransactionsService(u *UserClient) *ScheduledTransactionsService
func (a *ScheduledTransactionsService) Get(id string) *GetScheduledTransactionReq
func (a *ScheduledTransactionsService) List() *ListScheduledTransactionsReq
type StatsMerchantsReq struct {
// contains filtered or unexported fields
}
func (r *StatsMerchantsReq) ClientID(id string) *StatsMerchantsReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *StatsMerchantsReq) Context(ctx context.Context) *StatsMerchantsReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *StatsMerchantsReq) FromDate(date time.Time) *StatsMerchantsReq
func (r *StatsMerchantsReq) Send() (*MerchantsStats, error)
func (r *StatsMerchantsReq) ToDate(date time.Time) *StatsMerchantsReq
type StatsProvidersReq struct {
// contains filtered or unexported fields
}
func (r *StatsProvidersReq) ClientID(id string) *StatsProvidersReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *StatsProvidersReq) Context(ctx context.Context) *StatsProvidersReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *StatsProvidersReq) FromDate(date time.Time) *StatsProvidersReq
func (r *StatsProvidersReq) Send() (*ProvidersStats, error)
func (r *StatsProvidersReq) ToDate(date time.Time) *StatsProvidersReq
type StatsRequestsReq struct {
// contains filtered or unexported fields
}
func (r *StatsRequestsReq) ClientID(id string) *StatsRequestsReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *StatsRequestsReq) Context(ctx context.Context) *StatsRequestsReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *StatsRequestsReq) FromDate(date time.Time) *StatsRequestsReq
func (r *StatsRequestsReq) Send() (*RequestsStats, error)
func (r *StatsRequestsReq) ToDate(date time.Time) *StatsRequestsReq
type StatsService struct {
// contains filtered or unexported fields
}
StatsService provides access to statistic related API services.
func NewStatsService(c *DevClient) *StatsService
func (d *StatsService) Merchants() *StatsMerchantsReq
func (d *StatsService) Providers() *StatsProvidersReq
func (d *StatsService) Requests() *StatsRequestsReq
func (d *StatsService) Transfers() *StatsTransfersReq
func (d *StatsService) Users() *StatsUsersReq
type StatsTransfersReq struct {
// contains filtered or unexported fields
}
func (r *StatsTransfersReq) ClientID(id string) *StatsTransfersReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *StatsTransfersReq) Context(ctx context.Context) *StatsTransfersReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *StatsTransfersReq) FromDate(date time.Time) *StatsTransfersReq
func (r *StatsTransfersReq) Send() (interface{}, error)
func (r *StatsTransfersReq) ToDate(date time.Time) *StatsTransfersReq
type StatsUsersReq struct {
// contains filtered or unexported fields
}
func (r *StatsUsersReq) ClientID(id string) *StatsUsersReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *StatsUsersReq) Context(ctx context.Context) *StatsUsersReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *StatsUsersReq) FromDate(date time.Time) *StatsUsersReq
func (r *StatsUsersReq) Send() (*UsersStats, error)
func (r *StatsUsersReq) ToDate(date time.Time) *StatsUsersReq
const ( // TANTypePaymentPin4 is an abstract 4-chars string used to authorise payment TANTypePaymentPin4 TANType = "paymentPIN4" // TANTypeOptical indicates an optical TAN such as flickering barcodes TANTypeOptical TANType = "optical" // TANTypeITAN indicates an iTAN (aka indexed TAN) such as a list of TAN numbers with a sequence TANTypeITAN TANType = "itan" // TANTypeMobile indicates a mobileTAN such as an SMS with a passcode TANTypeMobile TANType = "mobile" // TANTypeChip indicates a chipTAN provided from a calculator device TANTypeChip TANType = "chip" // TANTypePush indicates a push push notification to a mobile app TANTypePush TANType = "push" // TANTypeOTP indicates a one-time password TANTypeOTP TANType = "otp" // TANTypeUSB indicate a usb based TAN TANTypeUSB TANType = "usb" // TANTypePhoto indicates a colorised matrix barcode TANTypePhoto TANType = "photo" TANTypeUnknown TANType = "unknown" )
type TestWebhookReq struct {
// contains filtered or unexported fields
}
func (r *TestWebhookReq) ClientID(id string) *TestWebhookReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *TestWebhookReq) Context(ctx context.Context) *TestWebhookReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *TestWebhookReq) Send() (*WebhookTestResult, error)
type Transaction struct { ID int64 `json:"id"` AccessID int64 `json:"user_bank_access_id,omitempty"` UserAccountID int64 `json:"user_bank_account_id,omitempty"` UserAccount AccountRef `json:"user_account,omitempty"` CategoryID int64 `json:"category_id,omitempty"` RepeatedTransactionID int64 `json:"repeated_transaction_id,omitempty"` Counterparty Counterparty `json:"counterparty,omitempty"` RemoteID string `json:"remote_id"` EntryDate time.Time `json:"entry_date,omitempty"` SettlementDate time.Time `json:"settlement_date,omitempty"` Amount *MoneyAmount `json:"amount,omitempty"` OriginalAmount *OriginalAmount `json:"original_amount,omitempty"` Usage string `json:"usage,omitempty"` TransactionType string `json:"transaction_type,omitempty"` Gvcode string `json:"gvcode,omitempty"` }
type TransactionPage struct { Transactions []Transaction `json:"data"` Total int `json:"total"` Limit int `json:"limit"` Offset int `json:"offset"` }
type TransactionsService struct {
// contains filtered or unexported fields
}
TransactionsService provides access to transaction related API services.
func NewTransactionsService(u *UserClient) *TransactionsService
func (a *TransactionsService) Get(id string) *GetTransactionReq
func (a *TransactionsService) List() *ListTransactionsReq
type Transfer struct { ID string `json:"id"` From TransferAddress `json:"from"` To TransferAddress `json:"to"` Amount *MoneyAmount `json:"amount"` Usage string `json:"usage"` Version int `json:"version"` Step TransferStep `json:"step"` State TransferState `json:"state"` EntryDate time.Time `json:"booking_date,omitempty"` SettlementDate time.Time `json:"effective_date,omitempty"` Created time.Time `json:"created,omitempty"` Updated time.Time `json:"updated,omitempty"` RemoteID string `json:"remote_id"` Errors []Problem `json:"errors"` Consent *TransferConsent `json:"consent,omitempty"` }
type TransferAddress struct { Name string `json:"name"` IBAN string `json:"iban"` AccessID int64 `json:"bank_access_id,omitempty"` AccountID int64 `json:"bank_account_id,omitempty"` }
type TransferConsent struct { ID string `json:"id,omitempty"` AuthURL string `json:"auth_url,omitempty"` AuthMessage string `json:"auth_message,omitempty"` }
const ( TransferIntentProvidePIN TransferIntent = "provide_pin" TransferIntentProvideCredentials TransferIntent = "provide_credentials" TransferIntentSelectAuthMethod TransferIntent = "select_auth_method" TransferIntentProvideChallengeAnswer TransferIntent = "provide_challenge_answer" TransferIntentConfirmSimilarTransfer TransferIntent = "confirm_similar_transfer" TransferIntentConsent TransferIntent = "consent" )
const ( TransferStateOngoing TransferState = "ongoing" TransferStateSucceeded TransferState = "succeeded" TransferStateFailed TransferState = "failed" TransferStateCancelled TransferState = "cancelled" )
type TransferStep struct { Intent TransferIntent `json:"intent,omitempty"` Data *TransferStepData `json:"data,omitempty"` Challenge *Challenge `json:"challenge,omitempty"` }
type TransferStepData struct { AuthMethods []AuthMethod `json:"auth_methods,omitempty"` // TAN Options Challenge string `json:"challenge,omitempty"` // TAN Challenge ChallengeMessage string `json:"challenge_message,omitempty"` // TAN Challenge Message TANType TANType `json:"tan_type,omitempty"` // Type of the TAN (optical, itan, unknown) Transfers []Transfer `json:"transfers,omitempty"` // Transfer list (similar transfers) }
const ( TransferTypeRecurring TransferType = "recurring" TransferTypeRegular TransferType = "regular" )
type TransfersService struct {
// contains filtered or unexported fields
}
TransfersService provides access to money transfer related API services.
func NewTransfersService(u *UserClient) *TransfersService
func (t *TransfersService) Cancel(id string, version int) *CancelTransferReq
Cancel returns a request that may be used to cancel an ongoing money transfer.
func (t *TransfersService) Create(from int64, to TransferAddress, amount MoneyAmount) *CreateTransferReq
Create returns a request that may be used to create a money transfer.
func (t *TransfersService) Process(id string, intent TransferIntent, version int) *ProcessTransferReq
Process returns a request that may be used to update information and answer challenges for a transfer.
type TransfersStats struct { From string `json:"from_date"` To string `json:"to_date"` Domain string `json:"domain"` TotalOut []StatsMoneyAmount `json:"total_out"` TodayOut []StatsMoneyAmount `json:"today_out"` Stats []DailyTransfersStats `json:"stats"` }
type UpdateAccessReq struct {
// contains filtered or unexported fields
}
func (r *UpdateAccessReq) ChallengeAnswer(answer ChallengeAnswer) *UpdateAccessReq
ChallengeAnswer adds an answer to one of the authorisation challenges required to complete update of the access.
func (r *UpdateAccessReq) ClientID(id string) *UpdateAccessReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *UpdateAccessReq) Context(ctx context.Context) *UpdateAccessReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *UpdateAccessReq) Send() (*Access, error)
type UpdateApplicationReq struct {
// contains filtered or unexported fields
}
func (r *UpdateApplicationReq) ClientID(id string) *UpdateApplicationReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *UpdateApplicationReq) Context(ctx context.Context) *UpdateApplicationReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *UpdateApplicationReq) Send() error
type UpdateApplicationSettingsReq struct {
// contains filtered or unexported fields
}
func (r *UpdateApplicationSettingsReq) BackgroundRefresh(value bool) *UpdateApplicationSettingsReq
BackgroundRefresh sets the value of the background_refresh configuration setting.
func (r *UpdateApplicationSettingsReq) ClientID(id string) *UpdateApplicationSettingsReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *UpdateApplicationSettingsReq) Context(ctx context.Context) *UpdateApplicationSettingsReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *UpdateApplicationSettingsReq) Send() (*ApplicationSettings, error)
Send sends the request to retrieve the developer's profile.
type UpdateCredentialReq struct {
// contains filtered or unexported fields
}
func (r *UpdateCredentialReq) ClientID(id string) *UpdateCredentialReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *UpdateCredentialReq) Context(ctx context.Context) *UpdateCredentialReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *UpdateCredentialReq) Send() error
type UpdateRepeatedTransactionReq struct {
// contains filtered or unexported fields
}
func (r *UpdateRepeatedTransactionReq) ChallengeAnswer(answer ChallengeAnswer) *UpdateRepeatedTransactionReq
ChallengeAnswer adds an answer to one of the authorisation challenges required to complete the update.
func (r *UpdateRepeatedTransactionReq) ClientID(id string) *UpdateRepeatedTransactionReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *UpdateRepeatedTransactionReq) Context(ctx context.Context) *UpdateRepeatedTransactionReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *UpdateRepeatedTransactionReq) Description(s string) *UpdateRepeatedTransactionReq
Description sets a human readable description for the transaction.
func (r *UpdateRepeatedTransactionReq) Schedule(rule RecurrenceRule) *UpdateRepeatedTransactionReq
Schedule sets a recurrence schedule for the transaction.
func (r *UpdateRepeatedTransactionReq) Send() (*RecurringTransfer, error)
Send sends the request to update a repeated transaction. It returns information about the long running recurring transfer job that may be used to track and progress the update.
type UpdateWebhookParams struct { URL string `json:"url"` Events []string `json:"events"` APIVersion int `json:"api_version"` }
type UpdateWebhookReq struct {
// contains filtered or unexported fields
}
func (r *UpdateWebhookReq) ClientID(id string) *UpdateWebhookReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *UpdateWebhookReq) Context(ctx context.Context) *UpdateWebhookReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *UpdateWebhookReq) Send() error
type UserClient struct { UserID string Accesses *AccessesService Jobs *JobsService Accounts *AccountsService Transactions *TransactionsService ScheduledTransactions *ScheduledTransactionsService RepeatedTransactions *RepeatedTransactionsService Transfers *TransfersService RecurringTransfers *RecurringTransfersService Consents *ConsentsService // contains filtered or unexported fields }
UserClient is a client used for interacting with services in the context of a registered application and a valid user session. It is safe for concurrent use by multiple goroutines.
func NewUserClient(client *http.Client, addr string, userID string, token string, applicationKey string) *UserClient
NewUserClient creates a new user client, ready to use.
func (u *UserClient) Delete(password string) *UserDeleteReq
Delete returns a request that may be used to delete a user account and its associated data. Once this request has been sent the user client is no longer valid and should not be used.
func (u *UserClient) Logout() *UserLogoutReq
Logout returns a request that may be used to log a user out of the Bankrs API. Once this request has been sent the user client is no longer valid and should not be used.
func (u *UserClient) SessionToken() string
SessionToken returns the current session token.
type UserCreateReq struct {
// contains filtered or unexported fields
}
UserCreateReq is a request that may be used to create a user.
func (r *UserCreateReq) ClientID(id string) *UserCreateReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *UserCreateReq) Context(ctx context.Context) *UserCreateReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *UserCreateReq) Send() (*UserClient, error)
Send sends the request to create the user and returns a client that can be used to access services within the new users's session.
type UserCredentials struct { Username string `json:"username"` Password string `json:"password"` }
type UserDeleteReq struct {
// contains filtered or unexported fields
}
func (r *UserDeleteReq) Context(ctx context.Context) *UserDeleteReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *UserDeleteReq) Send() (*DeletedUser, error)
Send sends the request to delete a user.
type UserInfo struct { PhoneNumber string `json:"phone_number,omitempty"` LastUpdated *time.Time `json:"last_updated,omitempty"` KYCUpdated *time.Time `json:"kyc_completed,omitempty"` CardActivated *time.Time `json:"card_activated,omitempty"` Country string `json:"country,omitempty"` }
UserInfo represents personal information about the user of this access
type UserListPage struct { Users []string `json:"users,omitempty"` NextCursor string `json:"next,omitempty"` }
type UserLoginReq struct {
// contains filtered or unexported fields
}
func (r *UserLoginReq) ClientID(id string) *UserLoginReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *UserLoginReq) Context(ctx context.Context) *UserLoginReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *UserLoginReq) Send() (*UserClient, error)
Send sends the request to login the user and returns a client that can be used to access services within the new users's session.
type UserLogoutReq struct {
// contains filtered or unexported fields
}
func (r *UserLogoutReq) ClientID(id string) *UserLogoutReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *UserLogoutReq) Context(ctx context.Context) *UserLogoutReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *UserLogoutReq) Send() error
type UserToken struct { ID string `json:"id"` // globally unique identifier for a user Token string `json:"token"` // session token }
type UsersStats struct { From string `json:"from_date"` To string `json:"to_date"` Domain string `json:"domain"` UsersTotal StatsValueChange `json:"users_total"` // with weekly relative change UsersToday StatsValueChange `json:"users_today"` // with daily relative change Stats []DailyUsersStats `json:"stats"` }
type ValidateIBANReq struct {
// contains filtered or unexported fields
}
ValidateIBANReq is a request that may be used to validate an IBAN.
func (r *ValidateIBANReq) ClientID(id string) *ValidateIBANReq
ClientID sets a client identifier that will be passed to the Bankrs API in the X-Client-Id header.
func (r *ValidateIBANReq) Context(ctx context.Context) *ValidateIBANReq
Context sets the context to be used during this request. If no context is supplied then the request will use context.Background.
func (r *ValidateIBANReq) Send() (*IBANDetails, error)
Send sends the request to validate the IBAN and returns details about the IBAN.
type Webhook struct { ID string `json:"id"` URL string `json:"url"` Events []string `json:"events"` APIVersion int `json:"api_version"` Enabled bool `json:"enabled"` Environment string `json:"environment"` CreatedAt time.Time `json:"created_at"` }
type WebhookEventDetail struct { ID string `json:"id"` Type string `json:"type"` URL string `json:"url"` APIVersion int `json:"api_version"` Environment string `json:"environment"` CreatedAt time.Time `json:"created_at"` }
type WebhookPayload struct { Event WebhookEventDetail `json:"event"` Data map[string]interface{} `json:"data"` }
type WebhookTestResponse struct { ID string `json:"id"` Code int `json:"code"` Status string `json:"status"` }
type WebhookTestResult struct { Payload WebhookPayload `json:"payload"` Response WebhookTestResponse `json:"response"` }
type WebhooksService struct {
// contains filtered or unexported fields
}
WebhooksService provides access to webhook related API services.
func NewWebhooksService(c *DevClient) *WebhooksService
func (d *WebhooksService) Create(apiVersion int, url string, events []string) *CreateWebhookReq
Create prepares and returns a request to create a new webhook.
func (d *WebhooksService) Delete(id string) *DeleteWebhookReq
Delete prepares and returns a request to delete an existing webhook.
func (d *WebhooksService) Get(id string) *GetWebhookReq
Get prepares and returns a request to get details of an existing webhook.
func (d *WebhooksService) List() *ListWebhookReq
List prepares and returns a request to list details of all webhooks.
func (d *WebhooksService) Test(id string, event string) *TestWebhookReq
Test prepares and returns a request to test a webhook.
func (d *WebhooksService) Update(id string, apiVersion int, u string, events []string) *UpdateWebhookReq
Update prepares and returns a request to update an existing webhook.
Package bosgo imports 12 packages (graph) and is imported by 4 packages. Updated 2020-03-21. Refresh now. Tools for package owners.