paypalnvp.fields
Class ShippingOptions

java.lang.Object
  extended by paypalnvp.fields.ShippingOptions
All Implemented Interfaces:
java.io.Serializable, RequestFields

public final class ShippingOptions
extends java.lang.Object
implements RequestFields

See Also:
Serialized Form

Constructor Summary
ShippingOptions()
           
 
Method Summary
 java.util.Map<java.lang.String,java.lang.String> getNVPRequest()
          Creates and returns part of the nvp (name value pair) request containing request values
 void setDefaultShippingOption(boolean isDefault)
          Required if specifying the Callback URL.
 void setShippingAmount(java.lang.String amount)
          Required if specifying the Callback URL.
 void setShippingLabel(java.lang.String label)
          Required if specifying the Callback URL.
 void setShippingName(java.lang.String name)
          Required if specifying the Callback URL.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShippingOptions

public ShippingOptions()
Method Detail

setDefaultShippingOption

public void setDefaultShippingOption(boolean isDefault)
Required if specifying the Callback URL. When the value of this flat rate shipping option is true, PayPal selects it by default for the buyer and reflects it in the "default" total. Note: There must be ONE and ONLY ONE default. It is not OK to have no default.

Parameters:
isDefault -

setShippingName

public void setShippingName(java.lang.String name)
                     throws java.lang.IllegalArgumentException
Required if specifying the Callback URL. The internal name of the shipping option such as Air, Ground, Expedited, and so forth. Character length and limitations: 50 character-string.

Parameters:
name -
Throws:
java.lang.IllegalArgumentException

setShippingLabel

public void setShippingLabel(java.lang.String label)
                      throws java.lang.IllegalArgumentException
Required if specifying the Callback URL. The label for the shipping option as displayed to the user. Examples include: Air: Next Day, Expedited: 3-5 days, Ground: 5-7 days, and so forth. Shipping option labels can be localized based on the buyer’s locale, which PayPal sends to your website as a parameter value in the callback request. Character length and limitations: 50 character-string.

Parameters:
label -
Throws:
java.lang.IllegalArgumentException

setShippingAmount

public void setShippingAmount(java.lang.String amount)
                       throws java.lang.IllegalArgumentException
Required if specifying the Callback URL. The amount of the flat rate shipping option. Limitations: Must not exceed $10,000 USD in any currency. No currency symbol. Must have two decimal places, decimal separator must be a period (.).

Parameters:
amount -
Throws:
java.lang.IllegalArgumentException

getNVPRequest

public java.util.Map<java.lang.String,java.lang.String> getNVPRequest()
Description copied from interface: RequestFields
Creates and returns part of the nvp (name value pair) request containing request values

Specified by:
getNVPRequest in interface RequestFields
Returns:
part of the nvp request as a Map

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object