Пример #1
0
 public Shipment(Address originAddress, Address destinationAddress, List<Package> packages)
 {
     this.OriginAddress = originAddress;
     this.DestinationAddress = destinationAddress;
     this.Packages = packages.AsReadOnly();
     this._rates = new List<Rate>();
 }
Пример #2
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)
 {
     Shipment shipment = new Shipment(originAddress, destinationAddress, packages);
     return this.getRates(ref shipment);
 }