<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="../notes.xsl"?>
<Documentation>
  <Title code="0510">SubAccountList</Title>
  <Overview>
    <p>Schema used to return information on all a user's sub accounts.</p>
  </Overview>
  <Request schema="0510_RequestSubAccountList.xsd">
    <p>
      The 'UserID' and 'Password' elements identify the account.
      The 'ServiceName' element must be set to 'SubAccountList'.
      The 'SoftwareVersion' element is for internal 2SMS use only and should not be set.
    </p>
    <p>
      The 'ServiceDetail' element may contain the following optional Boolean attributes to determine the type of
      information to be provided on the sub-accounts.
    </p>
    <ul>
      <li>
        The 'showNames' attribute provides the first name and last name registered with the sub-accounts
        (default is true).
      </li>
      <li>
        The 'showBalances' attribute provides the current anytime and off-peak balances for the sub-accounts
        excluding any initial free credits that are not transferable between sub-accounts (see schema code
        <a href="./0520_documentation.xml">0520</a> for further info) (default is true).
      </li>
      <li>
        The 'showAddressBookAccess' attribute confirms whether or not the sub-accounts inherit the user's address book
        (see schema code <a href="./0540_documentation.xml">0540</a> for info on inheriting address books)
        (default is false).
      </li>
      <li>
        The 'showMarketsMatch' attribute provides information on whether the sub-account is in the same 2sms market
        as its parent. This is important when transfering balances with sub-accounts (see schema code
        <a href="./0520_documentation.xml">0520</a>) as credits may only be transfered within the same market (default is false).
      </li>
    </ul>
  </Request>
  <Response schema="0510_ResponseSubAccountList.xsd">
    <p>
      This method returns a successful '00/OK' response if details of the user's sub accounts were successfully
      retrieved. The 'Result' element details how many sub-accounts were identified.
    </p>
    <p>
      The 'Detail' element contains a set of 'Account' children each of which provide information on a single
      sub-account. The exact information provided depends on the requested options.
    </p>
    <ul>
      <li>
        If 'showNames' was true then the 'FirstName' element contains the first name registered for this
        particular sub account.
      </li>
      <li>
        If 'showNames' was true then the 'LastName' element contains the last name registered for this
        particular sub account.
      </li>
      <li>
        The 'EmailAddress' element contains the username registered for this particular sub account.
        This element is always supplied as it identifies the sub-account.
      </li>
      <li>
        If 'showBalances' was true then the 'Balance' element contains the anytime and off-peak balances of the sub
        account in the 'CurrentBalance' and 'OffPeakBalance' child elements respectively.
        Note that the totals exclude any initial free credits that are not transferable between sub-accounts.
      </li>
      <li>
        If 'showAddressBookAccess' was true then the 'AddressBookAccess' element confirms whether or not the
        sub-account inherits access to the user's address book.
      </li>
      <li>
        If 'showMarketsMatch' was true then the 'MarketsMatch' element confirms whether or not the
        sub-account is in the same 2sms market as its parent.
      </li>
    </ul>
  </Response>
</Documentation>