lib/ews/types/item.rb
def validate_created_item(response)
      msg = response.response_messages[0]

      if(msg.status == 'Success')
        msg.items.empty? ? true : parse_created_item(msg.items.first)
      else
        raise EwsCreateItemError, "#{msg.code}: #{msg.message_text}"
      end
    end
def validate_created_item(response)
      msg = response.response_messages[0]

      if(msg.status == 'Success')
        msg.items.empty? ? true : parse_created_item(msg.items.first)
      else
        raise EwsCreateItemError, "#{msg.code}: #{msg.message_text}"
      end
    end
def validate_created_item ( response ) msg = response . response_messages [ 0 ] if ( msg . status == 'Success' ) msg . items . empty? ? true : parse_created_item ( msg . items . first ) else raise EwsCreateItemError , "#{msg.code}: #{msg.message_text}" end end
validate the CreateItem response.
 @return [Boolean, Item] returns true if items is empty and status is
   "Success" if items is not empty it will return the first Item since
   we are only dealing with single items here.
 @raise EwsCreateItemError on failure
validate the CreateItem response .