Difference between revisions of "ProductOption class"

From Catglobe Wiki
Jump to: navigation, search
 
Line 2: Line 2:
 
|Name=<nowiki>ProductOption</nowiki>
 
|Name=<nowiki>ProductOption</nowiki>
 
|Description=<nowiki>Represents a Product.</nowiki>
 
|Description=<nowiki>Represents a Product.</nowiki>
|Methods=
+
|InheritsFrom=object|Methods=
 
{{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>Buy</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>Buy</nowiki>|Parameters=
 
{{CGscriptParameters_Template|Type=Order|Name=<nowiki>order</nowiki>|Description=<nowiki>Order to add the purchase to</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>amount</nowiki>|Description=<nowiki>Number of items to add to order. Negative or 0 removes existing</nowiki>}}
 
{{CGscriptParameters_Template|Type=Order|Name=<nowiki>order</nowiki>|Description=<nowiki>Order to add the purchase to</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>amount</nowiki>|Description=<nowiki>Number of items to add to order. Negative or 0 removes existing</nowiki>}}
Line 9: Line 9:
 
{{CGscriptParameters_Template|Type=Order|Name=<nowiki>order</nowiki>|Description=<nowiki>Order to add the purchase to</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>amount</nowiki>|Description=<nowiki>Number of items to add to order. Negative or 0 removes existing</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>unitCost</nowiki>|Description=<nowiki>Cost per unit in points. 0 is equal to default price. If set, updates price for all existing also.</nowiki>}}
 
{{CGscriptParameters_Template|Type=Order|Name=<nowiki>order</nowiki>|Description=<nowiki>Order to add the purchase to</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>amount</nowiki>|Description=<nowiki>Number of items to add to order. Negative or 0 removes existing</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>unitCost</nowiki>|Description=<nowiki>Cost per unit in points. 0 is equal to default price. If set, updates price for all existing also.</nowiki>}}
 
|Description=<nowiki>Purchase items</nowiki>}}
 
|Description=<nowiki>Purchase items</nowiki>}}
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Description=<nowiki>The string representation of the object.</nowiki>}}
+
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}}
 
|Properties=
 
|Properties=
 
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>CanSell</nowiki>|HasGetter=1|Description=<nowiki>Is there enough products available to buy 1. Return false if unable to add to order</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>CanSell</nowiki>|HasGetter=1|Description=<nowiki>Is there enough products available to buy 1. Return false if unable to add to order</nowiki>}}
Line 16: Line 16:
 
{{CGscriptProperties_Template|ReturnType=Dictionary|Name=<nowiki>LocalizedNames</nowiki>|HasGetter=1|Description=<nowiki>Localized Names of the ProductOption</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=Dictionary|Name=<nowiki>LocalizedNames</nowiki>|HasGetter=1|Description=<nowiki>Localized Names of the ProductOption</nowiki>}}
 
{{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=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}}
+
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}}
 
}}
 
}}

Latest revision as of 07:23, 2 July 2020

ProductOption



Represents a Product.

Parent class

Inherits from object

Methods

  • bool Buy(Order order "Order to add the purchase to", int amount "Number of items to add to order. Negative or 0 removes existing") - Purchase items
  • ProductOrder Buy(Order order "Order to add the purchase to", int amount "Number of items to add to order. Negative or 0 removes existing", int unitCost "Cost per unit in points. 0 is equal to default price. If set, updates price for all existing also.") - Purchase items
  • (From object) string ToString() - The string representation of the object.

Properties

  • bool CanSell { get; } - Is there enough products available to buy 1. Return false if unable to add to order
  • int Id { get; } - Id of the ProductOption
  • string LocalizedName { get; } - Localized Name of the ProductOption
  • Dictionary LocalizedNames { get; } - Localized Names of the ProductOption
  • string ObjectTypeName { get; } - The name of the type of object.
  • (From object) TypeInformation TypeInformation { get; } - Get information about this class.