|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectibilling.client.ClientObject
ibilling.client.PaymentPlan
public class PaymentPlan
Represents a series of future payments that should be executed on the specified schedule using defined Payment Option. All future payments are encoded using Charge objects (see Charge) for more information
| Field Summary | |
|---|---|
private Adjustment |
adjustment
reference to adjustment object explaining changes made to the plan |
private java.lang.Integer |
amount
Amount of a single payment represented by the plan |
private java.lang.String |
billingCycleCode
code specified the billing cycle. |
private java.util.List<Charge> |
charges
list of the charges representing future payments |
private CustomerAccount |
customerAccount
customer account owning this plan |
private java.lang.Integer |
deferredLength
current total length of deferred charges or freezes included in the plan |
private java.lang.Integer |
deferredValue
deferredLength multiplied by amount |
private java.util.Date |
firstBillingDate
The date when first invoice is expected to be created |
private java.lang.String |
groupCode1
optional group code for external systems |
private java.lang.String |
groupCode2
optional group code for external systems |
private java.lang.String |
groupCode3
optional group code for external systems |
private java.lang.String |
groupCode4
optional group code for external systems |
private java.lang.String |
groupCode5
optional group code for external systems |
private java.lang.String |
groupCode6
optional group code for external systems |
private java.lang.String |
groupCode7
optional group code for external systems |
private java.lang.String |
groupCode8
optional group code for external systems |
private java.lang.String |
itemCode
optional item code; tax code can be derived from it. |
private java.util.Date |
lastInvoicingDate
the date when the invoice for this plan was last created |
private java.util.Date |
lastProcessingDate
the date when this plan was processed by Invoicing Service for the last time. |
private java.util.Date |
lastUpdateDate
the date when this plan was updated for the last time |
private java.lang.Integer |
length
current length of the payment plan (for perpetual and complimentary plans, the length will be derived from the forecasting period (see FAQ) |
private java.lang.Integer |
linkAccount
??? |
private PaymentPlan |
linkedParentPlan
parent of this payment plan (current plan becomes active only after the parent plan is fully processed or canceled) |
private java.util.Date |
nextBillingDate
The date when this plan will be processed next time. |
private PaymentOption |
paymentOption
reference to the payment option to be used to charge payments |
private java.lang.String |
sellerCode
optional code identifying the plan's seller in the external system |
private static long |
serialVersionUID
The Constant serialVersionUID. |
private java.lang.String |
status
current status of the plan. |
private java.lang.String |
taxCode
optional tax code defining tax amount. |
private java.lang.String |
type
type of the payment plan. |
private java.lang.Integer |
value
length multiplied by amount |
| Constructor Summary | |
|---|---|
PaymentPlan()
Instantiates a new payment plan. |
|
PaymentPlan(java.util.Date createDate,
java.util.Date lastInvocingDate,
java.util.Date lastProcessingDate,
java.lang.String code,
java.lang.String sellerCode,
java.lang.Integer length,
java.lang.Integer value,
java.lang.Integer deferredLength,
java.lang.Integer deferredValue,
java.lang.Integer amount,
java.lang.String groupCode1,
java.lang.String groupCode2,
java.lang.String groupCode3,
java.lang.String groupCode4,
java.lang.String groupCode5,
java.lang.String groupCode6,
java.lang.String groupCode7,
java.lang.String groupCode8,
java.lang.Integer merchantAccountCode,
java.lang.String type,
java.util.Date firstBillingDate,
java.lang.String billingCycleCode,
java.lang.String itemCode,
java.lang.String taxCode,
PaymentOption paymentOption,
CustomerAccount customerAccount,
java.lang.Long id,
java.util.Date lastUpdateDate,
java.util.Date nextBillingDate,
java.lang.String status)
Instantiates a new payment plan. |
|
| Method Summary | |
|---|---|
void |
add(java.lang.Integer position,
java.lang.Integer length,
boolean isFreeze)
Adds specified number of charges at the specified position to this payment plan |
(package private) void |
addCharge(Charge charge,
java.lang.Integer position)
Adds the specified charge at the indicated position |
void |
cancel()
Cancels the payment plan. |
Adjustment |
createAdjustment()
Creates an Adjustment object and assigns it to the plan. |
Adjustment |
createAdjustmentExtended(java.lang.String code,
java.lang.String notes,
java.lang.String adjustmentReasonCode)
Creates an Adjustment object with the specified values. |
PaymentPlan |
createLinkedPaymentPlan()
Creates and returns a new payment plan linked to this plan. |
PaymentPlan |
createLinkedPaymentPlanBasic(java.lang.String code,
java.lang.String type,
java.lang.Integer amount,
java.lang.Integer length)
Creates linked payment plan with specified values. |
PaymentPlan |
createLinkedPaymentPlanExtended(java.lang.String code,
java.lang.String type,
java.lang.Integer amount,
java.lang.Integer length,
PaymentOption paymentOption,
java.lang.String sellerCode,
java.lang.String itemCode,
java.lang.String taxCode,
java.lang.String groupCode1,
java.lang.String groupCode2,
java.lang.String groupCode3,
java.lang.String groupCode4,
java.lang.String groupCode5,
java.lang.String groupCode6,
java.lang.String groupCode7,
java.lang.String groupCode8)
Creates linked payment plan with specified values. |
(package private) java.util.List<Charge> |
createListCharges(int size)
Allocates list with charges to the specified size |
private void |
decrementChargesListParameters(Charge charge)
Recalculates all charge depended fields of a plan due to the existing charge being removed |
boolean |
equals(java.lang.Object anotherObject)
|
Adjustment |
getAdjustment()
Gets the adjustment. |
java.lang.Integer |
getAmount()
Gets the amount. |
java.lang.String |
getBillingCycleCode()
Gets the billing cycle code. |
java.util.List<Charge> |
getCharges()
Returns a copy of the list of charges within the plan |
(package private) java.util.List<Charge> |
getChargesInternal()
Returns list of charges. |
CustomerAccount |
getCustomerAccount()
Gets the customer account. |
java.lang.Integer |
getDeferredLength()
Gets the deferred length. |
java.lang.Integer |
getDeferredValue()
Gets the deferred value. |
java.util.Date |
getFirstBillingDate()
Gets the first billing date. |
java.lang.String |
getGroupCode1()
Gets the group code1. |
java.lang.String |
getGroupCode2()
Gets the group code2. |
java.lang.String |
getGroupCode3()
Gets the group code3. |
java.lang.String |
getGroupCode4()
Gets the group code4. |
java.lang.String |
getGroupCode5()
Gets the group code5. |
java.lang.String |
getGroupCode6()
Gets the group code6. |
java.lang.String |
getGroupCode7()
Gets the group code7. |
java.lang.String |
getGroupCode8()
Gets the group code8. |
java.lang.String |
getItemCode()
Gets the item code. |
java.util.Date |
getLastInvoicingDate()
Gets the last invocing date. |
java.util.Date |
getLastProcessingDate()
Gets the last processing date. |
java.util.Date |
getLastUpdateDate()
getLastUpdateDate method. |
java.lang.Integer |
getLength()
Gets the length. |
(package private) java.lang.Integer |
getLinkAccount()
Gets the link account. |
PaymentPlan |
getLinkedParentPlan()
Gets the link parent plan. |
java.util.Date |
getNextBillingDate()
Gets the next billing date. |
Charge |
getNextCharge()
Returns charge that will be processed in the next processing of the plan |
PaymentOption |
getPaymentOption()
Gets the payment option. |
java.lang.String |
getSellerCode()
Gets the seller code. |
java.lang.String |
getStatus()
Gets the status. |
java.lang.String |
getTaxCode()
Gets the tax code. |
java.lang.String |
getType()
Gets the type. |
java.lang.Integer |
getValue()
Gets the value. |
int |
hashCode()
|
private void |
incrementChargesListParameters(Charge charge)
Recalculates all charge depended fields of a plan due to the new charge being added |
void |
remove(Charge charge)
Removes the specified charge from the plan |
void |
removePosition(int position)
Removes a single charge at the specified position |
void |
removeRange(java.lang.Integer position,
java.lang.Integer length)
Removes specified range of charges |
void |
replace(java.util.List<Charge> chargesList)
|
void |
replaceRange(java.lang.Integer position,
java.lang.Integer length)
Replaced the specified range of regular charges with freezes Convenience method to "cancel" payments within a plan |
void |
setAdjustment(Adjustment adjustment)
Sets the adjustment. |
void |
setAmount(java.lang.Integer amount)
Set a value to amount. |
void |
setBillingCycleCode(java.lang.String billingCycleCode)
Set a value to billingCycleCode. |
(package private) void |
setCharges(java.util.List<Charge> charges)
Assigns charge list to the payment plan. |
(package private) void |
setCustomerAccount(CustomerAccount customerAccount)
Sets the customer account. |
(package private) void |
setDeferredLength(java.lang.Integer deferredLength)
Set a value to deferredLength. |
(package private) void |
setDeferredValue(java.lang.Integer deferredValue)
Set a value to deferredValue. |
void |
setFirstBillingDate(java.util.Date firstBillingDate)
Set a value to firstBillingDate. |
void |
setGroupCode1(java.lang.String groupCode1)
Set a value to groupCode1. |
void |
setGroupCode2(java.lang.String groupCode2)
Set a value to groupCode2. |
void |
setGroupCode3(java.lang.String groupCode3)
Set a value to groupCode3. |
void |
setGroupCode4(java.lang.String groupCode4)
Set a value to groupCode4. |
void |
setGroupCode5(java.lang.String groupCode5)
Set a value to groupCode5. |
void |
setGroupCode6(java.lang.String groupCode6)
Set a value to groupCode6. |
void |
setGroupCode7(java.lang.String groupCode7)
Set a value to groupCode7. |
void |
setGroupCode8(java.lang.String groupCode8)
Set a value to groupCode8. |
void |
setItemCode(java.lang.String itemCode)
Set a value to itemCode. |
(package private) void |
setLastInvoicingDate(java.util.Date lastInvoicingDate)
Set a value to lastInvoicingDate. |
(package private) void |
setLastProcessingDate(java.util.Date lastProcessingDate)
Set a value to lastProcessingDate. |
(package private) void |
setLastUpdateDate(java.util.Date lastUpdateDate)
setLastUpdateDate method. |
(package private) void |
setLength(java.lang.Integer length)
Set a value to length. |
(package private) void |
setLinkAccount(java.lang.Integer linkAccount)
Sets the link account. |
(package private) void |
setLinkedParentPlan(PaymentPlan linkedParentPlan)
Sets the link parent plan. |
(package private) void |
setNextBillingDate(java.util.Date nextBillingDate)
Sets the next billing date. |
void |
setPaymentOption(PaymentOption paymentOption)
Sets the payment option. |
void |
setSellerCode(java.lang.String sellerCode)
Set a value to sellerCode. |
(package private) void |
setStatus(java.lang.String status)
Sets the status. |
void |
setTaxCode(java.lang.String taxCode)
Set a value to taxCode. |
void |
setType(java.lang.String type)
Set a value to type. |
(package private) void |
setValue(java.lang.Integer value)
Set a value to value. |
java.lang.String |
type()
Returns the type of the object instance using library's terminology In most cases it will match ClassName, but when a single class may represent multiple conceptual objects, the value will differ. |
| Methods inherited from class ibilling.client.ClientObject |
|---|
getClientProperty, getCode, getCreateDate, getId, getMerchantAccountCode, getRefId, hasClientProperty, setClientProperty, setCode, setCreateDate, setId, setMerchantAccountCode, setRefId |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
private java.util.Date lastInvoicingDate
private java.util.Date lastProcessingDate
private java.lang.String sellerCode
private java.lang.Integer length
private java.lang.Integer value
private java.lang.Integer deferredLength
private java.lang.Integer deferredValue
private java.lang.Integer amount
private java.lang.String groupCode1
private java.lang.String groupCode2
private java.lang.String groupCode3
private java.lang.String groupCode4
private java.lang.String groupCode5
private java.lang.String groupCode6
private java.lang.String groupCode7
private java.lang.String groupCode8
private java.lang.String type
private java.util.Date firstBillingDate
private java.util.Date nextBillingDate
private java.lang.String billingCycleCode
private java.lang.String itemCode
private java.lang.String taxCode
private java.util.Date lastUpdateDate
private java.lang.String status
private java.lang.Integer linkAccount
private java.util.List<Charge> charges
private PaymentOption paymentOption
private CustomerAccount customerAccount
private PaymentPlan linkedParentPlan
private Adjustment adjustment
| Constructor Detail |
|---|
PaymentPlan()
PaymentPlan(java.util.Date createDate,
java.util.Date lastInvocingDate,
java.util.Date lastProcessingDate,
java.lang.String code,
java.lang.String sellerCode,
java.lang.Integer length,
java.lang.Integer value,
java.lang.Integer deferredLength,
java.lang.Integer deferredValue,
java.lang.Integer amount,
java.lang.String groupCode1,
java.lang.String groupCode2,
java.lang.String groupCode3,
java.lang.String groupCode4,
java.lang.String groupCode5,
java.lang.String groupCode6,
java.lang.String groupCode7,
java.lang.String groupCode8,
java.lang.Integer merchantAccountCode,
java.lang.String type,
java.util.Date firstBillingDate,
java.lang.String billingCycleCode,
java.lang.String itemCode,
java.lang.String taxCode,
PaymentOption paymentOption,
CustomerAccount customerAccount,
java.lang.Long id,
java.util.Date lastUpdateDate,
java.util.Date nextBillingDate,
java.lang.String status)
createDate - the create datelastInvocingDate - the last invocing datelastProcessingDate - the last processing datecode - the codesellerCode - the seller codelength - the lengthvalue - the valuedeferredLength - the deferred lengthdeferredValue - the deferred valueamount - the amountgroupCode1 - the group code1groupCode2 - the group code2groupCode3 - the group code3groupCode4 - the group code4groupCode5 - the group code5groupCode6 - the group code6groupCode7 - the group code7groupCode8 - the group code8merchantAccountCode - the merchant account codetype - the typefirstBillingDate - the first billing datebillingCycleCode - the billing cycle codeitemCode - the item codetaxCode - the tax codepaymentOption - the payment optioncustomerAccount - the customer accountid - the idlastUpdateDate - the last update datenextBillingDate - the next billing datestatus - the status| Method Detail |
|---|
public java.util.Date getLastInvoicingDate()
void setLastInvoicingDate(java.util.Date lastInvoicingDate)
lastInvoicingDate - the last invoicing datepublic java.util.Date getLastProcessingDate()
void setLastProcessingDate(java.util.Date lastProcessingDate)
lastProcessingDate - the last processing datepublic java.lang.String getSellerCode()
public void setSellerCode(java.lang.String sellerCode)
sellerCode - the seller codepublic java.lang.Integer getLength()
void setLength(java.lang.Integer length)
length - the lengthpublic java.lang.Integer getValue()
void setValue(java.lang.Integer value)
value - the valuepublic java.lang.Integer getDeferredLength()
void setDeferredLength(java.lang.Integer deferredLength)
deferredLength - the deferred lengthpublic java.lang.Integer getDeferredValue()
void setDeferredValue(java.lang.Integer deferredValue)
deferredValue - the deferred valuepublic java.lang.Integer getAmount()
public void setAmount(java.lang.Integer amount)
amount - the amountpublic java.lang.String getGroupCode1()
public void setGroupCode1(java.lang.String groupCode1)
groupCode1 - the group code1public java.lang.String getGroupCode2()
public void setGroupCode2(java.lang.String groupCode2)
groupCode2 - the group code2public java.lang.String getGroupCode3()
public void setGroupCode3(java.lang.String groupCode3)
groupCode3 - the group code3public java.lang.String getGroupCode4()
public void setGroupCode4(java.lang.String groupCode4)
groupCode4 - the group code4public java.lang.String getGroupCode5()
public void setGroupCode5(java.lang.String groupCode5)
groupCode5 - the group code5public java.lang.String getGroupCode6()
public void setGroupCode6(java.lang.String groupCode6)
groupCode6 - the group code6public java.lang.String getGroupCode7()
public void setGroupCode7(java.lang.String groupCode7)
groupCode7 - the group code7public java.lang.String getGroupCode8()
public void setGroupCode8(java.lang.String groupCode8)
groupCode8 - the group code8public java.lang.String getType()
public void setType(java.lang.String type)
type - the typepublic java.util.Date getFirstBillingDate()
public void setFirstBillingDate(java.util.Date firstBillingDate)
firstBillingDate - the first billing datejava.util.List<Charge> createListCharges(int size)
size - the size
public java.lang.String getBillingCycleCode()
public void setBillingCycleCode(java.lang.String billingCycleCode)
billingCycleCode - the billing cycle codepublic java.lang.String getItemCode()
public void setItemCode(java.lang.String itemCode)
itemCode - the item codepublic java.lang.String getTaxCode()
public void setTaxCode(java.lang.String taxCode)
taxCode - the tax codejava.util.List<Charge> getChargesInternal()
public java.util.List<Charge> getCharges()
public java.lang.String getStatus()
void setStatus(java.lang.String status)
status - the new statusvoid setCharges(java.util.List<Charge> charges)
charges - the new chargespublic PaymentOption getPaymentOption()
public void setPaymentOption(PaymentOption paymentOption)
paymentOption - the new payment optionpublic CustomerAccount getCustomerAccount()
void setCustomerAccount(CustomerAccount customerAccount)
customerAccount - the new customer accountpublic PaymentPlan getLinkedParentPlan()
void setLinkedParentPlan(PaymentPlan linkedParentPlan)
linkedParentPlan - the new link parent planpublic PaymentPlan createLinkedPaymentPlan()
public PaymentPlan createLinkedPaymentPlanBasic(java.lang.String code,
java.lang.String type,
java.lang.Integer amount,
java.lang.Integer length)
throws ClientException
createLinkedPaymentPlan()
code - Stringamount - Integerlength - Integertype - the type
ClientException - the client exception
public PaymentPlan createLinkedPaymentPlanExtended(java.lang.String code,
java.lang.String type,
java.lang.Integer amount,
java.lang.Integer length,
PaymentOption paymentOption,
java.lang.String sellerCode,
java.lang.String itemCode,
java.lang.String taxCode,
java.lang.String groupCode1,
java.lang.String groupCode2,
java.lang.String groupCode3,
java.lang.String groupCode4,
java.lang.String groupCode5,
java.lang.String groupCode6,
java.lang.String groupCode7,
java.lang.String groupCode8)
throws ClientException
createLinkedPaymentPlan()
code - the codetype - the typeamount - the amountlength - the lengthpaymentOption - the payment optionsellerCode - the seller codeitemCode - the item codetaxCode - the tax codegroupCode1 - the group code1groupCode2 - the group code2groupCode3 - the group code3groupCode4 - the group code4groupCode5 - the group code5groupCode6 - the group code6groupCode7 - the group code7groupCode8 - the group code8
ClientException - the client exception
public void add(java.lang.Integer position,
java.lang.Integer length,
boolean isFreeze)
throws ClientException
position - the position where the first charge will be insteredlength - the number of charges to addisFreeze - if true, the charge is added as freeze; otherwise, it is
added as a regular charge
ClientException - in case invalid field values
public void removeRange(java.lang.Integer position,
java.lang.Integer length)
position - position of the first charge to removelength - the number of charges to remove after the first one
public void replaceRange(java.lang.Integer position,
java.lang.Integer length)
position - position of the first charge to removelength - the number of charges to remove after the first onepublic void replace(java.util.List<Charge> chargesList)
public void cancel()
public void removePosition(int position)
position - the position of the charge to be removedpublic void remove(Charge charge)
charge - the charge to be removed
void addCharge(Charge charge,
java.lang.Integer position)
throws ClientException
charge - the charge to be addedposition - the position at which the charge is to be added
ClientException - when invalid field values are suppliedpublic Charge getNextCharge()
public java.lang.String type()
ClientObject
type in class ClientObjectpublic Adjustment createAdjustment()
public Adjustment createAdjustmentExtended(java.lang.String code,
java.lang.String notes,
java.lang.String adjustmentReasonCode)
createAdjustment()
code - the codenotes - the notesadjustmentReasonCode - the adjustment reason code
public java.util.Date getLastUpdateDate()
void setLastUpdateDate(java.util.Date lastUpdateDate)
lastUpdateDate - the last update datepublic Adjustment getAdjustment()
public void setAdjustment(Adjustment adjustment)
adjustment - the new adjustmentpublic java.util.Date getNextBillingDate()
void setNextBillingDate(java.util.Date nextBillingDate)
nextBillingDate - the new next billing dateprivate void incrementChargesListParameters(Charge charge)
charge - the chargeprivate void decrementChargesListParameters(Charge charge)
charge - the chargejava.lang.Integer getLinkAccount()
void setLinkAccount(java.lang.Integer linkAccount)
linkAccount - the new link accountpublic boolean equals(java.lang.Object anotherObject)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||