Dart
Dart
UPS Rate Request
See more UPS Examples
Simple UPS Rate ExampleChilkat Dart Downloads
import 'package:chilkat/chilkat.dart';
void main() {
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
final http = CkHttp();
// Use this online tool to generate code from sample JSON:
// Generate Code to Create JSON
// The following JSON is sent in the request body.
// {
// "RateRequest": {
// "Request": {
// "TransactionReference": {
// "CustomerContext": "CustomerContext"
// }
// },
// "Shipment": {
// "Shipper": {
// "Name": "ShipperName",
// "ShipperNumber": "ShipperNumber",
// "Address": {
// "AddressLine": [
// "ShipperAddressLine",
// "ShipperAddressLine",
// "ShipperAddressLine"
// ],
// "City": "TIMONIUM",
// "StateProvinceCode": "MD",
// "PostalCode": "21093",
// "CountryCode": "US"
// }
// },
// "ShipTo": {
// "Name": "ShipToName",
// "Address": {
// "AddressLine": [
// "ShipToAddressLine",
// "ShipToAddressLine",
// "ShipToAddressLine"
// ],
// "City": "Alpharetta",
// "StateProvinceCode": "GA",
// "PostalCode": "30005",
// "CountryCode": "US"
// }
// },
// "ShipFrom": {
// "Name": "ShipFromName",
// "Address": {
// "AddressLine": [
// "ShipFromAddressLine",
// "ShipFromAddressLine",
// "ShipFromAddressLine"
// ],
// "City": "TIMONIUM",
// "StateProvinceCode": "MD",
// "PostalCode": "21093",
// "CountryCode": "US"
// }
// },
// "PaymentDetails": {
// "ShipmentCharge": {
// "Type": "01",
// "BillShipper": {
// "AccountNumber": "ShipperNumber"
// }
// }
// },
// "Service": {
// "Code": "03",
// "Description": "Ground"
// },
// "NumOfPieces": "1",
// "Package": {
// "PackagingType": {
// "Code": "02",
// "Description": "Packaging"
// },
// "Dimensions": {
// "UnitOfMeasurement": {
// "Code": "IN",
// "Description": "Inches"
// },
// "Length": "5",
// "Width": "5",
// "Height": "5"
// },
// "PackageWeight": {
// "UnitOfMeasurement": {
// "Code": "LBS",
// "Description": "Pounds"
// },
// "Weight": "1"
// }
// }
// }
// }
// }
final json = CkJsonObject();
json.updateString('RateRequest.Request.TransactionReference.CustomerContext', 'CustomerContext');
json.updateString('RateRequest.Shipment.Shipper.Name', 'ShipperName');
json.updateString('RateRequest.Shipment.Shipper.ShipperNumber', 'ShipperNumber');
json.updateString('RateRequest.Shipment.Shipper.Address.AddressLine[0]', 'ShipperAddressLine');
json.updateString('RateRequest.Shipment.Shipper.Address.AddressLine[1]', 'ShipperAddressLine');
json.updateString('RateRequest.Shipment.Shipper.Address.AddressLine[2]', 'ShipperAddressLine');
json.updateString('RateRequest.Shipment.Shipper.Address.City', 'TIMONIUM');
json.updateString('RateRequest.Shipment.Shipper.Address.StateProvinceCode', 'MD');
json.updateString('RateRequest.Shipment.Shipper.Address.PostalCode', '21093');
json.updateString('RateRequest.Shipment.Shipper.Address.CountryCode', 'US');
json.updateString('RateRequest.Shipment.ShipTo.Name', 'ShipToName');
json.updateString('RateRequest.Shipment.ShipTo.Address.AddressLine[0]', 'ShipToAddressLine');
json.updateString('RateRequest.Shipment.ShipTo.Address.AddressLine[1]', 'ShipToAddressLine');
json.updateString('RateRequest.Shipment.ShipTo.Address.AddressLine[2]', 'ShipToAddressLine');
json.updateString('RateRequest.Shipment.ShipTo.Address.City', 'Alpharetta');
json.updateString('RateRequest.Shipment.ShipTo.Address.StateProvinceCode', 'GA');
json.updateString('RateRequest.Shipment.ShipTo.Address.PostalCode', '30005');
json.updateString('RateRequest.Shipment.ShipTo.Address.CountryCode', 'US');
json.updateString('RateRequest.Shipment.ShipFrom.Name', 'ShipFromName');
json.updateString('RateRequest.Shipment.ShipFrom.Address.AddressLine[0]', 'ShipFromAddressLine');
json.updateString('RateRequest.Shipment.ShipFrom.Address.AddressLine[1]', 'ShipFromAddressLine');
json.updateString('RateRequest.Shipment.ShipFrom.Address.AddressLine[2]', 'ShipFromAddressLine');
json.updateString('RateRequest.Shipment.ShipFrom.Address.City', 'TIMONIUM');
json.updateString('RateRequest.Shipment.ShipFrom.Address.StateProvinceCode', 'MD');
json.updateString('RateRequest.Shipment.ShipFrom.Address.PostalCode', '21093');
json.updateString('RateRequest.Shipment.ShipFrom.Address.CountryCode', 'US');
json.updateString('RateRequest.Shipment.PaymentDetails.ShipmentCharge.Type', '01');
json.updateString('RateRequest.Shipment.PaymentDetails.ShipmentCharge.BillShipper.AccountNumber', 'ShipperNumber');
json.updateString('RateRequest.Shipment.Service.Code', '03');
json.updateString('RateRequest.Shipment.Service.Description', 'Ground');
json.updateString('RateRequest.Shipment.NumOfPieces', '1');
json.updateString('RateRequest.Shipment.Package.PackagingType.Code', '02');
json.updateString('RateRequest.Shipment.Package.PackagingType.Description', 'Packaging');
json.updateString('RateRequest.Shipment.Package.Dimensions.UnitOfMeasurement.Code', 'IN');
json.updateString('RateRequest.Shipment.Package.Dimensions.UnitOfMeasurement.Description', 'Inches');
json.updateString('RateRequest.Shipment.Package.Dimensions.Length', '5');
json.updateString('RateRequest.Shipment.Package.Dimensions.Width', '5');
json.updateString('RateRequest.Shipment.Package.Dimensions.Height', '5');
json.updateString('RateRequest.Shipment.Package.PackageWeight.UnitOfMeasurement.Code', 'LBS');
json.updateString('RateRequest.Shipment.Package.PackageWeight.UnitOfMeasurement.Description', 'Pounds');
json.updateString('RateRequest.Shipment.Package.PackageWeight.Weight', '1');
// Load the OAuth2 access token obtained via client credentials as shown
// in this UPS OAuth2 Client Credentials example.
final jsonToken = CkJsonObject();
try {
jsonToken.loadFile('qa_data/tokens/ups_oauth2_token.json');
} on ChilkatException {
print('Failed to load ups_oauth2_token.json');
return;
}
// The access token JSON looks something like this:
// {
// "token_type": "Bearer",
// "issued_at": "1686911985606",
// "client_id": "2498righ8wr6aihe98rt8rhowirtyw9er6twe80rtywrehrt",
// "access_token": "eyJraW......R2sbqrY",
// "expires_in": "14399",
// "status": "approved"
// }
// Adds the "Authorization: Bearer <YOUR_TOKEN_HERE>" header.
http.authToken = jsonToken.stringOf('access_token');
http.setRequestHeader('Content-Type', 'application/json');
http.setRequestHeader('transId', 'string');
http.setRequestHeader('transactionSrc', 'testing');
// The "version" indicates Rate API to display the new release features in Rate API response based on Rate release.
// Supported values: v1, v1601, v1607, v1701, v1707, v2108, v2205.
http.setUrlVar('version', 'v1');
// The "requestoption" has the following valid values:
// Rate = The server rates (The default Request option is Rate if a Request Option is not provided).
// Shop = The server validates the shipment, and returns rates for all UPS products from the ShipFrom to the ShipTo addresses.
// Rate is the only valid request option for Ground Freight Pricing requests.
http.setUrlVar('requestoption', 'Rate');
final resp = CkHttpResponse();
try {
http.httpJson('POST', 'https://wwwcie.ups.com/api/rating/{\$version}/{\$requestoption}?additionalinfo=string', json, 'application/json', resp);
} on ChilkatException catch (e) {
print(e.lastErrorText);
return;
}
final sbResponseBody = CkStringBuilder();
resp.getBodySb(sbResponseBody);
final jResp = CkJsonObject();
jResp.loadSb(sbResponseBody);
jResp.emitCompact = false;
print('Response Body:');
print(jResp.emit());
// ----------------------------------------------------------------------------------------------------------
// Important: If you get the following error response, read further for the solution..
//
// {
// "response": {
// "errors": [
// {
// "code": "250002",
// "message": "Invalid Authentication Information."
// }
// ]
// }
// }
//
// It means you didn't add the Rating API permission to your app.
// To add the Rating API, login to your developer account and go to your Apps page at https://developer.ups.com/apps?loc=en_US
// Then edit your app and add the Rating API.
// ----------------------------------------------------------------------------------------------------------
final respStatusCode = resp.statusCode;
print('Response Status Code = $respStatusCode');
if (respStatusCode >= 400) {
print('Response Header:');
print(resp.header);
print('Failed.');
return;
}
// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)
// {
// "RateResponse": {
// "Response": {
// "ResponseStatus": {
// "Code": "s",
// "Description": "string"
// },
// "Alert": [
// {
// "Code": "string",
// "Description": "string"
// }
// ],
// "AlertDetail": [
// {
// "Code": "string",
// "Description": "string",
// "ElementLevelInformation": {
// "Level": "s",
// "ElementIdentifier": [
// {
// "Code": null,
// "Value": null
// }
// ]
// }
// }
// ],
// "TransactionReference": {
// "CustomerContext": "string"
// }
// },
// "RatedShipment": [
// {
// "Disclaimer": [
// {
// "Code": "st",
// "Description": "string"
// }
// ],
// "Service": {
// "Code": "str",
// "Description": "string"
// },
// "RateChart": "s",
// "RatedShipmentAlert": [
// {
// "Code": "string",
// "Description": "string"
// }
// ],
// "BillableWeightCalculationMethod": "st",
// "RatingMethod": "st",
// "BillingWeight": {
// "UnitOfMeasurement": {
// "Code": "str",
// "Description": "string"
// },
// "Weight": "strin"
// },
// "TransportationCharges": {
// "CurrencyCode": "str",
// "MonetaryValue": "stringstringstri"
// },
// "BaseServiceCharge": {
// "CurrencyCode": "str",
// "MonetaryValue": "stringstringstri"
// },
// "ItemizedCharges": [
// {
// "Code": "str",
// "Description": "string",
// "CurrencyCode": "str",
// "MonetaryValue": "string",
// "SubType": "string"
// }
// ],
// "FRSShipmentData": {
// "TransportationCharges": {
// "GrossCharge": {
// "CurrencyCode": "str",
// "MonetaryValue": "string"
// },
// "DiscountAmount": {
// "CurrencyCode": "str",
// "MonetaryValue": "string"
// },
// "DiscountPercentage": "st",
// "NetCharge": {
// "CurrencyCode": "str",
// "MonetaryValue": "string"
// }
// },
// "FreightDensityRate": {
// "Density": "strin",
// "TotalCubicFeet": "string"
// },
// "HandlingUnits": [
// {
// "Quantity": "string",
// "Type": {
// "Code": null,
// "Description": null
// },
// "Dimensions": {
// "UnitOfMeasurement": null,
// "Length": null,
// "Width": null,
// "Height": null
// },
// "AdjustedHeight": {
// "Value": null,
// "UnitOfMeasurement": null
// }
// }
// ]
// },
// "ServiceOptionsCharges": {
// "CurrencyCode": "str",
// "MonetaryValue": "string"
// },
// "TaxCharges": [
// {
// "Type": "string",
// "MonetaryValue": "string"
// }
// ],
// "TotalCharges": {
// "CurrencyCode": "str",
// "MonetaryValue": "string"
// },
// "TotalChargesWithTaxes": {
// "CurrencyCode": "str",
// "MonetaryValue": "string"
// },
// "NegotiatedRateCharges": {
// "ItemizedCharges": [
// {
// "Code": "str",
// "Description": "string",
// "CurrencyCode": "str",
// "MonetaryValue": "string",
// "SubType": "string"
// }
// ],
// "TaxCharges": [
// {
// "Type": "string",
// "MonetaryValue": "string"
// }
// ],
// "TotalCharge": {
// "CurrencyCode": "string",
// "MonetaryValue": "string"
// },
// "TotalChargesWithTaxes": {
// "CurrencyCode": "string",
// "MonetaryValue": "string"
// }
// },
// "RatedPackage": [
// {
// "BaseServiceCharge": {
// "CurrencyCode": "str",
// "MonetaryValue": "string"
// },
// "TransportationCharges": {
// "CurrencyCode": "string",
// "MonetaryValue": "string"
// },
// "ServiceOptionsCharges": {
// "CurrencyCode": "string",
// "MonetaryValue": "string"
// },
// "TotalCharges": {
// "CurrencyCode": "string",
// "MonetaryValue": "string"
// },
// "Weight": "string",
// "BillingWeight": {
// "UnitOfMeasurement": {
// "Code": null,
// "Description": null
// },
// "Weight": "string"
// },
// "Accessorial": [
// {
// "Code": null,
// "Description": null
// }
// ],
// "ItemizedCharges": [
// {
// "Code": null,
// "Description": null,
// "CurrencyCode": null,
// "MonetaryValue": null,
// "SubType": null
// }
// ],
// "NegotiatedCharges": {
// "ItemizedCharges": [
// null
// ]
// },
// "SimpleRate": {
// "Code": "st"
// },
// "RateModifier": [
// {
// "ModifierType": null,
// "ModifierDesc": null,
// "Amount": null
// }
// ]
// }
// ],
// "TimeInTransit": {
// "PickupDate": "stringst",
// "DocumentsOnlyIndicator": "string",
// "PackageBillType": "st",
// "ServiceSummary": {
// "Service": {
// "Description": "string"
// },
// "GuaranteedIndicator": "string",
// "Disclaimer": "string",
// "EstimatedArrival": {
// "Arrival": {
// "Date": null,
// "Time": null
// },
// "BusinessDaysInTransit": "strin",
// "Pickup": {
// "Date": null,
// "Time": null
// },
// "DayOfWeek": "string",
// "CustomerCenterCutoff": "string",
// "DelayCount": "str",
// "HolidayCount": "st",
// "RestDays": "st",
// "TotalTransitDays": "strin"
// },
// "SaturdayDelivery": "string",
// "SaturdayDeliveryDisclaimer": "string",
// "SundayDelivery": "string",
// "SundayDeliveryDisclaimer": "string"
// },
// "AutoDutyCode": "st",
// "Disclaimer": "string"
// },
// "ScheduledDeliveryDate": "string",
// "RoarRatedIndicator": "string"
// }
// ]
// }
// }
// Sample code for parsing the JSON response...
// Use the following online tool to generate parsing code from sample JSON:
// Generate Parsing Code from JSON
var level = '';
var j = 0;
var countJ = 0;
var value = '';
var serviceCode = '';
var serviceDescription = '';
var rateChart = '';
var billableWeightCalculationMethod = '';
var ratingMethod = '';
var unitOfMeasurementCode = '';
var unitOfMeasurementDescription = '';
var weight = '';
var currencyCode = '';
var monetaryValue = '';
var baseServiceChargeCurrencyCode = '';
var baseServiceChargeMonetaryValue = '';
var grossChargeCurrencyCode = '';
var grossChargeMonetaryValue = '';
var discountAmountCurrencyCode = '';
var discountAmountMonetaryValue = '';
var discountPercentage = '';
var netChargeCurrencyCode = '';
var netChargeMonetaryValue = '';
var density = '';
var totalCubicFeet = '';
var serviceOptionsChargesCurrencyCode = '';
var serviceOptionsChargesMonetaryValue = '';
var totalChargesCurrencyCode = '';
var totalChargesMonetaryValue = '';
var totalChargesWithTaxesCurrencyCode = '';
var totalChargesWithTaxesMonetaryValue = '';
var totalChargeCurrencyCode = '';
var totalChargeMonetaryValue = '';
var pickupDate = '';
var documentsOnlyIndicator = '';
var packageBillType = '';
var guaranteedIndicator = '';
var disclaimer = '';
var date = '';
var time = '';
var businessDaysInTransit = '';
var pickupTime = '';
var dayOfWeek = '';
var customerCenterCutoff = '';
var delayCount = '';
var holidayCount = '';
var restDays = '';
var totalTransitDays = '';
var saturdayDelivery = '';
var saturdayDeliveryDisclaimer = '';
var sundayDelivery = '';
var sundayDeliveryDisclaimer = '';
var autoDutyCode = '';
var timeInTransitDisclaimer = '';
var scheduledDeliveryDate = '';
var roarRatedIndicator = '';
var subType = '';
var quantity = '';
var typeCode = '';
var typeDescription = '';
var unitOfMeasurement = '';
var length = '';
var width = '';
var height = '';
var adjustedHeightValue = '';
var adjustedHeightUnitOfMeasurement = '';
var vType = '';
var transportationChargesCurrencyCode = '';
var transportationChargesMonetaryValue = '';
var billingWeightWeight = '';
var simpleRateCode = '';
var k = 0;
var countK = 0;
var modifierType = '';
var modifierDesc = '';
var amount = '';
var code = jResp.stringOf('RateResponse.Response.ResponseStatus.Code');
var description = jResp.stringOf('RateResponse.Response.ResponseStatus.Description');
final customerContext = jResp.stringOf('RateResponse.Response.TransactionReference.CustomerContext');
var i = 0;
var countI = jResp.sizeOfArray('RateResponse.Response.Alert');
while (i < countI) {
jResp.i = i;
code = jResp.stringOf('RateResponse.Response.Alert[i].Code');
description = jResp.stringOf('RateResponse.Response.Alert[i].Description');
i++;
}
i = 0;
countI = jResp.sizeOfArray('RateResponse.Response.AlertDetail');
while (i < countI) {
jResp.i = i;
code = jResp.stringOf('RateResponse.Response.AlertDetail[i].Code');
description = jResp.stringOf('RateResponse.Response.AlertDetail[i].Description');
level = jResp.stringOf('RateResponse.Response.AlertDetail[i].ElementLevelInformation.Level');
j = 0;
countJ = jResp.sizeOfArray('RateResponse.Response.AlertDetail[i].ElementLevelInformation.ElementIdentifier');
while (j < countJ) {
jResp.j = j;
code = jResp.stringOf('RateResponse.Response.AlertDetail[i].ElementLevelInformation.ElementIdentifier[j].Code');
value = jResp.stringOf('RateResponse.Response.AlertDetail[i].ElementLevelInformation.ElementIdentifier[j].Value');
j++;
}
i++;
}
i = 0;
countI = jResp.sizeOfArray('RateResponse.RatedShipment');
while (i < countI) {
jResp.i = i;
serviceCode = jResp.stringOf('RateResponse.RatedShipment[i].Service.Code');
serviceDescription = jResp.stringOf('RateResponse.RatedShipment[i].Service.Description');
rateChart = jResp.stringOf('RateResponse.RatedShipment[i].RateChart');
billableWeightCalculationMethod = jResp.stringOf('RateResponse.RatedShipment[i].BillableWeightCalculationMethod');
ratingMethod = jResp.stringOf('RateResponse.RatedShipment[i].RatingMethod');
unitOfMeasurementCode = jResp.stringOf('RateResponse.RatedShipment[i].BillingWeight.UnitOfMeasurement.Code');
unitOfMeasurementDescription = jResp.stringOf('RateResponse.RatedShipment[i].BillingWeight.UnitOfMeasurement.Description');
weight = jResp.stringOf('RateResponse.RatedShipment[i].BillingWeight.Weight');
currencyCode = jResp.stringOf('RateResponse.RatedShipment[i].TransportationCharges.CurrencyCode');
monetaryValue = jResp.stringOf('RateResponse.RatedShipment[i].TransportationCharges.MonetaryValue');
baseServiceChargeCurrencyCode = jResp.stringOf('RateResponse.RatedShipment[i].BaseServiceCharge.CurrencyCode');
baseServiceChargeMonetaryValue = jResp.stringOf('RateResponse.RatedShipment[i].BaseServiceCharge.MonetaryValue');
grossChargeCurrencyCode = jResp.stringOf('RateResponse.RatedShipment[i].FRSShipmentData.TransportationCharges.GrossCharge.CurrencyCode');
grossChargeMonetaryValue = jResp.stringOf('RateResponse.RatedShipment[i].FRSShipmentData.TransportationCharges.GrossCharge.MonetaryValue');
discountAmountCurrencyCode = jResp.stringOf('RateResponse.RatedShipment[i].FRSShipmentData.TransportationCharges.DiscountAmount.CurrencyCode');
discountAmountMonetaryValue = jResp.stringOf('RateResponse.RatedShipment[i].FRSShipmentData.TransportationCharges.DiscountAmount.MonetaryValue');
discountPercentage = jResp.stringOf('RateResponse.RatedShipment[i].FRSShipmentData.TransportationCharges.DiscountPercentage');
netChargeCurrencyCode = jResp.stringOf('RateResponse.RatedShipment[i].FRSShipmentData.TransportationCharges.NetCharge.CurrencyCode');
netChargeMonetaryValue = jResp.stringOf('RateResponse.RatedShipment[i].FRSShipmentData.TransportationCharges.NetCharge.MonetaryValue');
density = jResp.stringOf('RateResponse.RatedShipment[i].FRSShipmentData.FreightDensityRate.Density');
totalCubicFeet = jResp.stringOf('RateResponse.RatedShipment[i].FRSShipmentData.FreightDensityRate.TotalCubicFeet');
serviceOptionsChargesCurrencyCode = jResp.stringOf('RateResponse.RatedShipment[i].ServiceOptionsCharges.CurrencyCode');
serviceOptionsChargesMonetaryValue = jResp.stringOf('RateResponse.RatedShipment[i].ServiceOptionsCharges.MonetaryValue');
totalChargesCurrencyCode = jResp.stringOf('RateResponse.RatedShipment[i].TotalCharges.CurrencyCode');
totalChargesMonetaryValue = jResp.stringOf('RateResponse.RatedShipment[i].TotalCharges.MonetaryValue');
totalChargesWithTaxesCurrencyCode = jResp.stringOf('RateResponse.RatedShipment[i].TotalChargesWithTaxes.CurrencyCode');
totalChargesWithTaxesMonetaryValue = jResp.stringOf('RateResponse.RatedShipment[i].TotalChargesWithTaxes.MonetaryValue');
totalChargeCurrencyCode = jResp.stringOf('RateResponse.RatedShipment[i].NegotiatedRateCharges.TotalCharge.CurrencyCode');
totalChargeMonetaryValue = jResp.stringOf('RateResponse.RatedShipment[i].NegotiatedRateCharges.TotalCharge.MonetaryValue');
totalChargesWithTaxesCurrencyCode = jResp.stringOf('RateResponse.RatedShipment[i].NegotiatedRateCharges.TotalChargesWithTaxes.CurrencyCode');
totalChargesWithTaxesMonetaryValue = jResp.stringOf('RateResponse.RatedShipment[i].NegotiatedRateCharges.TotalChargesWithTaxes.MonetaryValue');
pickupDate = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.PickupDate');
documentsOnlyIndicator = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.DocumentsOnlyIndicator');
packageBillType = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.PackageBillType');
serviceDescription = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.ServiceSummary.Service.Description');
guaranteedIndicator = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.ServiceSummary.GuaranteedIndicator');
disclaimer = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.ServiceSummary.Disclaimer');
date = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.ServiceSummary.EstimatedArrival.Arrival.Date');
time = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.ServiceSummary.EstimatedArrival.Arrival.Time');
businessDaysInTransit = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.ServiceSummary.EstimatedArrival.BusinessDaysInTransit');
pickupDate = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.ServiceSummary.EstimatedArrival.Pickup.Date');
pickupTime = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.ServiceSummary.EstimatedArrival.Pickup.Time');
dayOfWeek = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.ServiceSummary.EstimatedArrival.DayOfWeek');
customerCenterCutoff = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.ServiceSummary.EstimatedArrival.CustomerCenterCutoff');
delayCount = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.ServiceSummary.EstimatedArrival.DelayCount');
holidayCount = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.ServiceSummary.EstimatedArrival.HolidayCount');
restDays = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.ServiceSummary.EstimatedArrival.RestDays');
totalTransitDays = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.ServiceSummary.EstimatedArrival.TotalTransitDays');
saturdayDelivery = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.ServiceSummary.SaturdayDelivery');
saturdayDeliveryDisclaimer = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.ServiceSummary.SaturdayDeliveryDisclaimer');
sundayDelivery = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.ServiceSummary.SundayDelivery');
sundayDeliveryDisclaimer = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.ServiceSummary.SundayDeliveryDisclaimer');
autoDutyCode = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.AutoDutyCode');
timeInTransitDisclaimer = jResp.stringOf('RateResponse.RatedShipment[i].TimeInTransit.Disclaimer');
scheduledDeliveryDate = jResp.stringOf('RateResponse.RatedShipment[i].ScheduledDeliveryDate');
roarRatedIndicator = jResp.stringOf('RateResponse.RatedShipment[i].RoarRatedIndicator');
j = 0;
countJ = jResp.sizeOfArray('RateResponse.RatedShipment[i].Disclaimer');
while (j < countJ) {
jResp.j = j;
code = jResp.stringOf('RateResponse.RatedShipment[i].Disclaimer[j].Code');
description = jResp.stringOf('RateResponse.RatedShipment[i].Disclaimer[j].Description');
j++;
}
j = 0;
countJ = jResp.sizeOfArray('RateResponse.RatedShipment[i].RatedShipmentAlert');
while (j < countJ) {
jResp.j = j;
code = jResp.stringOf('RateResponse.RatedShipment[i].RatedShipmentAlert[j].Code');
description = jResp.stringOf('RateResponse.RatedShipment[i].RatedShipmentAlert[j].Description');
j++;
}
j = 0;
countJ = jResp.sizeOfArray('RateResponse.RatedShipment[i].ItemizedCharges');
while (j < countJ) {
jResp.j = j;
code = jResp.stringOf('RateResponse.RatedShipment[i].ItemizedCharges[j].Code');
description = jResp.stringOf('RateResponse.RatedShipment[i].ItemizedCharges[j].Description');
currencyCode = jResp.stringOf('RateResponse.RatedShipment[i].ItemizedCharges[j].CurrencyCode');
monetaryValue = jResp.stringOf('RateResponse.RatedShipment[i].ItemizedCharges[j].MonetaryValue');
subType = jResp.stringOf('RateResponse.RatedShipment[i].ItemizedCharges[j].SubType');
j++;
}
j = 0;
countJ = jResp.sizeOfArray('RateResponse.RatedShipment[i].FRSShipmentData.HandlingUnits');
while (j < countJ) {
jResp.j = j;
quantity = jResp.stringOf('RateResponse.RatedShipment[i].FRSShipmentData.HandlingUnits[j].Quantity');
typeCode = jResp.stringOf('RateResponse.RatedShipment[i].FRSShipmentData.HandlingUnits[j].Type.Code');
typeDescription = jResp.stringOf('RateResponse.RatedShipment[i].FRSShipmentData.HandlingUnits[j].Type.Description');
unitOfMeasurement = jResp.stringOf('RateResponse.RatedShipment[i].FRSShipmentData.HandlingUnits[j].Dimensions.UnitOfMeasurement');
length = jResp.stringOf('RateResponse.RatedShipment[i].FRSShipmentData.HandlingUnits[j].Dimensions.Length');
width = jResp.stringOf('RateResponse.RatedShipment[i].FRSShipmentData.HandlingUnits[j].Dimensions.Width');
height = jResp.stringOf('RateResponse.RatedShipment[i].FRSShipmentData.HandlingUnits[j].Dimensions.Height');
adjustedHeightValue = jResp.stringOf('RateResponse.RatedShipment[i].FRSShipmentData.HandlingUnits[j].AdjustedHeight.Value');
adjustedHeightUnitOfMeasurement = jResp.stringOf('RateResponse.RatedShipment[i].FRSShipmentData.HandlingUnits[j].AdjustedHeight.UnitOfMeasurement');
j++;
}
j = 0;
countJ = jResp.sizeOfArray('RateResponse.RatedShipment[i].TaxCharges');
while (j < countJ) {
jResp.j = j;
vType = jResp.stringOf('RateResponse.RatedShipment[i].TaxCharges[j].Type');
monetaryValue = jResp.stringOf('RateResponse.RatedShipment[i].TaxCharges[j].MonetaryValue');
j++;
}
j = 0;
countJ = jResp.sizeOfArray('RateResponse.RatedShipment[i].NegotiatedRateCharges.ItemizedCharges');
while (j < countJ) {
jResp.j = j;
code = jResp.stringOf('RateResponse.RatedShipment[i].NegotiatedRateCharges.ItemizedCharges[j].Code');
description = jResp.stringOf('RateResponse.RatedShipment[i].NegotiatedRateCharges.ItemizedCharges[j].Description');
currencyCode = jResp.stringOf('RateResponse.RatedShipment[i].NegotiatedRateCharges.ItemizedCharges[j].CurrencyCode');
monetaryValue = jResp.stringOf('RateResponse.RatedShipment[i].NegotiatedRateCharges.ItemizedCharges[j].MonetaryValue');
subType = jResp.stringOf('RateResponse.RatedShipment[i].NegotiatedRateCharges.ItemizedCharges[j].SubType');
j++;
}
j = 0;
countJ = jResp.sizeOfArray('RateResponse.RatedShipment[i].NegotiatedRateCharges.TaxCharges');
while (j < countJ) {
jResp.j = j;
vType = jResp.stringOf('RateResponse.RatedShipment[i].NegotiatedRateCharges.TaxCharges[j].Type');
monetaryValue = jResp.stringOf('RateResponse.RatedShipment[i].NegotiatedRateCharges.TaxCharges[j].MonetaryValue');
j++;
}
j = 0;
countJ = jResp.sizeOfArray('RateResponse.RatedShipment[i].RatedPackage');
while (j < countJ) {
jResp.j = j;
baseServiceChargeCurrencyCode = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].BaseServiceCharge.CurrencyCode');
baseServiceChargeMonetaryValue = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].BaseServiceCharge.MonetaryValue');
transportationChargesCurrencyCode = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].TransportationCharges.CurrencyCode');
transportationChargesMonetaryValue = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].TransportationCharges.MonetaryValue');
serviceOptionsChargesCurrencyCode = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].ServiceOptionsCharges.CurrencyCode');
serviceOptionsChargesMonetaryValue = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].ServiceOptionsCharges.MonetaryValue');
totalChargesCurrencyCode = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].TotalCharges.CurrencyCode');
totalChargesMonetaryValue = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].TotalCharges.MonetaryValue');
weight = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].Weight');
unitOfMeasurementCode = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].BillingWeight.UnitOfMeasurement.Code');
unitOfMeasurementDescription = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].BillingWeight.UnitOfMeasurement.Description');
billingWeightWeight = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].BillingWeight.Weight');
simpleRateCode = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].SimpleRate.Code');
k = 0;
countK = jResp.sizeOfArray('RateResponse.RatedShipment[i].RatedPackage[j].Accessorial');
while (k < countK) {
jResp.k = k;
code = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].Accessorial[k].Code');
description = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].Accessorial[k].Description');
k++;
}
k = 0;
countK = jResp.sizeOfArray('RateResponse.RatedShipment[i].RatedPackage[j].ItemizedCharges');
while (k < countK) {
jResp.k = k;
code = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].ItemizedCharges[k].Code');
description = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].ItemizedCharges[k].Description');
currencyCode = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].ItemizedCharges[k].CurrencyCode');
monetaryValue = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].ItemizedCharges[k].MonetaryValue');
subType = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].ItemizedCharges[k].SubType');
k++;
}
k = 0;
countK = jResp.sizeOfArray('RateResponse.RatedShipment[i].RatedPackage[j].NegotiatedCharges.ItemizedCharges');
while (k < countK) {
jResp.k = k;
jResp.isNullOf('RateResponse.RatedShipment[i].RatedPackage[j].NegotiatedCharges.ItemizedCharges[k]');
k++;
}
k = 0;
countK = jResp.sizeOfArray('RateResponse.RatedShipment[i].RatedPackage[j].RateModifier');
while (k < countK) {
jResp.k = k;
modifierType = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].RateModifier[k].ModifierType');
modifierDesc = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].RateModifier[k].ModifierDesc');
amount = jResp.stringOf('RateResponse.RatedShipment[i].RatedPackage[j].RateModifier[k].Amount');
k++;
}
j++;
}
i++;
}
}