/**
 * SugarWebServiceImplv4_1.php
 *
 * This class is an implementation class for all the web services.  Version 4_1 adds limit/off support to the
 * get_relationships function.  We also added the sync_get_modified_relationships function call from version
 * one to facilitate querying for related meetings/calls contacts/users records.
 *
 */
Class [  class SugarWebServiceImplv4_1 extends SugarWebServiceImplv4 ] {
  

  - Constants [0] {
  }

  - Static properties [1] {
    Property [ public static $helperObject ]
  }

  - Static methods [0] {
  }

  - Properties [0] {
  }

  - Methods [153] {
    /**
     * Class Constructor Object
     *
     */
    Method [  public method __construct ] {
      
    }

    /**
     * Retrieve a collection of beans that are related to the specified bean and optionally return relationship data for those related beans.
     * So in this API you can get contacts info for an account and also return all those contact's email address or an opportunity info also.
     *
     * @param String $session -- Session ID returned by a previous call to login.
     * @param String $module_name -- The name of the module that the primary record is from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
     * @param String $module_id -- The ID of the bean in the specified module
     * @param String $link_field_name -- The name of the lnk field to return records from.  This name should be the name the relationship.
     * @param String $related_module_query -- A portion of the where clause of the SQL statement to find the related items.  The SQL query will already be filtered to only include the beans that are related to the specified bean.
     * @param Array $related_fields - Array of related bean fields to be returned.
     * @param Array $related_module_link_name_to_fields_array - For every related bean returrned, specify link fields name to fields info for that bean to be returned. For ex.'link_name_to_fields_array' => array(array('name' =>  'email_addresses', 'value' => array('id', 'email_address', 'opt_out', 'primary_address'))).
     * @param Number $deleted -- false if deleted records should not be include, true if deleted records should be included.
     * @param String $order_by -- field to order the result sets by
     * @param Number $offset -- where to start in the return
     * @param Number $limit -- number of results to return (defaults to all)
     * @return Array 'entry_list' -- Array - The records that were retrieved
     *               'relationship_list' -- Array - The records link field data. The example is if asked about accounts contacts email address then return data would look like Array ( [0] => Array ( [name] => email_addresses [records] => Array ( [0] => Array ( [0] => Array ( [name] => id [value] => 3fb16797-8d90-0a94-ac12-490b63a6be67 ) [1] => Array ( [name] => email_address [value] => hr.kid.qa@example.com ) [2] => Array ( [name] => opt_out [value] => 0 ) [3] => Array ( [name] => primary_address [value] => 1 ) ) [1] => Array ( [0] => Array ( [name] => id [value] => 403f8da1-214b-6a88-9cef-490b63d43566 ) [1] => Array ( [name] => email_address [value] => kid.hr@example.name ) [2] => Array ( [name] => opt_out [value] => 0 ) [3] => Array ( [name] => primary_address [value] => 0 ) ) ) ) )
     * @exception 'SoapFault' -- The SOAP error, if any
     */
    Method [  public method get_relationships ] {
      

      - Parameters [11] {
        Parameter #0 [  $session ]
        Parameter #1 [  $module_name ]
        Parameter #2 [  $module_id ]
        Parameter #3 [  $link_field_name ]
        Parameter #4 [  $related_module_query ]
        Parameter #5 [  $related_fields ]
        Parameter #6 [  $related_module_link_name_to_fields_array ]
        Parameter #7 [  $deleted ]
        Parameter #8 [  $order_by = '' ]
        Parameter #9 [  $offset = 0 ]
        Parameter #10 [  $limit = false ]
      }
    }

    /**
     * get_modified_relationships
     *
     * Get a list of the relationship records that have a date_modified value set within a specified date range.  This is used to
     * help facilitate sync operations.  The module_name should be "Users" and the related_module one of "Meetings", "Calls" and
     * "Contacts".
     *
     * @param xsd :string $session String of the session id
     * @param xsd :string $module_name String value of the primary module to retrieve relationship against
     * @param xsd :string $related_module String value of the related module to retrieve records off of
     * @param xsd :string $from_date String value in YYYY-MM-DD HH:MM:SS format of date_start range (required)
     * @param xsd :string $to_date String value in YYYY-MM-DD HH:MM:SS format of ending date_start range (required)
     * @param xsd :int $offset Integer value of the offset to begin returning records from
     * @param xsd :int $max_results Integer value of the max_results to return; -99 for unlimited
     * @param xsd :int $deleted Integer value indicating deleted column value search (defaults to 0).  Set to 1 to find deleted records
     * @param xsd :string $module_user_id String value of the user id (optional, but defaults to SOAP session user id anyway)  The module_user_id value
     * here ought to be the user id of the user initiating the SOAP session
     * @param tns :select_fields $select_fields Array value of fields to select and return as name/value pairs
     * @param xsd :string $relationship_name String value of the relationship name to search on
     * @param xsd :string $deletion_date String value in YYYY-MM-DD HH:MM:SS format for filtering on deleted records whose date_modified falls within range
     * this allows deleted records to be returned as well
     *
     * @return Array records that match search criteria
     */
    Method [  public method get_modified_relationships ] {
      

      - Parameters [12] {
        Parameter #0 [  $session ]
        Parameter #1 [  $module_name ]
        Parameter #2 [  $related_module ]
        Parameter #3 [  $from_date ]
        Parameter #4 [  $to_date ]
        Parameter #5 [  $offset ]
        Parameter #6 [  $max_results ]
        Parameter #7 [  $deleted = 0 ]
        Parameter #8 [  $module_user_id = '' ]
        Parameter #9 [  $select_fields = Array ]
        Parameter #10 [  $relationship_name = '' ]
        Parameter #11 [  $deletion_date = '' ]
      }
    }

    /**
     * Метод получения кода подтверждения при регистрации
     * @param $phone - номер телефона
     * @return array
     */
    Method [  public method send_code ] {
      

      - Parameters [1] {
        Parameter #0 [  $phone ]
      }
    }

    /**
     * Метод проверки наличия контакта по номеру телефона и паролю, зашифрованному в md5
     * @param $phone - номер телефона
     * @param $password - пароль (в открытом виде)
     * @param $device_id - идентификатор устройства
     * @return array
     */
    Method [  public method check_contact_password_old ] {
      

      - Parameters [3] {
        Parameter #0 [  $phone ]
        Parameter #1 [  $password ]
        Parameter #2 [  $device_id ]
      }
    }

    /**
     * Метод проверки наличия контакта по номеру телефона и паролю, зашифрованному в md5
     * @param $phone - номер телефона
     * @param $password - пароль (в открытом виде)
     * @param $device_id - идентификатор устройства
     * @return array
     */
    Method [  public method check_contact_password ] {
      

      - Parameters [3] {
        Parameter #0 [  $phone ]
        Parameter #1 [  $password ]
        Parameter #2 [  $device_id ]
      }
    }

    /**
     * Метод сброса пароля контакта с отправкой нового на Viber
     * @param $phone - номер телефона
     * @return array
     */
    Method [  public method reset_contact_password ] {
      

      - Parameters [1] {
        Parameter #0 [  $phone ]
      }
    }

    /**
     * Метод создания/обновления заказа
     * @param $login - логин авторизации в методе
     * @param $password - пароль авторизации в методе
     * @param $order_id - id заказа
     * @param $phone - телефон клиента (контакта)
     * @param $agent - источник сделки
     * @param $attribute - признак автобронирования/ручной обработки
     * @param $shipping - способ доставки
     * @param $items - массив с позициями заказа
     * @param string $site
     * @return array|bool|resource
     */
    Method [  public method create_update_order ] {
      

      - Parameters [9] {
        Parameter #0 [  $login ]
        Parameter #1 [  $password ]
        Parameter #2 [  $order_id ]
        Parameter #3 [  $phone ]
        Parameter #4 [  $agent ]
        Parameter #5 [  $attribute ]
        Parameter #6 [  $shipping ]
        Parameter #7 [  $items ]
        Parameter #8 [  $site = '' ]
      }
    }

    /**
     *
     * Метод проверки соответствия полученного в параметрах кода подтверждения с отправленным на указанный номер кодом
     *
     * @param $phone - номер телефона
     * @param $code - код подтверждения
     * @return array
     */
    Method [  public method check_code ] {
      

      - Parameters [2] {
        Parameter #0 [  $phone ]
        Parameter #1 [  $code ]
      }
    }

    /**
     * метод получения списка заказов контакта
     *
     * @param $token - токен авторизации
     * @param $contact_id - id контакта
     * @param $offset - смещение записей, с которого надо начинать
     * @param $max_result - максимальное количество контактов в результате
     * @return array
     */
    Method [  public method get_orders ] {
      

      - Parameters [4] {
        Parameter #0 [  $token ]
        Parameter #1 [  $contact_id ]
        Parameter #2 [  $offset ]
        Parameter #3 [  $max_result ]
      }
    }

    /**
     * метод получения списка контактов (клиентов) врача
     *
     * @param $token - токен авторизации
     * @param $doctor_id - id врача
     * @return array
     */
    Method [  public method get_doctor_clients ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $doctor_id ]
      }
    }

    /**
     * метод поиска контактов
     *
     * @param $token - токен авторизации
     * @param $search_values - значения для поиска
     * @param $offset - смещение записей, с которого начинать
     * @param $max_result - максимальное количество записей, которые будут в результате
     * @return array
     */
    Method [  public method search_contact ] {
      

      - Parameters [4] {
        Parameter #0 [  $token ]
        Parameter #1 [  $search_values ]
        Parameter #2 [  $offset ]
        Parameter #3 [  $max_result ]
      }
    }

    /**
     *
     * метод создания/удаления связи между врачом и клиентом (контактом)
     *
     * @param $token - токен авторизации
     * @param $doctor_id - id врача
     * @param $client_id - id клиента
     * @param $delete - признак удаляется связь или добавляется (0 - добавляется, 1 - удаляется)
     * @return array
     */
    Method [  public method set_clients_relationship ] {
      

      - Parameters [4] {
        Parameter #0 [  $token ]
        Parameter #1 [  $doctor_id ]
        Parameter #2 [  $client_id ]
        Parameter #3 [  $delete ]
      }
    }

    /**
     *
     * Метод получения промокодов по идентификатору устройства
     *
     * @param $device_id - идентификатор устройства
     * @return array
     */
    Method [  public method get_promo ] {
      

      - Parameters [2] {
        Parameter #0 [  $device_id ]
        Parameter #1 [  $app_id ]
      }
    }

    /**
     *
     * Метод для проверки промокода с поиском клиента по телефону и адресу e-mail и созданием клиента с указанными телефоном и адресом e-mail, если клиент не найден
     *
     * @param $app_id - id приложения
     * @param $device_id - id устройства
     * @param $promocode - промокод
     * @param $search_values - параметры поиска контакта (телефон, email)
     * @param $device_os - ОС устройства
     * @param $device_model - модель устройства
     * @return array
     */
    Method [  public method add_client_check_promo ] {
      

      - Parameters [6] {
        Parameter #0 [  $app_id ]
        Parameter #1 [  $device_id ]
        Parameter #2 [  $promocode ]
        Parameter #3 [  $search_values ]
        Parameter #4 [  $device_os ]
        Parameter #5 [  $device_model ]
      }
    }

    /**
     * Метод проверки промокода и привязки промокода к устройству
     *
     * @param $promocode - промокод
     * @param $app_id - идентификатор приложения
     * @param $device_id - идентификатор устройства
     * @param $device_os - ОС устройства
     * @param $device_model - модель устройства
     * @return array
     */
    Method [  public method check_promo ] {
      

      - Parameters [6] {
        Parameter #0 [  $promocode ]
        Parameter #1 [  $app_id ]
        Parameter #2 [  $device_id ]
        Parameter #3 [  $device_os ]
        Parameter #4 [  $device_model ]
        Parameter #5 [  $version = '' ]
      }
    }

    /**
     * Метод получения push-уведомлений
     *
     * @param $token - токен авторизации
     * @param $offset - смещение
     * @param $max_result - максимальное количество уведомлений в результате
     * @param $only_new - признак получения только новых уведомлений (1 - только новые, 0 - все уведомления)
     * @return array
     */
    Method [  public method get_alerts ] {
      

      - Parameters [4] {
        Parameter #0 [  $token ]
        Parameter #1 [  $offset ]
        Parameter #2 [  $max_result ]
        Parameter #3 [  $only_new ]
      }
    }

    /**
     *
     * Метод для получения информации о баннерах для показа. В результате возвращается 1 баннер из тех баннеров, которые включены в данный момент для данного идентификатора приложения и для данного типа и id страницы (информация в блоке "Страницы для показа"). Если в параметрах id и тип страницы указаны пустые строки, то будет получен баннер, у которого блок "Страницы для показа" пустой.
     *
     * @param $app_id - id приложения
     * @param $page_id - id страницы, на которой показывается баннер
     * @param $kind - тип страницы
     * @return array
     */
    Method [  public method get_banners ] {
      

      - Parameters [4] {
        Parameter #0 [  $app_id ]
        Parameter #1 [  $page_id ]
        Parameter #2 [  $kind ]
        Parameter #3 [  $language ]
      }
    }

    /**
     *
     * Метод для получения информации о баннерах для показа. В результате возвращается 1 баннер из тех баннеров, которые включены в данный момент для данного идентификатора приложения и для данного типа и id страницы (информация в блоке "Страницы для показа"). Если в параметрах id и тип страницы указаны пустые строки, то будет получен баннер, у которого блок "Страницы для показа" пустой.
     *
     * @param $app_id - id приложения
     * @param $page_id - id страницы, на которой показывается баннер
     * @param $kind - тип страницы
     * @return array
     */
    Method [  public method get_banners_new ] {
      

      - Parameters [5] {
        Parameter #0 [  $app_id ]
        Parameter #1 [  $page_id ]
        Parameter #2 [  $kind ]
        Parameter #3 [  $language ]
        Parameter #4 [  $type = '' ]
      }
    }

    /**
     *
     * Метод получения списка рецептов
     *
     * @param $token - токен авторизации
     * @param $contact_id - id контакта
     * @param $is_doctor - признак является ли контакт врачом (1 - врач, 0 - клиент)
     * @param $offset - смещение
     * @param $max_result - максимальное количество рецептов в результате
     * @return array
     */
    Method [  public method get_recipes ] {
      

      - Parameters [5] {
        Parameter #0 [  $token ]
        Parameter #1 [  $contact_id ]
        Parameter #2 [  $is_doctor ]
        Parameter #3 [  $offset ]
        Parameter #4 [  $max_result ]
      }
    }

    /**
     *
     * Метод создания рецепта
     *
     * @param $token - токен авторизации
     * @param $name - название рецепта
     * @param $doctor_id - id врача, который выписывает рецепт
     * @param $client_id - id клиента, которому назначается рецепт
     * @param $items - массив объектов в рецепте
     * @param string $gps_la
     * @param string $gps_lo
     * @param int $selected
     * @param string $app_id
     * @return array
     */
    Method [  public method set_recipe ] {
      

      - Parameters [9] {
        Parameter #0 [  $token ]
        Parameter #1 [  $name ]
        Parameter #2 [  $doctor_id ]
        Parameter #3 [  $client_id ]
        Parameter #4 [  $items ]
        Parameter #5 [  $gps_la = '' ]
        Parameter #6 [  $gps_lo = '' ]
        Parameter #7 [  $selected = 0 ]
        Parameter #8 [  $app_id = '' ]
      }
    }

    /**
     *
     * Метод удаления рецепта
     *
     * @param $token - токен авторизации
     * @param $recipe_id - id рецепта, который нужно удалить
     * @return array
     */
    Method [  public method delete_recipe ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $recipe_id ]
      }
    }

    /**
     *
     * Метод создания/обновления контакта
     *
     * @param $contact_fields - массив полей контакта
     * @return array
     */
    Method [  public method set_contact ] {
      

      - Parameters [1] {
        Parameter #0 [  $contact_fields ]
      }
    }

    /**
     *
     * Метод получения списка кодов ошибок с их описанием
     *
     * @return array
     */
    Method [  public method get_error_code ] {
      
    }

    /**
     *
     * Метод обновления токена доступа к API
     *
     * @param $refresh_token - токен для обновления токена авторизации
     * @param $device_id - идентификатор устройства
     * @return array
     */
    Method [  public method refresh_apitoken ] {
      

      - Parameters [2] {
        Parameter #0 [  $refresh_token ]
        Parameter #1 [  $device_id ]
      }
    }

    /**
     *
     * Метод получения количества непрочитанных уведомлений
     *
     * @param $token - токен авторизации
     * @return array
     */
    Method [  public method get_alerts_cnt ] {
      

      - Parameters [1] {
        Parameter #0 [  $token ]
      }
    }

    /**
     *
     * Метод записи токена Firebase для контакта, по которому будут отправляться push-уведомления
     *
     * @param $firebase_token - токен
     * @param $app_id - идентификатор прилодения
     * @param $contact_id - id контакта
     * @return array
     */
    Method [  public method set_firebase_token ] {
      

      - Parameters [3] {
        Parameter #0 [  $firebase_token ]
        Parameter #1 [  $contact_id ]
        Parameter #2 [  $app_id ]
      }
    }

    /**
     *
     * Метод авторизации для работы с API по промокоду
     *
     * @param $promocode - промокод
     * @param $app_id - идентификатор приложения
     * @param $device_id - идентификатор устройства
     * @return array
     */
    Method [  public method get_session ] {
      

      - Parameters [3] {
        Parameter #0 [  $promocode ]
        Parameter #1 [  $app_id ]
        Parameter #2 [  $device_id ]
      }
    }

    /**
     *
     * Метод для сбора статистки о использовании приложения
     *
     * @param $promocode - промокод
     * @param $device_id - идентификатор устройства
     * @param $event_type - тип события
     * @param $event_datetime - дата-время события
     * @param $page_type - тип страницы
     * @param $tab - вкладка
     * @param $page_id - id страницы
     * @param string $app_id - идентификатор приложения
     * @return array
     */
    Method [  public method set_statistics ] {
      

      - Parameters [8] {
        Parameter #0 [  $promocode ]
        Parameter #1 [  $device_id ]
        Parameter #2 [  $event_type ]
        Parameter #3 [  $event_datetime ]
        Parameter #4 [  $page_type ]
        Parameter #5 [  $tab ]
        Parameter #6 [  $page_id ]
        Parameter #7 [  $app_id = '' ]
      }
    }

    /**
     *
     * Метод получения информации о контакте по токен уавторизации
     *
     * @param $token
     * @return array
     */
    Method [  public method get_contact ] {
      

      - Parameters [1] {
        Parameter #0 [  $token ]
      }
    }

    /**
     *
     * Метод получения списка специализаций с возможностью фильтрации специализаций по идентификатору приложения. Специализации и идентификатор приложения связаны через модуль Группы специализаций
     *
     * @param $app_id - идентификатор приложения
     * @return array
     */
    Method [  public method get_spec ] {
      

      - Parameters [2] {
        Parameter #0 [  $app_id ]
        Parameter #1 [  $lang = 'ru' ]
      }
    }

    /**
     *
     * Метод создания записи запроса промокода
     *
     * @param $app_id - идентификатор приложения
     * @param $phone - номер телефона
     * @param $email - адрес email
     * @param $specialization - специализация
     * @return array
     */
    Method [  public method request_promo ] {
      

      - Parameters [4] {
        Parameter #0 [  $app_id ]
        Parameter #1 [  $phone ]
        Parameter #2 [  $email ]
        Parameter #3 [  $specialization ]
      }
    }

    /**
     *
     * Метод получения списка запросов промокодов
     *
     * @param $password - пароль для доступа к методу
     * @param $date_request - дата запроса данных. Будут возвращены записи, у которых дата/время запроса больше передаваемого
     * @param $app_id - идентификатор приложения
     * @return array
     */
    Method [  public method claim_promo ] {
      

      - Parameters [3] {
        Parameter #0 [  $password ]
        Parameter #1 [  $date_request ]
        Parameter #2 [  $app_id ]
      }
    }

    /**
     *
     * Метод create_promo_contact используется для привязки контакта к промокоду и создания контакта, если промокод не был ранее привязан ни к какому контакту. Контакт ищется в системе по указанному в параметрах morion_id. Если контакт найден, то его данные обновляются переданными в параметрах и контакт привязывается к промокоду. Если по указанному в параметрах morion_id контакт не найден, то создается новый контакт с переданными в параметрах данными и привязывается к промокоду.
     *
     * @param $promocode - промокод
     * @param $contact_data - массив с данными контакта
     * @param $app_id - идентификатор приложения
     * @return array
     */
    Method [  public method create_promo_contact ] {
      

      - Parameters [3] {
        Parameter #0 [  $promocode ]
        Parameter #1 [  $contact_data ]
        Parameter #2 [  $app_id ]
      }
    }

    /**
     * @param $app_id
     * @param $offset
     * @param $max_result
     * @return array
     */
    Method [  public method get_all_promo ] {
      

      - Parameters [3] {
        Parameter #0 [  $app_id ]
        Parameter #1 [  $offset ]
        Parameter #2 [  $max_result ]
      }
    }

    /**
     *
     * Метод для резервирования промокода
     *
     * @param $app_id - идентификатор приложения
     * @param $promocode - промокод
     * @param string $morion_id - morion id контакта
     * @return array
     */
    Method [  public method bind_promo ] {
      

      - Parameters [3] {
        Parameter #0 [  $app_id ]
        Parameter #1 [  $promocode ]
        Parameter #2 [  $morion_id = '' ]
      }
    }

    /**
     *
     * Метод для деактивиирования промокода
     *
     * @param $app_id - идентификатор приложения
     * @param $promocode - промокод
     * @return array
     */
    Method [  public method islost_promo ] {
      

      - Parameters [2] {
        Parameter #0 [  $app_id ]
        Parameter #1 [  $promocode ]
      }
    }

    Method [  public method get_contact_by_id ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $contact_id ]
      }
    }

    /**
     * Метод проверки токена
     *
     * @param $token
     * @return array
     */
    Method [  public method check_token ] {
      

      - Parameters [1] {
        Parameter #0 [  $token ]
      }
    }

    /**
     *
     * Метод получения данных о рецепте
     *
     * @param $recipe_id - id рецепта
     * @return array
     */
    Method [  public method get_recipe_by_id ] {
      

      - Parameters [1] {
        Parameter #0 [  $recipe_id ]
      }
    }

    Method [  public method get_token_recipe ] {
      

      - Parameters [1] {
        Parameter #0 [  $recipe_token ]
      }
    }

    /**
     *
     * Метод получения данных рецепта по токену рецепта
     *
     * @param $recipe_token
     * @return array
     */
    Method [  public method get_recipe_by_token ] {
      

      - Parameters [1] {
        Parameter #0 [  $recipe_token ]
      }
    }

    /**
     *
     * Метод получения активированных промокодов переданного идентификатора приложения, которые были активированы позже указанной даты (дата активации промокода - дата появления связи промокод-устройство. Если связей несколько, то минимальная из них.)
     *
     * @param $app_id - идентификатор приложения
     * @param $date - дата, по которой отбираются промокоды
     * @return array
     */
    Method [  public method get_active_promo ] {
      

      - Parameters [2] {
        Parameter #0 [  $app_id ]
        Parameter #1 [  $date ]
      }
    }

    /**
     *
     * Метод логина eHealth
     *
     * @param $token - токен авторизации
     * @return array
     */
    Method [  public method login_ehealth ] {
      

      - Parameters [1] {
        Parameter #0 [  $token ]
      }
    }

    /**
     *
     * Метод проверки авторизации пользователя в eHealth
     *
     * @param $session_id - id сессии eHealth
     * @return int
     */
    Method [  public method is_login_ehealth ] {
      

      - Parameters [1] {
        Parameter #0 [  $session_id ]
      }
    }

    /**
     *
     * Метод получения списка зарегистрированных в eHealth пользователей
     *
     * @param $token - токен авторизации
     * @return array|bool|mixed|string
     */
    Method [  public method get_contact_permission_ehealth ] {
      

      - Parameters [1] {
        Parameter #0 [  $token ]
      }
    }

    /**
     *
     * Метод получения ссылки для авторизации в eHealth
     *
     * @param $token - токен доступа в CRM
     * @param $user_id - id пользователя (сотрудника) eHealth
     * @return array|bool|mixed|string
     */
    Method [  public method get_redirect_in_ehealth ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $user_id ]
      }
    }

    /**
     *
     * Метод получения юр.лица eHealth по id
     *
     * @param $token - токен доступа CRM
     * @param $id - id eHealth юр.лица
     * @return array|bool|mixed|string
     */
    Method [  public method ehealth_get_legal_entity_by_id ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $id ]
      }
    }

    /**
     *
     * Метод получения юр.лица eHealth по ЕДРПОУ
     *
     * @param $token - токен доступа CRM
     * @param $edrpou - ЕДРПОУ юр.лица
     * @return array|bool|mixed|string
     */
    Method [  public method ehealth_get_legal_entity_by_edrpou ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $edrpou ]
      }
    }

    Method [  public method login_ehealth_api ] {
      
    }

    Method [  public method delete_session_ehealth_api ] {
      

      - Parameters [1] {
        Parameter #0 [  $session_id ]
      }
    }

    /**
     *
     * Метод для регистрации юр.лица в eHealth и, в случае успеха, создание юр.лица в CRM
     *
     * @param $AOrg - закодированный в Base64 json
     * @param $AOrgSign - закодированный в Base64 json с наложенной ЭЦП
     * @param string $token
     * @return array|mixed
     */
    Method [  public method create_legal_entity ] {
      

      - Parameters [3] {
        Parameter #0 [  $AOrg ]
        Parameter #1 [  $AOrgSign ]
        Parameter #2 [  $token = '' ]
      }
    }

    /**
     *
     * Метод для получения значений справочников eHealth
     *
     * @param $module
     * @param $list
     * @return array
     */
    Method [  public method get_ehealth_dict ] {
      

      - Parameters [2] {
        Parameter #0 [  $module ]
        Parameter #1 [  $list ]
      }
    }

    /**
     *
     * Метод создания/обновления подразделения eHealth
     *
     * @param $division - строка с закодированным в base64 json с данными подразделения
     * @param string $division_id - id подразделения, если обновление, иначе пусто
     * @return array|mixed
     */
    Method [  public method set_division_ehealth ] {
      

      - Parameters [3] {
        Parameter #0 [  $token ]
        Parameter #1 [  $division ]
        Parameter #2 [  $division_id = '' ]
      }
    }

    /**
     *
     * Метод создания/обновления сотрудника eHealth
     *
     * @param $employee - строка с закодированным в base64 json с данными сотрудника
     * @return array|mixed
     */
    Method [  public method set_employee_ehealth ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $employee ]
      }
    }

    /**
     *
     * Метод получения списка областей/регионов eHealth
     *
     * @return array
     */
    Method [  public method get_ehealth_regions ] {
      
    }

    /**
     *
     * Метод получения списка районов eHealth
     *
     * @param $region - id региона/области из результата метода get_ehealth_regions
     * @return array
     */
    Method [  public method get_ehealth_districts ] {
      

      - Parameters [1] {
        Parameter #0 [  $region_id = '' ]
      }
    }

    /**
     *
     * Метод получения списка населенных пунктов eHealth
     *
     * @param string $region - id региона/области из результата метода get_ehealth_regions
     * @param string $district - id района из результата метода get_ehealth_districts
     * @param string $type - тип населенного пункта
     * @return array
     */
    Method [  public method get_ehealth_settlements ] {
      

      - Parameters [3] {
        Parameter #0 [  $region = '' ]
        Parameter #1 [  $district = '' ]
        Parameter #2 [  $type = '' ]
      }
    }

    /**
     *
     * Метод получения списка улиц eHealth
     *
     * @param string $settlement - id населенного пункта, полученного методом get_ehealth_settlements
     * @param string $street_type - тип улицы из справочника STREET_TYPE
     * @return array
     */
    Method [  public method get_ehealth_streets ] {
      

      - Parameters [2] {
        Parameter #0 [  $settlement_id = '' ]
        Parameter #1 [  $street_type = '' ]
      }
    }

    /**
     *
     * Метод получения списка подразделений
     *
     * @param $token - токен авторизации в CRM
     * @param $legal_entity_id - ID юр.лица в eHealth
     * @return array|bool|mixed|string
     */
    Method [  public method get_divisions_ehealth ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $legal_entity_id ]
      }
    }

    /**
     *
     * Метод для активации/деактивации подразделения
     *
     * @param $token - токен доступа в CRM
     * @param $act_type - тип действия (0 - деактивация, 1 - активация)
     * @param $division_id - id подразделения в eHealth
     * @return array|bool|mixed|string
     */
    Method [  public method set_division_state_ehealth ] {
      

      - Parameters [3] {
        Parameter #0 [  $token ]
        Parameter #1 [  $act_type ]
        Parameter #2 [  $division_id ]
      }
    }

    /**
     *
     * Метод для получения списка сотрудников в eHealth
     *
     * @param $token - токен доступа в CRM
     * @param $legal_entity_id - ID юр.лица в eHealth
     * @param string $division_id - ID подразделения в eHealth
     * @param string $inn - ИНН сотрудника
     * @return array|bool|mixed|string
     */
    Method [  public method get_employee_ehealth ] {
      

      - Parameters [4] {
        Parameter #0 [  $token ]
        Parameter #1 [  $legal_entity_id ]
        Parameter #2 [  $division_id = '' ]
        Parameter #3 [  $inn = '' ]
      }
    }

    /**
     *
     * Метод получения детальной информации о сотруднике в eHealth
     *
     * @param $token - токен доступа в CRM
     * @param $employee_id - ID сотрудника в eHealth
     * @return array|bool|mixed|string
     */
    Method [  public method get_employee_details_ehealth ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $employee_id ]
      }
    }

    /**
     *
     * Метод для увольнения сотрудника в eHealth
     *
     * @param $token - токен доступа в CRM
     * @param $employee_id - id сотрудника в eHealth
     * @return array|bool|mixed|string
     */
    Method [  public method set_dismissed_employee_ehealth ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $employee_id ]
      }
    }

    /**
     *
     * Метод инициализации заявки на договор в eHealth
     *
     * @param $token - токен доступа в CRM
     * @return array|bool|mixed|string
     */
    Method [  public method init_contract_req_ehealth ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $ACotractType ]
      }
    }

    /**
     *
     * Метод для создания заявки на договор eHealth
     *
     * @param $token - токен доступа в CRM
     * @param $AContrReqID - id зявки на договор, полученный в результате вызова метода init_contract_req_ehealth
     * @param $AContrDataSign - JSON договора, подписанный ЕЦП и закодированный в Base64
     * @return array|bool|mixed|string
     */
    Method [  public method reg_contract_req_ehealth ] {
      

      - Parameters [4] {
        Parameter #0 [  $token ]
        Parameter #1 [  $AContrReqID ]
        Parameter #2 [  $AContractType ]
        Parameter #3 [  $AContrDataSign ]
      }
    }

    /**
     *
     * Метод получения списка заявок на договор в eHealth по статусу
     *
     * @param $token - токен доступа в CRM
     * @param $status - статус заявки на договор
     * @return array|bool|mixed|string
     */
    Method [  public method get_contract_req_list_ehealth ] {
      

      - Parameters [3] {
        Parameter #0 [  $token ]
        Parameter #1 [  $status ]
        Parameter #2 [  $AContractType ]
      }
    }

    /**
     *
     * Метод получения деталей заявки на договор в eHealth по ID
     *
     * @param $token
     * @param $contract_req_id
     * @return array|bool|mixed|string
     */
    Method [  public method get_contract_req_by_id_ehealth ] {
      

      - Parameters [3] {
        Parameter #0 [  $token ]
        Parameter #1 [  $contract_req_id ]
        Parameter #2 [  $AContractType ]
      }
    }

    /**
     *
     * Метод подтверждения заявки на договор в eHealth
     *
     * @param $token - токен доступа в CRM
     * @param $contract_req_id - ID заявки на договор в eHealth
     * @param $AContractType
     * @return array|bool|mixed|string
     */
    Method [  public method approve_contract_req_ehealth ] {
      

      - Parameters [3] {
        Parameter #0 [  $token ]
        Parameter #1 [  $contract_req_id ]
        Parameter #2 [  $AContractType ]
      }
    }

    /**
     *
     * Метод для получения печатной формы заявки на договор в eHealth
     *
     * @param $token - токен доступа в CRM
     * @param $contract_req_id - ID заявки на договор в eHealth
     * @return array|bool|mixed|string
     */
    Method [  public method printout_contract_req_ehealth ] {
      

      - Parameters [3] {
        Parameter #0 [  $token ]
        Parameter #1 [  $contract_req_id ]
        Parameter #2 [  $AContractType ]
      }
    }

    /**
     *
     * Метод для подписания ЭЦП договора со стороны МСП (Отправка подписанного с 2х сторон договора в eHealth)
     *
     * @param $token - токен доступа в CRM
     * @param $contract_req_id - ID заявки на договор в eHealth
     * @param $AContrReqSign - JSON в Base64 заявки на договор с 2мя подписями
     * @return array|bool|mixed|string
     */
    Method [  public method sign_contract_req_ehealth ] {
      

      - Parameters [4] {
        Parameter #0 [  $token ]
        Parameter #1 [  $contract_req_id ]
        Parameter #2 [  $AContractType ]
        Parameter #3 [  $AContrReqSign ]
      }
    }

    /**
     *
     * Метод для получения списка договоров по статусу
     *
     * @param $token - токен доступа в CRM
     * @param $status - статус договора
     * @return array|bool|mixed|string
     */
    Method [  public method get_contract_list_ehealth ] {
      

      - Parameters [3] {
        Parameter #0 [  $token ]
        Parameter #1 [  $status ]
        Parameter #2 [  $AContractType ]
      }
    }

    /**
     *
     * Метод для получения деталей договора по ID
     *
     * @param $token - токен доступа в CRM
     * @param $contract_id - ID договора
     * @return array|bool|mixed|string
     */
    Method [  public method get_contract_by_id_ehealth ] {
      

      - Parameters [3] {
        Parameter #0 [  $token ]
        Parameter #1 [  $contract_id ]
        Parameter #2 [  $AContractType ]
      }
    }

    /**
     *
     * Метод для получения печатной формы договора в eHealth
     *
     * @param $token - токен доступа в CRM
     * @param $contract_req_id - ID договора в eHealth
     * @return array|bool|mixed|string
     */
    Method [  public method printout_contract_ehealth ] {
      

      - Parameters [3] {
        Parameter #0 [  $token ]
        Parameter #1 [  $contract_id ]
        Parameter #2 [  $AContractType ]
      }
    }

    Method [  public method logout_ehealth ] {
      

      - Parameters [1] {
        Parameter #0 [  $token ]
      }
    }

    Method [  public method logout ] {
      

      - Parameters [1] {
        Parameter #0 [  $token ]
      }
    }

    /**
     *
     * Метод проверки телефона в рецепте. Sucсess - если переданный номер телефона указан у клиента который связан с рецептом. Т.е. находим клиента с данным телефоном, если есть связь с хоть одним рецептом- success = True
     *
     * @param $phone - номер телефона
     * @return array
     */
    Method [  public method check_phone_recipe ] {
      

      - Parameters [1] {
        Parameter #0 [  $phone ]
      }
    }

    /**
     *
     * Метод для сохранения версии приложения в устройстве, связанном с промокодом
     *
     * @param $token - токен доступа
     * @param $version - версия приложения
     * @param string $device_id - идентификатор устройства
     * @param string $app_id - идентификатор приложения
     * @param string $os - ОС устройства
     * @param string $device_model - модуль устройства
     * @return array
     */
    Method [  public method set_version ] {
      

      - Parameters [6] {
        Parameter #0 [  $token ]
        Parameter #1 [  $version ]
        Parameter #2 [  $device_id = '' ]
        Parameter #3 [  $app_id = '' ]
        Parameter #4 [  $os = '' ]
        Parameter #5 [  $device_model = '' ]
      }
    }

    /**
     *
     * Метод для получения списка мероприятий
     *
     * @param $token - токен авторизации
     * @param $date_start - дата начала
     * @param $date_end - дата окончания
     * @param string $language - язык
     * @return array
     */
    Method [  public method get_event ] {
      

      - Parameters [4] {
        Parameter #0 [  $token ]
        Parameter #1 [  $date_start ]
        Parameter #2 [  $date_end ]
        Parameter #3 [  $language = 'ua' ]
      }
    }

    /**
     *
     * Метод для удаления (отмены) заявки на договор в eHealth
     *
     * @param $token - токен доступа в CRM
     * @param $contract_req_id - ID заявки на договор в eHealth
     * @param $status_reason - причина удаления (отмены)
     * @return array|bool|mixed|string
     */
    Method [  public method terminate_contract_req_ehealth ] {
      

      - Parameters [4] {
        Parameter #0 [  $token ]
        Parameter #1 [  $contract_req_id ]
        Parameter #2 [  $AContractType ]
        Parameter #3 [  $status_reason ]
      }
    }

    /**
     *
     * Метод для вызова возможных списков препаратов, подходящих под рецепт
     *
     * @param $token - токен доступа
     * @param $med_req_id - идентификатор рецепта
     * @param $medical_program_id - идентификатор медицинской программы
     * @param string $PackageQty
     * @return array|bool|mixed|string
     */
    Method [  public method qualify_med_req_by_id_ehealth ] {
      

      - Parameters [4] {
        Parameter #0 [  $token ]
        Parameter #1 [  $med_req_id ]
        Parameter #2 [  $medical_program_id ]
        Parameter #3 [  $PackageQty = '' ]
      }
    }

    /**
     *
     * Метод для создания заявки на погашение рецепта
     *
     * @param $token - токен доступа
     * @param $code - код подтверждения из смс (отправляется на стороне eHealth)
     * @param $med_disp - JSON (принимает от фронта json, отдаём на бек закодированным в base64)
     * @return array|bool|mixed|string
     */
    Method [  public method reg_med_dispense_ehealth ] {
      

      - Parameters [3] {
        Parameter #0 [  $token ]
        Parameter #1 [  $code ]
        Parameter #2 [  $med_disp ]
      }
    }

    /**
     *
     * Метод для отмены ранее созданной заявки
     *
     * @param $token - токен доступа
     * @param $med_disp_id - ID заявки на создание рецепта, полученный в результате выполнения метода RegMedDispense
     * @return array|bool|mixed|string
     */
    Method [  public method reject_med_dispense_ehealth ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $med_disp_id ]
      }
    }

    /**
     *
     * Получение детальных данных по ранее созданной заявке на погашение рецепта
     *
     * @param $token - токен доступа
     * @param $med_disp_id - ID заявки на погашение рецепта
     * @return array|bool|mixed|string
     */
    Method [  public method get_med_dispense_by_id_ehealth ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $med_disp_id ]
      }
    }

    /**
     *
     * Метод для получения данных рецепта
     *
     * @param $token - токен доступа
     * @param $med_req_num - номер рецепта
     * @return array|bool|mixed|string
     */
    Method [  public method get_med_req_by_id_ehealth ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $med_req_num ]
      }
    }

    /**
     * Получение отчётов по уже погашенным рецептам
     */
    Method [  public method get_reimbursement_report ] {
      

      - Parameters [7] {
        Parameter #0 [  $token ]
        Parameter #1 [  $count_on_page ]
        Parameter #2 [  $page_num ]
        Parameter #3 [  $date_from_request ]
        Parameter #4 [  $date_to_request ]
        Parameter #5 [  $dispensed_from ]
        Parameter #6 [  $dispensed_to ]
      }
    }

    /**
     *
     * Метод для погашения рецепта
     *
     * @param $token
     * @param $med_disp_id
     * @param $medication_dispense
     * @param $signed_medication_dispense
     * @return array|bool|mixed|string
     */
    Method [  public method compl_med_dispense_ehealth ] {
      

      - Parameters [4] {
        Parameter #0 [  $token ]
        Parameter #1 [  $med_disp_id ]
        Parameter #2 [  $medication_dispense ]
        Parameter #3 [  $signed_medication_dispense ]
      }
    }

    /**
     *
     * Метод для получения списка заявок на рецепт
     *
     * @param $token - токен доступа
     * @param $count_on_page - количество на странице
     * @param $page_num - номер страницы
     * @param $legal_entity_id - id юр.лица
     * @param $division_id - id подразделения
     * @param $status - статус
     * @param $dispensed_from - Дата с которой проводилось погашение рецепта в формате "2019-03-22"
     * @param $dispensed_to - Дата по которую проводилось погашение рецепта в формате "2019-03-22"
     * @return array|bool|mixed|string
     */
    Method [  public method get_med_dispense_list_ehealth ] {
      

      - Parameters [8] {
        Parameter #0 [  $token ]
        Parameter #1 [  $count_on_page ]
        Parameter #2 [  $page_num ]
        Parameter #3 [  $legal_entity_id ]
        Parameter #4 [  $division_id ]
        Parameter #5 [  $status ]
        Parameter #6 [  $dispensed_from ]
        Parameter #7 [  $dispensed_to ]
      }
    }

    /**
     *
     * Метод для получения информации о клиентах
     *
     * @param $client_ids - массив id клиентов
     * @return array
     */
    Method [  public method get_clients_info_by_id ] {
      

      - Parameters [1] {
        Parameter #0 [  $client_ids ]
      }
    }

    /**
     *
     * Метод для получения списка заявок на рецепт в текстовой форме для экспорта
     *
     * @param $token - токен доступа
     * @param $legal_entity_id - Ид юр. лица
     * @param $division_id - ид подразделения
     * @param $status - статус (NEW, PROCESSED, REJECTED, EXPIRED)
     * @param $dispensed_from - Дата с которой проводилось погашение рецепта в формате "2019-03-22"
     * @param $dispensed_to - Дата по которую проводилось погашение рецепта в формате "2019-03-22"
     * @return array
     */
    Method [  public method get_med_dispense_list_in_file_ehealth ] {
      

      - Parameters [6] {
        Parameter #0 [  $token ]
        Parameter #1 [  $legal_entity_id ]
        Parameter #2 [  $division_id ]
        Parameter #3 [  $status ]
        Parameter #4 [  $dispensed_from ]
        Parameter #5 [  $dispensed_to ]
      }
    }

    /**
     *
     * Метод для получения списка погашенных рецептов в текстовой форме для экспорта
     *
     * @param $token - токен доступа
     * @param $date_from_request - Дата с которой был запрос на погашение
     * @param $date_to_request - Дата по которую был запрос на погашение
     * @param $dispensed_from - Дата с которой проводилось погашение
     * @param $dispensed_to - Дата до которой проводилось погашение
     * @return array
     */
    Method [  public method get_reimbursement_report_in_file_ehealth ] {
      

      - Parameters [5] {
        Parameter #0 [  $token ]
        Parameter #1 [  $date_from_request ]
        Parameter #2 [  $date_to_request ]
        Parameter #3 [  $dispensed_from ]
        Parameter #4 [  $dispensed_to ]
      }
    }

    /**
     *
     * Метод для добавления/удаления подразделений из договора
     *
     * @param $token - токен доступа в CRM
     * @param $contract_id - ID договора
     * @param $AContrDataSign - JSON подписанный ЭЦП и закодированный в Base64
     * @return array|bool|mixed|string
     */
    Method [  public method update_contract_ehealth ] {
      

      - Parameters [3] {
        Parameter #0 [  $token ]
        Parameter #1 [  $contract_id ]
        Parameter #2 [  $AContrDataSign ]
      }
    }

    /**
     *
     * Метод для поиска телефона пациента в списке верифицированных телефонов
     *
     * @param $token - токен доступа
     * @param $phone_num - номер телефона
     * @return array|bool|mixed|string
     */
    Method [  public method find_otp_verification_ehealth ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $phone_number ]
      }
    }

    /**
     *
     * Метод для запроса на верификацию номера телефона пациента. На этом этапе отправляется СМС с кодом на телефон пациента
     *
     * @param $token - токен доступа
     * @param $phone_num - номер телефона
     * @return array|bool|mixed|string
     */
    Method [  public method init_otp_verification_ehealth ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $phone_number ]
      }
    }

    /**
     *
     * Метод для подтверждения верификации номера телефона пациента
     *
     * @param $token - токен доступа
     * @param $phone_num - номер телефона
     * @param $code - код подтверждения из СМС
     * @return array|bool|mixed|string
     */
    Method [  public method compl_otp_verification_ehealth ] {
      

      - Parameters [3] {
        Parameter #0 [  $token ]
        Parameter #1 [  $phone_number ]
        Parameter #2 [  $code ]
      }
    }

    /**
     *
     * Метод для получения списка заявок на декларацию
     *
     * @param $token - токен доступа
     * @param $org_id - id юр.лица
     * @param $empl_id - id сотрудника
     * @param $status - статус заявки на декларацию
     * @param string $count_on_page - количество объектов на странице (0 - значение по умолчанию 50)
     * @param string $page_num - номер страницы (0 - все страницы)
     * @return array|bool|mixed|string
     */
    Method [  public method get_decl_req_list_ehealth ] {
      

      - Parameters [6] {
        Parameter #0 [  $token ]
        Parameter #1 [  $org_id ]
        Parameter #2 [  $empl_id ]
        Parameter #3 [  $status ]
        Parameter #4 [  $count_on_page = '0' ]
        Parameter #5 [  $page_num = '0' ]
      }
    }

    /**
     *
     * Метод для получения детальной информации о заявке на декларацию
     *
     * @param $token - токен доступа
     * @param $decl_req_id - id заявки на декларацию
     * @return array|bool|mixed|string
     */
    Method [  public method get_decl_req_by_id_ehealth ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $decl_req_id ]
      }
    }

    /**
     *
     * Метод для отмены/удаления заявки на декларацию
     *
     * @param $token - токен доступа
     * @param $decl_req_id - id заявки на декларацию
     * @return array|bool|mixed|string
     */
    Method [  public method reject_decl_req_ehealth ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $decl_req_id ]
      }
    }

    /**
     *
     * Метод для подтверждения заявки на декларацию
     *
     * @param $token - токен доступа
     * @param $decl_req_id - id заявки на декларацию
     * @param string $code - СМС-код подтверждения (СМС-код підтвердження якщо декларація переукладається, запит СМС-коду відбувається тільки в тому випадку, якщо в блоці «urgent» є блок «authentication_method_current» в результаті методу RegDeclReq)
     * @return array|bool|mixed|string
     */
    Method [  public method approve_decl_req_ehealth ] {
      

      - Parameters [3] {
        Parameter #0 [  $token ]
        Parameter #1 [  $decl_req_id ]
        Parameter #2 [  $code = '' ]
      }
    }

    /**
     *
     * Метод для получения списка деклараций
     *
     * @param $token - токен доступа
     * @param $org_id - id юр.лица
     * @param $empl_id - id сотрудника
     * @param $status - статус декларации
     * @param $count_on_page - количество объектов на странице (0 - значение по умолчанию 50)
     * @param $page_num - номер страницы (0 - все страницы)
     * @return array|bool|mixed|string
     */
    Method [  public method get_declaration_list_ehealth ] {
      

      - Parameters [6] {
        Parameter #0 [  $token ]
        Parameter #1 [  $org_id ]
        Parameter #2 [  $empl_id ]
        Parameter #3 [  $status ]
        Parameter #4 [  $count_on_page ]
        Parameter #5 [  $page_num ]
      }
    }

    /**
     *
     * Метод для переотправки СМС по предварительно созданной заявке на декларацию
     *
     * @param $token - токен доступа
     * @param $decl_req_id - id заявки на декларацию
     * @return array|bool|mixed|string
     */
    Method [  public method resend_otp_decl_req_ehealth ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $decl_req_id ]
      }
    }

    /**
     *
     * Метод для получения детальной информации по декларации
     *
     * @param $token - токен доступа
     * @param $decl_id - id декларации
     * @return array|bool|mixed|string
     */
    Method [  public method get_declaration_by_id_ehealth ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $decl_id ]
      }
    }

    /**
     *
     * Метод для создания/обновления юр.лица МИС
     *
     * @param $legal_entity - данные юр.лица
     * @param string $token - токен доступа
     * @return array
     */
    Method [  public method create_legal_entity_mis ] {
      

      - Parameters [2] {
        Parameter #0 [  $legal_entity ]
        Parameter #1 [  $token = '' ]
      }
    }

    /**
     * Метод для создания/обновления подразделения МИС
     *
     * @param $token - токен доступа
     * @param $division - данные подразделения
     * @return array
     */
    Method [  public method set_division_mis ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $division ]
      }
    }

    /**
     *
     * Метод для получения списка одразделений по ID юр.лица
     *
     * @param $token - токен доступа
     * @param $legal_entity_id - ID юр.лица
     * @return array
     */
    Method [  public method get_divisions_mis ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $legal_entity_id ]
      }
    }

    /**
     *
     * Метод для  деактивации/активации подразделений
     *
     * @param $token - токен доступа
     * @param $act_type - тип действия (0 – деактивация, 1 - активация)
     * @param $division_id - id подразделения
     * @return array
     */
    Method [  public method set_division_state_mis ] {
      

      - Parameters [3] {
        Parameter #0 [  $token ]
        Parameter #1 [  $act_type ]
        Parameter #2 [  $division_id ]
      }
    }

    /**
     *
     * Метод для создания/обновления сотрудника МИС
     *
     * @param $token - токен доступа
     * @param $employee - данные сотрудника
     * @return array
     */
    Method [  public method set_employee_mis ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $employee ]
      }
    }

    /**
     *
     * Метод для получения ссылки для авторизации в eHealth
     *
     * @param $token
     * @param $AOrgID
     * @param $AEmail
     * @param $AEmplType
     * @param $ATaxID
     * @return array|bool|mixed|string
     */
    Method [  public method get_redirect_in_ehealth_v2 ] {
      

      - Parameters [5] {
        Parameter #0 [  $token ]
        Parameter #1 [  $AOrgID ]
        Parameter #2 [  $AEmail ]
        Parameter #3 [  $AEmplType ]
        Parameter #4 [  $ATaxID ]
      }
    }

    /**
     *
     * Метод для получения списка сотрудников юр. лица МИС
     *
     * @param $token - токен авторизации
     * @param $legal_entity_id - id юр.лица в SuiteCRM
     * @param string $division_id - id подразделения в SuiteCRM (необязательный параметр)
     * @param string $inn - ИНН сотрудника (необязательный параметр)
     * @return array
     */
    Method [  public method get_employee_mis ] {
      

      - Parameters [4] {
        Parameter #0 [  $token ]
        Parameter #1 [  $legal_entity_id ]
        Parameter #2 [  $division_id = '' ]
        Parameter #3 [  $inn = '' ]
      }
    }

    /**
     *
     * Метод для получения детальной информации о сотруднике
     *
     * @param $token - токен доступа
     * @param $employee_id - ID сотрудника
     * @return array
     */
    Method [  public method get_employee_details_mis ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $employee_id ]
      }
    }

    /**
     *
     * Метод для увольнения сотрудника
     *
     * @param $token - токен доступа
     * @param $employee_id - ID сотрудника в CRM
     * @return array
     */
    Method [  public method set_dismissed_employee_mis ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $employee_id ]
      }
    }

    Method [  public method get_conclusions ] {
      

      - Parameters [4] {
        Parameter #0 [  $token ]
        Parameter #1 [  $patient_id ]
        Parameter #2 [  $offset ]
        Parameter #3 [  $max_results ]
      }
    }

    Method [  public method get_conclusion_by_id ] {
      

      - Parameters [2] {
        Parameter #0 [  $token ]
        Parameter #1 [  $conclusion_id ]
      }
    }

    /**
     *
     * Метод для создания мед.заключения
     *
     * @param $token
     * @param $patient_id
     * @param $conclusion
     * @param $diagnosis_id
     * @param $diagnosis_value
     * @param $mkb10_medical_sign
     * @param $recipe_id
     * @param $referral_id
     * @return array
     */
    Method [  public method create_conclusion ] {
      

      - Parameters [8] {
        Parameter #0 [  $token ]
        Parameter #1 [  $patient_id ]
        Parameter #2 [  $conclusion ]
        Parameter #3 [  $diagnosis_id ]
        Parameter #4 [  $diagnosis_value ]
        Parameter #5 [  $mkb10_medical_sign ]
        Parameter #6 [  $recipe_id ]
        Parameter #7 [  $referral_id ]
      }
    }

    /**
     *
     * Метод для подтверждения согласия на добавление в БД
     *
     * @param $contact_id - ID контакта
     * @return array
     */
    Method [  public method get_confirm ] {
      

      - Parameters [1] {
        Parameter #0 [  $contact_id ]
      }
    }

    /**
     *
     * Метод для получения общей информации о контакте по полю token_servolab
     *
     * @param $token_servolab
     * @return array
     */
    Method [  public method get_contact_servolab ] {
      

      - Parameters [1] {
        Parameter #0 [  $token_servolab ]
      }
    }

    /**
     * Метод создания заказа
     * @param $login - логин авторизации в методе
     * @param $password - пароль авторизации в методе
     * @param $order_id - id заказа
     * @param $phone - телефон клиента (контакта)
     * @param $agent - источник сделки
     * @param $attribute - признак автобронирования/ручной обработки
     * @param $shipping - способ доставки
     * @param $items - массив с позициями заказа
     * @param string $site
     * @return array|bool|resource
     */
    Method [  public method create_order ] {
      

      - Parameters [9] {
        Parameter #0 [  $login ]
        Parameter #1 [  $password ]
        Parameter #2 [  $order_id ]
        Parameter #3 [  $phone ]
        Parameter #4 [  $agent ]
        Parameter #5 [  $attribute ]
        Parameter #6 [  $shipping ]
        Parameter #7 [  $items ]
        Parameter #8 [  $site = '' ]
      }
    }

    /**
     * Метод обновления заказа
     * @param $login - логин авторизации в методе
     * @param $password - пароль авторизации в методе
     * @param $order_id - id заказа
     * @param $phone - телефон клиента (контакта)
     * @param $agent - источник сделки
     * @param $attribute - признак автобронирования/ручной обработки
     * @param $shipping - способ доставки
     * @param $items - массив с позициями заказа
     * @param string $site
     * @return array|bool|resource
     */
    Method [  public method update_order ] {
      

      - Parameters [9] {
        Parameter #0 [  $login ]
        Parameter #1 [  $password ]
        Parameter #2 [  $order_id ]
        Parameter #3 [  $phone ]
        Parameter #4 [  $agent ]
        Parameter #5 [  $attribute ]
        Parameter #6 [  $shipping ]
        Parameter #7 [  $items ]
        Parameter #8 [  $site = '' ]
      }
    }

    /**
     * Метод получения кода подтверждения при повторной регистрации ( если нету пароля )
     * @param $phone - номер телефона
     * @return array
     */
    Method [  public method user_check_by_password ] {
      

      - Parameters [1] {
        Parameter #0 [  $phone ]
      }
    }

    /**
     *
     * Метод проверки соответствия полученного в параметрах кода подтверждения с отправленным на указанный номер кодом (так же проверяется наличие пароля, для тех кто бы автоматически добавлен без пароля)
     *
     * @param $phone - номер телефона
     * @param $code - код подтверждения
     * @return array
     */
    Method [  public method code_check_by_password ] {
      

      - Parameters [2] {
        Parameter #0 [  $phone ]
        Parameter #1 [  $code ]
      }
    }

    Method [  public method test ] {
      
    }

    /**
     * Log the user into the application
     *
     * @param UserAuth array $user_auth -- Set user_name and password (password needs to be
     *      in the right encoding for the type of authentication the user is setup for.  For Base
     *      sugar validation, password is the MD5 sum of the plain text password.
     * @param String $application -- The name of the application you are logging in from.  (Currently unused).
     * @param array $name_value_list -- Array of name value pair of extra parameters. As of today only 'language' and 'notifyonsave' is supported
     * @return Array - id - String id is the session_id of the session that was created.
     * 				 - module_name - String - module name of user
     * 				 - name_value_list - Array - The name value pair of user_id, user_name, user_language, user_currency_id, user_currency_name,
     *                                         - user_default_team_id, user_is_admin, user_default_dateformat, user_default_timeformat
     * @exception 'SoapFault' -- The SOAP error, if any
     */
    Method [  public method login ] {
      

      - Parameters [3] {
        Parameter #0 [  $user_auth ]
        Parameter #1 [  $application = NULL ]
        Parameter #2 [  $name_value_list = Array ]
      }
    }

    /**
	 * Retrieve a list of SugarBean's based on provided IDs. This API will not wotk with report module
	 *
	 * @param String $session -- Session ID returned by a previous call to login.
	 * @param String $module_name -- The name of the module to return records from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
	 * @param Array $ids -- An array of SugarBean IDs.
	 * @param Array $select_fields -- A list of the fields to be included in the results. This optional parameter allows for only needed fields to be retrieved.
	 * @param Array $link_name_to_fields_array -- A list of link_names and for each link_name, what fields value to be returned. For ex.'link_name_to_fields_array' => array(array('name' =>  'email_addresses', 'value' => array('id', 'email_address', 'opt_out', 'primary_address')))
	 * @return Array
	 *        'entry_list' -- Array - The records name value pair for the simple data types excluding link field data.
	 *	     'relationship_list' -- Array - The records link field data. The example is if asked about accounts email address then return data would look like Array ( [0] => Array ( [name] => email_addresses [records] => Array ( [0] => Array ( [0] => Array ( [name] => id [value] => 3fb16797-8d90-0a94-ac12-490b63a6be67 ) [1] => Array ( [name] => email_address [value] => hr.kid.qa@example.com ) [2] => Array ( [name] => opt_out [value] => 0 ) [3] => Array ( [name] => primary_address [value] => 1 ) ) [1] => Array ( [0] => Array ( [name] => id [value] => 403f8da1-214b-6a88-9cef-490b63d43566 ) [1] => Array ( [name] => email_address [value] => kid.hr@example.name ) [2] => Array ( [name] => opt_out [value] => 0 ) [3] => Array ( [name] => primary_address [value] => 0 ) ) ) ) )
	 * @exception 'SoapFault' -- The SOAP error, if any
	 */
    Method [  public method get_entries ] {
      

      - Parameters [6] {
        Parameter #0 [  $session ]
        Parameter #1 [  $module_name ]
        Parameter #2 [  $ids ]
        Parameter #3 [  $select_fields ]
        Parameter #4 [  $link_name_to_fields_array ]
        Parameter #5 [  $track_view = false ]
      }
    }

    /**
     * Retrieve a list of beans.  This is the primary method for getting list of SugarBeans from Sugar using the SOAP API.
     *
     * @param String $session -- Session ID returned by a previous call to login.
     * @param String $module_name -- The name of the module to return records from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
     * @param String $query -- SQL where clause without the word 'where'
     * @param String $order_by -- SQL order by clause without the phrase 'order by'
     * @param integer $offset -- The record offset to start from.
     * @param Array  $select_fields -- A list of the fields to be included in the results. This optional parameter allows for only needed fields to be retrieved.
     * @param Array $link_name_to_fields_array -- A list of link_names and for each link_name, what fields value to be returned. For ex.'link_name_to_fields_array' => array(array('name' =>  'email_addresses', 'value' => array('id', 'email_address', 'opt_out', 'primary_address')))
    * @param integer $max_results -- The maximum number of records to return.  The default is the sugar configuration value for 'list_max_entries_per_page'
     * @param integer $deleted -- false if deleted records should not be include, true if deleted records should be included.
     * @return Array 'result_count' -- integer - The number of records returned
     *               'next_offset' -- integer - The start of the next page (This will always be the previous offset plus the number of rows returned.  It does not indicate if there is additional data unless you calculate that the next_offset happens to be closer than it should be.
     *               'entry_list' -- Array - The records that were retrieved
     *	     		 'relationship_list' -- Array - The records link field data. The example is if asked about accounts email address then return data would look like Array ( [0] => Array ( [name] => email_addresses [records] => Array ( [0] => Array ( [0] => Array ( [name] => id [value] => 3fb16797-8d90-0a94-ac12-490b63a6be67 ) [1] => Array ( [name] => email_address [value] => hr.kid.qa@example.com ) [2] => Array ( [name] => opt_out [value] => 0 ) [3] => Array ( [name] => primary_address [value] => 1 ) ) [1] => Array ( [0] => Array ( [name] => id [value] => 403f8da1-214b-6a88-9cef-490b63d43566 ) [1] => Array ( [name] => email_address [value] => kid.hr@example.name ) [2] => Array ( [name] => opt_out [value] => 0 ) [3] => Array ( [name] => primary_address [value] => 0 ) ) ) ) )
    * @exception 'SoapFault' -- The SOAP error, if any
    */
    Method [  public method get_entry_list ] {
      

      - Parameters [10] {
        Parameter #0 [  $session ]
        Parameter #1 [  $module_name ]
        Parameter #2 [  $query ]
        Parameter #3 [  $order_by ]
        Parameter #4 [  $offset ]
        Parameter #5 [  $select_fields ]
        Parameter #6 [  $link_name_to_fields_array ]
        Parameter #7 [  $max_results ]
        Parameter #8 [  $deleted ]
        Parameter #9 [  $favorites = false ]
      }
    }

    /**
     * Retrieve the layout metadata for a given module given a specific type and view.
     *
     * @param String $session -- Session ID returned by a previous call to login.
     * @param array $module_name(s) -- The name of the module(s) to return records from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
     * @return array $type The type(s) of views requested.  Current supported types are 'default' (for application) and 'wireless'
     * @return array $view The view(s) requested.  Current supported types are edit, detail, list, and subpanel.
     * @exception 'SoapFault' -- The SOAP error, if any
     */
    Method [  public method get_module_layout ] {
      

      - Parameters [6] {
        Parameter #0 [  $session ]
        Parameter #1 [  $a_module_names ]
        Parameter #2 [  $a_type ]
        Parameter #3 [  $a_view ]
        Parameter #4 [  $acl_check = true ]
        Parameter #5 [  $md5 = false ]
      }
    }

    /**
     * Given a list of modules to search and a search string, return the id, module_name, along with the fields
     * We will support Accounts, Bugs, Cases, Contacts, Leads, Opportunities, Project, ProjectTask, Quotes
     *
     * @param string $session			- Session ID returned by a previous call to login.
     * @param string $search_string 	- string to search
     * @param string[] $modules			- array of modules to query
     * @param int $offset				- a specified offset in the query
     * @param int $max_results			- max number of records to return
     * @param string $assigned_user_id	- a user id to filter all records by, leave empty to exclude the filter
     * @param string[] $select_fields   - An array of fields to return.  If empty the default return fields will be from the active list view defs.
     * @param bool $unified_search_only - A boolean indicating if we should only search against those modules participating in the unified search.
     * @param bool $favorites           - A boolean indicating if we should only search against records marked as favorites.
     * @return Array return_search_result 	- Array('Accounts' => array(array('name' => 'first_name', 'value' => 'John', 'name' => 'last_name', 'value' => 'Do')))
     * @exception 'SoapFault' -- The SOAP error, if any
     */
    Method [  public method search_by_module ] {
      

      - Parameters [9] {
        Parameter #0 [  $session ]
        Parameter #1 [  $search_string ]
        Parameter #2 [  $modules ]
        Parameter #3 [  $offset ]
        Parameter #4 [  $max_results ]
        Parameter #5 [  $assigned_user_id = '' ]
        Parameter #6 [  $select_fields = Array ]
        Parameter #7 [  $unified_search_only = true ]
        Parameter #8 [  $favorites = false ]
      }
    }

    /**
     * Get OAuth reqtest token
     */
    Method [  public method oauth_request_token ] {
      
    }

    /**
     * Get OAuth access token
     */
    Method [  public method oauth_access_token ] {
      
    }

    Method [  public method oauth_access ] {
      

      - Parameters [1] {
        Parameter #0 [  $session = '' ]
      }
    }

    /**
     * Get next job from the queue
     * @param string $session
     * @param string $clientid
     */
    Method [  public method job_queue_next ] {
      

      - Parameters [2] {
        Parameter #0 [  $session ]
        Parameter #1 [  $clientid ]
      }
    }

    /**
     * Run cleanup and schedule
     * @param string $session
     * @param string $clientid
     */
    Method [  public method job_queue_cycle ] {
      

      - Parameters [2] {
        Parameter #0 [  $session ]
        Parameter #1 [  $clientid ]
      }
    }

    /**
     * Run job from queue
     * @param string $session
     * @param string $jobid
     * @param string $clientid
     */
    Method [  public method job_queue_run ] {
      

      - Parameters [3] {
        Parameter #0 [  $session ]
        Parameter #1 [  $jobid ]
        Parameter #2 [  $clientid ]
      }
    }

    /**
     * Retrieve a single SugarBean based on ID.
     *
     * @param String $session -- Session ID returned by a previous call to login.
     * @param String $module_name -- The name of the module to return records from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
     * @param String $id -- The SugarBean's ID value.
     * @param Array $select_fields -- A list of the fields to be included in the results. This optional parameter allows for only needed fields to be retrieved.
     * @param Array $link_name_to_fields_array -- A list of link_names and for each link_name, what fields value to be returned. For ex.'link_name_to_fields_array' => array(array('name' =>  'email_addresses', 'value' => array('id', 'email_address', 'opt_out', 'primary_address')))
     * @param bool $trackView -- Should we track the record accessed.
     * @return Array
     *        'entry_list' -- Array - The records name value pair for the simple data types excluding link field data.
     *         'relationship_list' -- Array - The records link field data. The example is if asked about accounts email address then return data would look like Array ( [0] => Array ( [name] => email_addresses [records] => Array ( [0] => Array ( [0] => Array ( [name] => id [value] => 3fb16797-8d90-0a94-ac12-490b63a6be67 ) [1] => Array ( [name] => email_address [value] => hr.kid.qa@example.com ) [2] => Array ( [name] => opt_out [value] => 0 ) [3] => Array ( [name] => primary_address [value] => 1 ) ) [1] => Array ( [0] => Array ( [name] => id [value] => 403f8da1-214b-6a88-9cef-490b63d43566 ) [1] => Array ( [name] => email_address [value] => kid.hr@example.name ) [2] => Array ( [name] => opt_out [value] => 0 ) [3] => Array ( [name] => primary_address [value] => 0 ) ) ) ) )
     * @exception 'SoapFault' -- The SOAP error, if any
     */
    Method [  public method get_entry ] {
      

      - Parameters [6] {
        Parameter #0 [  $session ]
        Parameter #1 [  $module_name ]
        Parameter #2 [  $id ]
        Parameter #3 [  $select_fields ]
        Parameter #4 [  $link_name_to_fields_array ]
        Parameter #5 [  $track_view = false ]
      }
    }

    /**
     * Retrieve the md5 hash of the vardef entries for a particular module.
     *
     * @param String $session -- Session ID returned by a previous call to login.
     * @param String $module_name -- The name of the module to return records from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
     * @return String The md5 hash of the vardef definition.
     * @exception 'SoapFault' -- The SOAP error, if any
     */
    Method [  public method get_module_fields_md5 ] {
      

      - Parameters [2] {
        Parameter #0 [  $session ]
        Parameter #1 [  $module_name ]
      }
    }

    /**
     * Retrieve the md5 hash of a layout metadata for a given module given a specific type and view.
     *
     * @param String $session -- Session ID returned by a previous call to login.
     * @param array $module_name (s) -- The name of the module to return records from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
     * @return array $type(s) The type of view requested.  Current supported types are 'default' (for application) and 'wireless'
     * @return array $view(s) The view requested.  Current supported types are edit, detail, and list.
     * @exception 'SoapFault' -- The SOAP error, if any
     */
    Method [  public method get_module_layout_md5 ] {
      

      - Parameters [5] {
        Parameter #0 [  $session ]
        Parameter #1 [  $module_name ]
        Parameter #2 [  $type ]
        Parameter #3 [  $view ]
        Parameter #4 [  $acl_check = true ]
      }
    }

    /**
     * Update or create a single SugarBean.
     *
     * @param String $session -- Session ID returned by a previous call to login.
     * @param String $module_name -- The name of the module to return records from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
     * @param Array $name_value_list -- The keys of the array are the SugarBean attributes, the values of the array are the values the attributes should have.
     * @param Bool $track_view -- Should the tracker be notified that the action was performed on the bean.
     * @return Array    'id' -- the ID of the bean that was written to (-1 on error)
     * @exception 'SoapFault' -- The SOAP error, if any
     */
    Method [  public method set_entry ] {
      

      - Parameters [4] {
        Parameter #0 [  $session ]
        Parameter #1 [  $module_name ]
        Parameter #2 [  $name_value_list ]
        Parameter #3 [  $track_view = false ]
      }
    }

    /**
     * Retrieve the list of available modules on the system available to the currently logged in user.
     *
     * @param String $session -- Session ID returned by a previous call to login.
     * @param String $filter --  Valid values are: all     - Return all modules,
     *                                             default - Return all visible modules for the application
     *                                             mobile  - Return all visible modules for the mobile view
     * @return Array    'modules' -- Array - An array of module names
     * @exception 'SoapFault' -- The SOAP error, if any
     */
    Method [  public method get_available_modules ] {
      

      - Parameters [2] {
        Parameter #0 [  $session ]
        Parameter #1 [  $filter = 'all' ]
      }
    }

    /**
     * Enter description here...
     *
     * @param string $session - Session ID returned by a previous call to login.
     * @param array $modules Array of modules to return
     * @param bool $MD5 Should the results be md5d
     */
    Method [  public method get_language_definition ] {
      

      - Parameters [3] {
        Parameter #0 [  $session ]
        Parameter #1 [  $modules ]
        Parameter #2 [  $MD5 = false ]
      }
    }

    /**
     * Gets server info. This will return information like version, flavor and gmt_time.
     * @return Array - flavor - String - Retrieve the specific flavor of sugar.
     * 				 - version - String - Retrieve the version number of Sugar that the server is running.
     * 				 - gmt_time - String - Return the current time on the server in the format 'Y-m-d H:i:s'. This time is in GMT.
     * @exception 'SoapFault' -- The SOAP error, if any
     */
    Method [  public method get_server_info ] {
      
    }

    /**
     * Retrieve a list of recently viewed records by module.
     *
     * @param String $session -- Session ID returned by a previous call to login.
     * @param String $modules -- An array of modules or 'Home' to indicate all.
     * @return Array The recently viewed records
     * @exception 'SoapFault' -- The SOAP error, if any
     */
    Method [  public method get_last_viewed ] {
      

      - Parameters [2] {
        Parameter #0 [  $session ]
        Parameter #1 [  $module_names ]
      }
    }

    /**
     * Retrieve a list of upcoming activities including Calls, Meetings,Tasks and Opportunities
     *
     * @param String $session -- Session ID returned by a previous call to login.
     * @return Array List of upcoming activities
     * @exception 'SoapFault' -- The SOAP error, if any
     */
    Method [  public method get_upcoming_activities ] {
      

      - Parameters [1] {
        Parameter #0 [  $session ]
      }
    }

    /**
 * Set a single relationship between two beans.  The items are related by module name and id.
 *
 * @param String $session -- Session ID returned by a previous call to login.
 * @param String $module_name -- name of the module that the primary record is from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
 * @param String $module_id - The ID of the bean in the specified module_name
 * @param String link_field_name -- name of the link field which relates to the other module for which the relationship needs to be generated.
 * @param array related_ids -- array of related record ids for which relationships needs to be generated
 * @param array $name_value_list -- The keys of the array are the SugarBean attributes, the values of the array are the values the attributes should have.
 * @param integer $delete -- Optional, if the value 0 or nothing is passed then it will add the relationship for related_ids and if 1 is passed, it will delete this relationship for related_ids
 * @return Array - created - integer - How many relationships has been created
 *               - failed - integer - How many relationsip creation failed
 * 				 - deleted - integer - How many relationships were deleted
 * @exception 'SoapFault' -- The SOAP error, if any
 */
    Method [  public method set_relationship ] {
      

      - Parameters [7] {
        Parameter #0 [  $session ]
        Parameter #1 [  $module_name ]
        Parameter #2 [  $module_id ]
        Parameter #3 [  $link_field_name ]
        Parameter #4 [  $related_ids ]
        Parameter #5 [  $name_value_list ]
        Parameter #6 [  $delete ]
      }
    }

    /**
 * Set a single relationship between two beans.  The items are related by module name and id.
 *
 * @param String $session -- Session ID returned by a previous call to login.
 * @param array $module_names -- Array of the name of the module that the primary record is from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
 * @param array $module_ids - The array of ID of the bean in the specified module_name
 * @param array $link_field_names -- Array of the name of the link field which relates to the other module for which the relationships needs to be generated.
 * @param array $related_ids -- array of an array of related record ids for which relationships needs to be generated
 * @param array $name_value_lists -- Array of Array. The keys of the inner array are the SugarBean attributes, the values of the inner array are the values the attributes should have.
 * @param array int $delete_array -- Optional, array of 0 or 1. If the value 0 or nothing is passed then it will add the relationship for related_ids and if 1 is passed, it will delete this relationship for related_ids
 * @return Array - created - integer - How many relationships has been created
 *               - failed - integer - How many relationsip creation failed
 * 				 - deleted - integer - How many relationships were deleted
*
 * @exception 'SoapFault' -- The SOAP error, if any
*/
    Method [  public method set_relationships ] {
      

      - Parameters [7] {
        Parameter #0 [  $session ]
        Parameter #1 [  $module_names ]
        Parameter #2 [  $module_ids ]
        Parameter #3 [  $link_field_names ]
        Parameter #4 [  $related_ids ]
        Parameter #5 [  $name_value_lists ]
        Parameter #6 [  $delete_array ]
      }
    }

    /**
 * Update or create a list of SugarBeans
 *
 * @param String $session -- Session ID returned by a previous call to login.
 * @param String $module_name -- The name of the module to return records from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
 * @param Array $name_value_lists -- Array of Bean specific Arrays where the keys of the array are the SugarBean attributes, the values of the array are the values the attributes should have.
 * @return Array    'ids' -- Array of the IDs of the beans that was written to (-1 on error)
 * @exception 'SoapFault' -- The SOAP error, if any
 */
    Method [  public method set_entries ] {
      

      - Parameters [3] {
        Parameter #0 [  $session ]
        Parameter #1 [  $module_name ]
        Parameter #2 [  $name_value_lists ]
      }
    }

    /**
 * Return the user_id of the user that is logged into the current session.
 *
 * @param String $session -- Session ID returned by a previous call to login.
 * @return String -- the User ID of the current session
 * @exception 'SoapFault' -- The SOAP error, if any
 */
    Method [  public method get_user_id ] {
      

      - Parameters [1] {
        Parameter #0 [  $session ]
      }
    }

    /**
 * Retrieve vardef information on the fields of the specified bean.
 *
 * @param String $session -- Session ID returned by a previous call to login.
 * @param String $module_name -- The name of the module to return records from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
 * @param Array $fields -- Optional, if passed then retrieve vardef information on these fields only.
 * @return Array    'module_fields' -- Array - The vardef information on the selected fields.
 *                  'link_fields' -- Array - The vardef information on the link fields
 * @exception 'SoapFault' -- The SOAP error, if any
 */
    Method [  public method get_module_fields ] {
      

      - Parameters [3] {
        Parameter #0 [  $session ]
        Parameter #1 [  $module_name ]
        Parameter #2 [  $fields = Array ]
      }
    }

    /**
 * Perform a seamless login. This is used internally during the sync process.
 *
 * @param String $session -- Session ID returned by a previous call to login.
 * @return 1 -- integer - if the session was authenticated
 * @return 0 -- integer - if the session could not be authenticated
 */
    Method [  public method seamless_login ] {
      

      - Parameters [1] {
        Parameter #0 [  $session ]
      }
    }

    /**
 * Add or replace the attachment on a Note.
 * Optionally you can set the relationship of this note to Accounts/Contacts and so on by setting related_module_id, related_module_name
 *
 * @param String $session -- Session ID returned by a previous call to login.
 * @param Array 'note' -- Array String 'id' -- The ID of the Note containing the attachment
 *                              String 'filename' -- The file name of the attachment
 *                              Binary 'file' -- The binary contents of the file.
 * 								String 'related_module_id' -- module id to which this note to related to
 * 								String 'related_module_name' - module name to which this note to related to
 *
 * @return Array 'id' -- String - The ID of the Note
 * @exception 'SoapFault' -- The SOAP error, if any
 */
    Method [  public method set_note_attachment ] {
      

      - Parameters [2] {
        Parameter #0 [  $session ]
        Parameter #1 [  $note ]
      }
    }

    /**
 * Retrieve an attachment from a note
 * @param String $session -- Session ID returned by a previous call to login.
 * @param String $id -- The ID of the appropriate Note.
 * @return Array 'note_attachment' -- Array String 'id' -- The ID of the Note containing the attachment
 *                                          String 'filename' -- The file name of the attachment
 *                                          Binary 'file' -- The binary contents of the file.
 * 											String 'related_module_id' -- module id to which this note is related
 * 											String 'related_module_name' - module name to which this note is related
 * @exception 'SoapFault' -- The SOAP error, if any
 */
    Method [  public method get_note_attachment ] {
      

      - Parameters [2] {
        Parameter #0 [  $session ]
        Parameter #1 [  $id ]
      }
    }

    /**
 * sets a new revision for this document
 *
 * @param String $session -- Session ID returned by a previous call to login.
 * @param Array $document_revision -- Array String 'id' -- 	The ID of the document object
 * 											String 'document_name' - The name of the document
 * 											String 'revision' - The revision value for this revision
 *                                         	String 'filename' -- The file name of the attachment
 *                                          String 'file' -- The binary contents of the file.
 * @return Array - 'id' - String - document revision id
 * @exception 'SoapFault' -- The SOAP error, if any
 */
    Method [  public method set_document_revision ] {
      

      - Parameters [2] {
        Parameter #0 [  $session ]
        Parameter #1 [  $document_revision ]
      }
    }

    /**
 * This method is used as a result of the .htaccess lock down on the cache directory. It will allow a
 * properly authenticated user to download a document that they have proper rights to download.
 *
 * @param String $session -- Session ID returned by a previous call to login.
 * @param String $id      -- ID of the document revision to obtain
 * @return new_return_document_revision - Array String 'id' -- The ID of the document revision containing the attachment
 * 												String document_name - The name of the document
 * 												String revision - The revision value for this revision
 *                                         		String 'filename' -- The file name of the attachment
 *                                          	Binary 'file' -- The binary contents of the file.
 * @exception 'SoapFault' -- The SOAP error, if any
 */
    Method [  public method get_document_revision ] {
      

      - Parameters [2] {
        Parameter #0 [  $session ]
        Parameter #1 [  $id ]
      }
    }

    /**
*   Once we have successfuly done a mail merge on a campaign, we need to notify Sugar of the targets
*   and the campaign_id for tracking purposes
*
* @param String session  -- Session ID returned by a previous call to login.
* @param Array targets   -- a string array of ids identifying the targets used in the merge
* @param String campaign_id  --  the campaign_id used for the merge
* @return - No output
*
* @exception 'SoapFault' -- The SOAP error, if any
*/
    Method [  public method set_campaign_merge ] {
      

      - Parameters [3] {
        Parameter #0 [  $session ]
        Parameter #1 [  $targets ]
        Parameter #2 [  $campaign_id ]
      }
    }

    /**
*   Retrieve number of records in a given module
*
* @param String session      -- Session ID returned by a previous call to login.
* @param String module_name  -- module to retrieve number of records from
* @param String query        -- allows webservice user to provide a WHERE clause
* @param int deleted         -- specify whether or not to include deleted records
*
* @return Array  result_count - integer - Total number of records for a given module and query
* @exception 'SoapFault' -- The SOAP error, if any
*/
    Method [  public method get_entries_count ] {
      

      - Parameters [4] {
        Parameter #0 [  $session ]
        Parameter #1 [  $module_name ]
        Parameter #2 [  $query ]
        Parameter #3 [  $deleted ]
      }
    }
  }
}