def de_json(cls, data, bot): if not data: return None data = super(ShippingOption, cls).de_json(data, bot) data['prices'] = LabeledPrice.de_list(data.get('prices'), bot) return cls(**data)
def de_json(cls, data: Optional[JSONDict], bot: 'Bot') -> Optional['InputInvoiceMessageContent']: data = cls.parse_data(data) if not data: return None data['prices'] = LabeledPrice.de_list(data.get('prices'), bot) return cls(**data, bot=bot)
def de_json(cls, data: Optional[JSONDict], bot: 'Bot') -> Optional['InputInvoiceMessageContent']: """See :meth:`telegram.TelegramObject.de_json`.""" data = cls._parse_data(data) if not data: return None data['prices'] = LabeledPrice.de_list(data.get('prices'), bot) return cls(**data, bot=bot)
def de_json(data, bot): """ Args: data (dict): bot (telegram.Bot): Returns: telegram.ShippingOption: """ if not data: return None data = super(ShippingOption, ShippingOption).de_json(data, bot) data['prices'] = LabeledPrice.de_list(data.get('prices'), bot) return ShippingOption(**data)