getCostCentres()

CostCentres getCostCentres(string usn)

This method returns a list of cost centres that are associated with an account.

Parameters

usn
Format: string
Purpose: Specifies the USN of an account for which to retrieve cost centres.

Results

This method returns a CostCentres XML document containing a list of cost centres for the given account. If there are no cost centres associated with the account, then the <CostCentres> element will be empty.

There are no messages defined by this method.

Example: A returned CostCentres XML document

This example shows a CostCentres XML document that contains cost centre information for account 2142420658.

<CostCentres xmlns="http://xml.inomial.com/smile/2.xsd">
  <CostCentre>
    <CostCentreId>567</CostCentreId>
    <AccountUSN>2142420658</AccountUSN>
    <Name>Research and Development</Name>
  </CostCentre>
  <CostCentre>
    <CostCentreId>568</CostCentreId>
    <AccountUSN>2142420658</AccountUSN>
    <Name>Marketing</Name>
  </CostCentre>
</CostCentres>

Faults

NoSuchItemException

This fault is returned when the given USN does not correspond to an existing account.

Java client syntax

java -cp build/smilewsv2-client.jar [options]
 com.inomial.smile.client.v2.examples.GetCostCentres usn
usn
Purpose: Specifies the USN of an account for which to retrieve cost centres.
Note: For more information about the Java client and the options it accepts, see Java client syntax.