Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-signifyd
Model
SignifydGateway
Request
AddressBuilder.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Signifyd\Model\SignifydGateway\Request
;
7
8
use
Magento\Sales\Api\Data\OrderAddressInterface
;
9
13
class
AddressBuilder
14
{
21
public
function
build
(
OrderAddressInterface
$address
)
22
{
23
return
[
24
'streetAddress'
=> $this->getStreetLine(1,
$address
->getStreet()),
25
'unit'
=> $this->getStreetLine(2,
$address
->getStreet()),
26
'city'
=>
$address
->getCity(),
27
'provinceCode'
=>
$address
->getRegionCode(),
28
'postalCode'
=>
$address
->getPostcode(),
29
'countryCode'
=>
$address
->getCountryId()
30
];
31
}
32
40
private
function
getStreetLine(
$number
, $street)
41
{
42
$lines = is_array($street) ? $street : [];
43
44
return
isset($lines[
$number
- 1]) ? $lines[
$number
- 1] :
''
;
45
}
46
}
$number
$number
Definition:
details.phtml:22
Magento\Signifyd\Model\SignifydGateway\Request\AddressBuilder\build
build(OrderAddressInterface $address)
Definition:
AddressBuilder.php:21
$address
$address
Definition:
customer.php:38
Magento\Signifyd\Model\SignifydGateway\Request\AddressBuilder
Definition:
AddressBuilder.php:13
Magento\Sales\Api\Data\OrderAddressInterface
Definition:
OrderAddressInterface.php:17
Magento\Signifyd\Model\SignifydGateway\Request
Definition:
CreateCaseBuilderTest.php:6