@tool extends TwitchData # CLASS GOT AUTOGENERATED DON'T CHANGE MANUALLY. CHANGES CAN BE OVERWRITTEN EASILY. ## ## #/components/schemas/ExtensionBitsProduct class_name TwitchExtensionBitsProduct ## The product's SKU. The SKU is unique across an extension's products. @export var sku: String: set(val): sku = val track_data(&"sku", val) ## An object that contains the product's cost information. @export var cost: Cost: set(val): cost = val track_data(&"cost", val) ## A Boolean value that indicates whether the product is in development. If **true**, the product is not available for public use. @export var in_development: bool: set(val): in_development = val track_data(&"in_development", val) ## The product's name as displayed in the extension. @export var display_name: String: set(val): display_name = val track_data(&"display_name", val) ## The date and time, in RFC3339 format, when the product expires. @export var expiration: String: set(val): expiration = val track_data(&"expiration", val) ## A Boolean value that determines whether Bits product purchase events are broadcast to all instances of an extension on a channel. The events are broadcast via the `onTransactionComplete` helper callback. Is **true** if the event is broadcast to all instances. @export var is_broadcast: bool: set(val): is_broadcast = val track_data(&"is_broadcast", val) var response: BufferedHTTPClient.ResponseData ## Constructor with all required fields. static func create(_sku: String, _cost: Cost, _in_development: bool, _display_name: String, _expiration: String, _is_broadcast: bool) -> TwitchExtensionBitsProduct: var twitch_extension_bits_product: TwitchExtensionBitsProduct = TwitchExtensionBitsProduct.new() twitch_extension_bits_product.sku = _sku twitch_extension_bits_product.cost = _cost twitch_extension_bits_product.in_development = _in_development twitch_extension_bits_product.display_name = _display_name twitch_extension_bits_product.expiration = _expiration twitch_extension_bits_product.is_broadcast = _is_broadcast return twitch_extension_bits_product static func from_json(d: Dictionary) -> TwitchExtensionBitsProduct: var result: TwitchExtensionBitsProduct = TwitchExtensionBitsProduct.new() if d.get("sku", null) != null: result.sku = d["sku"] if d.get("cost", null) != null: result.cost = Cost.from_json(d["cost"]) if d.get("in_development", null) != null: result.in_development = d["in_development"] if d.get("display_name", null) != null: result.display_name = d["display_name"] if d.get("expiration", null) != null: result.expiration = d["expiration"] if d.get("is_broadcast", null) != null: result.is_broadcast = d["is_broadcast"] return result ## An object that contains the product's cost information. ## #/components/schemas/ExtensionBitsProduct/Cost class Cost extends TwitchData: ## The product's price. @export var amount: int: set(val): amount = val track_data(&"amount", val) ## The type of currency. Possible values are: ## ## * bits @export var type: String: set(val): type = val track_data(&"type", val) ## Constructor with all required fields. static func create(_amount: int, _type: String) -> Cost: var cost: Cost = Cost.new() cost.amount = _amount cost.type = _type return cost static func from_json(d: Dictionary) -> Cost: var result: Cost = Cost.new() if d.get("amount", null) != null: result.amount = d["amount"] if d.get("type", null) != null: result.type = d["type"] return result