   end
 
   defp address_params(%Address{} = address) do
+    state =
+      case address.state do
+        nil -> nil
+        _ -> state_without_country(address)
+      end
+
     %{
       Name: address.name,
       AttentionName: address.name,

        AddressKeyFormat: %{
          AddressLine: address.address,
          PoliticalDivision2: address.city,
          PoliticalDivision1: state_without_country(address),
          PostcodePrimaryLow: address.zip,
          CountryCode: address.country
        }


  @impl true
  def validate_address(%Address{} = address) do
    state =
      case address.state do
        nil -> nil
        _ -> state_without_country(address)
      end

    xav_params = %{
      XAVRequest: %{
        Request: %{
