コード例 #1
0
        /// <summary>
        /// Returns the rate expiry date from the returned aggregate reference.
        /// </summary>
        /// <param name="entity">Entity with an aggregate reference.</param>
        /// <returns>Rate expiry date.</returns>
        public static DateTime?GetRateExpiryDate(this IEntityWithAggregateReference entity)
        {
            var dateAsStr = GetPropertyFromAggregateReference(entity, "red");

            return(DateTime.TryParseExact(dateAsStr, "yyyyMMdd", null, DateTimeStyles.None, out var result)
                ? (DateTime?)result
                : null);
        }
コード例 #2
0
 /// <summary>
 /// Returns the price matrix code from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>Price matrix code.</returns>
 public static string GetPriceMatrixCode(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference(entity, "pmc");
コード例 #3
0
 /// <summary>
 /// Returns the inside commission from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>Inside commission.</returns>
 public static int?GetInsideCommission(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference <int?>(entity, "ic");
コード例 #4
0
 /// <summary>
 /// Returns the external seat index from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>External seat index.</returns>
 public static string GetExternalSeatIndex(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference(entity, "esei");
コード例 #5
0
 /// <summary>
 /// Returns the item performance ID from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>Item performance ID.</returns>
 public static string GetItemPerformanceId(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference(entity, "ipi");
コード例 #6
0
 /// <summary>
 /// Returns the item seat number from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>Item seat number.</returns>
 public static string GetItemSeatNumber(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference(entity, "isn");
コード例 #7
0
 /// <summary>
 /// Returns the product ID from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>Product ID.</returns>
 public static string GetProductId(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference(entity, "pi");
コード例 #8
0
 private static T GetPropertyFromAggregateReference <T>(IEntityWithAggregateReference entity, string propertyName)
 {
     return(JwtHelper.GetDecodedPropertyFromJwtString <T>(entity.AggregateReference, propertyName));
 }
コード例 #9
0
 /// <summary>
 /// Returns the office sale price value from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>Office sale price value.</returns>
 public static int?GetOfficeSalePriceValue(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference <int?>(entity, "ospv");
コード例 #10
0
 /// <summary>
 /// Returns the cost price currency from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>Cost price currency.</returns>
 public static string GetCostPriceCurrency(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference(entity, "cpc");
コード例 #11
0
 /// <summary>
 /// Checks if the aggregate reference can be correctly parsed and contains some data.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>True if the aggregate reference is valid.</returns>
 public static bool IsDataAvailableFromAggregateReference(this IEntityWithAggregateReference entity)
 => JwtHelper.CheckIfJwtStringContainsData(entity.AggregateReference);
コード例 #12
0
 /// <summary>
 /// Returns the external discount code type from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>External discount code type.</returns>
 public static string GetExternalDiscountCodeType(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference(entity, "edct");
コード例 #13
0
 /// <summary>
 /// Returns the external performance index from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>External performance index.</returns>
 public static string GetExternalPerformanceIndex(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference(entity, "epi");
コード例 #14
0
 /// <summary>
 /// Returns the external block ID from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>External block ID.</returns>
 public static string GetExternalBlockId(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference(entity, "ebi");
コード例 #15
0
 /// <summary>
 /// Returns the cost price currency from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>Shopper sale price currency.</returns>
 public static string GetShopperSalePriceCurrency(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference(entity, "sspc");
コード例 #16
0
 /// <summary>
 /// Returns the price rate version from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>Price rate version.</returns>
 public static int?GetPriceRateVersion(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference <int?>(entity, "prv");
コード例 #17
0
 /// <summary>
 /// Returns the shopper face value from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>Shopper face value.</returns>
 public static int?GetShopperFaceValue(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference <int?>(entity, "sfvv");
コード例 #18
0
 /// <summary>
 /// Returns the venue country from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>Venue country.</returns>
 public static string GetVenueCountry(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference(entity, "vc");
コード例 #19
0
 /// <summary>
 /// Returns the shopper face value currency from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>Shopper face value currency.</returns>
 public static string GetShopperFaceValueCurrency(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference(entity, "sfvc");
コード例 #20
0
 /// <summary>
 /// Returns the item row from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>Item row.</returns>
 public static string GetItemRow(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference(entity, "ir");
コード例 #21
0
 /// <summary>
 /// Returns the office to shopper sale price fx rate from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>FX rate of office to shopper sale price.</returns>
 public static int?GetOfficeToShopperSalePriceFXRate(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference <int?>(entity, "otsspfr");
コード例 #22
0
 /// <summary>
 /// Returns the item seat location description from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>Item seat location description.</returns>
 public static string GetItemSeatLocationDescription(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference(entity, "isld");
コード例 #23
0
 /// <summary>
 /// Returns the supplier to office sale price fx rate from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>FX rate of supplier to office sale price.</returns>
 public static int?GetSupplierToOfficeSalePriceFXRate(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference <int?>(entity, "stospfr");
コード例 #24
0
 /// <summary>
 /// Returns the item date from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>Item date.</returns>
 public static DateTime?GetItemDate(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference <DateTime?>(entity, "id");
コード例 #25
0
 /// <summary>
 /// Returns the external supplier ID from the returned aggregate reference.
 /// </summary>
 /// <param name="entity">Entity with an aggregate reference.</param>
 /// <returns>External supplier ID.</returns>
 public static string GetExternalSupplierId(this IEntityWithAggregateReference entity) =>
 GetPropertyFromAggregateReference(entity, "esi");