|
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\Framework\Locale\FormatInterface $localeFormat, Config $configHelper, ClientFactory $httpClientFactory, array $data=[]) | |
| collectRates (RateRequest $request) | |
| setRequest (RateRequest $request) | |
| getResult () | |
| getShipmentByCode ($code, $origin=null) | |
| getTracking ($trackings) | |
| getResponse () | |
| getAllowedMethods () | |
| getShipAcceptUrl () | |
| getShipConfirmUrl () | |
| getContainerTypes (\Magento\Framework\DataObject $params=null) | |
| getContainerTypesAll () | |
| getContainerTypesFilter () | |
| getDeliveryConfirmationTypes (\Magento\Framework\DataObject $params=null) | |
| getCustomizableContainerTypes () | |
Public Member Functions inherited from AbstractCarrierOnline | |
| __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 () | |
Public Member Functions inherited from AbstractCarrier | |
| __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) | |
Public Member Functions inherited from DataObject | |
| __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) | |
Public Member Functions inherited from AbstractCarrierInterface | |
| checkAvailableShipCountries (\Magento\Framework\DataObject $request) | |
Public Member Functions inherited from CarrierInterface | |
| isTrackingAvailable () | |
Data Fields | |
| const | CODE = 'ups' |
| const | DELIVERY_CONFIRMATION_SHIPMENT = 1 |
| const | DELIVERY_CONFIRMATION_PACKAGE = 2 |
Data Fields inherited from AbstractCarrierOnline | |
| const | USA_COUNTRY_ID = 'US' |
| const | PUERTORICO_COUNTRY_ID = 'PR' |
| const | GUAM_COUNTRY_ID = 'GU' |
| const | GUAM_REGION_CODE = 'GU' |
Data Fields inherited from AbstractCarrier | |
| 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 | |
| $_request | |
| $_result | |
| $_baseCurrencyRate | |
| $_xmlAccessRequest | |
| $_defaultCgiGatewayUrl = 'http://www.ups.com:80/using/services/rave/qcostcgi.cgi' | |
| $_defaultUrls | |
| $_liveUrls | |
| $_customizableContainerTypes = ['CP', 'CSP'] | |
| $_localeFormat | |
| $_logger | |
| $configHelper | |
| $_debugReplacePrivateDataKeys | |
Protected Attributes inherited from AbstractCarrierOnline | |
| $_activeFlag = 'active' | |
| $_directoryData = null | |
| $_xmlElFactory | |
| $_rateFactory | |
| $_rateMethodFactory | |
| $_trackFactory | |
| $_trackErrorFactory | |
| $_trackStatusFactory | |
| $_regionFactory | |
| $_countryFactory | |
| $_currencyFactory | |
| $stockRegistry | |
| $_rawRequest = null | |
| $xmlSecurity | |
Protected Attributes inherited from AbstractCarrier | |
| $_code | |
| $_rates | |
| $_numBoxes = 1 | |
| $_freeMethod = 'free_method' | |
| $_isFixed = false | |
| $_customizableContainerTypes = [] | |
| $_debugReplacePrivateDataKeys = [] | |
| $_scopeConfig | |
| $_rateErrorFactory | |
| $_logger | |
Protected Attributes inherited from DataObject | |
| $_data = [] | |
Additional Inherited Members | |
Static Protected Attributes inherited from AbstractCarrierOnline | |
| static | $_quotesCache = [] |
Static Protected Attributes inherited from DataObject | |
| static | $_underscoreCache = [] |
UPS shipping implementation @SuppressWarnings(PHPMD.ExcessiveClassComplexity) @SuppressWarnings(PHPMD.CouplingBetweenObjects)
Definition at line 24 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\Framework\Locale\FormatInterface | $localeFormat, | ||
| Config | $configHelper, | ||
| ClientFactory | $httpClientFactory, | ||
| array | $data = [] |
||
| ) |
| \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\Framework\Locale\FormatInterface | $localeFormat | |
| Config | $configHelper | |
| ClientFactory | $httpClientFactory | |
| array | $data | @SuppressWarnings(PHPMD.ExcessiveParameterList) |
Definition at line 159 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 1504 of file Carrier.php.
|
protected |
Get base currency rate
| string | $code |
Definition at line 768 of file Carrier.php.
|
protected |
Get cgi rates
Definition at line 445 of file Carrier.php.
|
protected |
Get cgi tracking
| string[] | $trackings |
Definition at line 988 of file Carrier.php.
|
protected |
Get correct weight
Namely: Checks the current weight to comply with the minimum weight standards set by the carrier. Then strictly rounds the weight up until the first significant digit after the decimal point.
| float | int | $weight |
Definition at line 380 of file Carrier.php.
|
protected |
Get delivery confirmation level based on origin/destination Return null if delivery confirmation is not acceptable
| string | null | $countyDestination |
Definition at line 1708 of file Carrier.php.
|
protected |
Do remote request for and handle errors
Definition at line 409 of file Carrier.php.
|
protected |
Get xml rates
Definition at line 597 of file Carrier.php.
|
protected |
Get xml tracking
| string[] | $trackings |
RequestOption==>'1' to request all activities
Definition at line 1018 of file Carrier.php.
|
protected |
Prepare shipping rate result based on response
| string | $response |
Definition at line 525 of file Carrier.php.
|
protected |
Prepare shipping rate result based on response
| mixed | $xmlResponse |
Definition at line 806 of file Carrier.php.
|
protected |
Parse xml tracking response
| string | $trackingValue | |
| string | $xmlResponse |
Definition at line 1064 of file Carrier.php.
|
protected |
Send and process shipment accept request
| Element | $shipmentConfirmResponse |
Definition at line 1439 of file Carrier.php.
|
protected |
Set free method request
| string | $freeMethod |
Definition at line 429 of file Carrier.php.
| collectRates | ( | RateRequest | $request | ) |
Collect and get rates/errors
| RateRequest | $request |
Implements AbstractCarrierInterface.
Definition at line 209 of file Carrier.php.
| getAllowedMethods | ( | ) |
Get allowed shipping methods
Implements CarrierInterface.
Definition at line 1210 of file Carrier.php.
| getContainerTypes | ( | \Magento\Framework\DataObject | $params = null | ) |
Return container types of carrier
| \Magento\Framework\DataObject | null | $params |
Definition at line 1579 of file Carrier.php.
| getContainerTypesAll | ( | ) |
Return all container types of carrier
Definition at line 1634 of file Carrier.php.
| getContainerTypesFilter | ( | ) |
Return structured data of containers witch related with shipping methods
Definition at line 1651 of file Carrier.php.
| getCustomizableContainerTypes | ( | ) |
Get Container Types, that could be customized for UPS carrier
Implements AbstractCarrierInterface.
Definition at line 1690 of file Carrier.php.
| getDeliveryConfirmationTypes | ( | \Magento\Framework\DataObject | $params = null | ) |
Return delivery confirmation types of carrier
| \Magento\Framework\DataObject | null | $params |
Definition at line 1662 of file Carrier.php.
| getResponse | ( | ) |
| getResult | ( | ) |
| getShipAcceptUrl | ( | ) |
Get ship accept url
Definition at line 1487 of file Carrier.php.
| getShipConfirmUrl | ( | ) |
Get ship confirm url
Definition at line 1554 of file Carrier.php.
| getShipmentByCode | ( | $code, | |
$origin = null |
|||
| ) |
Get shipment by code
| string | $code | |
| string | $origin |
Definition at line 505 of file Carrier.php.
| getTracking | ( | $trackings | ) |
Get tracking
| string|string[] | $trackings |
Definition at line 945 of file Carrier.php.
| setRequest | ( | RateRequest | $request | ) |
Prepare and set request to this instance
| RateRequest | $request |
Definition at line 232 of file Carrier.php.
|
protected |
Set xml access request
Definition at line 966 of file Carrier.php.
|
protected |
Definition at line 66 of file Carrier.php.
|
protected |
Definition at line 45 of file Carrier.php.
|
protected |
Definition at line 107 of file Carrier.php.
|
protected |
Definition at line 127 of file Carrier.php.
|
protected |
Definition at line 80 of file Carrier.php.
|
protected |
Definition at line 87 of file Carrier.php.
|
protected |
Definition at line 97 of file Carrier.php.
|
protected |
Definition at line 112 of file Carrier.php.
|
protected |
Definition at line 117 of file Carrier.php.
|
protected |
Definition at line 52 of file Carrier.php.
|
protected |
Definition at line 59 of file Carrier.php.
|
protected |
Definition at line 73 of file Carrier.php.
|
protected |
Definition at line 122 of file Carrier.php.
| const CODE = 'ups' |
Definition at line 31 of file Carrier.php.
| const DELIVERY_CONFIRMATION_PACKAGE = 2 |
Definition at line 38 of file Carrier.php.
| const DELIVERY_CONFIRMATION_SHIPMENT = 1 |
Delivery Confirmation level based on origin/destination
Definition at line 36 of file Carrier.php.