/// <summary> /// Gets a <see cref="IPaymentMethod"/> from the <see cref="ExtendedDataCollection"/> /// </summary> /// <param name="extendedData"> /// The extended Data. /// </param> /// <returns> /// The payment method key. /// </returns> internal static Guid GetPaymentMethodKey(this ExtendedDataCollection extendedData) { return(!extendedData.ContainsKey(Constants.ExtendedDataKeys.PaymentMethod) ? Guid.Empty : extendedData.GetValue(Constants.ExtendedDataKeys.PaymentMethod).AsGuid()); }
/// <summary> /// True/false indicating whether or not the collection contains a ShipmentKey /// </summary> /// <param name="extendedData"> /// The extended Data. /// </param> /// <returns> /// A value indicating whether or not the extended data collection contains a shipment key. /// </returns> public static bool ContainsShipmentKey(this ExtendedDataCollection extendedData) { return(extendedData.ContainsKey(Constants.ExtendedDataKeys.ShipmentKey)); }
/// <summary> /// True/false indicating whether or not the collection contains a WarehouseCatalogKey /// </summary> /// <param name="extendedData"> /// The extended Data. /// </param> /// <returns> /// A value indicating whether or not the extended data collection contains a warehouse key. /// </returns> public static bool ContainsWarehouseCatalogKey(this ExtendedDataCollection extendedData) { return(extendedData.ContainsKey(Constants.ExtendedDataKeys.WarehouseCatalogKey)); }
/// <summary> /// True/false indicating whether or not this extended data collection contains a child serialized extended data collection /// </summary> /// <param name="extendedData"> /// The extended Data. /// </param> /// <returns> /// A value indicating whether or not this extended data collection contains a child serialized extended data collection /// </returns> public static bool ContainsExtendedDataSerialization(this ExtendedDataCollection extendedData) { return(extendedData.ContainsKey(Constants.ExtendedDataKeys.ExtendedData)); }
/// <summary> /// True/false indicating whether or not the collection contains a ProductKey /// </summary> /// <param name="extendedData"> /// The extended data. /// </param> /// <returns> /// A value indicating whether or not the extended data collection contains a version key. /// </returns> public static bool ContainsVersionKey(this ExtendedDataCollection extendedData) { return(extendedData.ContainsKey(Constants.ExtendedDataKeys.VersionKey)); }
/// <summary> /// True/false indicating whether or not the collection contains a ProductVariantKey /// </summary> /// <param name="extendedData"> /// The extended Data. /// </param> /// <returns> /// A value indicating whether or not the extended data collection contains a product variant key. /// </returns> public static bool ContainsProductVariantKey(this ExtendedDataCollection extendedData) { return(extendedData.ContainsKey(Constants.ExtendedDataKeys.ProductVariantKey)); }
/// <summary> /// The tax included in product price. /// </summary> /// <param name="extendedData"> /// The extended data. /// </param> /// <returns> /// A value indicating whether or not tax is included in the product price. /// </returns> public static bool TaxIncludedInProductPrice(this ExtendedDataCollection extendedData) { return(extendedData.ContainsKey(Constants.ExtendedDataKeys.TaxIncludedInProductPrice) && extendedData.GetValue(Constants.ExtendedDataKeys.TaxIncludedInProductPrice).AsBool()); }
/// <summary> /// The get allows validation value. /// </summary> /// <param name="extendedData"> /// The extended data. /// </param> /// <returns> /// The <see cref="bool"/>. /// </returns> internal static bool GetAllowsValidationValue(this ExtendedDataCollection extendedData) { return(!extendedData.ContainsKey(Constants.ExtendedDataKeys.LineItemAllowsValidation) || extendedData.GetValue(Constants.ExtendedDataKeys.LineItemAllowsValidation).AsBool()); }