Class ShipTo
Shipping address is destination address information.
Following example shows how to use BillTo.
................. //inv is the Invoice object. ................. *//Set the Shipping Address details. ShipTo ship = new ShipTo(); ship.setShipToStreet( "123 Main St."); ship.setShipToZip("12345"); inv.setShipTo (ship); .................
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()This method copies the common contents from shipping to billing address.protected voidprotected Contextprotected StringBufferGets the Requestbuffer used for creating the actual request string.Gets the shipping carrier.Gets the ship from zip.Gets the shipping method.Gets the shipping cityGets the Shipping CountryGets the shipping email.Gets the shipping first nameGets the last name from the shipping address.Gets the middlename from the shipping address.Gets the phone number from the shipping address.Gets the Phone2 from the shipping address.Gets the shipping state.Gets the shipping street.Gets the shipping street2.Gets the shipping zip code.protected voidsetContext(Context context) protected voidsetRequestBuffer(StringBuffer value) sets the StringBuffer to hold the request string.voidsetShipCarrier(String shipCarrier) Sets the shipping carrier.voidsetShipFromZip(String shipFromZip) Sets the ship from zip.voidsetShipMethod(String shipMethod) Sets the shipping method.voidsetShipToCity(String shipToCity) Sets the shipping cityvoidsetShipToCountry(String shipToCountry) Sets the Shipping CountryvoidsetShipToEmail(String shipToEmail) Sets the shipping email.voidsetShipToFirstName(String shipToFirstName) Sets the shipping first namevoidsetShipToLastName(String shipToLastName) Sets the last name in the shipping address.voidsetShipToMiddleName(String shipToMiddleName) Sets the middlename in the shipping address.voidsetShipToPhone(String shipToPhone) Sets the phone number in the shipping address.voidsetShipToPhone2(String shipToPhone2) Sets the Phone2 in the shipping address.voidsetShipToState(String shipToState) Sets the shipping state.voidsetShipToStreet(String shipToStreet) Sets the shipping street.voidsetShipToStreet2(String shipToStreet2) Sets the shipping street2.voidsetShipToZip(String shipToZip) Sets the shipping zip code.Methods inherited from class paypal.payflow.Address
getAddressCity, getAddressCountry, getAddressEmail, getAddressFax, getAddressFirstName, getAddressLastName, getAddressMiddleName, getAddressPhone, getAddressPhone2, getAddressState, getAddressStreet, getAddressStreet2, getAddressZip, setAddressCity, setAddressCountry, setAddressEmail, setAddressFax, setAddressFirstName, setAddressLastName, setAddressMiddleName, setAddressPhone, setAddressPhone2, setAddressState, setAddressStreet, setAddressStreet2, setAddressZip
-
Constructor Details
-
ShipTo
public ShipTo()ConstructorShipping address is destination address information.
Following example shows how to use ShipTo.
................. //inv is the Invoice object. ................. *//Set the Shipping Address details. ShipTo ship = new ShipTo(); ship.setShipToStreet ("685A E. Middlefield Rd."); ship.ShipToZip ("94043"); inv.setShipTo( ship); .................
-
-
Method Details
-
getShipToCity
Gets the shipping city- Returns:
- String
Maps to Payflow Parameter: SHIPTOCITY
-
setShipToCity
Sets the shipping city- Parameters:
shipToCity- StringMaps to Payflow Parameter: SHIPTOCITY
-
getShipToCountry
Gets the Shipping Country- Returns:
- String
Maps to Payflow Parameter: SHIPTOCOUNTRY
-
setShipToCountry
Sets the Shipping Country- Parameters:
shipToCountry- StringMaps to Payflow Parameter: SHIPTOCOUNTRY
-
getShipToEmail
Gets the shipping email.- Returns:
- String
Maps to Payflow Parameter: SHIPTOEMAIL
-
setShipToEmail
Sets the shipping email.- Parameters:
shipToEmail- StringMaps to Payflow Parameter: SHIPTOEMAIL
-
getShipToFirstName
Gets the shipping first name- Returns:
- String
Maps to Payflow Parameter: SHIPTOFIRSTNAME
-
setShipToFirstName
Sets the shipping first name- Parameters:
shipToFirstName- StringMaps to Payflow Parameter: SHIPTOFIRSTNAME
-
getShipToLastName
Gets the last name from the shipping address.- Returns:
- String
Maps to Payflow Parameter: SHIPTOLASTNAME
-
setShipToLastName
Sets the last name in the shipping address.- Parameters:
shipToLastName- StringMaps to Payflow Parameter: SHIPTOLASTNAME
-
getShipToMiddleName
Gets the middlename from the shipping address.- Returns:
- String
Maps to Payflow Parameter: SHIPTOMIDDLENAME
-
setShipToMiddleName
Sets the middlename in the shipping address.- Parameters:
shipToMiddleName- StringMaps to Payflow Parameter: SHIPTOMIDDLENAME
-
getShipToPhone2
Gets the Phone2 from the shipping address.- Returns:
- String
Maps to Payflow Parameter: SHIPTOPHONE2
-
setShipToPhone2
Sets the Phone2 in the shipping address.- Parameters:
shipToPhone2- StringMaps to Payflow Parameter: SHIPTOPHONE2
-
getShipToPhone
Gets the phone number from the shipping address.- Returns:
- String
Maps to Payflow Parameter: SHIPTOPHONE
-
setShipToPhone
Sets the phone number in the shipping address.- Parameters:
shipToPhone- StringMaps to Payflow Parameter: SHIPTOPHONE
-
getShipToState
Gets the shipping state.- Returns:
- String
Maps to Payflow Parameter: SHIPTOSTATE
-
setShipToState
Sets the shipping state.- Parameters:
shipToState- StringMaps to Payflow Parameter: SHIPTOSTATE
-
getShipToStreet
Gets the shipping street.- Returns:
- String
Maps to Payflow Parameter: SHIPTOSTREET
-
setShipToStreet
Sets the shipping street.- Parameters:
shipToStreet- StringMaps to Payflow Parameter: SHIPTOSTREET
-
getShipToStreet2
Gets the shipping street2.- Returns:
- String
Maps to Payflow Parameter: SHIPTOSTREET2
-
setShipToStreet2
Sets the shipping street2.- Parameters:
shipToStreet2- StringMaps to Payflow Parameter: SHIPTOSTREET2
-
getShipToZip
Gets the shipping zip code.- Returns:
- String
Maps to Payflow Parameter: SHIPTOZIP
-
setShipToZip
Sets the shipping zip code.- Parameters:
shipToZip- StringMaps to Payflow Parameter: SHIPTOZIP.
-
getShipMethod
Gets the shipping method.- Returns:
- String
Maps to Payflow Parameter: SHIPMETHOD
-
setShipMethod
Sets the shipping method.- Parameters:
shipMethod- StringMaps to Payflow Parameter: SHIPMETHOD
-
getShipCarrier
Gets the shipping carrier.- Returns:
- String
Maps to Payflow Parameter: SHIPCARRIER
-
setShipCarrier
Sets the shipping carrier.- Parameters:
shipCarrier- StringMaps to Payflow Parameter: SHIPCARRIER
-
getShipFromZip
Gets the ship from zip.Ship from postal code (called ZIP code in the USA).
- Returns:
- String
Maps to Payflow Parameter: SHIPFROMZIP
-
setShipFromZip
Sets the ship from zip.Ship from postal code (called ZIP code in the USA).
- Parameters:
shipFromZip- StringMaps to Payflow Parameter: SHIPFROMZIP
-
copy
This method copies the common contents from shipping to billing address.- Returns:
- BillTo
This method can be used to populate the shipping addresses directly from the billing addresses when both are the same.
................ //ship is the object of //shipTo populated with //the shipping addresses. ................ *BillTo bill; *
//Populate billing addresses //from shipping addresses. bill = ship.copy(); *
................
-
generateRequest
protected void generateRequest() -
getContext
-
setContext
-
getRequestBuffer
Gets the Requestbuffer used for creating the actual request string.- Returns:
- mRequestBuffer StringBuffer
-
setRequestBuffer
sets the StringBuffer to hold the request string.- Parameters:
value- StringBuffer
-