Exemple #1
0
 /// <summary>
 /// To the order shipped notification.
 /// </summary>
 /// <param name="shipmentResult">
 /// The shipment Result.
 /// </param>
 /// <param name="contacts">
 /// The contacts.
 /// </param>
 public static IShipmentResultNotifyModel ToOrderShippedNotification(this IShipmentResultNotifyModel shipmentResult, IEnumerable <string> contacts)
 {
     return(new ShipmentResultNotifyModel()
     {
         Shipment = shipmentResult.Shipment,
         Invoice = shipmentResult.Invoice,
         Contacts = contacts.ToArray()
     });
 }
Exemple #2
0
        /// <summary>
        /// Gets a collection of <see cref="IReplaceablePattern"/> for the shipment result notify model
        /// </summary>
        /// <param name="notifyModel">
        /// The <see cref="IShipmentResultNotifyModel"/>.
        /// </param>
        /// <returns>
        /// The <see cref="IEnumerable{ReplaceablePatterns}"/>.
        /// </returns>
        internal static IEnumerable <IReplaceablePattern> ReplaceablePatterns(this IShipmentResultNotifyModel notifyModel)
        {
            // TODO localization needed on pricing and datetime
            var shipment = notifyModel.Shipment;
            var patterns = new List <IReplaceablePattern>();

            patterns.AddRange(shipment.ReplaceablePatterns(notifyModel.CurrencySymbol));

            patterns.AddRange(notifyModel.Invoice.ReplaceablePatterns(notifyModel.CurrencySymbol));

            return(patterns.Where(x => x != null));
        }