/// <summary> /// Initializes a new instance of the <see cref="Parcel" /> class. /// </summary> /// <param name="dimension">dimension.</param> /// <param name="weight">weight.</param> /// <param name="valueOfGoods">valueOfGoods.</param> /// <param name="currencyCode">Currency code as per [IOS 4217](https://en.wikipedia.org/wiki/ISO_4217).</param> public Parcel(ParcelDimension dimension = default(ParcelDimension), ParcelWeight weight = default(ParcelWeight), decimal valueOfGoods = default(decimal), string currencyCode = default(string)) { this.Dimension = dimension; this.Weight = weight; this.ValueOfGoods = valueOfGoods; this.CurrencyCode = currencyCode; }
/// <summary> /// Initializes a new instance of the <see cref="CustomsItem" /> class. /// </summary> /// <param name="brand">brand.</param> /// <param name="condition">condition.</param> /// <param name="description">description (required).</param> /// <param name="eccn">eccn.</param> /// <param name="hazmats">hazmats.</param> /// <param name="hSTariffCode">hSTariffCode.</param> /// <param name="hSTariffCodeCountry">hSTariffCodeCountry.</param> /// <param name="identifiers">identifiers.</param> /// <param name="imageURL">imageURL.</param> /// <param name="itemDimension">itemDimension.</param> /// <param name="itemId">itemId (required).</param> /// <param name="manufacturer">manufacturer.</param> /// <param name="netCostMethod">netCostMethod.</param> /// <param name="originCountryCode">originCountryCode (required).</param> /// <param name="originStateProvince">originStateProvince.</param> /// <param name="preferenceCriterion">preferenceCriterion.</param> /// <param name="producerAddress">producerAddress.</param> /// <param name="producerDetermination">producerDetermination.</param> /// <param name="producerId">producerId.</param> /// <param name="quantity">quantity (required).</param> /// <param name="quantityUOM">quantityUOM.</param> /// <param name="unitPrice">unitPrice (required).</param> /// <param name="unitWeight">unitWeight (required).</param> /// <param name="url">url.</param> public CustomsItem(string brand = default(string), string condition = default(string), string description = default(string), string eccn = default(string), List <string> hazmats = default(List <string>), string hSTariffCode = default(string), string hSTariffCodeCountry = default(string), List <CrossBorderQuotesRequestIdentifiers> identifiers = default(List <CrossBorderQuotesRequestIdentifiers>), List <string> imageURL = default(List <string>), CrossBorderQuotesRequestItemDimension itemDimension = default(CrossBorderQuotesRequestItemDimension), string itemId = default(string), string manufacturer = default(string), NetCostMethodEnum?netCostMethod = default(NetCostMethodEnum?), string originCountryCode = default(string), string originStateProvince = default(string), PreferenceCriterionEnum?preferenceCriterion = default(PreferenceCriterionEnum?), Address producerAddress = default(Address), ProducerDeterminationEnum?producerDetermination = default(ProducerDeterminationEnum?), string producerId = default(string), int quantity = default(int), string quantityUOM = default(string), decimal unitPrice = default(decimal), ParcelWeight unitWeight = default(ParcelWeight), string url = default(string)) { // to ensure "description" is required (not null) if (description == null) { throw new InvalidDataException("description is a required property for CustomsItem and cannot be null"); } else { this.Description = description; } // to ensure "itemId" is required (not null) if (itemId == null) { throw new InvalidDataException("itemId is a required property for CustomsItem and cannot be null"); } else { this.ItemId = itemId; } // to ensure "originCountryCode" is required (not null) if (originCountryCode == null) { throw new InvalidDataException("originCountryCode is a required property for CustomsItem and cannot be null"); } else { this.OriginCountryCode = originCountryCode; } // to ensure "quantity" is required (not null) if (quantity == null) { throw new InvalidDataException("quantity is a required property for CustomsItem and cannot be null"); } else { this.Quantity = quantity; } // to ensure "unitPrice" is required (not null) if (unitPrice == null) { throw new InvalidDataException("unitPrice is a required property for CustomsItem and cannot be null"); } else { this.UnitPrice = unitPrice; } // to ensure "unitWeight" is required (not null) if (unitWeight == null) { throw new InvalidDataException("unitWeight is a required property for CustomsItem and cannot be null"); } else { this.UnitWeight = unitWeight; } this.Brand = brand; this.Condition = condition; this.Eccn = eccn; this.Hazmats = hazmats; this.HSTariffCode = hSTariffCode; this.HSTariffCodeCountry = hSTariffCodeCountry; this.Identifiers = identifiers; this.ImageURL = imageURL; this.ItemDimension = itemDimension; this.ItemId = itemId; this.Manufacturer = manufacturer; this.NetCostMethod = netCostMethod; this.OriginStateProvince = originStateProvince; this.PreferenceCriterion = preferenceCriterion; this.ProducerAddress = producerAddress; this.ProducerDetermination = producerDetermination; this.ProducerId = producerId; this.QuantityUOM = quantityUOM; this.Url = url; }
/// <summary> /// Initializes a new instance of the <see cref="CustomsItem" /> class. /// </summary> /// <param name="description">description (required).</param> /// <param name="hSTariffCode">hSTariffCode.</param> /// <param name="netCostMethod">netCostMethod.</param> /// <param name="originCountryCode">originCountryCode (required).</param> /// <param name="originStateProvince">originStateProvince.</param> /// <param name="preferenceCriterion">preferenceCriterion.</param> /// <param name="producerAddress">producerAddress.</param> /// <param name="producerDetermination">producerDetermination.</param> /// <param name="producerId">producerId.</param> /// <param name="quantity">quantity (required).</param> /// <param name="quantityUOM">quantityUOM.</param> /// <param name="unitPrice">unitPrice (required).</param> /// <param name="unitWeight">unitWeight (required).</param> public CustomsItem(string description = default(string), string hSTariffCode = default(string), NetCostMethodEnum?netCostMethod = default(NetCostMethodEnum?), string originCountryCode = default(string), string originStateProvince = default(string), PreferenceCriterionEnum?preferenceCriterion = default(PreferenceCriterionEnum?), Address producerAddress = default(Address), ProducerDeterminationEnum?producerDetermination = default(ProducerDeterminationEnum?), string producerId = default(string), int quantity = default(int), string quantityUOM = default(string), decimal unitPrice = default(decimal), ParcelWeight unitWeight = default(ParcelWeight)) { // to ensure "description" is required (not null) if (description == null) { throw new InvalidDataException("description is a required property for CustomsItem and cannot be null"); } else { this.Description = description; } // to ensure "originCountryCode" is required (not null) if (originCountryCode == null) { throw new InvalidDataException("originCountryCode is a required property for CustomsItem and cannot be null"); } else { this.OriginCountryCode = originCountryCode; } // to ensure "quantity" is required (not null) if (quantity == null) { throw new InvalidDataException("quantity is a required property for CustomsItem and cannot be null"); } else { this.Quantity = quantity; } // to ensure "unitPrice" is required (not null) if (unitPrice == null) { throw new InvalidDataException("unitPrice is a required property for CustomsItem and cannot be null"); } else { this.UnitPrice = unitPrice; } // to ensure "unitWeight" is required (not null) if (unitWeight == null) { throw new InvalidDataException("unitWeight is a required property for CustomsItem and cannot be null"); } else { this.UnitWeight = unitWeight; } this.HSTariffCode = hSTariffCode; this.NetCostMethod = netCostMethod; this.OriginStateProvince = originStateProvince; this.PreferenceCriterion = preferenceCriterion; this.ProducerAddress = producerAddress; this.ProducerDetermination = producerDetermination; this.ProducerId = producerId; this.QuantityUOM = quantityUOM; }
/// <summary> /// Initializes a new instance of the <see cref="Rate" /> class. /// </summary> /// <param name="alternateBaseCharge">alternateBaseCharge.</param> /// <param name="alternateTotalCharge">alternateTotalCharge.</param> /// <param name="baseCharge">baseCharge.</param> /// <param name="baseChargeTaxes">baseChargeTaxes.</param> /// <param name="carrier">carrier (required).</param> /// <param name="currencyCode">ISO-4217.</param> /// <param name="deliveryCommitment">deliveryCommitment.</param> /// <param name="destinationZone">destinationZone.</param> /// <param name="dimensionalWeight">dimensionalWeight.</param> /// <param name="discounts">discounts.</param> /// <param name="inductionPostalCode">inductionPostalCode.</param> /// <param name="parcelType">parcelType (required).</param> /// <param name="rateTypeId">rateTypeId.</param> /// <param name="serviceId">serviceId.</param> /// <param name="specialServices">specialServices.</param> /// <param name="surcharges">surcharges.</param> /// <param name="totalCarrierCharge">totalCarrierCharge.</param> /// <param name="totalTaxAmount">totalTaxAmount.</param> public Rate(decimal alternateBaseCharge = default(decimal), decimal alternateTotalCharge = default(decimal), decimal baseCharge = default(decimal), List <Tax> baseChargeTaxes = default(List <Tax>), Carrier carrier = default(Carrier), string currencyCode = default(string), DeliveryCommitment deliveryCommitment = default(DeliveryCommitment), decimal destinationZone = default(decimal), ParcelWeight dimensionalWeight = default(ParcelWeight), List <Discount> discounts = default(List <Discount>), string inductionPostalCode = default(string), ParcelType parcelType = default(ParcelType), string rateTypeId = default(string), Services?serviceId = default(Services?), List <SpecialService> specialServices = default(List <SpecialService>), List <Surcharge> surcharges = default(List <Surcharge>), decimal totalCarrierCharge = default(decimal), decimal totalTaxAmount = default(decimal)) { // to ensure "carrier" is required (not null) if (carrier == null) { throw new InvalidDataException("carrier is a required property for Rate and cannot be null"); } else { this.Carrier = carrier; } // to ensure "parcelType" is required (not null) if (parcelType == null) { throw new InvalidDataException("parcelType is a required property for Rate and cannot be null"); } else { this.ParcelType = parcelType; } this.AlternateBaseCharge = alternateBaseCharge; this.AlternateTotalCharge = alternateTotalCharge; this.BaseCharge = baseCharge; this.BaseChargeTaxes = baseChargeTaxes; this.CurrencyCode = currencyCode; this.DeliveryCommitment = deliveryCommitment; this.DestinationZone = destinationZone; this.DimensionalWeight = dimensionalWeight; this.Discounts = discounts; this.InductionPostalCode = inductionPostalCode; this.RateTypeId = rateTypeId; this.ServiceId = serviceId; this.SpecialServices = specialServices; this.Surcharges = surcharges; this.TotalCarrierCharge = totalCarrierCharge; this.TotalTaxAmount = totalTaxAmount; }