Gandi Docs

 |   AAA  |    fr   en  

Questions

Account methods

account_currency

Signature

string account_currency(string session)

Description

Retrieve the currency name used with this prepaid account.

Parameters

  • string session: the session id (returned by login)

Returns

The XML-RPC response will contain the ISO 4217 currency name (string) used for this account. Possible faults are described in section Error Codes Format

Sample code

  • Sample code (python)
print "prepaid account currency: %s" % proxy.account_currency(session)
  • Sample code (php)
$msg  = new xmlrpcmsg("account_currency", array($session));
$reply  = $proxy->send($msg);
$val  = $reply->value();
$val  = $val->scalarval();
print "prepaid account currency: " . $val . "\n";
  • Sample code (perl)
my $reply  = $proxy->call("account_currency", $session);
my $currency  = $reply->result();
print "prepaid account currency: " . $currency . "\n";



account_balance

Signature

double account_balance(string session)

Description

Retrieve the prepaid account balance.

Parameters

  • string session: the session id (returned by login)

Returns

The XML-RPC response will contain the balance of the account (double). Possible faults are described in section Error Codes Format.

Sample code

  • Sample code (python)
print "prepaid account balance: %d"  % proxy.account_balance(session)
  • Sample code (php)
$msg  = new xmlrpcmsg("account_balance", array($session));
$reply  = $proxy->send($msg);
$val  = $reply->value();
$val  = $val->scalarval();
print "prepaid account currency: " . $val . "\n";
  • Sample code (perl)
my $reply  = $proxy->call("account_balance", $session);
my $balance  = $reply->result();
print "prepaid account balance: " . $balance . "\n";

Questions

Aucune question sur cette page et ses sous-pages.

Flux RSS des questions correspondant à ce filtre (Aide)

Dernière modification: le 03/03/2008 à 15:35 par Nicolas L. (Gandi)