Difference between revisions of "PaymentNamespace class"
Nguyenduyan (talk | contribs) |
Nguyenduyan (talk | contribs) |
||
Line 33: | Line 33: | ||
<source lang="javascript"> | <source lang="javascript"> | ||
− | |||
− | |||
array endDate = {2016,11,28,23,59}; | array endDate = {2016,11,28,23,59}; | ||
array startDate ={2016,11,28,0,0}; | array startDate ={2016,11,28,0,0}; | ||
− | number folderRId =15548914;//"AnCompany" folder; | + | number folderRId =15548914;//"AnCompany" folder; |
− | |||
array DetailedUsageCost1 = Catglobe.Payment.GetDetailedUsageCost(startDate, endDate); | array DetailedUsageCost1 = Catglobe.Payment.GetDetailedUsageCost(startDate, endDate); | ||
array DetailedUsageCost2 = Catglobe.Payment.GetDetailedUsageCost(startDate, endDate,folderRId); | array DetailedUsageCost2 = Catglobe.Payment.GetDetailedUsageCost(startDate, endDate,folderRId); | ||
print(DetailedUsageCost1); | print(DetailedUsageCost1); | ||
− | / | + | //result: {Function_System\Questionnaire (Q:0, Cgs:0, Import:0, Mail:0, Exp:0, Bought:-1000) = -1000, |
− | {Function_System\Questionnaire (Q:0, Cgs:0, Import:0, Mail:0, Exp:0, Bought:-1000) = -1000, | + | //-----\AnCompany\Qnaire\Survey test (Q:0, Cgs:0, Import:20300, Mail:0, Exp:0, Bought:0) = 20300} |
− | -----\AnCompany\Qnaire\Survey test (Q:0, Cgs:0, Import:20300, Mail:0, Exp:0, Bought:0) = 20300} | ||
− | |||
print(DetailedUsageCost2); | print(DetailedUsageCost2); | ||
− | / | + | //Result {-----\AnCompany\Qnaire\Survey test (Q:0, Cgs:0, Import:20300, Mail:0, Exp:0, Bought:0) = 20300} |
− | -----\AnCompany\Qnaire\Survey test (Q:0, Cgs:0, Import:20300, Mail:0, Exp:0, Bought:0) = 20300 | + | </source> |
− | } | + | <br/><source lang="javascript"> |
− | </source><br/><source lang="javascript"> | + | array endDate = {2016,11,28,23,59}; |
+ | array startDate ={2016,11,28,0,0}; | ||
+ | number folderRId =15548914;//"AnCompany" folder; | ||
+ | array a = Catglobe.Payment.GetDetailedUsageCostByDay(startDate, endDate);//{2016-00-28 (Units:-1000, Type:PackagePurchase,2016-00-28 (Units:20300, Type:ImportedData} | ||
+ | array a = Catglobe.Payment.GetDetailedUsageCostByDay(startDate, endDate, folderRId);//{2016-00-28 (Units:20300, Type:ImportedData} | ||
+ | </source> | ||
+ | <br/><source lang="javascript"> | ||
//array endDate=getCurrentDateTime(); | //array endDate=getCurrentDateTime(); | ||
//array startDate = DateTime_subtractDays(endDate,7); | //array startDate = DateTime_subtractDays(endDate,7); |
Revision as of 06:07, 30 November 2016
PaymentNamespace
The payment namespace
Methods
- array GetDetailedUsageCost(array startDate "Period start date", array endDate "Period end date") - Get detailed information about cost in the specified period
- array GetDetailedUsageCost(array startDate "Period start date", array endDate "Period end date", int inFolderResourceId "Top level folder to limit the search to") - Get detailed information about cost in the specified period
- array GetDetailedUsageCostByDay(array startDate "Period start date", array endDate "Period end date") - Get detailed information about cost in the specified period for each day with cost
- array GetDetailedUsageCostByDay(array startDate "Period start date", array endDate "Period end date", int inFolderResourceId "Top level folder to limit the search to") - Get detailed information about cost in the specified period for each day with cost
- CatglobeCost GetSimpleUsageCost(array startDate "Period start date", array endDate "Period end date") - Get simple information about cost in the specified period
- CatglobeCost GetSimpleUsageCost(array startDate "Period start date", array endDate "Period end date", int inFolderResourceId "Top level folder to limit the search to") - Get simple information about cost in the specified period
- string ToString() - The string representation of the object.
- Empty UpdateExpired(int inFolderResourceId "Top level folder to limit the search to") - Register any expired packages as used units
Properties
- string ObjectTypeName { get; } - The name of the type of object.
- TypeInformation TypeInformation { get; } - Get information about this class.
Examples
array endDate = {2016,11,28,23,59};
array startDate ={2016,11,28,0,0};
number folderRId =15548914;//"AnCompany" folder;
array DetailedUsageCost1 = Catglobe.Payment.GetDetailedUsageCost(startDate, endDate);
array DetailedUsageCost2 = Catglobe.Payment.GetDetailedUsageCost(startDate, endDate,folderRId);
print(DetailedUsageCost1);
//result: {Function_System\Questionnaire (Q:0, Cgs:0, Import:0, Mail:0, Exp:0, Bought:-1000) = -1000,
//-----\AnCompany\Qnaire\Survey test (Q:0, Cgs:0, Import:20300, Mail:0, Exp:0, Bought:0) = 20300}
print(DetailedUsageCost2);
//Result {-----\AnCompany\Qnaire\Survey test (Q:0, Cgs:0, Import:20300, Mail:0, Exp:0, Bought:0) = 20300}
array endDate = {2016,11,28,23,59};
array startDate ={2016,11,28,0,0};
number folderRId =15548914;//"AnCompany" folder;
array a = Catglobe.Payment.GetDetailedUsageCostByDay(startDate, endDate);//{2016-00-28 (Units:-1000, Type:PackagePurchase,2016-00-28 (Units:20300, Type:ImportedData}
array a = Catglobe.Payment.GetDetailedUsageCostByDay(startDate, endDate, folderRId);//{2016-00-28 (Units:20300, Type:ImportedData}
//array endDate=getCurrentDateTime();
//array startDate = DateTime_subtractDays(endDate,7);
array endDate = {2016,11,28,23,59};
array startDate ={2016,11,28,0,0};
number folderRId =15548914;//"AnCompany" folder;
CatglobeCost SimpleUsageCost1 = Catglobe.Payment.GetSimpleUsageCost(startDate, endDate);
CatglobeCost SimpleUsageCost2 = Catglobe.Payment.GetSimpleUsageCost(startDate, endDate,folderRId);
print(SimpleUsageCost1);// (Q:0, Cgs:0, Import:20300, Mail:0, Exp:0, Bought:-1000) = 19300
print(SimpleUsageCost2);// (Q:0, Cgs:0, Import:20300, Mail:0, Exp:0, Bought:0) = 20300