ImpositionResponse Class
Namespace
Example
In this mock adapter example, the adapter sets the TaxDetailsResponse.setImposition() method parameter to null if the request's document code indicates that the tax calculation didn't require any exceptions. Otherwise, it creates an instance of ImpositionResponse and sets its SubType and Type values, and then assigns it to TaxDetailsResponse.
1if(request.DocumentCode == 'SetsNullForResponseWithoutException'){
2 taxDetailsResponse.setImposition(null);
3 }else{
4 commercetax.ImpositionResponse imposition = new commercetax.ImpositionResponse();
5 imposition.setSubType('subtype');
6 imposition.setType('type');
7 taxDetailsResponse.setImposition(imposition);
8 }ImpositionResponse Methods
The ImpositionResponse class includes these methods.
setId(id)
Signature
global void setId(String id)
Parameters
-
id:
Type: String
User-defined ID value used
for referencing the tax imposition.
Return Value
Type: void
setName(name)
Signature
global void setName(String name)
Parameters
-
name:
Type: String
Optional user-defined name for the tax imposition response.
Return Value
Type: void
setSubType(subType)
Signature
global void setSubType(String subType)
Parameters
-
subType:
Type: String
Many tax calculation organizations use types and subtypes to categorize their tax imposition procedures.
If the tax engine you use follows this process, set the subtype with this parameter.
Return Value
Type: void
setType(type)
Signature
public void setType(String type)
Parameters
-
type:
Type: String
Many tax calculation organizations use types and subtypes to categorize their tax imposition procedures.
If the tax engine you use follows this process, set the type with this parameter.
Return Value
Type: void