|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.shephertz.app42.paas.sdk.jme.appTab.ChargeService
public class ChargeService
ChargeService is part of AppTab which is a rating, metering, charging and billing engine. This service allows app developers to specify the rate for a particular charge parameter. e.g. Storage, Bandwidth, Feature. It provides methods for first creating the scheme for charging which specifies the unit of charging and the associated price. Subsequently a chargeXXX call has to be made for charging. e.g. If an App developer wants to charge on Storage, He can use the method createStorageCharge and specify that for 10 KB/MB/GB TB the price is 10 USD. Once the scheme is created. The app developer can call the chargeStorage whenever storage is utilized. e.g. 5MB. The bill is calculated based on package which is specified.
Constructor Summary | |
---|---|
ChargeService(java.lang.String apiKey,
java.lang.String secretKey,
java.lang.String baseURL)
This is a constructor that takes |
Method Summary | |
---|---|
Charge |
chargePackage(java.lang.String schemeName,
java.lang.String packageName,
java.lang.String chargeUser,
java.lang.Double storageSpace,
java.lang.String usageStorage,
java.lang.String type)
|
Charge |
createBandwidthCharge(java.lang.String bandwidthName,
java.lang.Double bandwidthUsage,
java.lang.String usageBandWidth,
java.lang.Double bandwidthPrice,
java.lang.String bandwidthCurrency,
java.lang.String bandwidthDescription)
Creates the scheme for bandwidth based charging. |
Charge |
createFeatureCharge(java.lang.String featureName,
java.lang.Double featurePrice,
java.lang.String featureCurrency,
java.lang.String featureDescription)
Creates the scheme for feature based charging. |
Charge |
createStorageCharge(java.lang.String storageName,
java.lang.Double storageSpace,
java.lang.String usageStorage,
java.lang.Double storagePrice,
java.lang.String storageCurrency,
java.lang.String storageDescription)
Creates the scheme for storage based charging. |
Charge |
validatePackageUsage(java.lang.String schemeName,
java.lang.String packageName,
java.lang.String featureName,
java.lang.String userName,
java.lang.Double storageSpace,
java.lang.String usageStorage)
Check and Validate a package usage under this module before you plan a pricing for it. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChargeService(java.lang.String apiKey, java.lang.String secretKey, java.lang.String baseURL)
apiKey
- secretKey
- baseURL
- Method Detail |
---|
public Charge chargePackage(java.lang.String schemeName, java.lang.String packageName, java.lang.String chargeUser, java.lang.Double storageSpace, java.lang.String usageStorage, java.lang.String type) throws App42Exception
App42Exception
public Charge createBandwidthCharge(java.lang.String bandwidthName, java.lang.Double bandwidthUsage, java.lang.String usageBandWidth, java.lang.Double bandwidthPrice, java.lang.String bandwidthCurrency, java.lang.String bandwidthDescription) throws App42Exception
bandwidthName
- - name of the schemebandwidthUsage
- - bandwidth usage for the schemeusageBandWidth
- - bandwidth unit for the schemebandwidthPrice
- - The price of the level schemebandwidthCurrency
- - Currency to be used for the schemebandwidthDescription
- - Description of the scheme
App42Exception
public Charge createFeatureCharge(java.lang.String featureName, java.lang.Double featurePrice, java.lang.String featureCurrency, java.lang.String featureDescription) throws App42Exception
featureName
- - The name of the schemefeaturePrice
- - The price of the schemefeatureCurrency
- - Currency to be used for that schemefeatureDescription
- - Description of the scheme
App42Exception
public Charge createStorageCharge(java.lang.String storageName, java.lang.Double storageSpace, java.lang.String usageStorage, java.lang.Double storagePrice, java.lang.String storageCurrency, java.lang.String storageDescription) throws App42Exception
storageName
- - The name of the schemestorageSpace
- - storage space for the schemeusageStorage
- - Storage units to be used for the schemestoragePrice
- - The price of the schemestorageCurrency
- - Currency to be used for that schemestorageDescription
- - Description of the scheme
App42Exception
public Charge validatePackageUsage(java.lang.String schemeName, java.lang.String packageName, java.lang.String featureName, java.lang.String userName, java.lang.Double storageSpace, java.lang.String usageStorage) throws App42Exception
schemeName
- - Name of scheme you wan't to validatepackageName
- - Name of package you wan't to validatefeatureName
- - Name of feature you wan't to validateuserName
- - Name of user for which you wan't to validate for the packagestorageSpace
- - StorageSpace of scheme you wan't to validatestorageUnit
- - Unit of storage you wan't to validate (it is either in KB,
MB, GB Or TB.
App42Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |