Class ShippingMethod
ShippingMethod represents how the shipment will be shipped.
Property Summary
| Property | Description |
|---|
ID: String (read-only) | Returns the ID of the shipping method. |
baseMethod: ShippingMethod (read-only) | Returns the base shipping method or null if undefined. |
currencyCode: String (read-only) | Returns the currency code associated with the shipping method |
customerGroups: Collection (read-only) | Returns the customer groups assigned to the shipping method. |
defaultMethod: Boolean (read-only) | Returns ‘true’ if the shipping method is marked as ‘default’ for the current session’s currency. |
dependentMethods: Collection (read-only) | Returns the dependent shipping methods of this shipping method, regardless of the online status of the methods. |
description: String (read-only) | Returns the description of the shipping method as specified in the current locale or null if it could not be found. |
displayName: String (read-only) | Returns the display name of the shipping method in the current locale or null if it could not be found. |
online: Boolean (read-only) | Returns true if shipping method is online, false otherwise |
taxClassID: String (read-only) | Returns the tax class id of the shipping method. |
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
| Method | Description |
|---|
| getBaseMethod() | Returns the base shipping method or null if undefined. |
| getCurrencyCode() | Returns the currency code associated with the shipping method |
| getCustomerGroups() | Returns the customer groups assigned to the shipping method. |
| getDependentMethods() | Returns the dependent shipping methods of this shipping method, regardless of the online status of the methods. |
| getDescription() | Returns the description of the shipping method as specified in the current locale or null if it could not be found. |
| getDisplayName() | Returns the display name of the shipping method in the current locale or null if it could not be found. |
| getID() | Returns the ID of the shipping method. |
| getTaxClassID() | Returns the tax class id of the shipping method. |
| isDefaultMethod() | Returns ‘true’ if the shipping method is marked as ‘default’ for the current session’s currency. |
| isOnline() | Returns true if shipping method is online, false otherwise |
Methods inherited from class ExtensibleObject
describe, getCustom
Methods inherited from class PersistentObject
getCreationDate, getLastModified, getUUID
Methods inherited from class Object
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
Property Details
ID
- ID: String
(read-only)
Returns the ID of the shipping method.
baseMethod
- baseMethod: ShippingMethod
(read-only)
Returns the base shipping method or null if undefined.
currencyCode
- currencyCode: String
(read-only)
Returns the currency code associated with the shipping method
customerGroups
- customerGroups: Collection
(read-only)
Returns the customer groups assigned to the shipping method.
Assigned ids that do not belong to an existing customer group are ignored.
defaultMethod
- defaultMethod: Boolean
(read-only)
Returns 'true' if the shipping method is marked as 'default' for the current session's currency.
Otherwise 'false' is returned.
dependentMethods
- dependentMethods: Collection
(read-only)
Returns the dependent shipping methods of this shipping method,
regardless of the online status of the methods.
Dependent shipping methods have this method as their base method.
description
- description: String
(read-only)
Returns the description of the shipping method as specified in the current locale or
null if it could not be found.
displayName
- displayName: String
(read-only)
Returns the display name of the shipping method in the current locale or
null if it could not be found.
online
- online: Boolean
(read-only)
Returns true if shipping method is online, false otherwise
taxClassID
- taxClassID: String
(read-only)
Returns the tax class id of the shipping method.
Method Details
getBaseMethod()
- getBaseMethod(): ShippingMethod
Returns the base shipping method or null if undefined.
Returns:
getCurrencyCode()
- getCurrencyCode(): String
Returns the currency code associated with the shipping method
Returns:
getCustomerGroups()
- getCustomerGroups(): Collection
Returns the customer groups assigned to the shipping method.
Assigned ids that do not belong to an existing customer group are ignored.
Returns:
getDependentMethods()
- getDependentMethods(): Collection
Returns the dependent shipping methods of this shipping method,
regardless of the online status of the methods.
Dependent shipping methods have this method as their base method.
Returns:
- Dependent shipping methods
getDescription()
- getDescription(): String
Returns the description of the shipping method as specified in the current locale or
null if it could not be found.
Returns:
- he description of the shipping method as specified in the current locale or
null if it could not be found.
getDisplayName()
- getDisplayName(): String
Returns the display name of the shipping method in the current locale or
null if it could not be found.
Returns:
- the display name of the shipping method or null if it could not be found.
getID()
- getID(): String
Returns the ID of the shipping method.
Returns:
- the ID of the shipping method.
getTaxClassID()
- getTaxClassID(): String
Returns the tax class id of the shipping method.
Returns:
- the tax class id of the shipping method.
isDefaultMethod()
- isDefaultMethod(): Boolean
Returns 'true' if the shipping method is marked as 'default' for the current session's currency.
Otherwise 'false' is returned.
Returns:
- 'true' if it is the default shipping method of the site
isOnline()
- isOnline(): Boolean
Returns true if shipping method is online, false otherwise