/// <summary> /// Initializes a new instance of the <see cref="StatementEvent2" /> class. /// </summary> /// <param name="contractSelections"> These particular contracts are not related to markets in the same way that most contracts are related to markets.<br> The contract_selections field is only set for accumulator markets and it refers to the contract IDs that the acca is made up of, an example:<br> <br> M1 (Winner market in Man Utd - Liverpool) <ul> <li>M1-C1 (Man Utd) <li>M1-C2 (Draw) <li>M1-C3 (Liverpool) </ul> </ul> M2 (Winner market in Arsenal - Chelsea) <ul> <li>M2-C1 (Arsenal) <li>M2-C2 (Draw) <li>M2-C3 (Chelsea) </ul> <br> Now an accumulator market is created:<br> M3 (Man Utd and Arsenal both to win on 23rd of February) <ul> <li>M3-C1 (Yes) <li>M3-C2 (No) </ul> <br> In this case, M3 will have two contracts (M3-C1 and M3-C2) but contract_selections will be M1-C1 (Man Utd) and M2-C1 (Arsenal).<br> (required).</param> /// <param name="marketType">marketType (required).</param> /// <param name="name"> Name of the market. This field is for display purposes and should not be used to identify the market.<br> The market_type field should be used instead. (required).</param> public StatementEvent2(List <int?> contractSelections = default(List <int?>), AccountActivityResponseMarketType marketType = default(AccountActivityResponseMarketType), string name = default(string)) { // to ensure "contractSelections" is required (not null) if (contractSelections == null) { throw new InvalidDataException("contractSelections is a required property for StatementEvent2 and cannot be null"); } else { this.ContractSelections = contractSelections; } // to ensure "marketType" is required (not null) if (marketType == null) { throw new InvalidDataException("marketType is a required property for StatementEvent2 and cannot be null"); } else { this.MarketType = marketType; } // to ensure "name" is required (not null) if (name == null) { throw new InvalidDataException("name is a required property for StatementEvent2 and cannot be null"); } else { this.Name = name; } }
/// <summary> /// Initializes a new instance of the <see cref="Market" /> class. /// </summary> /// <param name="betDelay">How much is the bet delay for this market,\" the interval between order placement and acceptance (required).</param> /// <param name="cashoutEnabled"> Cashout enabled determines whether instant cashout is enabled for this market. If true, trading out of this market will cause the settlement result to be immediatelly reflected in the customer's balance (before the final settlement of the market). (required).</param> /// <param name="category">Category of this market.</param> /// <param name="complete">Complete markets cannot have additional contracts added after market creation (required).</param> /// <param name="contractSelections"> These particular contracts are not related to markets in the same way that most contracts are related to markets.<br> The contract_selections field is only set for accumulator markets and it refers to the contract IDs that the acca is made up of, an example:<br> <br> M1 (Winner market in Man Utd - Liverpool) <ul> <li>M1-C1 (Man Utd) <li>M1-C2 (Draw) <li>M1-C3 (Liverpool) </ul> </ul> M2 (Winner market in Arsenal - Chelsea) <ul> <li>M2-C1 (Arsenal) <li>M2-C2 (Draw) <li>M2-C3 (Chelsea) </ul> <br> Now an accumulator market is created:<br> M3 (Man Utd and Arsenal both to win on 23rd of February) <ul> <li>M3-C1 (Yes) <li>M3-C2 (No) </ul> <br> In this case, M3 will have two contracts (M3-C1 and M3-C2) but contract_selections will be M1-C1 (Man Utd) and M2-C1 (Arsenal).<br>.</param> /// <param name="created">When was the market created in the Smarkets exchange (required).</param> /// <param name="description">A summary about this market.</param> /// <param name="displayOrder">Markets are sorted in the website according to these numbers in descending order.</param> /// <param name="displayType"> The display type can be used by frontend to define how the odds of the contracts of<br> the market will appear on the website. (required) (default to DisplayTypeEnum.Default).</param> /// <param name="eventId">This ID uniquely identifies an event (required).</param> /// <param name="hidden">Hidden markets aren't displayed in our website (required).</param> /// <param name="id">This ID uniquely identifies the market (required).</param> /// <param name="inplayEnabled">True if trading will be open when the markets go live in-play.</param> /// <param name="marketType">marketType (required).</param> /// <param name="modified">The datetime of the last modification made by Smarkets to the market properties (required).</param> /// <param name="name"> Name of the market. This field is for display purposes and should not be used to identify the market.<br> The market_type field should be used instead. (required).</param> /// <param name="slug"> Slug concisely represents the market.<br> It should not be used to identify the market.<br> The market_type field should be used instead. (required).</param> /// <param name="state"> Market state can have the following values:<br> -new: just created, still not open for trading<br> -open: open for trading not live in-play<br> -live: open for trading, live in-play<br> -halted: trading is halted temporarily, usually due to material events<br> -settled: traded has ceased and the market has settled<br> -voided: the market was voided and no winner was chosen<br> -unavailable: the maret is not available for betting (required).</param> /// <param name="winnerCount"> How many winners will the market have.<br> Usually this number is 1, except for \"To Place\", \"Top x Finish\" type markets (required).</param> public Market(int?betDelay = default(int?), bool?cashoutEnabled = default(bool?), CategoryEnum?category = default(CategoryEnum?), bool?complete = default(bool?), List <int?> contractSelections = default(List <int?>), DateTime?created = default(DateTime?), string description = default(string), int?displayOrder = default(int?), DisplayTypeEnum displayType = DisplayTypeEnum.Default, string eventId = default(string), bool?hidden = default(bool?), string id = default(string), bool?inplayEnabled = default(bool?), AccountActivityResponseMarketType marketType = default(AccountActivityResponseMarketType), DateTime?modified = default(DateTime?), string name = default(string), string slug = default(string), StateEnum state = default(StateEnum), int?winnerCount = default(int?)) { // to ensure "betDelay" is required (not null) if (betDelay == null) { throw new InvalidDataException("betDelay is a required property for Market and cannot be null"); } else { this.BetDelay = betDelay; } // to ensure "cashoutEnabled" is required (not null) if (cashoutEnabled == null) { throw new InvalidDataException("cashoutEnabled is a required property for Market and cannot be null"); } else { this.CashoutEnabled = cashoutEnabled; } // to ensure "complete" is required (not null) if (complete == null) { throw new InvalidDataException("complete is a required property for Market and cannot be null"); } else { this.Complete = complete; } // to ensure "created" is required (not null) if (created == null) { throw new InvalidDataException("created is a required property for Market and cannot be null"); } else { this.Created = created; } // to ensure "displayType" is required (not null) if (displayType == null) { throw new InvalidDataException("displayType is a required property for Market and cannot be null"); } else { this.DisplayType = displayType; } // to ensure "eventId" is required (not null) if (eventId == null) { throw new InvalidDataException("eventId is a required property for Market and cannot be null"); } else { this.EventId = eventId; } // to ensure "hidden" is required (not null) if (hidden == null) { throw new InvalidDataException("hidden is a required property for Market and cannot be null"); } else { this.Hidden = hidden; } // to ensure "id" is required (not null) if (id == null) { throw new InvalidDataException("id is a required property for Market and cannot be null"); } else { this.Id = id; } // to ensure "marketType" is required (not null) if (marketType == null) { throw new InvalidDataException("marketType is a required property for Market and cannot be null"); } else { this.MarketType = marketType; } // to ensure "modified" is required (not null) if (modified == null) { throw new InvalidDataException("modified is a required property for Market and cannot be null"); } else { this.Modified = modified; } // to ensure "name" is required (not null) if (name == null) { throw new InvalidDataException("name is a required property for Market and cannot be null"); } else { this.Name = name; } // to ensure "slug" is required (not null) if (slug == null) { throw new InvalidDataException("slug is a required property for Market and cannot be null"); } else { this.Slug = slug; } // to ensure "state" is required (not null) if (state == null) { throw new InvalidDataException("state is a required property for Market and cannot be null"); } else { this.State = state; } // to ensure "winnerCount" is required (not null) if (winnerCount == null) { throw new InvalidDataException("winnerCount is a required property for Market and cannot be null"); } else { this.WinnerCount = winnerCount; } this.Category = category; this.ContractSelections = contractSelections; this.Description = description; this.DisplayOrder = displayOrder; this.InplayEnabled = inplayEnabled; }