Product class

From Catglobe Wiki
Revision as of 12:24, 13 January 2017 by Nguyenduyan (talk | contribs) (Created page with "{{CGscriptClass_Template |Name=Product |Description=Represents a Product. |Constructors= {{CGscriptConstructors_Template|Parameters= {{CGscriptParameters_Template|Type=int|Nam...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Product



Represents a Product.

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
  • 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
  • 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
  • string ResourceName { get; } - Name of the Product
  • TypeInformation TypeInformation { get; } - Get information about this class.
  • int Weight { get; } - Weight in kg