public class DefaultPaymentOptionsStrategy<O extends Order> extends Object implements PaymentOptionsStrategy<O>
PaymentOptionsStrategy; by default only online payment is available| Modifier and Type | Field and Description |
|---|---|
protected LogisticsService |
logisticsService
If we wish to supply multiple payment Options then supply a
LogisticsServiceIf null; only PaymentMethod.ONLINE_SERVICE_PROVIDER will be available. |
| Constructor and Description |
|---|
DefaultPaymentOptionsStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected Area |
getArea(O order) |
protected String |
getAreaCode(O order)
get Area Code for the Order; looks in the following order:
Order user contact Details - Shipping Address
User Object - Shipping Address
|
String |
getAreaType()
When looking up details for an Area what type of Area code to consider
|
PaymentOption |
getDefaultPaymentOption(O o)
Get default
PaymentOption |
LogisticsService |
getLogisticsService()
If we wish to supply multiple payment Options then supply a
LogisticsServiceIf null; only PaymentMethod.ONLINE_SERVICE_PROVIDER will be available. |
List<PaymentMethod> |
getPaymentMethods(O order)
Get a List of possible
PaymentMethods for the Order of a user |
List<PaymentOption> |
getPaymentOptions(O o)
Get a List of possible
PaymentOptions for the Order of a user |
String |
getVersion()
Strategies change; it may be important/required in most applications to know a result based on which version of a particular strategy.
|
void |
setAreaType(String areaType)
When looking up details for an Area what type of Area code to consider
|
void |
setLogisticsService(LogisticsService logisticsService)
If we wish to supply multiple payment Options then supply a
LogisticsServiceIf null; only PaymentMethod.ONLINE_SERVICE_PROVIDER will be available. |
protected LogisticsService logisticsService
LogisticsServicePaymentMethod.ONLINE_SERVICE_PROVIDER will be available.protected String getAreaCode(O order)
order - public List<PaymentMethod> getPaymentMethods(O order)
PaymentOptionsStrategyPaymentMethods for the Order of a usergetPaymentMethods in interface PaymentOptionsStrategy<O extends Order>order - as OrderPaymentMethod existspublic LogisticsService getLogisticsService()
LogisticsServicePaymentMethod.ONLINE_SERVICE_PROVIDER will be available.public void setLogisticsService(LogisticsService logisticsService)
LogisticsServicePaymentMethod.ONLINE_SERVICE_PROVIDER will be available.public String getAreaType()
Area.TYPE_AREACODEpublic void setAreaType(String areaType)
Area.TYPE_AREACODEpublic String getVersion()
getVersion in interface Strategypublic List<PaymentOption> getPaymentOptions(O o) throws Exception
PaymentOptionsStrategyPaymentOptions for the Order of a usergetPaymentOptions in interface PaymentOptionsStrategy<O extends Order>o - as OrderPaymentMethod existsExceptionpublic PaymentOption getDefaultPaymentOption(O o) throws Exception
PaymentOptionsStrategyPaymentOptiongetDefaultPaymentOption in interface PaymentOptionsStrategy<O extends Order>o - as OrderPaymentMethod existsExceptionCopyright © 2018. All rights reserved.