public Task <IActionResult> CommitOrderFor(SneakerProduct product) { if (product is null) { throw new ArgumentException(nameof(product)); } return(CommitOrder(product.ReferenceID, product.UniqueID)); }
public PutSneakerImagesRequest(SneakerProduct sneakerProduct) : base("/{sneakerId}/images", Method.PUT) { AddParameter("sneakerId", sneakerProduct.UniqueID, ParameterType.UrlSegment); AlwaysMultipartFormData = true; foreach (var photo in sneakerProduct.Photos) { AddFile(Path.GetFileName(photo), photo); } }
public static Proto.SneakerProduct FromNative(this SneakerProduct native) { return(new Proto.SneakerProduct { UniqueId = native.UniqueID, ReferenceId = native.ReferenceID, BrandName = native.BrandName, ModelName = native.ModelName, ModelSKU = native.ModelSKU, Description = native.Description, Color = native.Color, Price = Convert.ToDouble(native.Price), Type = native.Type.GetEnumMemberValue(), AddedAt = native.AddedAt.ToTimestamp(), Size = native.Size.FromNative(), Condition = native.Condition.GetEnumMemberValue(), ConditionIndex = Convert.ToDouble(native.ConditionIndex), Owner = native.Owner, }); }
public DeleteSneakerProductRequest(SneakerProduct sneakerProduct) : this(sneakerProduct.UniqueID) { }
public static SneakerProductViewModel ToViewModel(this SneakerProduct entity) => entity.CastExtend <SneakerProduct, SneakerProductViewModel>();
public PostSneakerProductRequest(SneakerProduct sneakerProduct) : base(string.Empty, Method.POST) { AddJsonBody(sneakerProduct); }