getAccountBalance
Get the balance for the specified account
/accounts/{accountId}/balance
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"http://localhost:8080//accounts/{accountId}/balance"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountsApi;
import java.io.File;
import java.util.*;
public class AccountsApiExample {
public static void main(String[] args) {
AccountsApi apiInstance = new AccountsApi();
Long accountId = 789; // Long |
try {
AccountBalance result = apiInstance.getAccountBalance(accountId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountsApi#getAccountBalance");
e.printStackTrace();
}
}
}
import io.swagger.client.api.AccountsApi;
public class AccountsApiExample {
public static void main(String[] args) {
AccountsApi apiInstance = new AccountsApi();
Long accountId = 789; // Long |
try {
AccountBalance result = apiInstance.getAccountBalance(accountId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountsApi#getAccountBalance");
e.printStackTrace();
}
}
}
Long *accountId = 789; //
AccountsApi *apiInstance = [[AccountsApi alloc] init];
// Get the balance for the specified account
[apiInstance getAccountBalanceWith:accountId
completionHandler: ^(AccountBalance output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var FakebankApi = require('fakebank_api');
var api = new FakebankApi.AccountsApi()
var accountId = 789; // {{Long}}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getAccountBalance(accountId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getAccountBalanceExample
{
public void main()
{
var apiInstance = new AccountsApi();
var accountId = 789; // Long |
try
{
// Get the balance for the specified account
AccountBalance result = apiInstance.getAccountBalance(accountId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling AccountsApi.getAccountBalance: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiAccountsApi();
$accountId = 789; // Long |
try {
$result = $api_instance->getAccountBalance($accountId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountsApi->getAccountBalance: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccountsApi;
my $api_instance = WWW::SwaggerClient::AccountsApi->new();
my $accountId = 789; # Long |
eval {
my $result = $api_instance->getAccountBalance(accountId => $accountId);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AccountsApi->getAccountBalance: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.AccountsApi()
accountId = 789 # Long |
try:
# Get the balance for the specified account
api_response = api_instance.get_account_balance(accountId)
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountsApi->getAccountBalance: %s\n" % e)
Parameters
Path parameters
Name | Description |
---|---|
accountId* |
Long
(int64)
Required
|