Unclear requirement when setting IShipment.ShippingAddress

Found in

EPiServer.Commerce 11.0.0

Fixed in

EPiServer.Commerce 11.2.1

Created

Aug 18 2017

Updated

Sep 06 2017

Area

Core

State

Closed, Fixed and tested


Description

Steps to reproduce:
var order = _orderRepository.Service.Create("Test");
order.GetFirstShipment().ShippingAddress = order.CreateOrderAddress();

This code does not work because the address is required to have an Id.

Expected:
The CreateOrderAddress method should have an overload that takes the name of the address.

Reported from: http://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2017/8/11-1-failure-to-set-shippingaddress-on-purchaseorder/?pageIndex=1#reply