code: @Override
      public Observable<ComapiResult<Map<String, Object>>> patchProfile(@NonNull final String profileId, @NonNull final Map<String, Object> profileDetails, final String eTag) {
  
          final String token = getToken();
  
          if (sessionController.isCreatingSession()) {
              return getTaskQueue().queuePatchProfile(profileDetails, eTag);
          } else if (TextUtils.isEmpty(token)) {
              return Observable.error(getSessionStateErrorDescription());
          } else {
              return doPatchProfile(token, dataMgr.getSessionDAO().session().getProfileId(), profileDetails, eTag);
          }
      }
docs: Applies given profile patch if required permission is granted.
  
  @param profileId      Id of an profile to patch.
  @param profileDetails Profile details.
  @param eTag           ETag for server to check if local version of the data is the same as the one the server side.
  @return Observable with to perform update profile for current session.