com.ibm.commerce.returns.commands

• All Implemented Interfaces:

```public class CalculateReturnItemAdjustmentFlatPolicyCmdImpl
```
Calculate the adjustment for a return merchandise authorization (RMA) item based on a flat fee. The properties passed to this policy may be of the following form:
• default=CAD-15.00 (this value is used if no other days_i/flat_i pair applies).
• days_i=30, flat_i=CAD-10.24 (where i changes).
If a days property is specified and no flat property, then flat=0 is assumed (that is, no adjustment). If the number of days since the item was shipped is more than any of the days_i properties. Assume flat is equal to 0 (unless a default value is specified).

An example property string is:

This translates into "If the item is returned within 30 days of it being shipped, the RMA is in CAD currency, the charge is \$5.00. If the RMA is in USD currency, the charge is \$3.00 . If it is returned within 90 days, the charge is a \$10.00 CAD. And if the RMA is in USD and there is a conversion from CAD->USD. They will be charged the equivalent of the converted amount in USD (or another currency). Otherwise, there is a \$20.00 CAD charge (or the equivalent if there is a conversion to the RMA currency)."

If there is no conversion to the RMA currency for a particular days_i value then the default will be used. If there is no conversion to the RMA currency for the default then 0 will be used.

• ### Constructor Detail

```public CalculateReturnItemAdjustmentFlatPolicyCmdImpl()
```
• ### Method Detail

• #### findAppropriateMonetaryAmount

```protected MonetaryAmount[] findAppropriateMonetaryAmount(int aDaysSinceShipped)
```
Find the appropriate flat fee charge.
Parameters:
aDaysSinceShipped - The number of days since the item was shipped.
Returns:
The flat fee array.
• #### getDefault

```protected MonetaryAmount[] getDefault()
```
Get the default values.
Returns:
The default flat fee array.