Skip to content

Commit 6f8cab2

Browse files
committed
MAGETWO-32921: Adapt Payment\Gateway framework to client requirement
- Added API documentation for Order Address
1 parent 6c9aa94 commit 6f8cab2

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

app/code/Magento/Sales/Api/Data/OrderAddressInterface.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ interface OrderAddressInterface extends \Magento\Framework\Api\ExtensibleDataInt
3535
* Region ID.
3636
*/
3737
const REGION_ID = 'region_id';
38+
/**
39+
* Region code.
40+
*/
41+
const KEY_REGION_CODE = 'region_code';
3842
/*
3943
* Customer ID.
4044
*/
@@ -248,9 +252,9 @@ public function getQuoteAddressId();
248252
public function getRegion();
249253

250254
/**
251-
* Return 2 letter state code if available, otherwise full region name
255+
* Gets the region code for the order address
252256
*
253-
* @return null|string
257+
* @return string|null Region code.
254258
*/
255259
public function getRegionCode();
256260

@@ -501,6 +505,14 @@ public function setVatIsValid($vatIsValid);
501505
*/
502506
public function setVatRequestId($id);
503507

508+
/**
509+
* Set region code
510+
*
511+
* @param string $regionCode
512+
* @return $this
513+
*/
514+
public function setRegionCode($regionCode);
515+
504516
/**
505517
* Sets the VAT request date for the order address.
506518
*

app/code/Magento/Sales/Model/Order/Address.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,14 @@ public function setVatRequestId($id)
702702
return $this->setData(OrderAddressInterface::VAT_REQUEST_ID, $id);
703703
}
704704

705+
/**
706+
* {@inheritdoc}
707+
*/
708+
public function setRegionCode($regionCode)
709+
{
710+
return $this->setData(OrderAddressInterface::KEY_REGION_CODE, $regionCode);
711+
}
712+
705713
/**
706714
* {@inheritdoc}
707715
*/

0 commit comments

Comments
 (0)