ShippingAddressRequirements.Builder

  • ShippingAddressRequirements.Builder is used to create a ShippingAddressRequirements object.

  • You can add allowed country codes for shipping using addAllowedCountryCode or addAllowedCountryCodes.

  • If no country codes are specified, all countries are considered allowed for shipping.

  • The build method returns the ShippingAddressRequirements object created by the builder.

public final class ShippingAddressRequirements.Builder extends Object

Builder to create a ShippingAddressRequirements.

Public Method Summary

ShippingAddressRequirements.Builder
addAllowedCountryCode(String allowedCountryCode)
Adds a country code of the country to which shipping is allowed in this transaction.
ShippingAddressRequirements.Builder
addAllowedCountryCodes(Collection<String> allowedCountryCodes)
Adds a collection of country codes of the countries to which shipping is allowed in this transaction.
ShippingAddressRequirements
build()
Returns the actual ShippingAddressRequirements created using the data passed to the Builder object.

Inherited Method Summary

Public Methods

public ShippingAddressRequirements.Builder addAllowedCountryCode (String allowedCountryCode)

Adds a country code of the country to which shipping is allowed in this transaction. If not specified here nor via addAllowedCountryCodes(Collection), all countries are considered to be allowed.

Parameters
allowedCountryCode an ISO 3166-1 alpha-2 formatted country code (e.g., "US", "CA", "JP").

public ShippingAddressRequirements.Builder addAllowedCountryCodes (Collection<String> allowedCountryCodes)

Adds a collection of country codes of the countries to which shipping is allowed in this transaction. If not specified here nor via addAllowedCountryCode(String), all countries are considered to be allowed.

Parameters
allowedCountryCodes a collection of ISO 3166-1 alpha-2 formatted country code (e.g., "US", "CA", "JP").

public ShippingAddressRequirements build ()

Returns the actual ShippingAddressRequirements created using the data passed to the Builder object.