Difference between revisions of "PaymentNamespace class"
Nguyenduyan (talk | contribs) |
Nguyenduyan (talk | contribs) |
||
Line 1: | Line 1: | ||
{{CGscriptClass_Template | {{CGscriptClass_Template | ||
− | |Name=PaymentNamespace | + | |Name=<nowiki>PaymentNamespace</nowiki> |
− | |Description=The payment namespace | + | |Description=<nowiki>The payment namespace</nowiki> |
|Methods= | |Methods= | ||
− | {{CGscriptMethods_Template|ReturnType=array|Name=GetDetailedUsageCost|Parameters= | + | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetDetailedUsageCost</nowiki>|Parameters= |
− | {{CGscriptParameters_Template|Type=array|Name=startDate|Description=Period start date|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=endDate|Description=Period end date}} | + | {{CGscriptParameters_Template|Type=array|Name=<nowiki>startDate</nowiki>|Description=<nowiki>Period start date</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>endDate</nowiki>|Description=<nowiki>Period end date</nowiki>}} |
− | |Description=Get detailed information about cost in the specified period}} | + | |Description=<nowiki>Get detailed information about cost in the specified period</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=array|Name=GetDetailedUsageCost|Parameters= | + | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetDetailedUsageCost</nowiki>|Parameters= |
− | {{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}} | + | {{CGscriptParameters_Template|Type=array|Name=<nowiki>startDate</nowiki>|Description=<nowiki>Period start date</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>endDate</nowiki>|Description=<nowiki>Period end date</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>inFolderResourceId</nowiki>|Description=<nowiki>Top level folder to limit the search to</nowiki>}} |
− | |Description=Get detailed information about cost in the specified period}} | + | |Description=<nowiki>Get detailed information about cost in the specified period</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=array|Name=GetDetailedUsageCostByDay|Parameters= | + | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetDetailedUsageCostByDay</nowiki>|Parameters= |
− | {{CGscriptParameters_Template|Type=array|Name=startDate|Description=Period start date|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=endDate|Description=Period end date}} | + | {{CGscriptParameters_Template|Type=array|Name=<nowiki>startDate</nowiki>|Description=<nowiki>Period start date</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>endDate</nowiki>|Description=<nowiki>Period end date</nowiki>}} |
− | |Description=Get detailed information about cost in the specified period for each day with cost}} | + | |Description=<nowiki>Get detailed information about cost in the specified period for each day with cost</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=array|Name=GetDetailedUsageCostByDay|Parameters= | + | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetDetailedUsageCostByDay</nowiki>|Parameters= |
− | {{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}} | + | {{CGscriptParameters_Template|Type=array|Name=<nowiki>startDate</nowiki>|Description=<nowiki>Period start date</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>endDate</nowiki>|Description=<nowiki>Period end date</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>inFolderResourceId</nowiki>|Description=<nowiki>Top level folder to limit the search to</nowiki>}} |
− | |Description=Get detailed information about cost in the specified period for each day with cost}} | + | |Description=<nowiki>Get detailed information about cost in the specified period for each day with cost</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=CatglobeCost|Name=GetSimpleUsageCost|Parameters= | + | {{CGscriptMethods_Template|ReturnType=CatglobeCost|Name=<nowiki>GetSimpleUsageCost</nowiki>|Parameters= |
− | {{CGscriptParameters_Template|Type=array|Name=startDate|Description=Period start date|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=endDate|Description=Period end date}} | + | {{CGscriptParameters_Template|Type=array|Name=<nowiki>startDate</nowiki>|Description=<nowiki>Period start date</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>endDate</nowiki>|Description=<nowiki>Period end date</nowiki>}} |
− | |Description=Get simple information about cost in the specified period}} | + | |Description=<nowiki>Get simple information about cost in the specified period</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=CatglobeCost|Name=GetSimpleUsageCost|Parameters= | + | {{CGscriptMethods_Template|ReturnType=CatglobeCost|Name=<nowiki>GetSimpleUsageCost</nowiki>|Parameters= |
− | {{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}} | + | {{CGscriptParameters_Template|Type=array|Name=<nowiki>startDate</nowiki>|Description=<nowiki>Period start date</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>endDate</nowiki>|Description=<nowiki>Period end date</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>inFolderResourceId</nowiki>|Description=<nowiki>Top level folder to limit the search to</nowiki>}} |
− | |Description=Get simple information about cost in the specified period}} | + | |Description=<nowiki>Get simple information about cost in the specified period</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=string|Name=ToString|Description=The string representation of the object.}} | + | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Description=<nowiki>The string representation of the object.</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=UpdateExpired|Parameters= | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>UpdateExpired</nowiki>|Parameters= |
− | {{CGscriptParameters_Template|Type=int|Name=inFolderResourceId|Description=Top level folder to limit the search to}} | + | {{CGscriptParameters_Template|Type=int|Name=<nowiki>inFolderResourceId</nowiki>|Description=<nowiki>Top level folder to limit the search to</nowiki>}} |
− | |Description=Register any expired packages as used units}} | + | |Description=<nowiki>Register any expired packages as used units</nowiki>}} |
|Properties= | |Properties= | ||
− | {{CGscriptProperties_Template|ReturnType=string|Name=ObjectTypeName|HasGetter=1|Description=The name of the type of object.}} | + | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}} |
− | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}} | + | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}} |
}} | }} | ||
+ | |||
Revision as of 04:11, 28 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=getCurrentDateTime();
//array startDate = DateTime_subtractDays(endDate,7);
array endDate = {2016,7,16,23,59};
array startDate ={2016,7,16,0,0};
number folderRId =6376;//"Catglobe Solutions" folder;
array DetailedUsageCost1 = Catglobe.Payment.GetDetailedUsageCost(startDate, endDate);
array DetailedUsageCost2 = Catglobe.Payment.GetDetailedUsageCost(startDate, endDate,folderRId);
print(DetailedUsageCost1);
/*result
{
Catglobe Solutions\CG0699vox - CEM Cars\CG0699vox - CEM Cars Intelligence - Block 1 - Redirect (Q:40000, Cgs:603000, Import:0, Mail:0, Exp:0, Bought:0) = 643000,
....
Catglobe Solutions\Panel management\Questionnaire\Panel Management - Invitation Log DK (Q:0, Cgs:0, Import:28800, Mail:0, Exp:0, Bought:0) = 28800,
...
CG1320liv - Potentialemåling - TestTestsen - Round 1 (Q:0, Cgs:0, Import:0, Mail:400, Exp:0, Bought:0) = 400,
...}*/
print(DetailedUsageCost2);//{}
array endDate=getCurrentDateTime();
array startDate = DateTime_subtractDays(endDate,7);
number folderRId =6376;//"Catglobe Solutions" folder;;
CatglobeCost SimpleUsageCost1 = Catglobe.Payment.GetSimpleUsageCost(startDate, endDate);
CatglobeCost SimpleUsageCost2 = Catglobe.Payment.GetSimpleUsageCost(startDate, endDate,folderRId);
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