//DTO public OrderCouponDTO ToDto() { OrderCouponDTO dto = new OrderCouponDTO(); dto.Id = this.Id; dto.StoreId = this.StoreId; dto.LastUpdatedUtc = this.LastUpdatedUtc; dto.OrderBvin = this.OrderBvin; dto.CouponCode = this.CouponCode; dto.IsUsed = this.IsUsed; dto.UserId = this.UserId; return(dto); }
public void FromDto(OrderCouponDTO dto) { if (dto == null) { return; } this.Id = dto.Id; this.StoreId = dto.StoreId; this.LastUpdatedUtc = dto.LastUpdatedUtc; this.OrderBvin = dto.OrderBvin ?? string.Empty; this.CouponCode = dto.CouponCode ?? string.Empty; this.IsUsed = dto.IsUsed; this.UserId = dto.UserId ?? string.Empty; }
/// <summary> /// Allows you to convert the current order coupon object to the DTO equivalent for use with the REST API /// </summary> /// <returns>A new instance of OrderCouponDTO</returns> public OrderCouponDTO ToDto() { var dto = new OrderCouponDTO { Id = Id, StoreId = StoreId, LastUpdatedUtc = LastUpdatedUtc, OrderBvin = OrderBvin, CouponCode = CouponCode, IsUsed = IsUsed, UserId = UserId }; return(dto); }