com.shephertz.app42.paas.sdk.jme.appTab
Class DiscountService

java.lang.Object
  extended by com.shephertz.app42.paas.sdk.jme.appTab.DiscountService

public class DiscountService
extends java.lang.Object

See Also:
PackageService, DiscountData, App42Response

Constructor Summary
DiscountService(java.lang.String apiKey, java.lang.String secretKey, java.lang.String baseURL)
          This is a constructor that takes
 
Method Summary
 DiscountData createDiscount(java.lang.String discountName, java.lang.String discountType, DiscountData.Discount discount, java.lang.String description)
          create a discount for the package.
 App42Response deleteDiscountByName(java.lang.String discountName)
           
 java.util.Vector getAllDiscount()
          Gets the details of all discounts.
 DiscountData getDiscountByName(java.lang.String discountName)
           
 DiscountData getDiscountByPromoCode(java.lang.String promoCode)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscountService

public DiscountService(java.lang.String apiKey,
                       java.lang.String secretKey,
                       java.lang.String baseURL)
This is a constructor that takes

Parameters:
apiKey -
secretKey -
baseURL -
Method Detail

createDiscount

public DiscountData createDiscount(java.lang.String discountName,
                                   java.lang.String discountType,
                                   DiscountData.Discount discount,
                                   java.lang.String description)
                            throws App42Exception
create a discount for the package.

Parameters:
discountName - - Discount Name which should be unique
discountType - - Type of discount that you want't to create Like Storage, Bandwidth etc
discount - - Discount contains the details of the package you create like discountPercent , discountUsage , startDate, endDate etc
description - - Description for the discount
Returns:
The Created DiscountData Object
Throws:
App42Exception

deleteDiscountByName

public App42Response deleteDiscountByName(java.lang.String discountName)
                                   throws App42Exception
Parameters:
discountName -
Returns:
Throws:
App42Exception

getAllDiscount

public java.util.Vector getAllDiscount()
                                throws App42Exception
Gets the details of all discounts.

Returns:
The DiscountData Object
Throws:
App42Exception

getDiscountByName

public DiscountData getDiscountByName(java.lang.String discountName)
                               throws App42Exception
Parameters:
discountName -
Returns:
Throws:
App42Exception

getDiscountByPromoCode

public DiscountData getDiscountByPromoCode(java.lang.String promoCode)
                                    throws App42Exception
Parameters:
promoCode -
Returns:
Throws:
App42Exception