Documentation ¶
Index ¶
- Constants
- Variables
- func NewKBankError(statusCode, messageTH, messageEN *string) thcerror.Error
- func NewTestSSLError(code, errorMsg *string) thcerror.Error
- type AccountBalance
- type AccountBalanceResponse
- type AccountStatus
- type CertificateObject
- type CheckBalanceRequest
- type Client
- type Config
- type RecentAccountActivitiesRequest
- type RecentAccountActivitiesResponse
- type RecentAccountActivity
- type TestSSLResponse
Constants ¶
View Source
const ( APIKBankCheckBalance = "/deposit/sight/balance/%v" APIKBankRecentAccountActivities = "/deposit/sight/transactions/%v" APIKBankTestSSL = "/test/ssl" )
Variables ¶
View Source
var (
ErrKBankConfigNotDefined = errors.New("kbank config not defined")
)
Functions ¶
func NewKBankError ¶
func NewTestSSLError ¶
Types ¶
type AccountBalance ¶
type AccountBalance struct { AvailableBalance float64 AccountBalance float64 AccountStatus string Error *thcerror.Error }
func (*AccountBalance) Status ¶
func (ab *AccountBalance) Status() AccountStatus
type AccountBalanceResponse ¶
type AccountBalanceResponse struct { StatusCode string AccountBalance *AccountBalance Error thcerror.Error }
type AccountStatus ¶
type AccountStatus string
const ( Active AccountStatus = "Active" Unknown AccountStatus = "Unknown" )
type CertificateObject ¶
type CheckBalanceRequest ¶
type CheckBalanceRequest struct {
AccountNumber string
}
func NewCheckBalanceRequest ¶
func NewCheckBalanceRequest(accountNumber string) *CheckBalanceRequest
type Client ¶
type Client interface { SetHttpClient(client *http.Client) CheckBalance(request *CheckBalanceRequest) (*AccountBalanceResponse, error) RecentAccountActivities(request *RecentAccountActivitiesRequest) (*RecentAccountActivitiesResponse, error) TestSSL() (*TestSSLResponse, error) }
type RecentAccountActivitiesRequest ¶
type RecentAccountActivitiesRequest struct {
AccountNumber string
}
func NewRecentAccountActivitiesRequest ¶
func NewRecentAccountActivitiesRequest(accountNumber string) *RecentAccountActivitiesRequest
type RecentAccountActivitiesResponse ¶
type RecentAccountActivitiesResponse struct { StatusCode string Activities []RecentAccountActivity Error thcerror.Error }
type RecentAccountActivity ¶
type RecentAccountActivity struct { ToAccountNo *string `json:"toAccountNo"` ToBankCode *string `json:"toBankCode"` ToAccountName *string `json:"toAccountName"` ToAccountNameEN *string `json:"toAccountNameEN"` FromAccountId *string `json:"fromAccountId"` FromBankCode *string `json:"fromBankCode"` FromAccountNameTH *string `json:"fromAccountNameTH"` FromAccountNameEN *string `json:"fromAccountNameEN"` MerchantCode *string `json:"merchantCode"` ChannelCode *string `json:"channelCode"` ChannelDetail *string `json:"channelDetail"` ServiceBranchNo string `json:"serviceBranchNo"` ChequeNo string `json:"chequeNo"` OutstandingBalance float64 `json:"outstandingBalance"` FeeAmount *float64 `json:"feeAmount"` TransactionAmount float64 `json:"txnAmount"` TransactionDate string `json:"txnDate"` TransactionTime string `json:"txnTime"` TransactionDesc string `json:"txnDesc"` TransactionDescEN string `json:"txnDescEN"` EffectiveDate string `json:"effectiveDate"` ProxyId *string `json:"proxyId"` ProxyTypeCode *string `json:"proxyTypeCode"` TellerId string `json:"tellerId"` DebitCreditFlag string `json:"debitCreditFlag"` }
type TestSSLResponse ¶
Source Files ¶
- client.go
- client_kbank_check_balance.go
- client_kbank_recent_account_activities.go
- client_kbank_test_ssl.go
- config.go
- entity_account_balance.go
- entity_recent_account_activities.go
- entity_test_ssl.go
- error_kbank.go
- error_test_ssl.go
- request_check_balance.go
- request_recent_account_activities.go
- service_check_balance.go
- service_kbank.go
- service_recent_account_activities.go
- service_test_ssl.go
Click to show internal directories.
Click to hide internal directories.