Difference between revisions of "CatglobeCostPurchase class"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "{{CGscriptClass_Template |Name=CatglobeCostPurchase |Description=Represents a purchase made |Methods= {{CGscriptMethods_Template|ReturnType=string|Name=ToString|Description=Th...")
 
Line 14: Line 14:
 
{{CGscriptProperties_Template|ReturnType=string|Name=UsageStatusAsString|HasGetter=1|Description=What is current usage status}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=UsageStatusAsString|HasGetter=1|Description=What is current usage status}}
 
}}
 
}}
 +
 +
=== <span style="color:#DF8621">'''Examples'''</span> ===
 +
 +
<source lang="javascript">
 +
number folderRId=15556593;
 +
array purInfo = Catglobe.Payment.GetPurchaseInformation(folderRId);
 +
CatglobeCostPurchase a = purInfo[0];
 +
print(a.BuyStatusAsString);
 +
print(a.ExpireDate);
 +
print(a.PurchaseDate);
 +
print(a.ResourceId);
 +
print(a.Units);
 +
print(a.UsageStatusAsString);
 +
</source>

Revision as of 09:34, 13 January 2017

CatglobeCostPurchase



Represents a purchase made


Methods

  • string ToString() - The string representation of the object.

Properties

  • string BuyStatusAsString { get; } - How was it bought
  • DateTime ExpireDate { get; } - When does the purchase expire. May be empty
  • string ObjectTypeName { get; } - The name of the type of object.
  • DateTime PurchaseDate { get; } - When was the purchase
  • int ResourceId { get; } - For which resource was the purchase made
  • TypeInformation TypeInformation { get; } - Get information about this class.
  • number Units { get; } - How many units was purchased
  • string UsageStatusAsString { get; } - What is current usage status


Examples

number folderRId=15556593;
array purInfo = Catglobe.Payment.GetPurchaseInformation(folderRId);
CatglobeCostPurchase a = purInfo[0];
print(a.BuyStatusAsString);
print(a.ExpireDate);
print(a.PurchaseDate);
print(a.ResourceId);
print(a.Units);
print(a.UsageStatusAsString);