magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.5k stars 9.3k forks source link

API improvement: OrderInterface should have a getShippingAddress method #6919

Closed phoenix-bjoern closed 7 years ago

phoenix-bjoern commented 8 years ago

As a developer who writes an order export for Magento2 you would expect that besides the getBillingAddress there would be also a getShippingAddress method. While all the [g/s]etShipping... methods exists in the Magento\Sales\Model\Order model (which is the actual implementation of the OrderInterface) those elementary shipping-address methods are not part of the API interface.

Example: $order is declared as type Magento\Sales\Api\Data\OrderInterface. Practically the code "$order->getShippingAddress()" works but from a declarative view the method does not exist in the API and the implementation therefore is technically wrong.

While it is understood that not all orders have a shipping address (virtual orders/goods) the majority of orders processed in ecommerce actually have a shipping address. So the shipping-address methods should become part of the OrderInterface like it is already the case for the billing-address methods.

pboisvert commented 8 years ago

Thanks Bjorn for the feedback. Will make sure the product owner for APIs sees this

phoenix-bjoern commented 8 years ago

Thanks @pboisvert! already in touch with @choukalos :-)

pboisvert commented 8 years ago

yes--Chuck knows about this area but owned currently by @mbrinton01

piotrekkaminski commented 7 years ago

@phoenix-bjoern would you be willing to contribute this as a PR?

piotrekkaminski commented 7 years ago

Thank you for your submission.

We recently made some changes to the way we process GitHub submissions to more quickly identify and respond to core code issues.

Feature Requests and Improvements should now be submitted to the new Magento 2 Feature Requests and Improvements forum (see details here).

We are closing this GitHub ticket and have moved your request to the new forum.

mbrinton01 commented 7 years ago

Tracking internally as MAGETWO-60017