Account


Data Structures

struct  libnfsnapi_account_t

Enumerations

enum  libnfsnapi_account_balance_t {
  LIBNFSNAPI_BALANCE_ALL = 0,
  LIBNFSNAPI_BALANCE_CASH = 1,
  LIBNFSNAPI_BALANCE_CREDIT = 2,
  LIBNFSNAPI_BALANCE_HIGH = 3
}

Functions

libnfsnapi_account_tlibnfsnapi_account_create (libnfsnapi_mgr_t *mgr, const char *account_id)
void libnfsnapi_account_destroy (libnfsnapi_account_t *account)
int libnfsnapi_account_balance (libnfsnapi_account_t *account, libnfsnapi_account_balance_t type)
char * libnfsnapi_account_friendlyName (libnfsnapi_account_t *account)

Enumeration Type Documentation

enum libnfsnapi_account_balance_t
 

See libnfsnapi_account_balance.

Definition at line 27 of file account.h.


Function Documentation

libnfsnapi_account_t* libnfsnapi_account_create libnfsnapi_mgr_t mgr,
const char *  account_id
 

Create an Account object.

Parameters:
mgr A Manager object, created with libnfsnapi_mgr_create.
account_id A 12-digit NFSN account number, in the form XXXX-XXXXXXXX. It will be copied internally.
Returns:
An Account object, or NULL on failure.

Definition at line 15 of file account.c.

References LIBNFSNAPI_ERROR_MEMORY.

void libnfsnapi_account_destroy libnfsnapi_account_t account  ) 
 

Destroy an Account object, and free all memory associated with it. Do not use this pointer after calling this function.

Definition at line 40 of file account.c.

int libnfsnapi_account_balance libnfsnapi_account_t account,
libnfsnapi_account_balance_t  type
 

Retrieve the account's balance.

Parameters:
account An Account object.
type The balance to retrieve:
  • BALANCE_ALL Current account balance (cash + credit).
  • BALANCE_CASH Current account cash balance.
  • BALANCE_CREDIT Current account credit (non-refundable) balance.
  • BALANCE_HIGH Highest account balance ever recorded.
Returns:
Account's balance in US cents, or a negative number on error. Use libnfsnapi_mgr_error to find out the error code.

Definition at line 47 of file account.c.

References LIBNFSNAPI_ERROR_ARGUMENT, and LIBNFSNAPI_ERROR_MEMORY.

char* libnfsnapi_account_friendlyName libnfsnapi_account_t account  ) 
 

Retrieve the account's human-friendly name.

Returns:
Account's friendly name. You should free the returned string when you've finished with it.

Definition at line 84 of file account.c.

References LIBNFSNAPI_ERROR_MEMORY.


Generated on Sat Jan 13 17:42:28 2007 for libNFSNapi by  doxygen 1.4.6