postRecord(callback) {
    /**
     * Write the body for this function.
     * The function is a wrapper for this.connector's post() method.
     * Note how the object was instantiated in the constructor().
     * post() takes a callback function.
     */
    let recordData = {
        change_ticket_number: null,
        active: null,
        priority: null,
        description: null,
        work_start: null,
        work_end: null,
        change_ticket_key: null,
     };
     
     let bodyData = {};
     let resultData = {};
     
     this.connector.post((data, error) => {
        if (error) {
            log.error(`\nError returned from POST request:\n${JSON.stringify(error)}`);
            callback(error);
        } else {
            log.info(`\nResponse returned from POST request:\n${JSON.stringify(data)}`);
            if(data.hasOwnProperty('body') === true){
                bodyData = JSON.parse(data.body);
                if(bodyData.hasOwnProperty('result') === true){
                    resultData = bodyData.result;
                    recordData.change_ticket_number = resultData.number;
                    recordData.active = resultData.active;
                    recordData.priority = resultData.priority;
                    recordData.description = resultData.description;
                    recordData.work_start = resultData.work_start;
                    recordData.work_end = resultData.work_end;
                    recordData.change_ticket_key = resultData.sys_id;
                } else {
                    outRecords.push("Missing Data Results");
                }
            } else {
                outRecords.push("Missing Data Body");
            }
            callback(recordData);
        }
     });
  }
/**
   * @memberof ServiceNowAdapter
   * @method postRecord
   * @summary Create ServiceNow Record
   * @description Creates a record in ServiceNow.
   *
   * @param {ServiceNowAdapter~requestCallback} callback - The callback that
   *   handles the response.
   */
@memberof ServiceNowAdapter
@method postRecord
@summary Create ServiceNow Record
@description Creates a record in ServiceNow.

@param {ServiceNowAdapter~requestCallback} callback - The callback that
handles the response.
@memberof ServiceNowAdapter @method postRecord @summary Create ServiceNow Record @description Creates a record in ServiceNow . @param { ServiceNowAdapter~requestCallback } callback - The callback that handles the response .
postRecord(callback) {
    let recordData = {
        change_ticket_number: null,
        active: null,
        priority: null,
        description: null,
        work_start: null,
        work_end: null,
        change_ticket_key: null,
     };
     let bodyData = {};
     let resultData = {};
     this.connector.post((data, error) => {
        if (error) {
            log.error(`\nError returned from POST request:\n${JSON.stringify(error)}`);
            callback(error);
        } else {
            log.info(`\nResponse returned from POST request:\n${JSON.stringify(data)}`);
            if(data.hasOwnProperty('body') === true){
                bodyData = JSON.parse(data.body);
                if(bodyData.hasOwnProperty('result') === true){
                    resultData = bodyData.result;
                    recordData.change_ticket_number = resultData.number;
                    recordData.active = resultData.active;
                    recordData.priority = resultData.priority;
                    recordData.description = resultData.description;
                    recordData.work_start = resultData.work_start;
                    recordData.work_end = resultData.work_end;
                    recordData.change_ticket_key = resultData.sys_id;
                } else {
                    outRecords.push("Missing Data Results");
                }
            } else {
                outRecords.push("Missing Data Body");
            }
            callback(recordData);
        }
     });
  }
postRecord ( callback ) { let recordData = { change_ticket_number : null , active : null , priority : null , description : null , work_start : null , work_end : null , change_ticket_key : null , } ; let bodyData = { } ; let resultData = { } ; this . connector . post ( ( data , error ) => { if ( error ) { log . error ( ` \n \n ${ JSON . stringify ( error ) } ` ) ; callback ( error ) ; } else { log . info ( ` \n \n ${ JSON . stringify ( data ) } ` ) ; if ( data . hasOwnProperty ( 'body' ) === true ) { bodyData = JSON . parse ( data . body ) ; if ( bodyData . hasOwnProperty ( 'result' ) === true ) { resultData = bodyData . result ; recordData . change_ticket_number = resultData . number ; recordData . active = resultData . active ; recordData . priority = resultData . priority ; recordData . description = resultData . description ; recordData . work_start = resultData . work_start ; recordData . work_end = resultData . work_end ; recordData . change_ticket_key = resultData . sys_id ; } else { outRecords . push ( "Missing Data Results" ) ; } } else { outRecords . push ( "Missing Data Body" ) ; } callback ( recordData ) ; } } ) ; }
@memberof ServiceNowAdapter
 @method postRecord
 @summary Create ServiceNow Record
 @description Creates a record in ServiceNow.
@memberof ServiceNowAdapter @method postRecord @summary Create ServiceNow Record @description Creates a record in ServiceNow .
/**
     * Write the body for this function.
     * The function is a wrapper for this.connector's post() method.
     * Note how the object was instantiated in the constructor().
     * post() takes a callback function.
     */