Class DisputeGateway

    • Constructor Detail

    • Method Detail

      • accept

        public Result<Dispute> accept​(String id)
        Accept a @{link Dispute}, given a dispute ID.
        Parameters:
        id - the dispute id to accept.
        Returns:
        a Result.
        Throws:
        NotFoundException - if a Dispute with the given ID cannot be found.
      • addFileEvidence

        public Result<DisputeEvidence> addFileEvidence​(String disputeId,
                                                       String documentId)
        Add File Evidence to a @{link Dispute}, given an ID and a @{link DocumentUpload} ID.
        Parameters:
        disputeId - the dispute id to add text evidence to.
        documentId - the document id of a previously uploaded document
        Returns:
        a Result.
        Throws:
        NotFoundException - if the Dispute ID or Document ID cannot be found.
      • addFileEvidence

        public Result<DisputeEvidence> addFileEvidence​(String disputeId,
                                                       FileEvidenceRequest fileEvidenceRequest)
        Add File Evidence to a @{link Dispute}, given an ID and a @{link FileEvidenceRequest} File evidence request.
        Parameters:
        disputeId - the dispute id to add text evidence to.
        fileEvidenceRequest - the file evidence request for the dispute.
        Returns:
        a Result.
        Throws:
        NotFoundException - if the Dispute ID or Document ID cannot be found.
      • addTextEvidence

        public Result<DisputeEvidence> addTextEvidence​(String id,
                                                       String content)
        Add Text Evidence to a @{link Dispute}, given an ID and content.
        Parameters:
        id - the dispute id to add text evidence to.
        content - the content of the text evidence for the dispute.
        Returns:
        a Result.
        Throws:
        NotFoundException - if a Dispute with the given ID cannot be found.
        IllegalArgumentException - if the content is empty.
      • finalize

        public Result<Dispute> finalize​(String id)
        Finalize a @{link Dispute}, given an ID.
        Parameters:
        id - the dispute id to finalize.
        Returns:
        a Result.
        Throws:
        NotFoundException - if a Dispute with the given ID cannot be found.
      • find

        public Dispute find​(String id)
        Returns a @{link Dispute}, given an ID.
        Parameters:
        id - the dispute id to find.
        Returns:
        a Dispute.
        Throws:
        NotFoundException - if a Dispute with the given ID cannot be found.
      • removeEvidence

        public Result<Dispute> removeEvidence​(String disputeId,
                                              String evidenceId)
        Remove Evidence from a @{link Dispute}, given an ID and a @{link DisputeEvidence} ID.
        Parameters:
        disputeId - the dispute id to remove evidence from.
        evidenceId - the evidence id to remove.
        Returns:
        a Result.
        Throws:
        NotFoundException - if the Dispute ID or evidence ID cannot be found.