module SolidusShipwire::AddressDecorator
  def to_shipwire
    {
      # Recipient details
      name: "#{firstname} #{lastname}",
      company: company,
      address1: address1,
      address2: address2,
      city: city,
      state: state_name,
      postalCode: zipcode,
      country: country.iso
    }
  end
end

Spree::Address.prepend SolidusShipwire::AddressDecorator

module SolidusShipwire::AddressDecorator
  def to_shipwire
    {
      # Recipient details
      name: "#{firstname} #{lastname}",
      company: company,
      address1: address1,
      address2: address2,
      city: city,
      state: state_name,
      postalCode: zipcode,
      country: country.iso,
      phone: phone
    }
  end
end

Spree::Address.prepend SolidusShipwire::AddressDecorator

Add phone to shipwire address
Add phone to shipwire address
