Exemplo n.º 1
0
 public Shipment(Address originAddress, Address destinationAddress, List<Package> packages)
 {
     OriginAddress = originAddress;
     DestinationAddress = destinationAddress;
     Packages = packages.AsReadOnly();
     _rates = new List<Rate>();
 }
Exemplo n.º 2
0
 /// <summary>
 ///     Retrieves rates for all of the specified providers using the specified address and package information.
 /// </summary>
 /// <param name="originAddress">An instance of <see cref="Address" /> specifying the origin of the shipment.</param>
 /// <param name="destinationAddress">An instance of <see cref="Address" /> specifying the destination of the shipment.</param>
 /// <param name="package">An instance of <see cref="Package" /> specifying the package to be rated.</param>
 /// <returns>A <see cref="Shipment" /> instance containing all returned rates.</returns>
 public Shipment GetRates(Address originAddress, Address destinationAddress, Package package)
 {
     return GetRates(originAddress, destinationAddress, new List<Package> {package});
 }
Exemplo n.º 3
0
 /// <summary>
 ///     Retrieves rates for all of the specified providers using the specified address and packages information.
 /// </summary>
 /// <param name="originAddress">An instance of <see cref="Address" /> specifying the origin of the shipment.</param>
 /// <param name="destinationAddress">An instance of <see cref="Address" /> specifying the destination of the shipment.</param>
 /// <param name="packages">An instance of <see cref="PackageCollection" /> specifying the packages to be rated.</param>
 /// <returns>A <see cref="Shipment" /> instance containing all returned rates.</returns>
 public Shipment GetRates(Address originAddress, Address destinationAddress, List<Package> packages)
 {
     var shipment = new Shipment(originAddress, destinationAddress, packages) {RateAdjusters = _adjusters};
     return getRates(ref shipment);
 }