UPSRates Class
Properties Methods Events Configuration Settings Errors
Provides domestic or international rates based on weight, service, and origin/destination information.
Syntax
inship.upsrates()
Remarks
Rates class provides automated online access to domestic and international rate information and is capable also of rating shipments containing multiple packages. Based on the shipment's input characteristics (origin, destination, shipment weight, special services, etc.), the class provides a list of all applicable UPS services and their respective published rates.
For all shipments inside or between the U.S. and Puerto Rico:
The request that is sent to UPS Server must provide details at the package level. For shipments consisting of only one package, the class identifies all the available UPS domestic and international services and returns shipping rates based on the package's specifications. If the shipment consists of two or more packages, the class will return a separate rate for each package and the rate for the total shipment. The total shipment rate will be a sum of the rates for all packages.
For all shipments outside the U.S. and Puerto Rico:
The request must provide details at the shipment level. For shipments consisting of one or more packages, the class will return one rate for all packages at the shipment level (not at the package level).
To retrieve a list of rates for all services applicable to your shipment, the RequestedService must be set to 0 (stUnspecified) when calling GetRates method. To get a rate for a specified service, the RequestedService must be set to the corresponding value of the UPS service to be rated (other than 0: stUnspecified).
In either scenario, UPS server response will contain negotiated rate(s) only for the qualified UPSAccountNumbers. Eligibility is determined using the combination of UPSUserId and UPSAccountNumber. If the user is authorized for negotiated rates, and if negotiated rates apply to the particular service, UPS returns those rates along with the published rates in its response. Otherwise, a warning message might be returned that indicates ineligibility and only the published rates are returned in the response. For more information on negotiated rates, including authorization to receive them, please check with your UPS account representative.
Please note that shipping rates retrieved by this class are estimates based on the information supplied. Other shipping charges may apply and the final shipping charge may differ depending upon your UPS Account Number and how the package is tendered to UPS.
Property List
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
AccountAddress1 | Street name. |
AccountAddress2 | A specific detail on the address (such as building, suite, apartment, floor number etc. |
AccountCity | Name of city, town, etc. |
AccountCountryCode | Country code. |
AccountState | State or province code. |
AccountZipCode | Postal code. |
CODTotalAmount | The total amount to be collected on shipment level. |
CODType | The code that indicates the type of funds that will be used for the COD payment. |
CustomerType | Customer classification code. |
Disclaimer | Disclaimer text. |
DutyType | Auto duty type applicable for requests outside the US. |
FirewallAutoDetect | This property tells the component whether or not to automatically detect and use firewall system settings, if available. |
FirewallType | This property determines the type of firewall to connect through. |
FirewallHost | This property contains the name or IP address of firewall (optional). |
FirewallPassword | This property contains a password if authentication is to be used when connecting through the firewall. |
FirewallPort | This property contains the TCP port for the firewall Host . |
FirewallUser | This property contains a user name if authentication is to be used connecting through a firewall. |
PackageCount | The number of records in the Package arrays. |
PackageBaseCharge | Base charge applicable to this package. |
PackageCODAmount | The COD monetary value for the package. |
PackageCODType | The code that indicates the type of funds that will be used for the COD payment for this package. |
PackageHeight | The height of the package to be shipped. |
PackageInsuredValue | Amount of insurance requested for this package. |
PackageLength | The length of the package to be shipped. |
PackageNetCharge | Net charge applicable to this package. |
PackageType | The packaging type of the package being rated and/or shipped. |
PackageRatingAggregate | Rating aggregate applicable to this package. |
PackageSignatureType | Specifies one of the Delivery Signature Options requested for this package. |
PackageSpecialServices | Contains the collection of special services offered on the package level. |
PackageTotalSurcharges | Total surcharges applicable to this package. |
PackageWeight | Weight of this package. |
PackageWidth | The width of the package to be shipped. |
PackageServiceIndex | The service index in the list of available services returned. |
PickupType | Pickup type used for the shipment that rate is requested for. |
ProxyAuthScheme | This property is used to tell the component which type of authorization to perform when connecting to the proxy. |
ProxyAutoDetect | This property tells the component whether or not to automatically detect and use proxy system settings, if available. |
ProxyPassword | This property contains a password if authentication is to be used for the proxy. |
ProxyPort | This property contains the TCP port for the proxy Server (default 80). |
ProxyServer | If a proxy Server is given, then the HTTP request is sent to the proxy instead of the server otherwise specified. |
ProxySSL | This property determines when to use SSL for the connection to the proxy. |
ProxyUser | This property contains a user name, if authentication is to be used for the proxy. |
RecipientAddress1 | Street name. |
RecipientAddress2 | A specific detail on the address (such as building, suite, apartment, floor number etc. |
RecipientAddressFlags | Various flags that denote information about the address. |
RecipientCity | Name of city, town, etc. |
RecipientCountryCode | Country code. |
RecipientState | State or province code. |
RecipientZipCode | Postal code. |
RecipientCandidateAggregate | String representing the list of destination address candidates (if any). |
RequestedService | Service type for which the shipping rate is requested. |
SenderAddress1 | Street name. |
SenderAddress2 | A specific detail on the address (such as building, suite, apartment, floor number etc. |
SenderCity | Name of city, town, etc. |
SenderCountryCode | Country code. |
SenderState | State or province code. |
SenderZipCode | Postal code. |
SenderCandidateAggregate | String representing the list of origin address candidates (if any). |
ServiceCount | The number of records in the Service arrays. |
ServiceAccountNetCharge | Net charge amount applied to a ServiceType . |
ServiceBusinessDays | Number of business days from origin to destination location. |
ServiceCustomerCenterCutoff | Time the UPS Customer Service Center closes. |
ServiceDelayDays | Number of days the shipment is delayed in customs. |
ServiceDeliveryDate | This indicates the shipment delivery date for the ServiceType . |
ServiceDeliveryDay | Indicates the day of the week the shipment can be delivered when using the ServiceType . |
ServiceDeliveryTime | Scheduled local delivery time. |
ServiceGuaranteedDescription | Textual description of a guaranteed delivery for a UPS service type in the list of available services returned. |
ServiceHolidays | Number of national holidays during transit. |
ServiceListBaseCharge | Transportation charges before surcharges and discounts applied to a ServiceType . |
ServiceListNetCharge | Net charge amount applied to a ServiceType . |
ServiceListTotalSurcharge | Total surcharge amount for all additional services applied to a ServiceType . |
ServiceRestDays | Number of days the shipment is in rest due to non-business days. |
ServiceType | Indicates the service type in the list of available services returned. |
ServiceTypeDescription | Indicates the textual description of a service type in the list of available services returned. |
ServiceShipDate | Date UPS picks up the package from the origin. |
ServiceShipTime | Time UPS picks up the package from the origin. |
ServiceTransitTime | Expected number of days in transit from pickup to delivery for the ServiceType . |
ShipDate | The date the user requests UPS to pickup the package from the origin. |
ShipmentSpecialServices | Contains the collection of special services offered by UPS on shipment level. |
SSLAcceptServerCertEncoded | The certificate (PEM/base64 encoded). |
SSLCertEncoded | The certificate (PEM/base64 encoded). |
SSLCertStore | The name of the certificate store for the client certificate. |
SSLCertStorePassword | If the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store. |
SSLCertStoreType | The type of certificate store for this certificate. |
SSLCertSubject | The subject of the certificate used for client authentication. |
SSLServerCertEncoded | The certificate (PEM/base64 encoded). |
Timeout | A timeout for the component. |
TotalValue | Monetary value of shipment contents. |
TotalWeight | Total shipment's weight. |
UPSAccessKey | An identifier required to connect to a UPS server. |
UPSAccountNumber | The shipper's UPS account number. |
UPSPassword | Password to use for logging in to a UPS Server . |
UPSServer | URL for the UPS server where the requests are sent. |
UPSUserId | User Id for logging in to UPS. |
Method List
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
Config | Sets or retrieves a configuration setting . |
GetRates | Returns rate information for a specified or all available UPS RequestedService s. |
GetShippingTime | Provides the average estimated time to ship a package from an origin to a destination address. |
Reset | Resets the internal state of the component and all properties to their default values. |
Event List
The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.
Error | Information about errors during data delivery. |
Notification | Notification returned by the server upon successful request (if applicable). |
SSLServerAuthentication | Fired after the server presents its certificate to the client. |
SSLStatus | Shows the progress of the secure connection. |
Configuration Settings
The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.
RawRequest | Contains the complete request sent to the Server. |
RawResponse | Contains the complete response returned by the Server. |
XPath | Used to retrieve data at any place within the response. |
Warning | Warning message returned by the server. |
UseSOAP | Whether or not to use UPS' webservices. |
PackageDeclaredValueType[i] | The type of declared value (corresponding to the package at index i). |
RateCurrency | The currency of the returned rates. |
RatesWarning | Rated shipment warning message. |
CurrencyCode | The currency code associated with the monetary values present in the request. |
Documents | Whether the shipment contains only documents. |
MaxRecords | Maximum number of candidates the user wishes to receive in the response. |
RecipientCountryName | Country name to which the shipment is destined. |
RecipientTown | Town name to where the shipment is destined (applicable to non-US addresses only). |
SenderCountryName | Country name from which the shipment is originating. |
SenderTown | Town name from which the shipment is originating (applicable to non-US addresses only). |
WeightUnit | Weight unit. |
AcceptEncoding | Used to tell the server which types of content encodings the client supports. |
AllowHTTPCompression | This property enables HTTP compression for receiving data. |
AllowIdenticalRedirectURL | Allow redirects to the same URL. |
Append | Whether to append data to LocalFile. |
Authorization | The Authorization string to be sent to the server. |
BytesTransferred | Contains the number of bytes transferred in the response data. |
EncodeURL | If set to true the URL will be encoded by the component. |
FollowRedirects | Determines what happens when the server issues a redirect. |
GetOn302Redirect | If set to true the component will perform a GET on the new location. |
HTTPVersion | The version of HTTP used by the component. |
IfModifiedSince | A date determining the maximum age of the desired document. |
KeepAlive | Determines whether the HTTP connection is closed after completion of the request. |
MaxRedirectAttempts | Limits the number of redirects that are followed in a request. |
OtherHeaders | Other headers as determined by the user (optional). |
ProxyAuthorization | The authorization string to be sent to the proxy server. |
ProxyAuthScheme | The authorization scheme to be used for the proxy. |
ProxyPassword | A password if authentication is to be used for the proxy. |
ProxyPort | Port for the proxy server (default 80). |
ProxyServer | Name or IP address of a proxy server (optional). |
ProxyUser | A user name if authentication is to be used for the proxy. |
TransferredDataLimit | The maximum number of incoming bytes to be stored by the component. |
TransferredHeaders | The full set of headers as received from the server. |
UseChunkedEncoding | Enables or Disables HTTP chunked encoding for transfers. |
ChunkSize | Specifies the chunk size in bytes when using chunked encoding. |
UserAgent | Information about the user agent (browser). |
KerberosSPN | The Service Principal Name for the Kerberos Domain Controller. |
ConnectionTimeout | Sets a separate timeout value for establishing a connection. |
FirewallAutoDetect | Tells the component whether or not to automatically detect and use firewall system settings, if available. |
FirewallHost | Name or IP address of firewall (optional). |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
Linger | When set to True, connections are terminated gracefully. |
LingerTime | Time in seconds to have the connection linger. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The TCP port in the local host where the component binds. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxTransferRate | The transfer rate limit in bytes per second. |
RecordLength | The length of received data records. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
UseIPv6 | Whether to use IPv6. |
TcpNoDelay | Whether or not to delay when sending packets. |
TLS12SignatureAlgorithms | Defines the allowed TLS 1.2 signature algorithms when UseManagedSecurityAPI is True. |
ReuseSSLSession | Determines if the SSL session is reused. |
SSLCipherStrength | The minimum cipher strength used for bulk encryption. |
SSLEnabledProtocols | Used to enable/disable the supported security protocols. |
SSLProvider | The name of the security provider to use. |
SSLSecurityFlags | Flags that control certificate verification. |
OpenSSLCADir | The path to a directory containing CA certificates. |
OpenSSLCAFile | Name of the file containing the list of CA's trusted by your application. |
OpenSSLCipherList | A string that controls the ciphers to be used by SSL. |
OpenSSLPrngSeedData | The data to seed the pseudo random number generator (PRNG). |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
CodePage | The system code page used for Unicode to Multibyte translations. |