Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory, \Psr\Log\LoggerInterface $logger, Security $xmlSecurity, \Magento\Shipping\Model\Simplexml\ElementFactory $xmlElFactory, \Magento\Shipping\Model\Rate\ResultFactory $rateFactory, \Magento\Quote\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory, \Magento\Shipping\Model\Tracking\ResultFactory $trackFactory, \Magento\Shipping\Model\Tracking\Result\ErrorFactory $trackErrorFactory, \Magento\Shipping\Model\Tracking\Result\StatusFactory $trackStatusFactory, \Magento\Directory\Model\RegionFactory $regionFactory, \Magento\Directory\Model\CountryFactory $countryFactory, \Magento\Directory\Model\CurrencyFactory $currencyFactory, \Magento\Directory\Helper\Data $directoryData, \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\Module\Dir\Reader $configReader, \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory, array $data=[], Json $serializer=null, ClientFactory $soapClientFactory=null) | |
collectRates (RateRequest $request) | |
setRequest (RateRequest $request) | |
getResult () | |
getVersionInfo () | |
getCode ($type, $code='') | |
getCurrencyCode () | |
getTracking ($trackings) | |
getResponse () | |
getAllowedMethods () | |
rollBack ($data) | |
getContainerTypes (\Magento\Framework\DataObject $params=null) | |
getContainerTypesAll () | |
getContainerTypesFilter () | |
getDeliveryConfirmationTypes (\Magento\Framework\DataObject $params=null) | |
![]() | |
__construct (\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory, \Psr\Log\LoggerInterface $logger, Security $xmlSecurity, \Magento\Shipping\Model\Simplexml\ElementFactory $xmlElFactory, \Magento\Shipping\Model\Rate\ResultFactory $rateFactory, \Magento\Quote\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory, \Magento\Shipping\Model\Tracking\ResultFactory $trackFactory, \Magento\Shipping\Model\Tracking\Result\ErrorFactory $trackErrorFactory, \Magento\Shipping\Model\Tracking\Result\StatusFactory $trackStatusFactory, \Magento\Directory\Model\RegionFactory $regionFactory, \Magento\Directory\Model\CountryFactory $countryFactory, \Magento\Directory\Model\CurrencyFactory $currencyFactory, \Magento\Directory\Helper\Data $directoryData, \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry, array $data=[]) | |
setActiveFlag ($code='active') | |
getCarrierCode () | |
getTrackingInfo ($tracking) | |
isTrackingAvailable () | |
isCityRequired () | |
isZipCodeRequired ($countryId=null) | |
isShippingLabelsAvailable () | |
getAllItems (RateRequest $request) | |
proccessAdditionalValidation (\Magento\Framework\DataObject $request) | |
requestToShipment ($request) | |
returnOfShipment ($request) | |
rollBack ($data) | |
isGirthAllowed ($countyDest=null, $carrierMethodCode=null) | |
setRawRequest ($request) | |
getMethodPrice ($cost, $method='') | |
parseXml ($xmlContent, $customSimplexml='SimpleXMLElement') | |
canCollectRates () | |
![]() | |
__construct (\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory, \Psr\Log\LoggerInterface $logger, array $data=[]) | |
getConfigData ($field) | |
getConfigFlag ($field) | |
requestToShipment ($request) | |
returnOfShipment ($request) | |
getContainerTypes (\Magento\Framework\DataObject $params=null) | |
getCustomizableContainerTypes () | |
getDeliveryConfirmationTypes (\Magento\Framework\DataObject $params=null) | |
processAdditionalValidation (\Magento\Framework\DataObject $request) | |
proccessAdditionalValidation (\Magento\Framework\DataObject $request) | |
isActive () | |
isFixed () | |
isTrackingAvailable () | |
isShippingLabelsAvailable () | |
getSortOrder () | |
getFinalPriceWithHandlingFee ($cost) | |
getTotalNumOfBoxes ($weight) | |
isStateProvinceRequired () | |
isCityRequired () | |
isZipCodeRequired ($countryId=null) | |
getDebugFlag () | |
debugData ($debugData) | |
getCarrierCode () | |
getContentTypes (\Magento\Framework\DataObject $params) | |
![]() | |
__construct (array $data=[]) | |
addData (array $arr) | |
setData ($key, $value=null) | |
unsetData ($key=null) | |
getData ($key='', $index=null) | |
getDataByPath ($path) | |
getDataByKey ($key) | |
setDataUsingMethod ($key, $args=[]) | |
getDataUsingMethod ($key, $args=null) | |
hasData ($key='') | |
toArray (array $keys=[]) | |
convertToArray (array $keys=[]) | |
toXml (array $keys=[], $rootName='item', $addOpenTag=false, $addCdata=true) | |
convertToXml (array $arrAttributes=[], $rootName='item', $addOpenTag=false, $addCdata=true) | |
toJson (array $keys=[]) | |
convertToJson (array $keys=[]) | |
toString ($format='') | |
__call ($method, $args) | |
isEmpty () | |
serialize ($keys=[], $valueSeparator='=', $fieldSeparator=' ', $quote='"') | |
debug ($data=null, &$objects=[]) | |
offsetSet ($offset, $value) | |
offsetExists ($offset) | |
offsetUnset ($offset) | |
offsetGet ($offset) | |
![]() | |
checkAvailableShipCountries (\Magento\Framework\DataObject $request) | |
![]() | |
isTrackingAvailable () | |
Data Fields | |
const | CODE = 'fedex' |
const | RATE_REQUEST_GENERAL = 'general' |
const | RATE_REQUEST_SMARTPOST = 'SMART_POST' |
![]() | |
const | USA_COUNTRY_ID = 'US' |
const | PUERTORICO_COUNTRY_ID = 'PR' |
const | GUAM_COUNTRY_ID = 'GU' |
const | GUAM_REGION_CODE = 'GU' |
![]() | |
const | DEBUG_KEYS_MASK = '****' |
const | USA_COUNTRY_ID = 'US' |
const | CANADA_COUNTRY_ID = 'CA' |
const | MEXICO_COUNTRY_ID = 'MX' |
const | HANDLING_TYPE_PERCENT = 'P' |
const | HANDLING_TYPE_FIXED = 'F' |
const | HANDLING_ACTION_PERPACKAGE = 'P' |
const | HANDLING_ACTION_PERORDER = 'O' |
Protected Attributes | |
$_code = self::CODE | |
$_ratesOrder | |
$_request = null | |
$_result = null | |
$_rateServiceWsdl | |
$_shipServiceWsdl = null | |
$_trackServiceWsdl = null | |
$_customizableContainerTypes = ['YOUR_PACKAGING'] | |
$_storeManager | |
$_productCollectionFactory | |
$_debugReplacePrivateDataKeys | |
![]() | |
$_activeFlag = 'active' | |
$_directoryData = null | |
$_xmlElFactory | |
$_rateFactory | |
$_rateMethodFactory | |
$_trackFactory | |
$_trackErrorFactory | |
$_trackStatusFactory | |
$_regionFactory | |
$_countryFactory | |
$_currencyFactory | |
$stockRegistry | |
$_rawRequest = null | |
$xmlSecurity | |
![]() | |
$_code | |
$_rates | |
$_numBoxes = 1 | |
$_freeMethod = 'free_method' | |
$_isFixed = false | |
$_customizableContainerTypes = [] | |
$_debugReplacePrivateDataKeys = [] | |
$_scopeConfig | |
$_rateErrorFactory | |
$_logger | |
![]() | |
$_data = [] | |
Additional Inherited Members | |
![]() | |
static | $_quotesCache = [] |
![]() | |
static | $_underscoreCache = [] |
Fedex shipping implementation
@SuppressWarnings(PHPMD.ExcessiveClassComplexity) @SuppressWarnings(PHPMD.CouplingBetweenObjects)
Definition at line 25 of file Carrier.php.
__construct | ( | \Magento\Framework\App\Config\ScopeConfigInterface | $scopeConfig, |
\Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory | $rateErrorFactory, | ||
\Psr\Log\LoggerInterface | $logger, | ||
Security | $xmlSecurity, | ||
\Magento\Shipping\Model\Simplexml\ElementFactory | $xmlElFactory, | ||
\Magento\Shipping\Model\Rate\ResultFactory | $rateFactory, | ||
\Magento\Quote\Model\Quote\Address\RateResult\MethodFactory | $rateMethodFactory, | ||
\Magento\Shipping\Model\Tracking\ResultFactory | $trackFactory, | ||
\Magento\Shipping\Model\Tracking\Result\ErrorFactory | $trackErrorFactory, | ||
\Magento\Shipping\Model\Tracking\Result\StatusFactory | $trackStatusFactory, | ||
\Magento\Directory\Model\RegionFactory | $regionFactory, | ||
\Magento\Directory\Model\CountryFactory | $countryFactory, | ||
\Magento\Directory\Model\CurrencyFactory | $currencyFactory, | ||
\Magento\Directory\Helper\Data | $directoryData, | ||
\Magento\CatalogInventory\Api\StockRegistryInterface | $stockRegistry, | ||
\Magento\Store\Model\StoreManagerInterface | $storeManager, | ||
\Magento\Framework\Module\Dir\Reader | $configReader, | ||
\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory | $productCollectionFactory, | ||
array | $data = [] , |
||
Json | $serializer = null , |
||
ClientFactory | $soapClientFactory = null |
||
) |
\Magento\Framework\App\Config\ScopeConfigInterface | $scopeConfig | |
\Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory | $rateErrorFactory | |
\Psr\Log\LoggerInterface | $logger | |
Security | $xmlSecurity | |
\Magento\Shipping\Model\Simplexml\ElementFactory | $xmlElFactory | |
\Magento\Shipping\Model\Rate\ResultFactory | $rateFactory | |
\Magento\Quote\Model\Quote\Address\RateResult\MethodFactory | $rateMethodFactory | |
\Magento\Shipping\Model\Tracking\ResultFactory | $trackFactory | |
\Magento\Shipping\Model\Tracking\Result\ErrorFactory | $trackErrorFactory | |
\Magento\Shipping\Model\Tracking\Result\StatusFactory | $trackStatusFactory | |
\Magento\Directory\Model\RegionFactory | $regionFactory | |
\Magento\Directory\Model\CountryFactory | $countryFactory | |
\Magento\Directory\Model\CurrencyFactory | $currencyFactory | |
\Magento\Directory\Helper\Data | $directoryData | |
\Magento\CatalogInventory\Api\StockRegistryInterface | $stockRegistry | |
\Magento\Store\Model\StoreManagerInterface | $storeManager | |
\Magento\Framework\Module\Dir\Reader | $configReader | |
\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory | $productCollectionFactory | |
array | $data | |
Json | null | $serializer | |
ClientFactory | null | $soapClientFactory | @SuppressWarnings(PHPMD.ExcessiveParameterList) |
Definition at line 176 of file Carrier.php.
|
protected |
Create rate soap client
Definition at line 251 of file Carrier.php.
|
protected |
Create ship soap client
Definition at line 261 of file Carrier.php.
|
protected |
Create soap client with selected wsdl
string | $wsdl | |
bool | int | $trace |
Definition at line 234 of file Carrier.php.
|
protected |
Create track soap client
Definition at line 271 of file Carrier.php.
|
protected |
Makes remote request to the carrier and returns a response
string | $purpose |
Definition at line 498 of file Carrier.php.
|
protected |
Do shipment request to carrier web service, obtain Print Shipping Labels and process errors in response
\Magento\Framework\DataObject | $request |
Definition at line 1403 of file Carrier.php.
|
protected |
Forming request for rate estimation depending to the purpose
string | $purpose |
Definition at line 424 of file Carrier.php.
|
protected |
Form array with appropriate structure for shipment request
\Magento\Framework\DataObject | $request |
Form XML for shipment request
\Magento\Framework\DataObject | $request |
Definition at line 1228 of file Carrier.php.
|
protected |
Return array of authenticated information
Definition at line 1199 of file Carrier.php.
|
protected |
Do remote request for and handle errors
Definition at line 529 of file Carrier.php.
|
protected |
Get origin based amount form response of rate estimation
\stdClass | $rate |
Definition at line 630 of file Carrier.php.
|
protected |
Get xml quotes
Definition at line 677 of file Carrier.php.
|
protected |
Send request for tracking
string[] | $tracking |
Send request for tracking
string[] | $trackings |
Checkpoint details selection flag LAST_CHECK_POINT_ONLY ALL_CHECK_POINTS
Value that indicates for getting the tracking details with the additional piece details and its respective Piece Details, Piece checkpoints along with Shipment Details if queried.
S-Only Shipment Details B-Both Shipment & Piece Details P-Only Piece Details Default is ‘S’
Definition at line 1056 of file Carrier.php.
|
protected |
Parse tracking response
string | $trackingValue | |
\stdClass | $response |
Definition at line 1108 of file Carrier.php.
|
protected |
Prepare shipping rate result based on response
mixed | $response |
Definition at line 761 of file Carrier.php.
|
protected |
Prepare shipping rate result based on response
mixed | $response |
Definition at line 561 of file Carrier.php.
|
protected |
Set free method request
string | $freeMethod |
Definition at line 664 of file Carrier.php.
collectRates | ( | RateRequest | $request | ) |
Collect and get rates
RateRequest | $request |
Implements AbstractCarrierInterface.
Definition at line 282 of file Carrier.php.
|
protected |
Recursive replace sensitive fields in debug data by the mask
string | $data |
Replace sensitive fields.
Replace sensitive fields, which specified as attributes of xml node. For followed xml: ```xml <RateV4Request userid="1"> <Revision>2</Revision> </RateV4Request> ``xml the
USERID` attribute value will be replaced by specified mask
string | $data |
Definition at line 1558 of file Carrier.php.
getAllowedMethods | ( | ) |
Get allowed shipping methods
Implements CarrierInterface.
Definition at line 1183 of file Carrier.php.
getCode | ( | $type, | |
$code = '' |
|||
) |
Get configuration data of carrier
string | $type | |
string | $code |
Definition at line 831 of file Carrier.php.
getContainerTypes | ( | \Magento\Framework\DataObject | $params = null | ) |
Return container types of carrier
\Magento\Framework\DataObject | null | $params |
Implements AbstractCarrierInterface.
Definition at line 1481 of file Carrier.php.
getContainerTypesAll | ( | ) |
Return all container types of carrier
Definition at line 1526 of file Carrier.php.
getContainerTypesFilter | ( | ) |
Return structured data of containers witch related with shipping methods
Definition at line 1536 of file Carrier.php.
getCurrencyCode | ( | ) |
Return FeDex currency ISO code by Magento Base Currency Code
Definition at line 990 of file Carrier.php.
getDeliveryConfirmationTypes | ( | \Magento\Framework\DataObject | $params = null | ) |
Return delivery confirmation types of carrier
\Magento\Framework\DataObject | null | $params |
Implements AbstractCarrierInterface.
Definition at line 1548 of file Carrier.php.
getResponse | ( | ) |
getResult | ( | ) |
getTracking | ( | $trackings | ) |
Get tracking
string|string[] | $trackings |
Definition at line 1020 of file Carrier.php.
getVersionInfo | ( | ) |
rollBack | ( | $data | ) |
For multi package shipments. Delete requested shipments if the current shipment request is failed
array | $data |
Definition at line 1461 of file Carrier.php.
setRequest | ( | RateRequest | $request | ) |
Prepare and set request to this instance
RateRequest | $request |
Definition at line 303 of file Carrier.php.
|
protected |
Set tracking request
Definition at line 1040 of file Carrier.php.
|
protected |
Definition at line 53 of file Carrier.php.
|
protected |
Definition at line 111 of file Carrier.php.
|
protected |
Definition at line 126 of file Carrier.php.
|
protected |
Definition at line 121 of file Carrier.php.
|
protected |
Definition at line 90 of file Carrier.php.
|
protected |
Definition at line 60 of file Carrier.php.
|
protected |
Definition at line 76 of file Carrier.php.
|
protected |
Definition at line 83 of file Carrier.php.
|
protected |
Definition at line 97 of file Carrier.php.
|
protected |
Definition at line 116 of file Carrier.php.
|
protected |
Definition at line 104 of file Carrier.php.
const CODE = 'fedex' |
Definition at line 32 of file Carrier.php.
const RATE_REQUEST_GENERAL = 'general' |
Definition at line 39 of file Carrier.php.
const RATE_REQUEST_SMARTPOST = 'SMART_POST' |
Definition at line 46 of file Carrier.php.