docs: def from_array(array):
          """
          Deserialize a new PreCheckoutQuery from a given dictionary.
  
          :return: new PreCheckoutQuery instance.
          :rtype: PreCheckoutQuery
          """
          if array is None or not array:
              return None
          # end if
          assert_type_or_raise(array, dict, parameter_name="array")
          from pytgbot.api_types.receivable.peer import User
  
          data = {}
          data['id'] = u(array.get('id'))
          data['from_peer'] = User.from_array(array.get('from'))
          data['currency'] = u(array.get('currency'))
          data['total_amount'] = int(array.get('total_amount'))
          data['invoice_payload'] = u(array.get('invoice_payload'))
          data['shipping_option_id'] = u(array.get('shipping_option_id')) if array.get('shipping_option_id') is not None else None
          data['order_info'] = OrderInfo.from_array(array.get('order_info')) if array.get('order_info') is not None else None
          data['_raw'] = array
          return PreCheckoutQuery(**data)