Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jars #27

Merged
merged 2 commits into from
May 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,20 @@
[![Godoc Reference][godoc-img]][godoc-url] [![CI][ci-img]][ci-url] [![codecov][codecov-img]][codecov-url]

Monobank REST API client.
Supports personal(with Token) and corporate authorizations.

## Usage
## Features
- Personal API(with Token authorization).
- Corporate API(with authorization).
- Webhooks(including the Corporate API).
- Jars.

## Installation
```shell
go get github.com/vtopc/go-rest
```
This will update yours go.mod file.

## Usage examples
NOTE: Do not forget to check errors.

#### Public client
Expand Down
13 changes: 13 additions & 0 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type ClientInfo struct {
Name string `json:"name"`
WebHookURL string `json:"webHookUrl"`
Accounts Accounts `json:"accounts"`
Jars Jars `json:"jars"`
}

type Account struct {
Expand All @@ -24,6 +25,16 @@ type Account struct {
IBAN string `json:"iban"`
}

type Jar struct {
ID string `json:"id"`
SendID string `json:"sendId"`
Title string `json:"title"`
Description string `json:"description"`
CurrencyCode int `json:"currencyCode"`
Balance int64 `json:"balance"`
Goal int64 `json:"goal"`
}

type CardType string

const (
Expand All @@ -36,6 +47,8 @@ const (

type Accounts []Account

type Jars []Jar

// Transaction - bank account statement
type Transaction struct {
ID string `json:"id"`
Expand Down