Update Plan

Call UpdatePlan API to update a plan and pricing details of the existing plan in the system.  Services of a plan which are to be added/modified should be specified in the XML. If the specified service does not exists in the system then new service with attributes (if specified in XML) will be created and added to the plan. If service already exists under the plan then service will be updated accordingly. Provision is also available to specify service wise plan attributes to create/modify plan attribute information.

Syntax and Arguments

UpdatePlan (ByVal UpdatePlanXML As String, ByVal ReferenceNo As String) as String.

Input Arguments

Argument Name

Data Type

Is Mandatory

Description

UpdatePlanXML

String

Yes

An XML string contains plan,service and attribute  information.

ReferenceNo

String

Yes

An unique number provided to identify the request

UpdatePlanXml

Request XML Elements

Element Name

Data Type

Length(Bytes)

Is Mandatory

Description

PLANCODE

String

64

Y

Plan Code.

PLANNAME

String

64

Y

Plan Name

STATUS

String

16

N

Plan Status

ADDMODIFYPRODUCTINFO

 

SERVICEINFO                      

Service detail element.

SERVICECODE

String

64

Y

Service code.

SERVICENAME

String

64

Y

Service name

OPTIONAL

String

1

N

Optional or mandatory service.

NRCAMOUNT

Decimal

15,3

N

One time charge amount.

RCAMOUNT

RC amount detail element.

AMOUNT

Decimal

15,3

Y

Recurring charge amount.

CHARGEUNIT

String

10

Y

Charge unit for recurring charge amount.

CUSTOMERTYPE

String

10

N

Customer type code.

BILLINGFREQUENCY

String

10

N

Frequency code.

CURRENCY

String

10

N

Currency code.

REGION

Number

10

N

Region id.

OTHERINFO

Service class attributes element.

ATTRIBUTE1

String

128

N

Service class attribute value for a service.

ATTRIBUTE2

String

128

N

Service class attribute value for a service.

ATTRIBUTE3

String

128

N

Service class attribute value for a service.

ATTRIBUTE4

String

128

N

Service class attribute value for a service.

ATTRIBUTE5

String

128

N

Service class attribute value for a service.

ATTRIBUTE INFO

Plan attribute key value pairs should be specified.

DELETEPRODUCTINFO

 

SERVICEINFO

 Service detail element

SERVICENAME

String

128

Y

Service name

Request XML Format

<REQUESTINFO>

           <PLANINFO>

                       <PLANCODE>94</PLANCODE>

                       <PLANNAME>Rackspace plan94</PLANNAME>

                      <STATUS>A</STATUS>

                        <ADDMODIFYPRODUCTINFO>

                                   <SERVICEINFO>

                                                   <SERVICENAME>TEST ONE</SERVICENAME>

                                                    <OPTIONAL>N</OPTIONAL>

                                                  <NRCAMOUNT>800</NRCAMOUNT>

                                                 <RCAMOUNT>

                                                             <AMOUNT>170</AMOUNT>

                                                              <CHARGEUNIT>1M</CHARGEUNIT>

                                               </RCAMOUNT>

                                             <OTHERINFO>

                                                   <ATTRIBUTE1></ATTRIBUTE1>

                                                  <ATTRIBUTE2></ATTRIBUTE2>

                                            </OTHERINFO>

                                           <ATTRIBUTEINFO>

                                                   <USAGE_LIMIT></USAGE_LIMIT>

                                              </ATTRIBUTEINFO>

                                     </SERVICEINFO>

                           </ADDMODIFYPRODUCTINFO>

                      <DELETEPRODUCTINFO>

                               <SERVICEINFO>

                                              <SERVICENAME>TEST</SERVICENAME>

                             </SERVICEINFO>

                        </DELETEPRODUCTINFO>

                 </PLANINFO>

</REQUESTINFO>

Response XML

Output Parameters

Parameter Name

Data Type

Description

TRANSACTIONNO

String

An unique number generated for each request

ERRORNO

Integer

Returns Error Number

94073 – Charge units not defined.

80346 – Plan name should not be empty.

80348 – Product name should not be empty.

80347 – Invalid value in optional tag.

18 – Please enter a valid decimal value.

60087 – Invalid price.

94075 – Invalid charge unit.

60104 – No attributes defined.

60096 -No plans exists with this plan code.

80165-Plan code can not be blank.

60103 – Invalid attribute.

60113-Service does not exists with the name .

60063-Service does not exists with this code.

60118- Service name already exist.

60119- Services are repeated.

6 – Invalid integer value.

60105 – Attributes are not defined for service class.

ERRORMESSAGE

String

Returns “Success” or “Failed”

Response XML Format

<RESPONSEINFO>

<STATUS>

<TRANSACTIONNO>3564</TRANSACTIONNO>

<ERRORNO>0</ERRORNO>

<MESSAGE>SUCCESS</MESSAGE>

</STATUS>

<PLANID>118</PLANID>

</RESPONSEINFO>

Note: Refer to Error Codes and Description to view errors in detail.