text: /**
   * EasyBimehLandingLib
   *
   * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
   */
  
  ;(function (angular) {
  'use strict';
  
  angular.module('EasyBimehLandingLib')
      .factory('LiabilityDoctorInsuranceController', ['$q',
          'Configuration',
          'Servers',
          'HttpClient',
          'APIHelper',
          'BaseController',
          LiabilityDoctorInsuranceController
      ]);
  
      function LiabilityDoctorInsuranceController($q, Configuration, Servers, HttpClient, APIHelper, BaseController) {
          return {
              /**
               * در یافت اطلاعات اولیه برای استعلام بیمه مسئولیت پزشکان
               *
               * @param {string} subDomain دامنه یا زیر دامنه ی مرکز بیمه
               * @param {string} xApiKey کلید اختصاصی ارتباط با سرور
               *
               * @return {promise<Base Model LiabilityDoctorInsurance>}
               */
              getLiabilityDoctorInsurance: function (subDomain, xApiKey) {
  
                  //Create promise to return
                  var _deffered = $q.defer();
                  
                  //prepare query string for API call
                  var _baseUri = Configuration.getBaseUri();
                  var _queryBuilder = _baseUri + '/LiabilityDoctorInsurance/Initialize';
                  
                  // Process query parameters
                  _queryBuilder = APIHelper.appendUrlWithQueryParameters(_queryBuilder, {
                      'subDomain': subDomain
                  });
  
                  //validate and preprocess url
                  var _queryUrl = APIHelper.cleanUrl(_queryBuilder);
                  
                  // prepare headers
                  var _headers = {
                      'accept': 'application/json',
                      'x-api-key': xApiKey
                  };
  
                  // prepare and invoke the API call request to fetch the response
                  var _config = {
                      method: 'GET',
                      queryUrl: _queryUrl,
                      headers: _headers,
                  };
                  
                  var _response = new HttpClient(_config);
                  
                  //process response
                  _response.then(function success(_result) {
                      var parsed = _result.body;
                      parsed = BaseController.getObjectMapper().mapObject(parsed, 'BaseModelLiabilityDoctorInsurance');
                      _result.body = parsed;
                      _deffered.resolve(_result);
                  }, function error(_result){
                      // Error handling for custom HTTP status codes
                      _deffered.reject(APIHelper.appendContext({
                          errorMessage:'HTTP Response Not OK',
                          errorCode: _result.code,
                          errorResponse: _result.message
                      }, _result.getContext()));
                  });
                  
                  return _deffered.promise;
              },
              /**
               * دریافت لیست تخصص های پزشکی
               *
               * @param {string} id نوع تخصص => ParamedicalExpertise => پیراپزشکی MedicalExpertise => پزشکی
               * @param {string} xApiKey کلید اختصاصی ارتباط با سرور
               *
               * @return {promise<Base Model MedicalSpecialties>}
               */
              getMedicalSpecialties: function (id, xApiKey) {
  
                  //Create promise to return
                  var _deffered = $q.defer();
                  
                  //prepare query string for API call
                  var _baseUri = Configuration.getBaseUri();
                  var _queryBuilder = _baseUri + '/MedicalSpecialties';
                  
                  // Process query parameters
                  _queryBuilder = APIHelper.appendUrlWithQueryParameters(_queryBuilder, {
                      'id': id
                  });
  
                  //validate and preprocess url
                  var _queryUrl = APIHelper.cleanUrl(_queryBuilder);
                  
                  // prepare headers
                  var _headers = {
                      'accept': 'application/json',
                      'x-api-key': xApiKey
                  };
  
                  // prepare and invoke the API call request to fetch the response
                  var _config = {
                      method: 'GET',
                      queryUrl: _queryUrl,
                      headers: _headers,
                  };
                  
                  var _response = new HttpClient(_config);
                  
                  //process response
                  _response.then(function success(_result) {
                      var parsed = _result.body;
                      parsed = BaseController.getObjectMapper().mapObject(parsed, 'BaseModelMedicalSpecialties');
                      _result.body = parsed;
                      _deffered.resolve(_result);
                  }, function error(_result){
                      // Error handling for custom HTTP status codes
                      _deffered.reject(APIHelper.appendContext({
                          errorMessage:'HTTP Response Not OK',
                          errorCode: _result.code,
                          errorResponse: _result.message
                      }, _result.getContext()));
                  });
                  
                  return _deffered.promise;
              }
          };
      }
  
  }(angular));
  