applyFeature()
subscriptionFeatureId applyFeature(string usn, int featureId,
date startDate, date endDate)
This method applies a feature to a subscription for the specified length of time. A feature is an item that modifies a subscription and that can be switched on and off, for example, voicemail, call forwarding or DSL shaping.
The method returns a subscriptionFeatureId string that is unique to each call. Use this string to call stopApplyingFeature() and change the date that Smile stops applying the feature to the subscription.
Parameters
- usn
- Format: string
- featureId
- Format: integer
- startDate
- Format: date
- endDate
- Format: date
Results
This method applies the feature at the specified time and returns the subscriptionFeatureId parameter. Smile returns a different value for this parameter each time you call this method.
Smile emits the SubscriptionFeaturesChanged message when Smile applies the feature or stops applying the feature.
Faults
NoSuchItemExceptionThis fault is returned when the specified subscription or feature does not exist.
InvalidRequestExceptionThis fault is returned when the end date is earlier than the start date.
Java client syntax
java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.ApplyFeature usn featureId [startDate] [endDate]
- usn
- Purpose: Specifies the USN of the subscription for which to apply the feature.
- featureId
- Purpose: Specifies the ID of the feature to apply.
- startDate
- Purpose: (Optional) Specifies the date at which Smile applies the feature. If you do not specify this parameter, Smile applies the feature immediately.
- endDate
- Purpose: (Optional) Specifies the date at which Smile stops applying the feature. If you do not specify this parameter, Smile applies the feature indefinitely.