Commit 06da550a authored by Sumaiyya Burney's avatar Sumaiyya Burney

Creates PromotionDto

parent 8034f326
package com.nisum.ascend.promotions.dto;
import com.nisum.ascend.promotions.model.Promotion;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public class PromotionDto {
private String promotionId;
private String productSku;
private float discountPercentage;
private int minimumQuantity;
public static PromotionDto generateDtoFromPromotion(Promotion p) {
return new PromotionDto(p.getPromotionId(), p.getProductSku(), p.getDiscountPercentage(),
p.getMinimumQuantity());
}
public PromotionDto() {}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment