text: /*
   * HMPPS Offender Assessment API
   * OASys Data API.
   *
   * OpenAPI spec version: 2020-09-02
   * Contact: feedback@digital.justice.gov.uk
   *
   * NOTE: This class is auto generated by the swagger code generator program.
   * https://github.com/swagger-api/swagger-codegen.git
   *
   * Swagger Codegen version: 2.4.15
   *
   * Do not edit the class manually.
   *
   */
  
  (function(root, factory) {
    if (typeof define === 'function' && define.amd) {
      // AMD. Register as an anonymous module.
      define(['ApiClient', 'model/RefElementDto'], factory);
    } else if (typeof module === 'object' && module.exports) {
      // CommonJS-like environments that support module.exports, like Node.
      module.exports = factory(require('../ApiClient'), require('../model/RefElementDto'));
    } else {
      // Browser globals (root is window)
      if (!root.HmppsOffenderAssessmentApi) {
        root.HmppsOffenderAssessmentApi = {};
      }
      root.HmppsOffenderAssessmentApi.ReferenceDataApi = factory(root.HmppsOffenderAssessmentApi.ApiClient, root.HmppsOffenderAssessmentApi.RefElementDto);
    }
  }(this, function(ApiClient, RefElementDto) {
    'use strict';
  
    /**
     * ReferenceData service.
     * @module api/ReferenceDataApi
     * @version 1.0.0
     */
  
    /**
     * Constructs a new ReferenceDataApi. 
     * @alias module:api/ReferenceDataApi
     * @class
     * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
     * default to {@link module:ApiClient#instance} if unspecified.
     */
    var exports = function(apiClient) {
      this.apiClient = apiClient || ApiClient.instance;
  
  
  
      /**
       * Gets reference data for a category
       * @param {String} category category
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/RefElementDto>} and HTTP response
       */
      this.getReferenceDataByCategoryCodeUsingGETWithHttpInfo = function(category) {
        var postBody = null;
  
        // verify the required parameter 'category' is set
        if (category === undefined || category === null) {
          throw new Error("Missing the required parameter 'category' when calling getReferenceDataByCategoryCodeUsingGET");
        }
  
  
        var pathParams = {
          'category': category
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['spring_oauth'];
        var contentTypes = [];
        var accepts = ['*/*'];
        var returnType = [RefElementDto];
  
        return this.apiClient.callApi(
          '/referencedata/{category}', 'GET',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * Gets reference data for a category
       * @param {String} category category
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/RefElementDto>}
       */
      this.getReferenceDataByCategoryCodeUsingGET = function(category) {
        return this.getReferenceDataByCategoryCodeUsingGETWithHttpInfo(category)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
    };
  
    return exports;
  }));
  