Modify a Contract's Auto-Renewal Preferences
put
/bcws/webresources/v1.0/subscriptions/contract
Modifies the auto-renewal preferences for a subscriber's contract.
Request
There are no request parameters for this operation.
Supported Media Types
- application/xml
- application/json
Details about the contract to modify.
Root Schema : schema
Type:
Show Source
object
-
accountRef: object
ResourceRef
-
autoRenew: boolean
Whether to automatically renew the terms at the end of its commitment period (true) or not (false).
-
bundleName(required): string
The name of the bundle associated with the subscription terms.
-
bundleRef: object
ResourceRef
-
commitmentEndDate(required): string
(date-time)
The date and time the commitment period ends.
-
commitmentPeriod: integer
(int32)
The duration of the commitment period.
-
commitmentStartDate(required): string
(date-time)
The date and time the commitment period starts.
-
commitmentUnit: integer
(int32)
The unit for the commitment period. Can be one of the following:
- 0: Months
- 1: Days
-
currency: integer
(int32)
The currency associated with the subscription fee.
-
earlyCancellationAllowed: boolean
Whether early cancellation is allowed (true) or not (false).
-
earlyCancellationDate(required): string
(date-time)
The date and time of early cancellation.
-
earlyCancellationFee(required): number
The fee for canceling a subscription early.
-
earlyCancellationType: integer
(int32)
The type of early cancelation fee. Can be one of the following:
- 0: Fixed
- 1: Reducing
-
extension: object
extension
The extended attributes.
-
gracePeriod: integer
(int32)
The duration of the grace period.
-
gracePeriodUnit: integer
(int32)
The unit for the grace period. Can be one of the following:
- 0: Months
- 1: Days
-
id(required): string
The ID.
-
packageId: integer
(int32)
The ID of package associated with the subscription terms.
-
packageRef: object
ResourceRef
-
reducedCancellationFee(required): number
The reduced cancellation fee.
-
renewalContractTerms(required): object
schema
-
renewWithSameTerms: boolean
Whether to renew with the same terms (true) or with different terms (false).
-
serviceRef: object
ResourceRef
-
subscriberContractRef: object
ResourceRef
-
termsDescription: string
The subscription terms' description.
-
termsName(required): string
The subscription terms' name.
Nested Schema : ResourceRef
Type:
Show Source
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
Nested Schema : extension
Type:
object
The extended attributes.
Details about the contract to modify.
Root Schema : schema
Type:
Show Source
object
-
accountRef: object
ResourceRef
-
autoRenew: boolean
Whether to automatically renew the terms at the end of its commitment period (true) or not (false).
-
bundleName(required): string
The name of the bundle associated with the subscription terms.
-
bundleRef: object
ResourceRef
-
commitmentEndDate(required): string
(date-time)
The date and time the commitment period ends.
-
commitmentPeriod: integer
(int32)
The duration of the commitment period.
-
commitmentStartDate(required): string
(date-time)
The date and time the commitment period starts.
-
commitmentUnit: integer
(int32)
The unit for the commitment period. Can be one of the following:
- 0: Months
- 1: Days
-
currency: integer
(int32)
The currency associated with the subscription fee.
-
earlyCancellationAllowed: boolean
Whether early cancellation is allowed (true) or not (false).
-
earlyCancellationDate(required): string
(date-time)
The date and time of early cancellation.
-
earlyCancellationFee(required): number
The fee for canceling a subscription early.
-
earlyCancellationType: integer
(int32)
The type of early cancelation fee. Can be one of the following:
- 0: Fixed
- 1: Reducing
-
extension: object
extension
The extended attributes.
-
gracePeriod: integer
(int32)
The duration of the grace period.
-
gracePeriodUnit: integer
(int32)
The unit for the grace period. Can be one of the following:
- 0: Months
- 1: Days
-
id(required): string
The ID.
-
packageId: integer
(int32)
The ID of package associated with the subscription terms.
-
packageRef: object
ResourceRef
-
reducedCancellationFee(required): number
The reduced cancellation fee.
-
renewalContractTerms(required): object
schema
-
renewWithSameTerms: boolean
Whether to renew with the same terms (true) or with different terms (false).
-
serviceRef: object
ResourceRef
-
subscriberContractRef: object
ResourceRef
-
termsDescription: string
The subscription terms' description.
-
termsName(required): string
The subscription terms' name.
Nested Schema : ResourceRef
Type:
Show Source
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
Nested Schema : extension
Type:
object
The extended attributes.
Response
200 Response
The subscriber's contract was updated successfully.
500 Response
An internal server error occurred.
Examples
This example shows how to modify a contract's auto-renewal preferences by submitting a PUT request on the REST resource using cURL. For more information about cURL, see "Use cURL".
cURL Command
curl -X PUT http://hostname:port/bcws/webresources/v1.0/subscriptions/contract -H 'content-type: application/json' -d @file.json
where:
- hostname is the URL for the Billing Care REST server.
- port is the port for the Billing Care REST server.
- version is the version of the API you're using, such as v1.0.
- file.json is the JSON file that specifies the contract to modify.
Example of Request Body
This example shows the contents of the file.json file sent as the request body.
{
"accountRef": {
"id": "0.0.0.1+-account+1607269"
},
"subscriberContractRef": {
"id": "0.0.0.1+-subscriber_contract+1613606"
},
"autoRenew": "true"
}
Example of Response Body
If successful, the response code 200 is returned with true in the response body.