Categorygithub.com/fastbill/go-finapi

# README

Go finAPI

This package provides a finAPI SDK for Go. It was created via OpenAPI Generator as described in the finAPI documentation. Additionally some wrapper code was added to improve the usability.

  • API version: 1.151.1
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen
  • OpenAPI Generator Version 5.0.1

For more information, please visit https://www.finapi.io/impressumrechtlicher-hinweis

Table of Contents

Usage

import ( 
    "github.com/fastbill/go-finapi/v6"
)


config := finapi.ClientConfig{
    Endpoint: "",
    ClientID: "",
    ClientSecret: "",
}
client := finapi.NewClient(config)

// Use a client context to perform actions like creating new users.
ctx, err := client.NewClientContext()
// handle error
newUser := finapimodel.UserCreateParams{
    Email: "",
    Password: "",
    IsAutoUpdateEnabled: true,
}
user, res, err := client.UsersApi.CreateUser(ctx, newUser)

// Use a user context for user based actions like connection banks etc.
userCtx, err := client.NewUserContext("put finapi user id here", "put user password here")
// handle error
newBankConn := finapimodel.ImportBankConnectionParams{
    BankId: 1234,
    BankingUserId: "",
    BankingPin: "",
    StorePin: true,
    MaxDaysForDownload: 90,
    AccountTypeIds: []int{1,2,3}
}
bankConnection, res, err := client.BankConnectionsApi.ImportBankConnection(userCtx, newBankConn)

Documentation for API Endpoints

All URIs are relative to https://sandbox.finapi.io

ClassMethodHTTP requestDescription
AccountsApiDeleteAccountDelete /api/v1/accounts/{id}Delete an account
AccountsApiDeleteAllAccountsDelete /api/v1/accountsDelete all accounts
AccountsApiEditAccountPatch /api/v1/accounts/{id}Edit an account
AccountsApiExecuteSepaDirectDebitPost /api/v1/accounts/executeSepaDirectDebitExecute SEPA Direct Debit
AccountsApiExecuteSepaMoneyTransferPost /api/v1/accounts/executeSepaMoneyTransferExecute SEPA Money Transfer
AccountsApiGetAccountGet /api/v1/accounts/{id}Get an account
AccountsApiGetAndSearchAllAccountsGet /api/v1/accountsGet and search all accounts
AccountsApiGetDailyBalancesGet /api/v1/accounts/dailyBalancesGet daily balances
AccountsApiGetMultipleAccountsGet /api/v1/accounts/{ids}Get multiple accounts
AccountsApiRequestSepaDirectDebitPost /api/v1/accounts/requestSepaDirectDebitRequest SEPA Direct Debit
AccountsApiRequestSepaMoneyTransferPost /api/v1/accounts/requestSepaMoneyTransferRequest SEPA Money Transfer
AuthorizationApiGetTokenPost /oauth/tokenGet tokens
AuthorizationApiRevokeTokenPost /oauth/revokeRevoke a token
BankConnectionsApiConnectInterfacePost /api/v1/bankConnections/connectInterfaceConnect a new interface
BankConnectionsApiDeleteAccessDataDelete /api/v1/bankConnections/{id}/aisConsentDelete a consent
BankConnectionsApiDeleteAllBankConnectionsDelete /api/v1/bankConnectionsDelete all bank connections
BankConnectionsApiDeleteBankConnectionDelete /api/v1/bankConnections/{id}Delete a bank connection
BankConnectionsApiEditBankConnectionPatch /api/v1/bankConnections/{id}Edit a bank connection
BankConnectionsApiGetAllBankConnectionsGet /api/v1/bankConnectionsGet all bank connections
BankConnectionsApiGetBankConnectionGet /api/v1/bankConnections/{id}Get a bank connection
BankConnectionsApiGetMultipleBankConnectionsGet /api/v1/bankConnections/{ids}Get multiple bank connections
BankConnectionsApiImportBankConnectionPost /api/v1/bankConnections/importImport a new bank connection
BankConnectionsApiRemoveInterfacePost /api/v1/bankConnections/removeInterfaceRemove an interface
BankConnectionsApiUpdateBankConnectionPost /api/v1/bankConnections/updateUpdate a bank connection
BanksApiGetAndSearchAllBanksGet /api/v1/banksGet and search all banks
BanksApiGetBankGet /api/v1/banks/{id}Get a bank
BanksApiGetMultipleBanksGet /api/v1/banks/{ids}Get multiple banks
CategoriesApiCreateCategoryPost /api/v1/categoriesCreate a new category
CategoriesApiDeleteAllCategoriesDelete /api/v1/categoriesDelete all categories
CategoriesApiDeleteCategoryDelete /api/v1/categories/{id}Delete a category
CategoriesApiEditCategoryPatch /api/v1/categories/{id}Edit a category
CategoriesApiGetAndSearchAllCategoriesGet /api/v1/categoriesGet and search all categories
CategoriesApiGetCashFlowsGet /api/v1/categories/cashFlowsGet cash flows
CategoriesApiGetCategoryGet /api/v1/categories/{id}Get a category
CategoriesApiGetMultipleCategoriesGet /api/v1/categories/{ids}Get multiple categories
CategoriesApiTrainCategorizationPost /api/v1/categories/trainCategorizationTrain categorization
ClientConfigurationApiEditClientConfigurationPatch /api/v1/clientConfigurationEdit client configuration
ClientConfigurationApiGetClientConfigurationGet /api/v1/clientConfigurationGet client configuration
LabelsApiCreateLabelPost /api/v1/labelsCreate a new label
LabelsApiDeleteAllLabelsDelete /api/v1/labelsDelete all labels
LabelsApiDeleteLabelDelete /api/v1/labels/{id}Delete a label
LabelsApiEditLabelPatch /api/v1/labels/{id}Edit a label
LabelsApiGetAndSearchAllLabelsGet /api/v1/labelsGet and search all labels
LabelsApiGetLabelGet /api/v1/labels/{id}Get a label
LabelsApiGetMultipleLabelsGet /api/v1/labels/{ids}Get multiple labels
MandatorAdministrationApiChangeClientCredentialsPost /api/v1/mandatorAdmin/changeClientCredentialsChange client credentials
MandatorAdministrationApiCreateIbanRulesPost /api/v1/mandatorAdmin/ibanRulesCreate IBAN rules
MandatorAdministrationApiCreateKeywordRulesPost /api/v1/mandatorAdmin/keywordRulesCreate keyword rules
MandatorAdministrationApiDeleteIbanRulesPost /api/v1/mandatorAdmin/ibanRules/deleteDelete IBAN rules
MandatorAdministrationApiDeleteKeywordRulesPost /api/v1/mandatorAdmin/keywordRules/deleteDelete keyword rules
MandatorAdministrationApiDeleteUsersPost /api/v1/mandatorAdmin/deleteUsersDelete users
MandatorAdministrationApiGetIbanRuleListGet /api/v1/mandatorAdmin/ibanRulesGet IBAN rules
MandatorAdministrationApiGetKeywordRuleListGet /api/v1/mandatorAdmin/keywordRulesGet keyword rules
MandatorAdministrationApiGetUserListGet /api/v1/mandatorAdmin/getUserListGet user list
MocksAndTestsApiCheckCategorizationPost /api/v1/tests/checkCategorizationCheck categorization
MocksAndTestsApiMockBatchUpdatePost /api/v1/tests/mockBatchUpdateMock batch update
NotificationRulesApiCreateNotificationRulePost /api/v1/notificationRulesCreate a new notification rule
NotificationRulesApiDeleteAllNotificationRulesDelete /api/v1/notificationRulesDelete all notification rules
NotificationRulesApiDeleteNotificationRuleDelete /api/v1/notificationRules/{id}Delete a notification rule
NotificationRulesApiGetAndSearchAllNotificationRulesGet /api/v1/notificationRulesGet and search all notification rules
NotificationRulesApiGetNotificationRuleGet /api/v1/notificationRules/{id}Get a notification rule
PaymentsApiCreateDirectDebitPost /api/v1/payments/directDebitsCreate direct debit
PaymentsApiCreateMoneyTransferPost /api/v1/payments/moneyTransfersCreate money transfer
PaymentsApiGetPaymentsGet /api/v1/paymentsGet payments
PaymentsApiSubmitPaymentPost /api/v1/payments/submitSubmit payment
SecuritiesApiGetAndSearchAllSecuritiesGet /api/v1/securitiesGet and search all securities
SecuritiesApiGetMultipleSecuritiesGet /api/v1/securities/{ids}Get multiple securities
SecuritiesApiGetSecurityGet /api/v1/securities/{id}Get a security
StandingOrdersApiCreateStandingOrderPost /api/v1/standingOrdersCreate a standing order
StandingOrdersApiGetStandingOrdersGet /api/v1/standingOrdersGet standing orders
StandingOrdersApiSubmitStandingOrderPost /api/v1/standingOrders/submitSubmit standing order
TPPCertificatesApiCreateNewCertificatePost /api/v1/tppCertificatesUpload TPP certificate
TPPCertificatesApiDeleteCertificateDelete /api/v1/tppCertificates/{id}Delete a TPP certificate
TPPCertificatesApiGetAllCertificatesGet /api/v1/tppCertificatesGet all TPP certificates
TPPCertificatesApiGetCertificateGet /api/v1/tppCertificates/{id}Get a TPP certificate
TPPCredentialsApiCreateTppCredentialPost /api/v1/tppCredentialsUpload TPP credentials
TPPCredentialsApiDeleteTppCredentialDelete /api/v1/tppCredentials/{id}Delete a set of TPP credentials
TPPCredentialsApiEditTppCredentialPatch /api/v1/tppCredentials/{id}Edit a set of TPP credentials
TPPCredentialsApiGetAllTppCredentialsGet /api/v1/tppCredentialsGet all TPP credentials
TPPCredentialsApiGetAndSearchTppAuthenticationGroupsGet /api/v1/tppCredentials/tppAuthenticationGroupsGet all TPP Authentication Groups
TPPCredentialsApiGetTppCredentialGet /api/v1/tppCredentials/{id}Get a set of TPP credentials
TransactionsApiDeleteAllTransactionsDelete /api/v1/transactionsDelete all transactions
TransactionsApiDeleteTransactionDelete /api/v1/transactions/{id}Delete a transaction
TransactionsApiEditMultipleTransactionsPatch /api/v1/transactionsEdit multiple transactions
TransactionsApiEditMultipleTransactionsDeprecatedPatch /api/v1/transactions/{ids}Edit multiple transactions (DEPRECATED)
TransactionsApiEditTransactionPatch /api/v1/transactions/{id}Edit a transaction
TransactionsApiGetAndSearchAllTransactionsGet /api/v1/transactionsGet and search all transactions
TransactionsApiGetMultipleTransactionsGet /api/v1/transactions/{ids}Get multiple transactions
TransactionsApiGetTransactionGet /api/v1/transactions/{id}Get a transaction
TransactionsApiRestoreTransactionPost /api/v1/transactions/{id}/restoreRestore a transaction
TransactionsApiSplitTransactionPost /api/v1/transactions/{id}/splitSplit a transaction
TransactionsApiTriggerCategorizationPost /api/v1/transactions/triggerCategorizationTrigger categorization
UsersApiCreateUserPost /api/v1/usersCreate a new user
UsersApiDeleteAuthorizedUserDelete /api/v1/usersDelete the authorized user
UsersApiDeleteUnverifiedUserDelete /api/v1/users/{userId}Delete an unverified user
UsersApiEditAuthorizedUserPatch /api/v1/usersEdit the authorized user
UsersApiExecutePasswordChangePost /api/v1/users/executePasswordChangeExecute password change
UsersApiGetAuthorizedUserGet /api/v1/usersGet the authorized user
UsersApiGetVerificationStatusGet /api/v1/users/verificationStatusGet a user's verification status
UsersApiRequestPasswordChangePost /api/v1/users/requestPasswordChangeRequest password change
UsersApiVerifyUserPost /api/v1/users/verify/{userId}Verify a user
WebFormsApiGetWebFormGet /api/v1/webForms/{id}Get a Web Form

Documentation For Models

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat64
  • PtrFloat64
  • PtrString
  • PtrTime

How to Update This SDK

  1. Download the newest version of the official SDK from docs.finapi.io. For that click the download button on the top of the page and select "go" as language.
  2. Save the zip file you get there to some place on your PC and extract it. Open the folder go-client.
  3. In the current SDK folder, delete everything besides README.md and finapi.go. Then copy everything besides gitpush.sh and dot files from the new SDK that you downloaded into your existing repository.
  4. Replace all occurances of package io.finapi.access with package finapi besides the one in this README file.
  5. Revert the module name in the go.mod file to the one you had before. Consider increasing the major version in case you expect breaking changes from the update.
  6. Fix compiliation errors if there are some (e.g. the NewTransaction struct might need to be renamed to ExtendedTransaction to avoid a naming collision).
  7. In the file client.go make sure to keep the following change for the serialization of the OpenAPI error (either revert the change from copying the file or just paste in the old version again):
    func (e GenericOpenAPIError) Error() string {
        return e.error + ", body: " + string(e.body)
    }
    
  8. From the README.md file in the downloaded SDK copy the sections Documentation for API Endpoints and Documentation For Models and use them to replace those sections in the repository README.md file.' Also update the API version mentioned at the top of the readme.
  9. Replace all float32 with float64 and Float32 with Float64 in the entire SDK with the exception of this README file and the utils.go file. This is needed because otherwise we get rounding errors for large transaction amounts. Float64 only garantees 6 correct digits, not enought for amounts like 123456.78.
  10. Review the changes in the Git diff before commiting them. Files in docs folder can be commited without thourough checking since they only contain text changes.

# Packages

No description provided by the author