findCostCentre()
CostCentres findCostCentre(string usn, string costCentreName)
This method searches cost centres from an account by name.
Parameters
- usn
- Format: string
- costCentreName
- Format: string
Results
This method returns a CostCentres XML document that contains a list of cost centres that match the name given. If there are no matching cost centres, an empty list will be returned.
There are no messages defined by this method.
Example: A returned CostCentres XML document
This example shows a CostCentres XML document containing a list of cost centres that match the given name.
<CostCentres>
<CostCentre>
<CostCentreId>326</CostCentreId>
<AccountUSN>2142420658</AccountUSN>
<Name>Sydney Marketing Office</Name>
</CostCentre>
</CostCentres>
Faults
NoSuchItemExceptionThis fault is returned when the account with the given USN cannot be found.
Java client syntax
java -cp build/smilewsv2-client.jar [options]
com.inomial.smile.client.v2.examples.FindCostCentre usn costCentreName
- usn
- Purpose: Specifies the account USN.
- costCentreName
- Purpose: Specifies the cost centre name to search for.
Note: For more information about the Java client and the options it
accepts, see Java client syntax.