class_docstr: The PayPal Orders Table implementation
class_docstr_tok: ["The","PayPal","Orders","Table","implementation"]
docstr: Pulls PayPal Orders data.
  Parameters
  ----------
  query : ast.Select
     Given SQL SELECT query
  Returns
  -------
  pd.DataFrame
      PayPal Orders matching the query
  Raises
  ------
  ValueError
      If the query contains an unsupported condition
docstr_tok: ["Pulls","PayPal","Orders","data",".","Parameters","--","--","--","--","--","query",":","ast.Select","Given","SQL","SELECT","query","Returns","--","--","--","-","pd.DataFrame","PayPal","Orders","matching","the","query","Raises","--","--","--","ValueError","If","the","query","contains","an","unsupported","condition"]
code: def select(self, query: ast.Select) -> pd.DataFrame:
      """
      Pulls PayPal Orders data.
      Parameters
      ----------
      query : ast.Select
         Given SQL SELECT query
      Returns
      -------
      pd.DataFrame
          PayPal Orders matching the query
      Raises
      ------
      ValueError
          If the query contains an unsupported condition
      """
      select_statement_parser = SELECTQueryParser(
          query, "orders", self.get_columns()
      )
      (
          selected_columns,
          where_conditions,
          order_by_conditions,
          result_limit,
      ) = select_statement_parser.parse_query()
  
      id = None
      subset_where_conditions = []
      for op, arg1, arg2 in where_conditions:
          if arg1 == "id":
              if op == "=":
                  id = arg2
              else:
                  raise NotImplementedError(
                      "Only '=' operator is supported for 'ids' column"
                  )
          elif arg1 in [
              "state",
              "amount",
              "create_time",
              "update_time",
              "links",
              "pending_reason",
              "parent_payment",
          ]:
              subset_where_conditions.append([op, arg1, arg2])
  
      if not id:
          raise NotImplementedError(
              "id column is required for this table"
          )
  
      orders_df = pd.json_normalize(self.get_orders(id))
      select_statement_executor = SELECTQueryExecutor(
          orders_df,
          selected_columns,
          subset_where_conditions,
          order_by_conditions,
      )
      orders_df = select_statement_executor.execute_query()
      return orders_df
  
imports: import paypalrestsdk
  import pandas
  from typing import Text, List, Dict
  from mindsdb_sql.parser import ast
  from mindsdb.integrations.libs.api_handler import APITable
  from mindsdb.integrations.handlers.utilities.query_utilities import SELECTQueryParser, SELECTQueryExecutor
label_desc: Use image node_id 1 for calling the OrdersTable obj's underlying member method code with example usage: obj.select(query) and returns: orders_df