def parameterize_audit(action, payload)
      params = {}
      summary = non_blank(payload[:summary])
      detail = non_blank(payload[:detail])
      case action
      when "create_entry"
        params[:audit_entry] = {:auditee_href => @self_href}
        params[:audit_entry][:summary] = truncate(summary, MAX_AUDIT_SUMMARY_LENGTH) if summary
        params[:audit_entry][:detail] = detail if detail
        if (user_email = non_blank(payload[:user_email]))
          params[:user_email] = user_email
        end
        params[:notify] = payload[:category] if payload[:category]
      when "update_entry"
        params[:offset] = payload[:offset] if payload[:offset]
        if summary
          params[:summary] = truncate(summary, MAX_AUDIT_SUMMARY_LENGTH)
          params[:notify] = payload[:category] if payload[:category]
        end
        params[:detail] = detail if detail
      else
        raise ArgumentError, "Unknown audit request action: #{action}"
      end
      params
    end
def parameterize_audit(action, payload)
      params = {}
      summary = non_blank(payload[:summary])
      detail = non_blank(payload[:detail])
      case action
      when "create_entry"
        params[:audit_entry] = {:auditee_href => @self_href}
        params[:audit_entry][:summary] = truncate(summary, MAX_AUDIT_SUMMARY_LENGTH) if summary
        params[:audit_entry][:detail] = detail if detail
        if (user_email = non_blank(payload[:user_email]))
          params[:user_email] = user_email
        end
        params[:notify] = payload[:category] if payload[:category]
      when "update_entry"
        params[:offset] = payload[:offset] if payload[:offset]
        if summary
          params[:summary] = truncate(summary, MAX_AUDIT_SUMMARY_LENGTH)
          params[:notify] = payload[:category] if payload[:category]
        end
        params[:detail] = detail if detail
      else
        raise ArgumentError, "Unknown audit request action: #{action}"
      end
      params
    end
Translate audit request payload to HTTP parameters
 Truncate audit summary to MAX_AUDIT_SUMMARY_LENGTH, the limit imposed by RightApi

 @param [String] action requested: create_entry or update_entry
 @param [Hash] payload from submitted request

 @return [Hash] HTTP request parameters

 @raise [ArgumentError] unknown request action