This is a sample API server
Add a new account
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
body | body | Account object that needs to be added to the store | Yes | AccountRequest |
Code | Description | Schema |
---|---|---|
200 | OK | AccountResponce |
400 | invalid input: cannot decode |
Get all accounts
Code | Description | Schema |
---|---|---|
200 | OK | [ AccountResponce ] |
500 | internal server error |
Get account payments
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
accountId | path | ID of account | Yes | int64 |
Code | Description | Schema |
---|---|---|
200 | OK | [ AccountPaymentResponse ] |
500 | internal server error |
Do a new payment
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
body | body | Payment object that needs to be added to the store | Yes | DoPaymentRquest |
Code | Description | Schema |
---|---|---|
200 | OK | AccountResponce |
400 | invalid input: cannot decode |
Name | Type | Description | Required |
---|---|---|---|
name | string | the new account name | Yes |
currency | string | the account currency | Yes |
balance | int64 | the account initial balance | Yes |
Name | Type | Description | Required |
---|---|---|---|
id | int64 | the account ID | Yes |
name | string | Yes | |
currency | string | Yes | |
balance | int64 | Yes |
Name | Type | Description | Required |
---|---|---|---|
amount | int64 | how much money need to transfer | Yes |
to_id | string | transfer to account ID | Yes |
from_id | string | transfer from account ID | Yes |
Name | Type | Description | Required |
---|---|---|---|
id | int64 | the payment ID | Yes |
amount | int64 | how much money transferred | Yes |
to_account | string | transferred to account ID | Yes |
from_account | string | transferred from account ID | Yes |
direction | string | transfer direction | Yes |