WebService::NFSN::Account is a Perl module that can access NFSN account information.
my $nfsn = WebService::NFSN->new($USER, $API_KEY);
my $balance = $nfsn->account($ACCOUNT_ID)->balance;
WebService::NFSN::Account provides access to NearlyFreeSpeech.NET's account API. It is only useful to people who have websites hosted at NearlyFreeSpeech.NET.
$account = $nfsn->account($ACCOUNT_ID)
This constructs a new Account object for the specified $ACCOUNT_ID (a string like 'A1B2-C3D4E5F6'). Equivalent to $account = WebService::NFSN::Account->new($nfsn, $ACCOUNT_ID).
Returns the current available account balance, without regard for distinctions between cash and credit.
Returns the current account cash balance.
Returns the current account credit balance. Credit balances represent nonrefundable funds.
Returns the highest account balance ever recorded for this account. This can be useful in conjunction with the balance property to determine the relative health of the account (for example, as a percentage).
$account->friendlyName( [$NEW_NAME] )
Gets or sets the account friendly name, an alternative to the 12-digit account number that is intended to be more friendly to work with. For example, if you have two accounts, you could name one "Personal" and the other "Business."
You cannot use the account friendly name in API calls; it is intended to be read/parsed only by humans.
The friendly name must be between 1 and 64 characters and is a SimpleText field. It must be unique across all your accounts (but other members may have accounts with the same friendly name).
Returns the account status, which provides general information about the health of the account.
The value returned is a hash reference with the following elements:
A text string describing the status.
A 2-4 character uppercase abbreviation of the status.
The recommended HTML color for displaying the status.
Returns a list of sites associated with this account (as an array reference of short names).
$account->addWarning(balance => $BALANCE)
This adds a balance warning to the account, so that an email will be sent when the balance drops below $BALANCE.
$BALANCE must be a positive dollar value specified to at most two decimal digits (one cent).
$account->removeWarning(balance => $BALANCE)
Removes an existing balance warning.
$BALANCE must be the dollar value of an existing balance warning, specified as a decimal number.