com.logicboxes.foundation.sfnb.order.instahelp
Class EngageOrder

java.lang.Object
  extended by com.logicboxes.foundation.sfnb.order.instahelp.EngageOrder

public class EngageOrder
extends java.lang.Object


Constructor Summary
EngageOrder()
           
 
Method Summary
 java.util.HashMap add(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID, java.lang.String productkey, java.lang.String domainName, int customerId, int noOfMonths, java.util.HashMap orderParams, java.lang.String invoiceOption)
          Places a LiveHelp Order for the specified domain name.
 java.util.HashMap del(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID, int entityId)
          Deletes the LiveHelp service for a specified Order
 java.util.HashMap getDeletionRefundAmount(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID, int orderId)
          Returns the refund details on deleting a specified order.
 java.util.HashMap getDetails(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID, int orderId, java.util.Vector option)
          Returns details for a particular Engage Order.
 java.util.HashMap getDetailsByDomain(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID, java.lang.String domainName, java.util.Vector option, java.lang.String productkey)
          Gets the Details of the specified order based on given option(s)
 java.util.HashMap getModPricing(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID, int orderId, java.lang.String packagekey, int noofmonths)
          This method is used to determine the cost of Order Modification, if a particular order param is not modified the existing pricing param needs to be passed.
 java.util.HashMap getMonthlyCostAndValidate(java.lang.String userName, java.lang.String password, java.lang.String role, java.lang.String langpref, int parentid, java.lang.String packagekey)
           
 int getOrderIdByDomain(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID, java.lang.String domainName, java.lang.String productkey)
          Gets the OrderId of given domainname
 java.util.HashMap getPlanDetails(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID)
          Returns all the plan details of LogicBoxes Engage.
 java.util.HashMap mod(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID, int orderId, int noOfMonths, java.util.HashMap orderParams)
          Modifies an existing LiveHelp Order based to the parameters desired.
 java.util.HashMap renew(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID, int orderId, int renewMonths, java.lang.String invoiceOption, java.lang.String existingEndTime)
          Renews an existing LiveHelp Order.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EngageOrder

public EngageOrder()
Method Detail

getMonthlyCostAndValidate

public java.util.HashMap getMonthlyCostAndValidate(java.lang.String userName,
                                                   java.lang.String password,
                                                   java.lang.String role,
                                                   java.lang.String langpref,
                                                   int parentid,
                                                   java.lang.String packagekey)

add

public java.util.HashMap add(java.lang.String SERVICE_USERNAME,
                             java.lang.String SERVICE_PASSWORD,
                             java.lang.String SERVICE_ROLE,
                             java.lang.String SERVICE_LANGPREF,
                             int SERVICE_PARENTID,
                             java.lang.String productkey,
                             java.lang.String domainName,
                             int customerId,
                             int noOfMonths,
                             java.util.HashMap orderParams,
                             java.lang.String invoiceOption)
Places a LiveHelp Order for the specified domain name. Since this is a billable action your reseller account must have sufficient funds to add the Web Hosting order.

Parameters:
productkey - The product key identifies the type of the LiveHelp Order. The current acceptable value for this parameter is
engage - For adding the LogicBoxes Engage Order
domainName - The domain name for which the order is placed.
customerId - The customer under whom the orders should be added.
noOfMonths - The number of months for which the order is placed.
orderParams - It is a HashMap and should contain the predefined pack for which the order needs to be added. It should have the engage_pack as the key and value must be either of pack1, pack2, pack3, pack4. ex. {engage_pack=pack3}
invoiceOption - This parameter will decide how the Customer Invoices will be handled. NoInvoice - If this value is passed, then no customer invoice will be generated for the order. PayInvoice - If this value is passed, then a customer invoice will be generated for the domains in the first step. If there is sufficient balance in the Customer's Debit Account, then the invoices will be paid and the order will be added. KeepInvoice -If this value is passed, then a customer invoice will be generated for the order. However, this invoice will not be paid. It will be kept pending, while the orders will be executed. OnlyAdd - The order will simply be added but NOT executed in the system. A customer invoice will be generated. However, the invoice will not be paid.
Returns:
HashMap A HashMap with the result of Order addition. The HashMap will have key-values as follows:

entityid=500 (orderid)
description=engageorder.com
status=Success

Incase you have chosen "KeepInvoice" or "PayInvoice", the return HashMap will also contain the following data:

customerid=200
invoiceid=8000
sellingcurrencysymbol=INR
sellingamount=-7000.000
unutilisedsellingamount=-7000.000

invoiceid is the Id that you will need to pass to Fund.payCustomerTransaction if you wish to pay the invoice at a later date.

selllingamount is the Invoice amount in your Selling Currency

unutilisedselllingamount is the Pending Invoice amount in your Selling Currency.

In case of "KeepInvoice", the pending amount will always be equal to the invoice amount.

In case of "PayInvoice", if the Customer does not have sufficient funds to pay the entire invoice amount, unutilisedsellingamount will reflect the balance amount that is pending.

If the invoice has been completely paid, the unutilisedsellingamount will be 0.

Throws:
LogicBoxesException

mod

public java.util.HashMap mod(java.lang.String SERVICE_USERNAME,
                             java.lang.String SERVICE_PASSWORD,
                             java.lang.String SERVICE_ROLE,
                             java.lang.String SERVICE_LANGPREF,
                             int SERVICE_PARENTID,
                             int orderId,
                             int noOfMonths,
                             java.util.HashMap orderParams)
Modifies an existing LiveHelp Order based to the parameters desired.

Parameters:
orderId - The orderid of the Order which is to be modified.
noOfMonths - The no of months for which the order is to be renewed, pass 0 if you do not wish to extend the duration of the order.
orderParams - The orderParams HashMap should contain Pricing Keys and the desired Pricing Parameters Existing order pricing parameters need to passed for the pricing keys that require no modifications. It should have the engage_pack as the key and value must be either of pack1, pack2, pack3, pack4. ex. {engage_pack=pack3}
Returns:
HashMap with following keys
  • status - It will be "success" if action was successful
  • endDate - This is the value in seconds for period of validity
  • invoiceId - Invoice id for current modification
Throws:
LogicBoxesException

renew

public java.util.HashMap renew(java.lang.String SERVICE_USERNAME,
                               java.lang.String SERVICE_PASSWORD,
                               java.lang.String SERVICE_ROLE,
                               java.lang.String SERVICE_LANGPREF,
                               int SERVICE_PARENTID,
                               int orderId,
                               int renewMonths,
                               java.lang.String invoiceOption,
                               java.lang.String existingEndTime)
Renews an existing LiveHelp Order.

Parameters:
orderId - The OrderId which is to be renewed.
renewMonths - The no of months for which the order is to be renewed.
existingEndTime - The current end time for this order in milliseconds
invoiceOption - This parameter will decide how the Customer Invoices will be handled.
NoInvoice - If this value is passed, then no customer invoice will be generated for the order.
PayInvoice - If this value is passed, then a customer invoice will be generated for the domains in the first step. If there is sufficient balance in the Customer's Debit Account,
then the invoices will be paid and the order will be added.
KeepInvoice -If this value is passed, then a customer invoice will be generated for the order.
However, this invoice will not be paid. It will be kept pending, while the orders will be executed.
OnlyAdd - The order will simply be added but NOT executed in the system.
A customer invoice will be generated. However, the invoice will not be paid.
Returns:
HashMap with following keys
  • invoiceid - ID for invoice generated
  • customercost - Cost for customer
  • customerid - customer's ID to which renewed order belongs
  • domainname - domain for which order is renewed
Certain other information related to the action are also returned as a part of the HashMap
Throws:
LogicBoxesException

getDeletionRefundAmount

public java.util.HashMap getDeletionRefundAmount(java.lang.String SERVICE_USERNAME,
                                                 java.lang.String SERVICE_PASSWORD,
                                                 java.lang.String SERVICE_ROLE,
                                                 java.lang.String SERVICE_LANGPREF,
                                                 int SERVICE_PARENTID,
                                                 int orderId)
Returns the refund details on deleting a specified order.

Parameters:
orderId - The OrderId for which the Refund details are required.
Returns:
Returns HashMap containing refund details The Keys of the HashMap are as follows:

childtype - Could be customer or reseller. If the order being deleted belongs to a direct customer, the childtype would be customer If the order being deleted belongs to a sub reseller, the childtype would be reseller

childcompany - The company of the customer / sub reseller

childname - Name of the customer / sub reseller

childrefund - The amount that will be refunded to the customer / sub reseller

userrefund - The amount that will be refunded to the reseller

Throws:
LogicBoxesException

del

public java.util.HashMap del(java.lang.String SERVICE_USERNAME,
                             java.lang.String SERVICE_PASSWORD,
                             java.lang.String SERVICE_ROLE,
                             java.lang.String SERVICE_LANGPREF,
                             int SERVICE_PARENTID,
                             int entityId)
Deletes the LiveHelp service for a specified Order

Parameters:
entityId - The Orderid for which the service needs to be deleted.
Returns:
HashMap with key "status". If value for this key is "success" than operation was successful

Certain other information related to the action is also returned as a part of the HashMap

Throws:
LogicBoxesException - if order does not belong to reseller who has invoked this method

getDetails

public java.util.HashMap getDetails(java.lang.String SERVICE_USERNAME,
                                    java.lang.String SERVICE_PASSWORD,
                                    java.lang.String SERVICE_ROLE,
                                    java.lang.String SERVICE_LANGPREF,
                                    int SERVICE_PARENTID,
                                    int orderId,
                                    java.util.Vector option)
Returns details for a particular Engage Order.

Parameters:
orderId - The Orderid for which the details are required.
option - Vector of different option for details listing. Allowed Option values are All, StatusDetails, PricingDetails, ExecutionInfoParams, OrderDetails
Returns:
HashMap - key/value pair for all fields depending upon the option
Throws:
LogicBoxesException

getModPricing

public java.util.HashMap getModPricing(java.lang.String SERVICE_USERNAME,
                                       java.lang.String SERVICE_PASSWORD,
                                       java.lang.String SERVICE_ROLE,
                                       java.lang.String SERVICE_LANGPREF,
                                       int SERVICE_PARENTID,
                                       int orderId,
                                       java.lang.String packagekey,
                                       int noofmonths)
This method is used to determine the cost of Order Modification, if a particular order param is not modified the existing pricing param needs to be passed.

Parameters:
orderId - The OrderId which is to be modified.
noofmonths - The no of months for which the order is to be renewed, pass 0 if you do not wish to extend the duration of the order.
Returns:
HashMap returns a HashMap contains the following keys
[endDate] - End timestamp of the order (timestamp after the modification)
[modifyCostResult] - UpGrade/DownGrade/error
if modifyCostResult contains UpGrade or DownGrade the return HashMap would contain 2 more keys
[upgradecost] - customer modification cost
[resellerupgradecost] - reseller (self) modification cost
if modifyCostResult contains DownGrade the [upgradecost] key and [resellerupgradecost] key will always be 0.00
if modifyCostResult contains error the return HashMap will contain another key called error the values of which will be the error msg
Throws:
LogicBoxesException

getDetailsByDomain

public java.util.HashMap getDetailsByDomain(java.lang.String SERVICE_USERNAME,
                                            java.lang.String SERVICE_PASSWORD,
                                            java.lang.String SERVICE_ROLE,
                                            java.lang.String SERVICE_LANGPREF,
                                            int SERVICE_PARENTID,
                                            java.lang.String domainName,
                                            java.util.Vector option,
                                            java.lang.String productkey)
Gets the Details of the specified order based on given option(s)

Parameters:
domainName - The domainname under which the details are to be listed
option - Vector for listing Orders with various options *
Valid values are: All,OrderDetails,PricingDetails
Returns:
A HashMap with the result

Values returned by the HashMap are customerdetails= resellerdetails= orderdetails=
Each further returns an AssociativeArray containing repective details


getOrderIdByDomain

public int getOrderIdByDomain(java.lang.String SERVICE_USERNAME,
                              java.lang.String SERVICE_PASSWORD,
                              java.lang.String SERVICE_ROLE,
                              java.lang.String SERVICE_LANGPREF,
                              int SERVICE_PARENTID,
                              java.lang.String domainName,
                              java.lang.String productkey)
Gets the OrderId of given domainname

Parameters:
domainName - The domainname for which the orderid is to be listed
Returns:
OrderId of domainname

getPlanDetails

public java.util.HashMap getPlanDetails(java.lang.String SERVICE_USERNAME,
                                        java.lang.String SERVICE_PASSWORD,
                                        java.lang.String SERVICE_ROLE,
                                        java.lang.String SERVICE_LANGPREF,
                                        int SERVICE_PARENTID)
Returns all the plan details of LogicBoxes Engage.

Returns:
Returns HashMap containing plan details The Keys of the HashMap are as follows: operator_count - The operator count for this pack department_count - The department count for this pack ssl_chat - Indicates whether the Secure Chat will be provided or not. reporting - Indicates whether Enterprise Reporting feature will be available or not packagename - Name of the particular pack packprice - Monthly Customer cost price of this pack proratedcost - Prorated cost price packagekey - Pricing Param for this pack
Throws:
LogicBoxesException