updateCostCentre()

void updateCostCentre(CostCentre costCentre)

This method updates the cost centre given by the CostCentreId field. The Account USN cannot be updated.

Parameters

costCentre
Format: CostCentre XML
Purpose: Defines a CostCentre XML document that specifies the updated cost centre information.

Example: Update cost centre information

This example shows the cost centre information to update for costCentreId 325.

<CostCentre>
  <CostCentreId>325</CostCentreId>
  <AccountUSN>2142420658</AccountUSN>
  <Name>Sydney Marketing</Name>
</CostCentre>

Results

This method does not return any output for a successful update.

There are no messages defined by this method.

Faults

NoSuchItemException

This fault is returned when the cost centre with the given ID does not exist.

InvalidRequestException
This fault is returned when:
  • the cost centre does not belong to the account USN
  • when the name is not provided
  • when the name is already in use

Java client syntax

java -cp build/smilewsv2-client.jar [options]
 com.inomial.smile.client.v2.examples.UpdateCostCentre filename
filename
Purpose: Defines the filename of the CostCentre XML document.
Note: For more information about the Java client and the options it accepts, see Java client syntax.