Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

AddressResponse Class

Contains a location code sent from the external tax engine.

Namespace

CommerceTax

Usage

Use the AddressResponse class to set unique values for each address.

1commercetax.AddressesResponse addressesRes = new commercetax.AddressesResponse();
2
3//AddressResponse containing ShipTo information
4commercetax.AddressResponse shipToAddress = new commercetax.AddressResponse();
5shipToAddress.setLocationCode('1234567');
6
7//AddressResponse containing ShipFrom information
8commercetax.AddressResponse shipFromAddress = new commercetax.AddressResponse();
9shipFromAddress.setLocationCode('84720385');
10
11//AddressResponse containing Sold To information
12commercetax.AddressResponse soldToAddress = new commercetax.AddressResponse();
13soldToAddress.setLocationCode('92381749');
14
15//set values of addressesRes
16addressesRes.setShipFrom(shipFromAddress);
17addressesRes.setShipTo(shipToAddress);
18addressesRes.setSoldTo(soldToAddress);

AddressResponse Methods

Learn more about the available methods with the AddressResponse class.

The AddressResponse class includes these methods.

setLocationCode(locationCode)

Sets the value of a LocationCode field.

Signature

global void setLocationCode(String locationCode)

Parameters

  • locationCode:

    Type: String

    A code that contains address information. This value can be passed to a method that sets the value of an address field.

Return Value

Type: void