示例#1
0
 /// <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());
 }
示例#2
0
 /// <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));
 }
示例#3
0
 /// <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));
 }
示例#4
0
 /// <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));
 }
示例#5
0
 /// <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));
 }
示例#6
0
 /// <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));
 }
示例#7
0
 /// <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());
 }
示例#8
0
 /// <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());
 }