Class HttpHelper


  • public class HttpHelper
    extends Object
    • Constructor Detail

      • HttpHelper

        public HttpHelper​(IEnvironmentEndpoints endpoints)
        Initializes a new instance of the HttpHelper class
        Parameters:
        endpoints -
    • Method Detail

      • sendQuery

        public String sendQuery​(GraphQLQuery query,
                                String token)
        Method used to post graphQL queries
        Parameters:
        query - The graphQL query object
        token - The authorization token
        Returns:
        The raw httpResponse string
      • uploadInvoice

        public String uploadInvoice​(File file,
                                    String shopId,
                                    String token)
        Method used to upload PDF invoice
        Parameters:
        file - The invoice file
        shopId - The merchant's shop id
        token - The authorization token
        Returns:
        The TransactionBatchDocument's identifier
      • readResponse

        public static String readResponse​(org.apache.http.HttpResponse response)
        Method used for reading HTTP response
        Parameters:
        response -
        Returns: