Documentation ¶
Overview ¶
Package mono - is MonoBank API client https://api.monobank.ua/docs/
Index ¶
- type Account
- type Accounts
- type Authorizer
- type Client
- func (c Client) ClientInfo() (*ClientInfo, error)
- func (c Client) Currency() (Currencies, error)
- func (c Client) Do(req *http.Request, expectedStatusCode int, v interface{}) error
- func (c Client) SetWebHook(uri string) error
- func (c Client) Statement(accountID string, from, to time.Time) (Statements, error)
- func (c Client) WithAuth(auth Authorizer) Client
- func (c Client) WithBaseURL(uri string) Client
- type ClientInfo
- type Currencies
- type Currency
- type Iface
- type PersonalAuthorizer
- type PublicAuthorizer
- type PublicIface
- type Statement
- type Statements
- type Time
- type WebHookData
- type WebHookRequest
- type WebHookResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorizer ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (Client) ClientInfo ¶
func (c Client) ClientInfo() (*ClientInfo, error)
func (Client) Currency ¶
func (c Client) Currency() (Currencies, error)
func (Client) SetWebHook ¶
func (Client) WithAuth ¶
func (c Client) WithAuth(auth Authorizer) Client
WithAuth returns copy of Client with authorizer
func (Client) WithBaseURL ¶
WithAuth returns copy of Client with overridden baseURL
type ClientInfo ¶
ClientInfo - client/user info
type Currencies ¶
type Currencies []Currency
type Iface ¶
type Iface interface { PublicIface // ClientInfo - https://api.monobank.ua/docs/#/definitions/UserInfo ClientInfo() (*ClientInfo, error) // Statement - bank account statement(transations) // https://api.monobank.ua/docs/#/definitions/StatementItems Statement(accountID string, from, to time.Time) (Statements, error) // SetWebHook - sets webhook for statements SetWebHook(uri string) error }
type PersonalAuthorizer ¶
type PersonalAuthorizer struct {
// contains filtered or unexported fields
}
func NewPersonalAuthorizer ¶
func NewPersonalAuthorizer(token string) PersonalAuthorizer
func (PersonalAuthorizer) SetAuth ¶
func (a PersonalAuthorizer) SetAuth(req *http.Request)
type PublicAuthorizer ¶
type PublicAuthorizer struct{}
func NewPublicAuthorizer ¶
func NewPublicAuthorizer() PublicAuthorizer
func (PublicAuthorizer) SetAuth ¶
func (a PublicAuthorizer) SetAuth(req *http.Request)
type PublicIface ¶
type PublicIface interface { // Currency https://api.monobank.ua/docs/#/definitions/CurrencyInfo Currency() (Currencies, error) }
type Statement ¶
type Statement struct { ID string `json:"id"` Time Time `json:"time"` Description string `json:"description"` MCC int32 `json:"mcc"` Hold bool `json:"hold"` Amount int64 `json:"amount"` OperationAmount int64 `json:"operationAmount"` CurrencyCode int `json:"currencyCode"` CommissionRate int64 `json:"commissionRate"` CashbackAmount int64 `json:"cashbackAmount"` Balance int64 `json:"balance"` Comment string `json:"comment"` }
Statement - bank account statement
type Time ¶
func (*Time) UnmarshalJSON ¶
type WebHookData ¶
type WebHookRequest ¶
type WebHookRequest struct {
WebHookURL string `json:"webHookUrl"`
}
type WebHookResponse ¶
type WebHookResponse struct { Type string `json:"type"` // "StatementItem" Data WebHookData `json:"data"` }
Click to show internal directories.
Click to hide internal directories.