More actions
Nguyenduyan (talk | contribs) No edit summary |
Nguyenduyan (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{CGscriptClass_Template | {{CGscriptClass_Template | ||
|Name= | |Name=PaymentNamespace | ||
|Description= | |Description=The payment namespace | ||
|Methods= | |Methods= | ||
{{CGscriptMethods_Template|ReturnType=array|Name= | {{CGscriptMethods_Template|ReturnType=array|Name=GetDetailedUsageCost|Parameters= | ||
{{CGscriptParameters_Template|Type=array|Name= | {{CGscriptParameters_Template|Type=array|Name=startDate|Description=Period start date|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=endDate|Description=Period end date}} | ||
|Description= | |Description=Get detailed information about cost in the specified period}} | ||
{{CGscriptMethods_Template|ReturnType=array|Name= | {{CGscriptMethods_Template|ReturnType=array|Name=GetDetailedUsageCost|Parameters= | ||
{{CGscriptParameters_Template|Type=array|Name= | {{CGscriptParameters_Template|Type=array|Name=startDate|Description=Period start date|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=endDate|Description=Period end date|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=inFolderResourceId|Description=Top level folder to limit the search to}} | ||
|Description= | |Description=Get detailed information about cost in the specified period}} | ||
{{CGscriptMethods_Template|ReturnType=CatglobeCost|Name= | {{CGscriptMethods_Template|ReturnType=CatglobeCost|Name=GetSimpleUsageCost|Parameters= | ||
{{CGscriptParameters_Template|Type=array|Name= | {{CGscriptParameters_Template|Type=array|Name=startDate|Description=Period start date|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=endDate|Description=Period end date}} | ||
|Description= | |Description=Get simple information about cost in the specified period}} | ||
{{CGscriptMethods_Template|ReturnType=CatglobeCost|Name= | {{CGscriptMethods_Template|ReturnType=CatglobeCost|Name=GetSimpleUsageCost|Parameters= | ||
{{CGscriptParameters_Template|Type=array|Name= | {{CGscriptParameters_Template|Type=array|Name=startDate|Description=Period start date|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=endDate|Description=Period end date|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=inFolderResourceId|Description=Top level folder to limit the search to}} | ||
|Description= | |Description=Get simple information about cost in the specified period}} | ||
{{CGscriptMethods_Template|ReturnType=string|Name= | {{CGscriptMethods_Template|ReturnType=string|Name=ToString|Description=The string representation of the object.}} | ||
|Properties= | |Properties= | ||
{{CGscriptProperties_Template|ReturnType=string|Name= | {{CGscriptProperties_Template|ReturnType=string|Name=ObjectTypeName|HasGetter=1|Description=The name of the type of object.}} | ||
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name= | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}} | ||
}} | }} | ||
Line 27: | Line 28: | ||
<source lang="javascript"> | <source lang="javascript"> | ||
array endDate=getCurrentDateTime(); | |||
array startDate = DateTime_subtractDays(endDate,7); | |||
number folderRId =2124; | |||
array DetailedUsageCost1 = Catglobe.Payment.GetDetailedUsageCost(startDate, endDate); | |||
array DetailedUsageCost2 = Catglobe.Payment.GetDetailedUsageCost(startDate, endDate,folderRId); | |||
CatglobeCost SimpleUsageCost1 = Catglobe.Payment.GetSimpleUsageCost(startDate, endDate); | |||
CatglobeCost SimpleUsageCost2 = Catglobe.Payment.GetSimpleUsageCost(startDate, endDate,folderRId); | |||
print(DetailedUsageCost1);//{Clients\The Nielsen Company DK\An test - in/ex from (Q:0, Cgs:0, Import:29250, Mail:0, Exp:0, Bought:0) = 29250,Clients\The Nielsen Company DK\An test - in/ex from (Q:0, Cgs:10000, Import:0, Mail:0, Exp:0, Bought:0) = 10000,vinhtest\bt-questionnaire-10-11 (Q:5068000, Cgs:3511000, Import:0, Mail:0, Exp:0, Bought:0) = 8579000,vinhtest\Copy (1) of bt-questionnaire-10-11 (Q:2012000, Cgs:1264000, Import:0, Mail:0, Exp:0, Bought:0) = 3276000} | |||
print(DetailedUsageCost2);//{} | |||
print(SimpleUsageCost1);// (Q:7080000, Cgs:4785000, Import:29250, Mail:0, Exp:0, Bought:0) = 11894250 | |||
print(SimpleUsageCost2);// (Q:0, Cgs:0, Import:0, Mail:0, Exp:0, Bought:0) = 0 | |||
</source> | </source> | ||
Revision as of 08:27, 23 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
- 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.
Properties
- string ObjectTypeName { get; } - The name of the type of object.
- TypeInformation TypeInformation { get; } - Get information about this class.
Examples
array endDate=getCurrentDateTime();
array startDate = DateTime_subtractDays(endDate,7);
number folderRId =2124;
array DetailedUsageCost1 = Catglobe.Payment.GetDetailedUsageCost(startDate, endDate);
array DetailedUsageCost2 = Catglobe.Payment.GetDetailedUsageCost(startDate, endDate,folderRId);
CatglobeCost SimpleUsageCost1 = Catglobe.Payment.GetSimpleUsageCost(startDate, endDate);
CatglobeCost SimpleUsageCost2 = Catglobe.Payment.GetSimpleUsageCost(startDate, endDate,folderRId);
print(DetailedUsageCost1);//{Clients\The Nielsen Company DK\An test - in/ex from (Q:0, Cgs:0, Import:29250, Mail:0, Exp:0, Bought:0) = 29250,Clients\The Nielsen Company DK\An test - in/ex from (Q:0, Cgs:10000, Import:0, Mail:0, Exp:0, Bought:0) = 10000,vinhtest\bt-questionnaire-10-11 (Q:5068000, Cgs:3511000, Import:0, Mail:0, Exp:0, Bought:0) = 8579000,vinhtest\Copy (1) of bt-questionnaire-10-11 (Q:2012000, Cgs:1264000, Import:0, Mail:0, Exp:0, Bought:0) = 3276000}
print(DetailedUsageCost2);//{}
print(SimpleUsageCost1);// (Q:7080000, Cgs:4785000, Import:29250, Mail:0, Exp:0, Bought:0) = 11894250
print(SimpleUsageCost2);// (Q:0, Cgs:0, Import:0, Mail:0, Exp:0, Bought:0) = 0