ccrz.cc_ctrl_hlpr_ShippingOption
Represents a shipping option available in the Shipping Method picklist on the
storefront's Checkout page.
Compatibility
This reference applies to:
Release | Managed Package Version | API Version |
---|---|---|
B2B Commerce for Visualforce Winter ’21 | 4.13 | 12 |
B2B Commerce for Visualforce Spring ’20 | 4.12 | 11 |
B2B Commerce for Visualforce Summer ’19 | 4.11 | 10 |
B2B Commerce for Visualforce Spring ’19 | 4.10 | 9 |
B2B Commerce for Visualforce Summer ’18 | 4.9 | 8 |
Properties
This class defines the following Apex global properties. For more information about Apex properties and accessors, see Apex Properties.
- currencyCode {get; set;}
- String that specifies the ISO 4217 currency code, such as USD or JPY, for the shipping option.
- discount {get; set;}
- Decimal that specifies the amount of discount on the shipping cost.
- discountedShipCost {get; set;}
- Decimal that specifies the cost of the shipping option after applying an applicable discount on the shipping cost.
- price {get; set;}
- Decimal that specifies the total cost of the shipping option.
- provider {get; set;}
- String that specifies the shipping service provider.
- serviceName {get; set;}
- String that specifies the service name.
- systemReference {get; set;}
- String that specifies a reference to an external system.
- uniqueId {get; set;}
- String that specifies a unique ID for the shipping option. By default, this ID is created by appending provider to serviceName.
Constructors
This class defines the following constructors:
- ccrz.cc_ctrl_hlpr_ShippingOption
- Default constructor that doesn't take any parameters and doesn't set any fields.
- ccrz.cc_ctrl_hlpr_ShippingOption(String provider, String serviceName, Decimal price)
- Constructor that takes and sets a provider, service name, and price. This constructor also sets uniqueId.
- ccrz.cc_ctrl_hlpr_ShippingOption(String provider, String serviceName, Decimal price, Decimal discountedShipCost)
- Constructor that takes and sets a provider, service name, price, and discounted shipping cost. This constructor also sets uniqueId.
- ccrz.cc_ctrl_hlpr_ShippingOption(String provider, String systemReference, String serviceName, Decimal price, Decimal discountedShipCost)
- Constructor that takes and sets a provider, external system reference, service name, price, and discounted shipping cost. This constructor also sets currencyCode to null.
- ccrz.cc_ctrl_hlpr_ShippingOption(String provider, String systemReference, String serviceName, String currencyCode, Decimal price, Decimal discountedShipCost)
- Constructor that takes and sets a provider, external system reference, service name, price, currency code, and discounted shipping cost.
Methods
This class defines the following methods:
- getNetPrice()
- Returns a Decimal that results from subtracting the shipping discount (discount) from the original shipping cost (price).