| @@ 261-266 (lines=6) @@ | ||
| 258 | // also it will be good to accept ISO3 code in future, need to be discussed with product owners |
|
| 259 | // - convert region name to region code (as result we accept the combined code, code and name) |
|
| 260 | // - move region name to region_text field for unknown region |
|
| 261 | if (array_key_exists('addresses', $contactData)) { |
|
| 262 | foreach ($contactData['addresses'] as &$address) { |
|
| 263 | AddressApiUtils::fixAddress($address, $this->get('doctrine.orm.entity_manager')); |
|
| 264 | } |
|
| 265 | $this->getRequest()->request->set($formAlias, $contactData); |
|
| 266 | } |
|
| 267 | ||
| 268 | parent::fixRequestAttributes($entity); |
|
| 269 | } |
|
| @@ 164-167 (lines=4) @@ | ||
| 161 | // also it will be good to accept ISO3 code in future, need to be discussed with product owners |
|
| 162 | // - convert region name to region code (as result we accept the combined code, code and name) |
|
| 163 | // - move region name to region_text field for unknown region |
|
| 164 | if (array_key_exists('shippingAddress', $customerData)) { |
|
| 165 | AddressApiUtils::fixAddress($customerData['shippingAddress'], $this->get('doctrine.orm.entity_manager')); |
|
| 166 | $this->getRequest()->request->set($formAlias, $customerData); |
|
| 167 | } |
|
| 168 | if (array_key_exists('billingAddress', $customerData)) { |
|
| 169 | AddressApiUtils::fixAddress($customerData['billingAddress'], $this->get('doctrine.orm.entity_manager')); |
|
| 170 | $this->getRequest()->request->set($formAlias, $customerData); |
|
| @@ 168-171 (lines=4) @@ | ||
| 165 | AddressApiUtils::fixAddress($customerData['shippingAddress'], $this->get('doctrine.orm.entity_manager')); |
|
| 166 | $this->getRequest()->request->set($formAlias, $customerData); |
|
| 167 | } |
|
| 168 | if (array_key_exists('billingAddress', $customerData)) { |
|
| 169 | AddressApiUtils::fixAddress($customerData['billingAddress'], $this->get('doctrine.orm.entity_manager')); |
|
| 170 | $this->getRequest()->request->set($formAlias, $customerData); |
|
| 171 | } |
|
| 172 | ||
| 173 | parent::fixRequestAttributes($entity); |
|
| 174 | } |
|