setCostCentre()

void setCostCentre(string usn, int costCentreId)

This method sets the cost centre given by the CostCentreId field to a subscription. When no cost centre ID is provided, it will clear the subscription's cost centre.

Parameters

usn
Format: string
Purpose: Specifies the subscription USN.
costCentreId
Format: integer
Purpose: Specifies the ID of the cost centre.

Results

This method does not return any output, and sets a cost centre for a subscription.

Smile emits the RatingConfigurationUpdated message when the task is complete.

Faults

NoSuchItemException
This fault is returned when:
  • a cost centre with the specified ID does not exist
  • a subscription with the specified USN does not exist
InvalidRequestException

This fault is returned when the cost centre does not belong to the account of the given subscription.

Java client syntax

java -cp build/smilewsv2-client.jar [options]
 com.inomial.smile.client.v2.examples.SetCostCentre usn costCentreId
usn
Purpose: Specifies the subscription USN.
costCentreId
Purpose: Specifies the ID of the cost centre.
Note: For more information about the Java client and the options it accepts, see Java client syntax.