paypalnvp.fields
Class BillingPeriodDetails

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

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

Billing Period Details Fields

See Also:
Serialized Form

Nested Class Summary
static class BillingPeriodDetails.BillingPeriod
          Unit for billing during this subscription period
 
Constructor Summary
BillingPeriodDetails(BillingPeriodDetails.BillingPeriod period, int frequency, java.lang.String amount, Currency currency)
           
 
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 setShippingAmount(java.lang.String amount)
           
 void setTaxAmount(java.lang.String amount)
           
 void setTotalBillingCycles(int billingCycles)
          The number of billing cycles for payment period.
 void setTrialBilling(BillingPeriodDetails.BillingPeriod period, int frequency, java.lang.String amount)
           
 void setTrialBillingCycles(int billingCycles)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BillingPeriodDetails

public BillingPeriodDetails(BillingPeriodDetails.BillingPeriod period,
                            int frequency,
                            java.lang.String amount,
                            Currency currency)
                     throws java.lang.IllegalArgumentException
Parameters:
period - Unit for billing during this subscription period. For SemiMonth, billing is done on the 1st and 15th of each month. Note: The combination of BillingPeriod and BillingFrequency cannot exceed one year.
frequency - Number of billing periods that make up one billing cycle. The combination of billing frequency and billing period must be less than or equal to one year. For example, if the billing cycle is Month, the maximum value for billing frequency is 12. Similarly, if the billing cycle is Week, the maximum value for billing frequency is 52. Note: If the billing period is SemiMonth., the billing frequency must be 1.
amount - Billing amount for each billing cycle during this payment period. This amount does not include shipping and tax amounts. Note: All amounts in the CreateRecurringPaymentsProfile request must have the same currency. Character length and limitations: Does not exceed $10,000 USD in any currency. No currency symbol. Regardless of currency, decimal separator is a period (.). Equivalent to nine characters maximum for USD.
currency - Currency code.
Throws:
java.lang.IllegalArgumentException
Method Detail

setTotalBillingCycles

public void setTotalBillingCycles(int billingCycles)
The number of billing cycles for payment period.

Parameters:
billingCycles - For the regular payment period, if no value is specified or the value is 0, the regular payment period continues until the profile is cancelled or deactivated. For the regular payment period, if the value is greater than 0, the regular payment period will expire after the trial period is finished and continue at the billing frequency for TotalBillingCycles cycles.

setTrialBilling

public void setTrialBilling(BillingPeriodDetails.BillingPeriod period,
                            int frequency,
                            java.lang.String amount)
                     throws java.lang.IllegalArgumentException
Parameters:
period - Unit for billing during this subscription period. For SemiMonth, billing is done on the 1st and 15th of each month. Note: The combination of BillingPeriod and BillingFrequency cannot exceed one year.
frequency - Number of billing periods that make up one billing cycle; required if you specify an optional trial period. The combination of billing frequency and billing period must be less than or equal to one year. For example, if the billing cycle is Month, the maximum value for billing frequency is 12. Similarly, if the billing cycle is Week, the maximum value for billing frequency is 52. Note: If the billing period is SemiMonth., the billing frequency must be 1.
amount - Billing amount for each billing cycle during this payment period. This amount does not include shipping and tax amounts. Note: All amounts in the CreateRecurringPaymentsProfile request must have the same currency. Character length and limitations: Does not exceed $10,000 USD in any currency. No currency symbol. Regardless of currency, decimal separator is a period (.). Equivalent to nine characters maximum for USD.
Throws:
java.lang.IllegalArgumentException

setTrialBillingCycles

public void setTrialBillingCycles(int billingCycles)
Parameters:
billingCycles - The number of billing cycles for trial payment period.

setShippingAmount

public void setShippingAmount(java.lang.String amount)
                       throws java.lang.IllegalArgumentException
Parameters:
amount - Shipping amount for each billing cycle during this payment period. Note: All amounts in the request must have the same currency. Character length and limitations: Does not exceed $10,000 USD in any currency. No currency symbol. Regardless of currency, decimal separator is a period (.). Equivalent to nine characters maximum for USD.
Throws:
java.lang.IllegalArgumentException

setTaxAmount

public void setTaxAmount(java.lang.String amount)
                  throws java.lang.IllegalArgumentException
Parameters:
amount - Tax amount for each billing cycle during this payment period. Note: All amounts in the request must have the same currency. Character length and limitations: Does not exceed $10,000 USD in any currency. No currency symbol. Regardless of currency, decimal separator is a period (.). Equivalent to nine characters maximum for USD.
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