Interface TaxClient

  • All Superinterfaces:
    CisClient
    All Known Implementing Classes:
    TaxClientMock

    public interface TaxClient
    extends CisClient
    Charon Client to the CIS Tax API
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      CisTaxDoc adjust​(java.lang.String xClientRef, java.lang.String tenantId, java.lang.String taxDocId, CisOrder order)
      Adjusts a previously submitted or invoiced tax document.
      com.hybris.charon.RawResponse<java.lang.String> cancel​(java.lang.String xClientRef, java.lang.String tenantId, java.lang.String taxDocId)
      Cancels a previously submitted or invoiced tax document.
      com.hybris.charon.RawResponse<java.lang.String> exists​(java.lang.String xClientRef, java.lang.String tenantId, java.lang.String taxDocId)
      Checks if a tax document exists.
      CisTaxDoc invoice​(java.lang.String xClientRef, java.lang.String tenantId, CisOrder order)
      Creates an invoice based on the provided order details.
      CisTaxDoc post​(java.lang.String xClientRef, java.lang.String tenantId, CisOrder order)
      Submits taxes for the given order.
      CisTaxDoc quote​(java.lang.String xClientRef, java.lang.String tenantId, CisOrder order)
      Returns a tax quote for the order.
    • Method Detail

      • quote

        @POST
        @Produces("application/json")
        @Consumes("application/json")
        @Path("/quotes")
        CisTaxDoc quote​(@HeaderParam("X-CIS-Client-ref")
                        java.lang.String xClientRef,
                        @HeaderParam("X-tenantId")
                        java.lang.String tenantId,
                        CisOrder order)
        Returns a tax quote for the order.
        Parameters:
        xClientRef - client ref to pass in the header
        tenantId - tenantId to pass in the header
        order - The order details to get the quote for
        Returns:
        A tax document
      • post

        @POST
        @Produces("application/json")
        @Consumes("application/json")
        @Path("/posts")
        CisTaxDoc post​(@HeaderParam("X-CIS-Client-ref")
                       java.lang.String xClientRef,
                       @HeaderParam("X-tenantId")
                       java.lang.String tenantId,
                       CisOrder order)

        Submits taxes for the given order.

        Taxes can be posted when the order is placed, which will create a persisted tax document for later reference.

        Parameters:
        xClientRef - client ref to pass in the header
        tenantId - tenantId to pass in the header
        order - The order details to post taxes for
        Returns:
        A tax document
      • invoice

        @POST
        @Produces("application/json")
        @Consumes("application/json")
        @Path("/invoices")
        CisTaxDoc invoice​(@HeaderParam("X-CIS-Client-ref")
                          java.lang.String xClientRef,
                          @HeaderParam("X-tenantId")
                          java.lang.String tenantId,
                          CisOrder order)

        Creates an invoice based on the provided order details.

        Invoiced orders can be adjusted or cancelled.

        Parameters:
        xClientRef - client ref to pass in the header
        tenantId - tenantId to pass in the header
        order - The order details to invoice taxes for
        Returns:
        A tax document
      • cancel

        @DELETE
        @Produces("application/json")
        @Consumes("application/json")
        @Path("/invoices/{taxDocId}")
        com.hybris.charon.RawResponse<java.lang.String> cancel​(@HeaderParam("X-CIS-Client-ref")
                                                               java.lang.String xClientRef,
                                                               @HeaderParam("X-tenantId")
                                                               java.lang.String tenantId,
                                                               @PathParam("taxDocId")
                                                               java.lang.String taxDocId)

        Cancels a previously submitted or invoiced tax document.

        Parameters:
        xClientRef - client ref to pass in the header
        tenantId - tenantId to pass in the header
        taxDocId - id of the tax document we want to cancel
      • adjust

        @POST
        @Produces("application/json")
        @Consumes("application/json")
        @Path("/invoices/{taxDocId}/adjustments")
        CisTaxDoc adjust​(@HeaderParam("X-CIS-Client-ref")
                         java.lang.String xClientRef,
                         @HeaderParam("X-tenantId")
                         java.lang.String tenantId,
                         @PathParam("taxDocId")
                         java.lang.String taxDocId,
                         CisOrder order)

        Adjusts a previously submitted or invoiced tax document.

        Parameters:
        xClientRef - client ref to pass in the header
        tenantId - tenantId to pass in the header
        taxDocId - id of the tax document we want to adjust
        order - CisOrder with lineitems to be cancelled
        Returns:
        A tax document
      • exists

        @HEAD
        @Produces("application/json")
        @Consumes("application/json")
        @Path("/invoices/{taxDocId}")
        com.hybris.charon.RawResponse<java.lang.String> exists​(java.lang.String xClientRef,
                                                               @HeaderParam("X-tenantId")
                                                               java.lang.String tenantId,
                                                               @PathParam("taxDocId")
                                                               java.lang.String taxDocId)

        Checks if a tax document exists.

        Parameters:
        xClientRef - client ref to pass in the header
        tenantId - tenantId to pass in the header
        taxDocId - The location URI of the document (can be relative or absolute)