/// <summary>
 /// Initializes a new instance of the <see cref="MerchantChannelLabelShipmentRequest" /> class.
 /// </summary>
 /// <param name="dimensions">dimensions (required).</param>
 /// <param name="weight">weight (required).</param>
 /// <param name="channelMethodCode">channelMethodCode (required).</param>
 /// <param name="merchantShipmentNo">The unique shipment reference used by the Merchant. (required).</param>
 /// <param name="merchantOrderNo">The unique order reference used by the Merchant. (required).</param>
 /// <param name="shippedFromCountryCode">The code of the country from where the package is being shipped..</param>
 /// <param name="lines">lines (required).</param>
 public MerchantChannelLabelShipmentRequest(MerchantShipmentPackageDimensionsRequest dimensions = default(MerchantShipmentPackageDimensionsRequest), MerchantShipmentPackageWeightRequest weight = default(MerchantShipmentPackageWeightRequest), string channelMethodCode = default(string), string merchantShipmentNo = default(string), string merchantOrderNo = default(string), string shippedFromCountryCode = default(string), List <MerchantShipmentLineRequest> lines = default(List <MerchantShipmentLineRequest>))
 {
     // to ensure "dimensions" is required (not null)
     if (dimensions == null)
     {
         throw new ArgumentNullException("dimensions is a required property for MerchantChannelLabelShipmentRequest and cannot be null");
     }
     this.Dimensions = dimensions;
     // to ensure "weight" is required (not null)
     if (weight == null)
     {
         throw new ArgumentNullException("weight is a required property for MerchantChannelLabelShipmentRequest and cannot be null");
     }
     this.Weight = weight;
     // to ensure "channelMethodCode" is required (not null)
     if (channelMethodCode == null)
     {
         throw new ArgumentNullException("channelMethodCode is a required property for MerchantChannelLabelShipmentRequest and cannot be null");
     }
     this.ChannelMethodCode = channelMethodCode;
     // to ensure "merchantShipmentNo" is required (not null)
     if (merchantShipmentNo == null)
     {
         throw new ArgumentNullException("merchantShipmentNo is a required property for MerchantChannelLabelShipmentRequest and cannot be null");
     }
     this.MerchantShipmentNo = merchantShipmentNo;
     // to ensure "merchantOrderNo" is required (not null)
     if (merchantOrderNo == null)
     {
         throw new ArgumentNullException("merchantOrderNo is a required property for MerchantChannelLabelShipmentRequest and cannot be null");
     }
     this.MerchantOrderNo = merchantOrderNo;
     // to ensure "lines" is required (not null)
     if (lines == null)
     {
         throw new ArgumentNullException("lines is a required property for MerchantChannelLabelShipmentRequest and cannot be null");
     }
     this.Lines = lines;
     this.ShippedFromCountryCode = shippedFromCountryCode;
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MerchantShipmentLabelCarrierRequest" /> class.
 /// </summary>
 /// <param name="lines">lines (required).</param>
 /// <param name="dimensions">dimensions (required).</param>
 /// <param name="weight">weight (required).</param>
 public MerchantShipmentLabelCarrierRequest(List <MerchantShipmentLineRequest> lines = default(List <MerchantShipmentLineRequest>), MerchantShipmentPackageDimensionsRequest dimensions = default(MerchantShipmentPackageDimensionsRequest), MerchantShipmentPackageWeightRequest weight = default(MerchantShipmentPackageWeightRequest))
 {
     // to ensure "lines" is required (not null)
     if (lines == null)
     {
         throw new ArgumentNullException("lines is a required property for MerchantShipmentLabelCarrierRequest and cannot be null");
     }
     this.Lines = lines;
     // to ensure "dimensions" is required (not null)
     if (dimensions == null)
     {
         throw new ArgumentNullException("dimensions is a required property for MerchantShipmentLabelCarrierRequest and cannot be null");
     }
     this.Dimensions = dimensions;
     // to ensure "weight" is required (not null)
     if (weight == null)
     {
         throw new ArgumentNullException("weight is a required property for MerchantShipmentLabelCarrierRequest and cannot be null");
     }
     this.Weight = weight;
 }