Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields
ShippingMethodInterface Interface Reference
Inheritance diagram for ShippingMethodInterface:
ExtensibleDataInterface ShippingMethod

Public Member Functions

 getCarrierCode ()
 
 setCarrierCode ($carrierCode)
 
 getMethodCode ()
 
 setMethodCode ($methodCode)
 
 getCarrierTitle ()
 
 setCarrierTitle ($carrierTitle)
 
 getMethodTitle ()
 
 setMethodTitle ($methodTitle)
 
 getAmount ()
 
 setAmount ($amount)
 
 getBaseAmount ()
 
 setBaseAmount ($baseAmount)
 
 getAvailable ()
 
 setAvailable ($available)
 
 getExtensionAttributes ()
 
 setExtensionAttributes (\Magento\Quote\Api\Data\ShippingMethodExtensionInterface $extensionAttributes)
 
 getErrorMessage ()
 
 setErrorMessage ($errorMessage)
 
 getPriceExclTax ()
 
 setPriceExclTax ($priceExclTax)
 
 getPriceInclTax ()
 
 setPriceInclTax ($priceInclTax)
 

Data Fields

const KEY_CARRIER_CODE = 'carrier_code'
 
const KEY_METHOD_CODE = 'method_code'
 
const KEY_CARRIER_TITLE = 'carrier_title'
 
const KEY_METHOD_TITLE = 'method_title'
 
const KEY_SHIPPING_AMOUNT = 'amount'
 
const KEY_BASE_SHIPPING_AMOUNT = 'base_amount'
 
const KEY_AVAILABLE = 'available'
 
const KEY_ERROR_MESSAGE = 'error_message'
 
const KEY_PRICE_EXCL_TAX = 'price_excl_tax'
 
const KEY_PRICE_INCL_TAX = 'price_incl_tax'
 
- Data Fields inherited from ExtensibleDataInterface
const EXTENSION_ATTRIBUTES_KEY = 'extension_attributes'
 

Detailed Description

Interface ShippingMethodInterface @api

Since
100.0.2

Definition at line 13 of file ShippingMethodInterface.php.

Member Function Documentation

◆ getAmount()

getAmount ( )

Returns the shipping amount in store currency.

Returns
float Shipping amount in store currency.

Implemented in ShippingMethod.

◆ getAvailable()

getAvailable ( )

Returns the value of the availability flag for the current shipping method.

Returns
bool @SuppressWarnings(PHPMD.BooleanGetMethodName)

Implemented in ShippingMethod.

◆ getBaseAmount()

getBaseAmount ( )

Returns the shipping amount in base currency.

Returns
float Shipping amount in base currency.

Implemented in ShippingMethod.

◆ getCarrierCode()

getCarrierCode ( )

Returns the shipping carrier code.

Returns
string Shipping carrier code.

Implemented in ShippingMethod.

◆ getCarrierTitle()

getCarrierTitle ( )

Returns the shipping carrier title.

Returns
string|null Shipping carrier title. Otherwise, null.

Implemented in ShippingMethod.

◆ getErrorMessage()

getErrorMessage ( )

Returns an error message.

Returns
string Shipping Error message.

Implemented in ShippingMethod.

◆ getExtensionAttributes()

getExtensionAttributes ( )

Retrieve existing extension attributes object or create a new one.

Returns
\Magento\Quote\Api\Data\ShippingMethodExtensionInterface|null

Implemented in ShippingMethod.

◆ getMethodCode()

getMethodCode ( )

Returns the shipping method code.

Returns
string Shipping method code.

Implemented in ShippingMethod.

◆ getMethodTitle()

getMethodTitle ( )

Returns the shipping method title.

Returns
string|null Shipping method title. Otherwise, null.

Implemented in ShippingMethod.

◆ getPriceExclTax()

getPriceExclTax ( )

Returns shipping price excl tax.

Returns
float

Implemented in ShippingMethod.

◆ getPriceInclTax()

getPriceInclTax ( )

Returns shipping price incl tax.

Returns
float

Implemented in ShippingMethod.

◆ setAmount()

setAmount (   $amount)

Sets the shipping amount in store currency.

Parameters
float$amount
Returns
$this

Implemented in ShippingMethod.

◆ setAvailable()

setAvailable (   $available)

Sets the value of the availability flag for the current shipping method.

Parameters
bool$available
Returns
$this

Implemented in ShippingMethod.

◆ setBaseAmount()

setBaseAmount (   $baseAmount)

Sets the shipping amount in base currency.

Parameters
float$baseAmount
Returns
$this

Implemented in ShippingMethod.

◆ setCarrierCode()

setCarrierCode (   $carrierCode)

Sets the shipping carrier code.

Parameters
string$carrierCode
Returns
$this

Implemented in ShippingMethod.

◆ setCarrierTitle()

setCarrierTitle (   $carrierTitle)

Sets the shipping carrier title.

Parameters
string$carrierTitle
Returns
$this

Implemented in ShippingMethod.

◆ setErrorMessage()

setErrorMessage (   $errorMessage)

Set an error message.

Parameters
string$errorMessage
Returns
$this

Implemented in ShippingMethod.

◆ setExtensionAttributes()

setExtensionAttributes ( \Magento\Quote\Api\Data\ShippingMethodExtensionInterface  $extensionAttributes)

Set an extension attributes object.

Parameters
\Magento\Quote\Api\Data\ShippingMethodExtensionInterface$extensionAttributes
Returns
$this

◆ setMethodCode()

setMethodCode (   $methodCode)

Sets the shipping method code.

Parameters
string$methodCode
Returns
$this

Implemented in ShippingMethod.

◆ setMethodTitle()

setMethodTitle (   $methodTitle)

Sets the shipping method title.

Parameters
string$methodTitle
Returns
$this

Implemented in ShippingMethod.

◆ setPriceExclTax()

setPriceExclTax (   $priceExclTax)

Set a shipping price excl tax.

Parameters
float$priceExclTax
Returns
$this

Implemented in ShippingMethod.

◆ setPriceInclTax()

setPriceInclTax (   $priceInclTax)

Set a shipping price incl tax.

Parameters
float$priceInclTax
Returns
$this

Implemented in ShippingMethod.

Field Documentation

◆ KEY_AVAILABLE

const KEY_AVAILABLE = 'available'

Available.

Definition at line 48 of file ShippingMethodInterface.php.

◆ KEY_BASE_SHIPPING_AMOUNT

const KEY_BASE_SHIPPING_AMOUNT = 'base_amount'

Shipping amount in base currency.

Definition at line 43 of file ShippingMethodInterface.php.

◆ KEY_CARRIER_CODE

const KEY_CARRIER_CODE = 'carrier_code'

Shipping carrier code.

Definition at line 18 of file ShippingMethodInterface.php.

◆ KEY_CARRIER_TITLE

const KEY_CARRIER_TITLE = 'carrier_title'

Shipping carrier title.

Definition at line 28 of file ShippingMethodInterface.php.

◆ KEY_ERROR_MESSAGE

const KEY_ERROR_MESSAGE = 'error_message'

Shipping error message.

Definition at line 53 of file ShippingMethodInterface.php.

◆ KEY_METHOD_CODE

const KEY_METHOD_CODE = 'method_code'

Shipping method code.

Definition at line 23 of file ShippingMethodInterface.php.

◆ KEY_METHOD_TITLE

const KEY_METHOD_TITLE = 'method_title'

Shipping method title.

Definition at line 33 of file ShippingMethodInterface.php.

◆ KEY_PRICE_EXCL_TAX

const KEY_PRICE_EXCL_TAX = 'price_excl_tax'

Shipping error message.

Definition at line 58 of file ShippingMethodInterface.php.

◆ KEY_PRICE_INCL_TAX

const KEY_PRICE_INCL_TAX = 'price_incl_tax'

Shipping error message.

Definition at line 63 of file ShippingMethodInterface.php.

◆ KEY_SHIPPING_AMOUNT

const KEY_SHIPPING_AMOUNT = 'amount'

Shipping amount in store currency.

Definition at line 38 of file ShippingMethodInterface.php.


The documentation for this interface was generated from the following file: