Package com.hybris.cis.client.mock
Class TaxClientMock
- java.lang.Object
-
- com.hybris.cis.client.mock.SharedClientMock
-
- com.hybris.cis.client.mock.TaxClientMock
-
public class TaxClientMock extends SharedClientMock implements TaxClient
Mock implementation ofTaxClient.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPING_FAIL
-
Constructor Summary
Constructors Constructor Description TaxClientMock()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CisTaxDocadjust(java.lang.String xClientRef, java.lang.String tenantId, java.lang.String taxDocId, CisOrder order)Simulates adjustment of a tax entry.com.hybris.charon.RawResponse<java.lang.String>cancel(java.lang.String xClientRef, java.lang.String tenantId, java.lang.String taxDocId)Simulates cancellation of a tax entry.com.hybris.charon.RawResponse<java.lang.String>exists(java.lang.String xClientRef, java.lang.String tenantId, java.lang.String taxDocId)Simulates check if the tax document existsprotected java.util.Optional<java.net.URL>getLocation(java.lang.String location)Transforms aURIintoURLMockTaxUtilsgetTaxUtils()CisTaxDocinvoice(java.lang.String xClientRef, java.lang.String tenantId, CisOrder order)Simulates invoicing of taxes.CisTaxDocpost(java.lang.String xClientRef, java.lang.String tenantId, CisOrder order)Simulates posting of taxes.CisTaxDocquote(java.lang.String xClientRef, java.lang.String tenantId, CisOrder order)Simulates quoting of taxes.voidsetTaxUtils(MockTaxUtils taxUtils)-
Methods inherited from class com.hybris.cis.client.mock.SharedClientMock
createRawResponseWithStatus, doPing
-
-
-
-
Field Detail
-
PING_FAIL
public static final java.lang.String PING_FAIL
- See Also:
- Constant Field Values
-
-
Method Detail
-
quote
public CisTaxDoc quote(@HeaderParam("X-CIS-Client-ref") java.lang.String xClientRef, @HeaderParam("X-tenantId") java.lang.String tenantId, CisOrder order)
Simulates quoting of taxes.
-
post
public CisTaxDoc post(@HeaderParam("X-CIS-Client-ref") java.lang.String xClientRef, @HeaderParam("X-tenantId") java.lang.String tenantId, CisOrder order)
Simulates posting of taxes.
-
invoice
public CisTaxDoc invoice(@HeaderParam("X-CIS-Client-ref") java.lang.String xClientRef, @HeaderParam("X-tenantId") java.lang.String tenantId, CisOrder order)
Simulates invoicing of taxes.- Specified by:
invoicein interfaceTaxClient- Parameters:
order- an example orderxClientRef- client ref to pass in the headertenantId- tenantId to pass in the header- Returns:
- an accepted tax document with document id equaling cart id
- Throws:
ServiceErrorResponseException- with UnkownServiceExceptionDetail if the cart date is equals 1996\01\23
-
cancel
public com.hybris.charon.RawResponse<java.lang.String> cancel(@HeaderParam("X-CIS-Client-ref") java.lang.String xClientRef, @HeaderParam("X-tenantId") java.lang.String tenantId, java.lang.String taxDocId)Simulates cancellation of a tax entry.
-
adjust
public CisTaxDoc adjust(@HeaderParam("X-CIS-Client-ref") java.lang.String xClientRef, @HeaderParam("X-tenantId") java.lang.String tenantId, java.lang.String taxDocId, CisOrder order)
Simulates adjustment of a tax entry.
-
exists
public com.hybris.charon.RawResponse<java.lang.String> exists(java.lang.String xClientRef, @HeaderParam("X-tenantId") java.lang.String tenantId, java.lang.String taxDocId)Simulates check if the tax document exists
-
getLocation
protected java.util.Optional<java.net.URL> getLocation(java.lang.String location)
Transforms aURIintoURL- Parameters:
location- theURIto be transformed- Returns:
- the
Optional
-
setTaxUtils
public void setTaxUtils(MockTaxUtils taxUtils)
-
getTaxUtils
public MockTaxUtils getTaxUtils()
-
-