com.konakart.app
Class Subscription

java.lang.Object
  extended by com.konakart.app.Subscription
All Implemented Interfaces:
SubscriptionIf

public class Subscription
extends java.lang.Object
implements SubscriptionIf

Defines a recurring billing subscription.


Constructor Summary
Subscription()
          Constructor
Subscription(com.workingdogs.village.Record vr, org.apache.torque.util.Criteria c)
          Instantiates the attributes of the Country object from a Record object
 
Method Summary
 java.math.BigDecimal getAmount()
          The amount billed
 java.lang.String getCustom1()
           
 java.lang.String getCustom2()
           
 java.lang.String getCustom3()
           
 java.lang.String getCustom4()
           
 java.lang.String getCustom5()
           
 int getCustomerId()
          Customer id
 java.util.Calendar getDateAdded()
           
 int getId()
           
 java.util.Calendar getLastBillingDate()
          The last time that the customer was billed
 java.util.Calendar getLastModified()
           
 java.util.Calendar getNextBillingDate()
          The next time that the customer will be billed
 int getOrderId()
          Id of the order
 java.lang.String getOrderNumber()
          Order Number
 PaymentScheduleIf getPaymentSchedule()
          PaymentSchedule object for this subscription
 int getPaymentScheduleId()
          PaymentSchedule id for this subscription
 java.lang.String getProblemDesc()
          A description of the problem detected during billing
 int getProductId()
          Id of the product being paid for
 java.lang.String getProductSku()
          SKU of the product being paid for
 java.util.Calendar getStartDate()
          Start date for the subscription
 java.lang.String getSubscriptionCode()
          Unique code for the subscription.
 java.math.BigDecimal getTrialAmount()
          The amount billed during the trial period
 boolean isActive()
          Set to true when the subscription is active
 boolean isProblem()
          Set to true if a problem has been detected during a billing transaction.
 void setActive(boolean active)
          Set to true when the subscription is active
 void setAmount(java.math.BigDecimal amount)
          The amount billed
 void setCustom1(java.lang.String custom1)
           
 void setCustom2(java.lang.String custom2)
           
 void setCustom3(java.lang.String custom3)
           
 void setCustom4(java.lang.String custom4)
           
 void setCustom5(java.lang.String custom5)
           
 void setCustomerId(int customerId)
          Customer id
 void setDateAdded(java.util.Calendar dateAdded)
           
 void setId(int id)
           
 void setLastBillingDate(java.util.Calendar lastBillingDate)
          The last time that the customer was billed
 void setLastModified(java.util.Calendar lastModified)
           
 void setNextBillingDate(java.util.Calendar nextBillingDate)
          The next time that the customer will be billed
 void setOrderId(int orderId)
          Id of the order
 void setOrderNumber(java.lang.String orderNumber)
          Order Number
 void setPaymentSchedule(PaymentScheduleIf paymentSchedule)
          PaymentSchedule object for this subscription
 void setPaymentScheduleId(int paymentScheduleId)
          PaymentSchedule id for this subscription
 void setProblem(boolean problem)
          Set to true if a problem has been detected during a billing transaction.
 void setProblemDesc(java.lang.String problemDesc)
          A description of the problem detected during billing
 void setProductId(int productId)
          Id of the product being paid for
 void setProductSku(java.lang.String productSku)
          SKU of the product being paid for
 void setStartDate(java.util.Calendar startDate)
          Start date for the subscription
 void setSubscriptionCode(java.lang.String subscriptionCode)
          Unique code for the subscription.
 void setTrialAmount(java.math.BigDecimal trialAmount)
          The amount billed during the trial period
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Subscription

public Subscription()
Constructor


Subscription

public Subscription(com.workingdogs.village.Record vr,
                    org.apache.torque.util.Criteria c)
             throws com.workingdogs.village.DataSetException
Instantiates the attributes of the Country object from a Record object

Parameters:
vr - Record containing data
c - Criteria containing column names
Throws:
com.workingdogs.village.DataSetException
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
Returns a string containing the attributes of the Subscription object.

getId

public int getId()
Specified by:
getId in interface SubscriptionIf
Returns:
the id

setId

public void setId(int id)
Specified by:
setId in interface SubscriptionIf
Parameters:
id - the id to set

getCustom1

public java.lang.String getCustom1()
Specified by:
getCustom1 in interface SubscriptionIf
Returns:
the custom1

setCustom1

public void setCustom1(java.lang.String custom1)
Specified by:
setCustom1 in interface SubscriptionIf
Parameters:
custom1 - the custom1 to set

getCustom2

public java.lang.String getCustom2()
Specified by:
getCustom2 in interface SubscriptionIf
Returns:
the custom2

setCustom2

public void setCustom2(java.lang.String custom2)
Specified by:
setCustom2 in interface SubscriptionIf
Parameters:
custom2 - the custom2 to set

getCustom3

public java.lang.String getCustom3()
Specified by:
getCustom3 in interface SubscriptionIf
Returns:
the custom3

setCustom3

public void setCustom3(java.lang.String custom3)
Specified by:
setCustom3 in interface SubscriptionIf
Parameters:
custom3 - the custom3 to set

getCustom4

public java.lang.String getCustom4()
Specified by:
getCustom4 in interface SubscriptionIf
Returns:
the custom4

setCustom4

public void setCustom4(java.lang.String custom4)
Specified by:
setCustom4 in interface SubscriptionIf
Parameters:
custom4 - the custom4 to set

getCustom5

public java.lang.String getCustom5()
Specified by:
getCustom5 in interface SubscriptionIf
Returns:
the custom5

setCustom5

public void setCustom5(java.lang.String custom5)
Specified by:
setCustom5 in interface SubscriptionIf
Parameters:
custom5 - the custom5 to set

getDateAdded

public java.util.Calendar getDateAdded()
Specified by:
getDateAdded in interface SubscriptionIf
Returns:
the dateAdded

setDateAdded

public void setDateAdded(java.util.Calendar dateAdded)
Specified by:
setDateAdded in interface SubscriptionIf
Parameters:
dateAdded - the dateAdded to set

getLastModified

public java.util.Calendar getLastModified()
Specified by:
getLastModified in interface SubscriptionIf
Returns:
the lastModified

setLastModified

public void setLastModified(java.util.Calendar lastModified)
Specified by:
setLastModified in interface SubscriptionIf
Parameters:
lastModified - the lastModified to set

getOrderId

public int getOrderId()
Id of the order

Specified by:
getOrderId in interface SubscriptionIf
Returns:
the orderId

setOrderId

public void setOrderId(int orderId)
Id of the order

Specified by:
setOrderId in interface SubscriptionIf
Parameters:
orderId - the orderId to set

getProductId

public int getProductId()
Id of the product being paid for

Specified by:
getProductId in interface SubscriptionIf
Returns:
the productId

setProductId

public void setProductId(int productId)
Id of the product being paid for

Specified by:
setProductId in interface SubscriptionIf
Parameters:
productId - the productId to set

getSubscriptionCode

public java.lang.String getSubscriptionCode()
Unique code for the subscription. Normally returned by a payment gateway when the subscription is created.

Specified by:
getSubscriptionCode in interface SubscriptionIf
Returns:
the subscriptionCode

setSubscriptionCode

public void setSubscriptionCode(java.lang.String subscriptionCode)
Unique code for the subscription. Normally returned by a payment gateway when the subscription is created.

Specified by:
setSubscriptionCode in interface SubscriptionIf
Parameters:
subscriptionCode - the subscriptionCode to set

getStartDate

public java.util.Calendar getStartDate()
Start date for the subscription

Specified by:
getStartDate in interface SubscriptionIf
Returns:
the startDate

setStartDate

public void setStartDate(java.util.Calendar startDate)
Start date for the subscription

Specified by:
setStartDate in interface SubscriptionIf
Parameters:
startDate - the startDate to set

getAmount

public java.math.BigDecimal getAmount()
The amount billed

Specified by:
getAmount in interface SubscriptionIf
Returns:
the amount

setAmount

public void setAmount(java.math.BigDecimal amount)
The amount billed

Specified by:
setAmount in interface SubscriptionIf
Parameters:
amount - the amount to set

getTrialAmount

public java.math.BigDecimal getTrialAmount()
The amount billed during the trial period

Specified by:
getTrialAmount in interface SubscriptionIf
Returns:
the trialAmount

setTrialAmount

public void setTrialAmount(java.math.BigDecimal trialAmount)
The amount billed during the trial period

Specified by:
setTrialAmount in interface SubscriptionIf
Parameters:
trialAmount - the trialAmount to set

isActive

public boolean isActive()
Set to true when the subscription is active

Specified by:
isActive in interface SubscriptionIf
Returns:
the active

setActive

public void setActive(boolean active)
Set to true when the subscription is active

Specified by:
setActive in interface SubscriptionIf
Parameters:
active - the active to set

isProblem

public boolean isProblem()
Set to true if a problem has been detected during a billing transaction. i.e. Credit card may have expired.

Specified by:
isProblem in interface SubscriptionIf
Returns:
the problem

setProblem

public void setProblem(boolean problem)
Set to true if a problem has been detected during a billing transaction. i.e. Credit card may have expired.

Specified by:
setProblem in interface SubscriptionIf
Parameters:
problem - the problem to set

getProblemDesc

public java.lang.String getProblemDesc()
A description of the problem detected during billing

Specified by:
getProblemDesc in interface SubscriptionIf
Returns:
the problemDesc

setProblemDesc

public void setProblemDesc(java.lang.String problemDesc)
A description of the problem detected during billing

Specified by:
setProblemDesc in interface SubscriptionIf
Parameters:
problemDesc - the problemDesc to set

getLastBillingDate

public java.util.Calendar getLastBillingDate()
The last time that the customer was billed

Specified by:
getLastBillingDate in interface SubscriptionIf
Returns:
the lastBillingDate

setLastBillingDate

public void setLastBillingDate(java.util.Calendar lastBillingDate)
The last time that the customer was billed

Specified by:
setLastBillingDate in interface SubscriptionIf
Parameters:
lastBillingDate - the lastBillingDate to set

getNextBillingDate

public java.util.Calendar getNextBillingDate()
The next time that the customer will be billed

Specified by:
getNextBillingDate in interface SubscriptionIf
Returns:
the nextBillingDate

setNextBillingDate

public void setNextBillingDate(java.util.Calendar nextBillingDate)
The next time that the customer will be billed

Specified by:
setNextBillingDate in interface SubscriptionIf
Parameters:
nextBillingDate - the nextBillingDate to set

getPaymentScheduleId

public int getPaymentScheduleId()
PaymentSchedule id for this subscription

Specified by:
getPaymentScheduleId in interface SubscriptionIf
Returns:
the paymentScheduleId

setPaymentScheduleId

public void setPaymentScheduleId(int paymentScheduleId)
PaymentSchedule id for this subscription

Specified by:
setPaymentScheduleId in interface SubscriptionIf
Parameters:
paymentScheduleId - the paymentScheduleId to set

getOrderNumber

public java.lang.String getOrderNumber()
Order Number

Specified by:
getOrderNumber in interface SubscriptionIf
Returns:
the orderNumber

setOrderNumber

public void setOrderNumber(java.lang.String orderNumber)
Order Number

Specified by:
setOrderNumber in interface SubscriptionIf
Parameters:
orderNumber - the orderNumber to set

getProductSku

public java.lang.String getProductSku()
SKU of the product being paid for

Specified by:
getProductSku in interface SubscriptionIf
Returns:
the productSku

setProductSku

public void setProductSku(java.lang.String productSku)
SKU of the product being paid for

Specified by:
setProductSku in interface SubscriptionIf
Parameters:
productSku - the productSku to set

getCustomerId

public int getCustomerId()
Customer id

Specified by:
getCustomerId in interface SubscriptionIf
Returns:
the customerId

setCustomerId

public void setCustomerId(int customerId)
Customer id

Specified by:
setCustomerId in interface SubscriptionIf
Parameters:
customerId - the customerId to set

getPaymentSchedule

public PaymentScheduleIf getPaymentSchedule()
PaymentSchedule object for this subscription

Specified by:
getPaymentSchedule in interface SubscriptionIf
Returns:
the paymentSchedule

setPaymentSchedule

public void setPaymentSchedule(PaymentScheduleIf paymentSchedule)
PaymentSchedule object for this subscription

Specified by:
setPaymentSchedule in interface SubscriptionIf
Parameters:
paymentSchedule - the paymentSchedule to set


Copyright © 2011 DS Data Systems UK Ltd.