org.locomotive.commerce.ics
Class Offer

java.lang.Object
  |
  +--org.locomotive.commerce.ics.Offer

public class Offer
extends java.lang.Object

Offer is a wrapper class for the ICS Offer field of an ICS Message. No fields should contain the characters '^', ',' or ':', as these are used as field separators in the SCMPMessages sent to the Cybersource gateway. Please see the Cybersource CommerceFLEX API documentation for more information.


Constructor Summary
Offer(java.lang.String offerid, java.lang.String price, java.lang.String productname, java.lang.String productsku, java.lang.String producttype, int quantity)
          Creates a new Offer.
 
Method Summary
 java.lang.String getEncodedString()
          returns the string suitable for inclusion in an SCMPMessage.
 void setELicenseFields(java.lang.String description, java.lang.String export, java.lang.String serial_number, java.lang.String distributor, java.lang.String distributor_acct)
          These fields are used when requesting the "ics_elc" (Electronic License) service.
 void setNexus(java.lang.String s)
          nexus is optional and used by the "ics_tax" service
 void setScoreMetric(java.lang.String s)
          Overrides the default score metric for this offer.
 void setShipAmount(java.lang.String s)
          shipamount is optional and is used by the "ics_tax" and "ics_preapp" services
 void setTaxAmount(java.lang.String s)
          taxamount is optional and is used by the "ics_tax" and "ics_preapp" services
 void setTaxClass(java.lang.String s)
          taxclass is optional and is used by the "ics_tax" service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Offer

public Offer(java.lang.String offerid,
             java.lang.String price,
             java.lang.String productname,
             java.lang.String productsku,
             java.lang.String producttype,
             int quantity)
Creates a new Offer. ICS calls this a "Product Description" (digital offer). The constructor has required fields, but depending upon the other services requested in the message sent to Cybersource, setting some additional fields may be required.
Method Detail

setNexus

public void setNexus(java.lang.String s)
nexus is optional and used by the "ics_tax" service

setTaxClass

public void setTaxClass(java.lang.String s)
taxclass is optional and is used by the "ics_tax" service

setShipAmount

public void setShipAmount(java.lang.String s)
shipamount is optional and is used by the "ics_tax" and "ics_preapp" services

setTaxAmount

public void setTaxAmount(java.lang.String s)
taxamount is optional and is used by the "ics_tax" and "ics_preapp" services

setScoreMetric

public void setScoreMetric(java.lang.String s)
Overrides the default score metric for this offer. Ignored unless "ics_score" service is requested.

setELicenseFields

public void setELicenseFields(java.lang.String description,
                              java.lang.String export,
                              java.lang.String serial_number,
                              java.lang.String distributor,
                              java.lang.String distributor_acct)
These fields are used when requesting the "ics_elc" (Electronic License) service. Fields may be left null or blank.

getEncodedString

public java.lang.String getEncodedString()
returns the string suitable for inclusion in an SCMPMessage. This method is called by ICSRequest.send() and