|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.commerce.order.CommerceIdentifierImpl atg.commerce.order.PaymentGroupImpl atg.commerce.order.InvoiceRequest
public class InvoiceRequest
This payment method represents the information needed to produce an invoice for use in billing a customer for all or part of an order. The required information includes the purchase order number and the billing address to which the invoice should be sent.
Applications can also specify the preferred format for the invoice (text, html, etc), and the preferred delivery mode (email, fax, postal delivery, etc). It is up to the application to decide whether these properties are required or optional, and how to react in cases where the values are unspecified or the requested values are not supported by that particular application.
Applications can also specify optional payment terms for the invoice. Payment terms are traditionally specified as net days (payment due in full with no discount), discount days (discount offered if invoice paid within this many days), and discount percent (percentage discount for paying within "discount days").
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
protected Address |
mBillingAddress
|
Constructor Summary | |
---|---|
InvoiceRequest()
Default constructor |
Method Summary | |
---|---|
Address |
getBillingAddress()
Returns the billing address to use for this invoice. |
java.lang.Integer |
getPaymentDiscountDays()
Get the "discount days" component of this invoice's payment terms. |
java.lang.Double |
getPaymentDiscountPercent()
Get the "discount percentage" component of this invoice's payment terms. |
java.util.Date |
getPaymentDueDate()
Get the date on which payment is nominally due. |
java.lang.Integer |
getPaymentNetDays()
Get the "net days" component of this invoice's payment terms. |
java.lang.String |
getPONumber()
Return the purchase order number for this invoice, obtained by looking at the PONumber property of the underlying repository item. |
java.lang.String |
getPreferredDeliveryMode()
Get the preferred delivery mode (email, postal mail, fax, etc) for this invoice. |
java.lang.String |
getPreferredFormat()
Get the preferred delivery format (text, HTML, XML DTD specification, etc. |
void |
setBillingAddress(Address pBillingAddress)
|
void |
setPaymentDiscountDays(java.lang.Integer pPaymentDiscountDays)
Set the "discount days" component of this invoice's payment terms. |
void |
setPaymentDiscountPercent(java.lang.Double pPaymentDiscountPercent)
Set the "discount percentage" component of this invoice's payment terms. |
void |
setPaymentDueDate(java.util.Date pPaymentDueDate)
Set the date on which payment is nominally due. |
void |
setPaymentNetDays(java.lang.Integer pPaymentNetDays)
Set the "net days" component of this invoice's payment terms. |
void |
setPONumber(java.lang.String pPONumber)
Set the purchase order number for this invoice. |
void |
setPreferredDeliveryMode(java.lang.String pPreferredDeliveryMode)
Set the preferred delivery mode (email, postal mail, fax, etc) for this invoice. |
void |
setPreferredFormat(java.lang.String pPreferredFormat)
Set the preferred delivery format (text, HTML, XML DTD specification, etc.) for this invoice. |
Methods inherited from class atg.commerce.order.CommerceIdentifierImpl |
---|
getId, setId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface atg.commerce.order.CommerceIdentifier |
---|
getId |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
protected Address mBillingAddress
Constructor Detail |
---|
public InvoiceRequest()
Method Detail |
---|
public void setPONumber(java.lang.String pPONumber)
public java.lang.String getPONumber()
public Address getBillingAddress()
The object returned will actually be an instance of atg.order.RepositoryContactInfo, a subclass of ContactInfo that overrides every method to set or get properties of an underlying repository item, in this case the repository item corresponding to this InvoiceRequest object. So the properties of the billing address are actually flattened into the invoiceRequest repository item when they are read and written.
This somewhat unconventional approach was adopted from the DCS CreditCard implementation. The alternative would be to endow the invoiceRequest repository item with a property of type contactInfo, then add code somewhere in the pipeline that would load the invoiceRequest repository item, construct the wrapper object for it, find its billingAddress property (which would be of type RepositoryItem), build a wrapper class around that, and add the address wrapper to the invoice wrapper.
Using flattened properties as we do here is less intuitive, but also requires less custom coding.
getBillingAddress
in interface PaymentAddressContainer
public void setBillingAddress(Address pBillingAddress)
setBillingAddress
in interface PaymentAddressContainer
public void setPreferredFormat(java.lang.String pPreferredFormat)
The value specified here must be one of those recognized as legal for the "preferredFormat" property of the "deliveryInfo" repository item in the "Invoice" repository. Applications should typically use an instance of atg.repository.servlet.PossibleValues to obtain the list of permissible values, then present a user interface that restricts the user to choosing among these values.
PossibleValues
public java.lang.String getPreferredFormat()
public void setPreferredDeliveryMode(java.lang.String pPreferredDeliveryMode)
The value specified here must be one of those recognized as legal for the "preferredDeliveryMode" property of the "deliveryInfo" repository item in the "Invoice" repository. Applications should typically use an instance of atg.repository.servlet.PossibleValues to obtain the list of permissible values, then present a user interface that restricts the user to choosing among these values.
PossibleValues
public java.lang.String getPreferredDeliveryMode()
public void setPaymentDueDate(java.util.Date pPaymentDueDate)
public java.util.Date getPaymentDueDate()
public void setPaymentNetDays(java.lang.Integer pPaymentNetDays)
public java.lang.Integer getPaymentNetDays()
public void setPaymentDiscountDays(java.lang.Integer pPaymentDiscountDays)
public java.lang.Integer getPaymentDiscountDays()
public void setPaymentDiscountPercent(java.lang.Double pPaymentDiscountPercent)
public java.lang.Double getPaymentDiscountPercent()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |