docs: def from_array(array):
          """
          Deserialize a new InvoiceMessage from a given dictionary.
  
          :return: new InvoiceMessage instance.
          :rtype: InvoiceMessage
          """
          if array is None or not array:
              return None
          # end if
          assert_type_or_raise(array, dict, parameter_name="array")
          from pytgbot.api_types.sendable.payments import LabeledPrice
          from pytgbot.api_types.sendable.reply_markup import InlineKeyboardMarkup
          
  
          data = {}
          data['title'] = u(array.get('title'))
          data['description'] = u(array.get('description'))
          data['payload'] = u(array.get('payload'))
          data['provider_token'] = u(array.get('provider_token'))
          data['start_parameter'] = u(array.get('start_parameter'))
          data['currency'] = u(array.get('currency'))
          data['prices'] = LabeledPrice.from_array_list(array.get('prices'), list_level=1)
          if array.get('chat_id') is None:
              data['receiver'] = None
          elif isinstance(array.get('chat_id'), None):
              data['receiver'] = None(array.get('chat_id'))
          elif isinstance(array.get('chat_id'), str):
              data['receiver'] = u(array.get('chat_id'))
          elif isinstance(array.get('chat_id'), int):
              data['receiver'] = int(array.get('chat_id'))
          else:
              raise TypeError('Unknown type, must be one of None, str, int or None.')
          # end if
          if array.get('reply_to_message_id') is None:
              data['reply_id'] = None
          elif isinstance(array.get('reply_to_message_id'), DEFAULT_MESSAGE_ID):
              data['reply_id'] = DEFAULT_MESSAGE_ID(array.get('reply_to_message_id'))
          elif isinstance(array.get('reply_to_message_id'), int):
              data['reply_id'] = int(array.get('reply_to_message_id'))
          else:
              raise TypeError('Unknown type, must be one of DEFAULT_MESSAGE_ID, int or None.')
          # end if
          data['provider_data'] = u(array.get('provider_data')) if array.get('provider_data') is not None else None
          data['photo_url'] = u(array.get('photo_url')) if array.get('photo_url') is not None else None
          data['photo_size'] = int(array.get('photo_size')) if array.get('photo_size') is not None else None
          data['photo_width'] = int(array.get('photo_width')) if array.get('photo_width') is not None else None
          data['photo_height'] = int(array.get('photo_height')) if array.get('photo_height') is not None else None
          data['need_name'] = bool(array.get('need_name')) if array.get('need_name') is not None else None
          data['need_phone_number'] = bool(array.get('need_phone_number')) if array.get('need_phone_number') is not None else None
          data['need_email'] = bool(array.get('need_email')) if array.get('need_email') is not None else None
          data['need_shipping_address'] = bool(array.get('need_shipping_address')) if array.get('need_shipping_address') is not None else None
          data['send_phone_number_to_provider'] = bool(array.get('send_phone_number_to_provider')) if array.get('send_phone_number_to_provider') is not None else None
          data['send_email_to_provider'] = bool(array.get('send_email_to_provider')) if array.get('send_email_to_provider') is not None else None
          data['is_flexible'] = bool(array.get('is_flexible')) if array.get('is_flexible') is not None else None
          data['disable_notification'] = bool(array.get('disable_notification')) if array.get('disable_notification') is not None else None
          data['reply_markup'] = InlineKeyboardMarkup.from_array(array.get('reply_markup')) if array.get('reply_markup') is not None else None
          return InvoiceMessage(**data)