Difference between revisions of "Product class"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "{{CGscriptClass_Template |Name=Product |Description=Represents a Product. |Constructors= {{CGscriptConstructors_Template|Parameters= {{CGscriptParameters_Template|Type=int|Nam...")
 
Line 1: Line 1:
 
{{CGscriptClass_Template
 
{{CGscriptClass_Template
|Name=Product
+
|Name=<nowiki>Product</nowiki>
|Description=Represents a Product.
+
|Description=<nowiki>Represents a Product.</nowiki>
|Constructors=
+
|InheritsFrom=object|Constructors=
 
{{CGscriptConstructors_Template|Parameters=
 
{{CGscriptConstructors_Template|Parameters=
{{CGscriptParameters_Template|Type=int|Name=ResourceId|Description=Resource Id of the Product}}
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>ResourceId</nowiki>|Description=<nowiki>Resource Id of the Product</nowiki>}}
|Description=Instanciate an existing instance using the resource id of a product}}
+
|Description=<nowiki>Instanciate an existing instance using the resource id of a product</nowiki>}}
 
|Methods=
 
|Methods=
{{CGscriptMethods_Template|ReturnType=number|Name=CostInCurrency|Parameters=
+
{{CGscriptMethods_Template|ReturnType=number|Name=<nowiki>CostInCurrency</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=string|Name=currency|Description=Currency to use for calculations. Use empty for default currency}}
+
{{CGscriptParameters_Template|Type=string|Name=<nowiki>currency</nowiki>|Description=<nowiki>Currency to use for calculations. Use empty for default currency</nowiki>}}
|Description=How many points does this product cost}}
+
|Description=<nowiki>How many points does this product cost</nowiki>}}
{{CGscriptMethods_Template|ReturnType=string|Name=ToString|Description=The string representation of the object.}}
+
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}}
 
|Properties=
 
|Properties=
{{CGscriptProperties_Template|ReturnType=string|Name=Category|HasGetter=1|Description=Category of the Product}}
+
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Category</nowiki>|HasGetter=1|Description=<nowiki>Category of the Product</nowiki>}}
{{CGscriptProperties_Template|ReturnType=number|Name=CostInDefaultCurrency|HasGetter=1|Description=How many points does this product cost}}
+
{{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>CostInDefaultCurrency</nowiki>|HasGetter=1|Description=<nowiki>How many points does this product cost</nowiki>}}
{{CGscriptProperties_Template|ReturnType=int|Name=CostInPoints|HasGetter=1|Description=How many points does this product cost}}
+
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>CostInPoints</nowiki>|HasGetter=1|Description=<nowiki>How many points does this product cost</nowiki>}}
{{CGscriptProperties_Template|ReturnType=int|Name=GiftPoints|HasGetter=1|Description=Bonus points awarded when buying this product}}
+
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>GiftPoints</nowiki>|HasGetter=1|Description=<nowiki>Bonus points awarded when buying this product</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=ImageUrl|HasGetter=1|Description=Url to the main image of the product}}
+
{{CGscriptProperties_Template|ReturnType=object|Name=<nowiki>GroupResourceId</nowiki>|HasGetter=1|Description=<nowiki>Resource id of the group contains product (product supplier). if product doesn't belong any group, return empty</nowiki>}}
{{CGscriptProperties_Template|ReturnType=bool|Name=IsPhysical|HasGetter=1|Description=Is the product something that needs to be physically delivered}}
+
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ImageUrl</nowiki>|HasGetter=1|Description=<nowiki>Url to the main image of the product</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=LocalizedDescription|HasGetter=1|Description=Localized description of the Product. This is HTML}}
+
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>IsPhysical</nowiki>|HasGetter=1|Description=<nowiki>Is the product something that needs to be physically delivered</nowiki>}}
{{CGscriptProperties_Template|ReturnType=Dictionary|Name=LocalizedDescriptions|HasGetter=1|Description=Localized Descriptions of the Product}}
+
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>LocalizedDescription</nowiki>|HasGetter=1|Description=<nowiki>Localized description of the Product. This is HTML</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=LocalizedName|HasGetter=1|Description=Localized Name of the Product}}
+
{{CGscriptProperties_Template|ReturnType=Dictionary|Name=<nowiki>LocalizedDescriptions</nowiki>|HasGetter=1|Description=<nowiki>Localized Descriptions of the Product</nowiki>}}
{{CGscriptProperties_Template|ReturnType=Dictionary|Name=LocalizedNames|HasGetter=1|Description=Localized Names of the Product}}
+
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>LocalizedName</nowiki>|HasGetter=1|Description=<nowiki>Localized Name of the Product</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=ObjectTypeName|HasGetter=1|Description=The name of the type of object.}}
+
{{CGscriptProperties_Template|ReturnType=Dictionary|Name=<nowiki>LocalizedNames</nowiki>|HasGetter=1|Description=<nowiki>Localized Names of the Product</nowiki>}}
{{CGscriptProperties_Template|ReturnType=array|Name=ProductOptions|HasGetter=1|Description=Get the options of this product, ordered by points then by localizedName}}
+
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=ResourceName|HasGetter=1|Description=Name of the Product}}
+
{{CGscriptProperties_Template|ReturnType=array|Name=<nowiki>ProductOptions</nowiki>|HasGetter=1|Description=<nowiki>Get the options of this product, ordered by points then by localizedName</nowiki>}}
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}}
+
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>ResourceId</nowiki>|HasGetter=1|Description=<nowiki>Resource id of the Product</nowiki>}}
{{CGscriptProperties_Template|ReturnType=int|Name=Weight|HasGetter=1|Description=Weight in kg}}
+
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ResourceName</nowiki>|HasGetter=1|Description=<nowiki>Name of the Product</nowiki>}}
 +
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}}
 +
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>Weight</nowiki>|HasGetter=1|Description=<nowiki>Weight in kg</nowiki>}}
 
}}
 
}}

Revision as of 06:23, 2 July 2020

Product



Represents a Product.

Parent class

Inherits from object

Constructors

  • (int ResourceId "Resource Id of the Product") - Instanciate an existing instance using the resource id of a product

Methods

  • number CostInCurrency(string currency "Currency to use for calculations. Use empty for default currency") - How many points does this product cost
  • (From object) string ToString() - The string representation of the object.

Properties

  • string Category { get; } - Category of the Product
  • number CostInDefaultCurrency { get; } - How many points does this product cost
  • int CostInPoints { get; } - How many points does this product cost
  • int GiftPoints { get; } - Bonus points awarded when buying this product
  • object GroupResourceId { get; } - Resource id of the group contains product (product supplier). if product doesn't belong any group, return empty
  • string ImageUrl { get; } - Url to the main image of the product
  • bool IsPhysical { get; } - Is the product something that needs to be physically delivered
  • string LocalizedDescription { get; } - Localized description of the Product. This is HTML
  • Dictionary LocalizedDescriptions { get; } - Localized Descriptions of the Product
  • string LocalizedName { get; } - Localized Name of the Product
  • Dictionary LocalizedNames { get; } - Localized Names of the Product
  • string ObjectTypeName { get; } - The name of the type of object.
  • array ProductOptions { get; } - Get the options of this product, ordered by points then by localizedName
  • int ResourceId { get; } - Resource id of the Product
  • string ResourceName { get; } - Name of the Product
  • (From object) TypeInformation TypeInformation { get; } - Get information about this class.
  • int Weight { get; } - Weight in kg