def __init__(self, *args, **kwargs): if isArgsThisClass(self, args): self.data = args[0].data else: if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] # Sort description by countrycode kwargs["description"] = sorted(kwargs["description"], key=lambda x: repr(x[0]), reverse=False) description = Map([[String(e[0]), String(e[1])] for e in kwargs["description"]]) super().__init__( OrderedDict([ ("fee", Asset(kwargs["fee"])), ("description", description), ("event_id", FullObjectId(kwargs["event_id"])), ("rules_id", FullObjectId(kwargs["rules_id"])), ("asset_id", ObjectId(kwargs["asset_id"], "asset")), ("never_in_play", Bool(kwargs["never_in_play"])), ( "delay_before_settling", Uint32(kwargs["delay_before_settling"]), ), ######################## # Multi Market Exposure # Not available on beatrice or alice-hardfork ######################## # ( # "resolution_constraint", # ResolutionConstraint(kwargs["resolution_constraint"]), # ), ("extensions", Set([])), ]))
def __init__(self, *args, **kwargs): if isArgsThisClass(self, args): self.data = args[0].data else: if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] # Sort description by countrycode kwargs["description"] = sorted( kwargs["description"], key=lambda x: repr(x[0]), reverse=False, ) description = Map([ [String(e[0]), String(e[1])] for e in kwargs["description"] ]) super().__init__(OrderedDict([ ('fee', Asset(kwargs["fee"])), ('description', description), ('event_id', FullObjectId(kwargs["event_id"])), ('rules_id', FullObjectId(kwargs["rules_id"])), ('asset_id', ObjectId(kwargs["asset_id"], "asset")), ('never_in_play', Bool(kwargs["never_in_play"])), ('delay_before_settling', Uint32(kwargs["delay_before_settling"])), ('extensions', Set([])), ]))
def __init__(self, *args, **kwargs): if isArgsThisClass(self, args): self.data = args[0].data else: if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] if "new_description" in kwargs: # Sort description by countrycode kwargs["new_description"] = sorted( kwargs["new_description"], key=lambda x: repr(x[0]), reverse=False, ) description = Optional(Map([ [String(e[0]), String(e[1])] for e in kwargs["new_description"] ])) else: description = Optional(None) if "freeze" in kwargs: freeze = Optional(Bool(kwargs["freeze"])) else: freeze = Optional(None) if "delay_bets" in kwargs: delay_bets = Optional(Bool(kwargs["delay_bets"])) else: delay_bets = Optional(None) if "new_event_id" in kwargs: new_event_id = Optional(FullObjectId(kwargs["new_event_id"])) else: new_event_id = Optional(None) if "new_rules_id" in kwargs: new_rules_id = Optional(FullObjectId(kwargs["new_rules_id"])) else: new_rules_id = Optional(None) super().__init__(OrderedDict([ ('fee', Asset(kwargs["fee"])), ('betting_market_group_id', ObjectId(kwargs["betting_market_group_id"], "betting_market_group")), ('new_description', description), ('new_rules_id', new_rules_id), ('freeze', freeze), ('delay_bets', delay_bets), ('extensions', Set([])), ]))
def __init__(self, *args, **kwargs): if isArgsThisClass(self, args): self.data = args[0].data else: if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] # Sort names by countrycode kwargs["payout_condition"] = sorted( kwargs.get("payout_condition", []), key=lambda x: repr(x[0]), reverse=False, ) payout_condition = Map([[String(e[0]), String( e[1])] for e in kwargs.get("payout_condition", [])]) # Sort description by countrycode kwargs["description"] = sorted(kwargs["description"], key=lambda x: repr(x[0]), reverse=False) description = Map([[String(e[0]), String(e[1])] for e in kwargs["description"]]) super().__init__( OrderedDict([ ("fee", Asset(kwargs["fee"])), ("group_id", FullObjectId(kwargs["group_id"])), ("description", description), ("payout_condition", payout_condition), ("extensions", Set([])), ]))
def __init__(self, *args, **kwargs): if isArgsThisClass(self, args): self.data = args[0].data else: if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] if "new_name" in kwargs: # Sort names by countrycode kwargs["new_name"] = sorted(kwargs["new_name"], key=lambda x: repr(x[0]), reverse=False) name = Optional( Map([[String(e[0]), String(e[1])] for e in kwargs["new_name"]])) else: name = Optional(None) if "new_sport_id" in kwargs: new_sport_id = Optional(FullObjectId(kwargs["new_sport_id"])) else: new_sport_id = Optional(None) super().__init__( OrderedDict([ ("fee", Asset(kwargs["fee"])), ("new_sport_id", new_sport_id), ("new_name", name), ( "event_group_id", ObjectId(kwargs["event_group_id"], "event_group"), ), ("extensions", Set([])), ]))
def __init__(self, *args, **kwargs): if isArgsThisClass(self, args): self.data = args[0].data else: if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] # Sort names by countrycode kwargs["name"] = sorted( kwargs.get("name", []), key=lambda x: repr(x[0]), reverse=False, ) name = Map([ [String(e[0]), String(e[1])] for e in kwargs.get("name", []) ]) # Sort season by countrycode kwargs["season"] = sorted( kwargs.get("season", []), key=lambda x: repr(x[0]), reverse=False, ) season = Map([ [String(e[0]), String(e[1])] for e in kwargs.get("season", []) ]) if "start_time" in kwargs: start_time = Optional(PointInTime(kwargs["start_time"])) else: start_time = Optional(None) super().__init__(OrderedDict([ ('fee', Asset(kwargs["fee"])), ('name', name), ('season', season), ('start_time', start_time), ('event_group_id', FullObjectId(kwargs["event_group_id"])), ('competitors', Array([FullObjectId(o) for o in kwargs["competitors"]])), ('extensions', Set([])), ]))
def __init__(self, *args, **kwargs): if isArgsThisClass(self, args): self.data = args[0].data else: if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] super().__init__(OrderedDict([ ('fee', Asset(kwargs["fee"])), ('event_id', FullObjectId(kwargs["event_id"])), ('options', BettingMarketOptions(kwargs["options"])), ('extensions', Set([])), ]))
def __init__(self, *args, **kwargs): if isArgsThisClass(self, args): self.data = args[0].data else: if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] # Sort names by countrycode if "new_payout_condition" in kwargs: kwargs["new_payout_condition"] = sorted( kwargs.get("new_payout_condition", []), key=lambda x: repr(x[0]), reverse=False, ) payout_condition = Optional( Map([[String(e[0]), String(e[1])] for e in kwargs.get("new_payout_condition", [])])) else: payout_condition = Optional(None) if "new_description" in kwargs: # Sort description by countrycode kwargs["new_description"] = sorted(kwargs["new_description"], key=lambda x: repr(x[0]), reverse=False) description = Optional( Map([[String(e[0]), String(e[1])] for e in kwargs["new_description"]])) else: description = Optional(None) super().__init__( OrderedDict([ ("fee", Asset(kwargs["fee"])), ( "betting_market_id", ObjectId(kwargs["betting_market_id"], "betting_market"), ), ( "new_group_id", Optional(FullObjectId(kwargs["new_group_id"])), ), ("new_description", description), ("new_payout_condition", payout_condition), ("extensions", Set([])), ]))
def __init__(self, *args, **kwargs): if isArgsThisClass(self, args): self.data = args[0].data else: if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] # Sort names by countrycode kwargs["name"] = sorted(kwargs["name"], key=lambda x: repr(x[0]), reverse=False) name = Map([[String(e[0]), String(e[1])] for e in kwargs["name"]]) super().__init__( OrderedDict([ ("fee", Asset(kwargs["fee"])), ("name", name), ("sport_id", FullObjectId(kwargs["sport_id"])), ("extensions", Set([])), ]))
def __init__(self, *args, **kwargs): if isArgsThisClass(self, args): self.data = args[0].data else: if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] if "new_description" in kwargs: # Sort description by countrycode kwargs["new_description"] = sorted(kwargs["new_description"], key=lambda x: repr(x[0]), reverse=False) description = Optional( Map([[String(e[0]), String(e[1])] for e in kwargs["new_description"]])) else: description = Optional(None) if "status" in kwargs: status = Optional(BettingMarketGroupStatus(kwargs["status"])) else: status = Optional(None) if "new_rules_id" in kwargs: new_rules_id = Optional(FullObjectId(kwargs["new_rules_id"])) else: new_rules_id = Optional(None) super().__init__( OrderedDict([ ("fee", Asset(kwargs["fee"])), ( "betting_market_group_id", ObjectId( kwargs["betting_market_group_id"], "betting_market_group", ), ), ("new_description", description), ("new_rules_id", new_rules_id), ("status", status), ("extensions", Set([])), ]))
def __init__(self, *args, **kwargs): if isArgsThisClass(self, args): self.data = args[0].data else: if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] if "new_name" in kwargs: # Sort names by countrycode kwargs["new_name"] = sorted(kwargs.get("new_name", []), key=lambda x: repr(x[0]), reverse=False) name = Optional( Map([[String(e[0]), String(e[1])] for e in kwargs.get("new_name", [])])) else: name = Optional(None) if "new_season" in kwargs: # Sort season by countrycode kwargs["new_season"] = sorted( kwargs.get("new_season", []), key=lambda x: repr(x[0]), reverse=False, ) season = Optional( Map([[String(e[0]), String(e[1])] for e in kwargs.get("new_season", [])])) else: season = Optional(None) if "new_name" in kwargs: # Sort name by countrycode kwargs["new_name"] = sorted(kwargs.get("new_name", []), key=lambda x: repr(x[0]), reverse=False) name = Optional( Map([[String(e[0]), String(e[1])] for e in kwargs.get("new_name", [])])) else: name = Optional(None) if "new_start_time" in kwargs: start_time = Optional(PointInTime(kwargs["new_start_time"])) else: start_time = Optional(None) if "new_status" in kwargs: status = Optional(EventStatus(kwargs["new_status"])) else: status = Optional(None) if "new_event_group_id" in kwargs: new_event_group_id = Optional( FullObjectId(kwargs["new_event_group_id"])) else: new_event_group_id = Optional(None) super().__init__( OrderedDict([ ("fee", Asset(kwargs["fee"])), ("event_id", ObjectId(kwargs["event_id"], "event")), ("new_event_group_id", new_event_group_id), ("new_name", name), ("new_season", season), ("new_start_time", start_time), ("new_status", status), ("extensions", Set([])), ]))