Skip to content

VP-4236: Add Purchase Order Number #535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions VirtoCommerce.Storefront.Model/Cart/Services/ICartBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ public interface ICartBuilder
/// <returns></returns>
Task UpdateCartComment(string comment);

/// <summary>
/// Update purchase order number
/// </summary>
/// <param name="purchaseOrderNumber"></param>
/// <returns></returns>
Task UpdatePurchaseOrderNumberAsync(string purchaseOrderNumber);

/// <summary>
/// Load or created new cart for specified parameters and capture it. All next changes will be implemented on it
/// </summary>
Expand Down
8 changes: 7 additions & 1 deletion VirtoCommerce.Storefront.Model/Cart/ShoppingCart.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
Expand Down Expand Up @@ -119,6 +118,13 @@ public ShoppingCart(Currency currency, Language language)
[JsonIgnore]
public string Note => Comment;

/// <summary>
/// A Purchase Order (PO) is a document generated by the buyer in order to authorize a purchase transaction.
/// A PO Number uniquely identifies a purchase order and is generally defined by the buyer.
/// The buyer will match the PO number in the invoice to the Purchase Order.
/// </summary>
public string PurchaseOrderNumber { get; set; }

/// <summary>
/// Gets or sets the value of volumetric weight
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace VirtoCommerce.Storefront.Model.Cart
{
public class UpdatePurchaseOrderNumberRequest
{
public string PurchaseOrderNumber { get; set; }
}
}
7 changes: 7 additions & 0 deletions VirtoCommerce.Storefront.Model/Order/CustomerOrder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ public CustomerOrder(Currency currency)
/// <value>Unique user friendly document number (generate automatically based on special algorithm realization)</value>
public string Number { get; set; }

/// <summary>
/// A Purchase Order (PO) is a document generated by the buyer in order to authorize a purchase transaction.
/// A PO Number uniquely identifies a purchase order and is generally defined by the buyer.
/// The buyer will match the PO number in the invoice to the Purchase Order.
/// </summary>
public string PurchaseOrderNumber { get; set; }

/// <summary>
/// Flag can be used to refer to a specific order status in a variety of user scenarios with combination of Status\r\n (Order completion, Shipment send etc)
/// </summary>
Expand Down
8 changes: 7 additions & 1 deletion VirtoCommerce.Storefront/AutoRestClients/CartModuleApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6710,7 +6710,7 @@ public ShoppingCart()
/// <summary>
/// Initializes a new instance of the ShoppingCart class.
/// </summary>
public ShoppingCart(string name = default(string), string storeId = default(string), string channelId = default(string), bool? isAnonymous = default(bool?), string customerId = default(string), string customerName = default(string), string organizationId = default(string), string currency = default(string), string languageCode = default(string), bool? taxIncluded = default(bool?), bool? isRecuring = default(bool?), string comment = default(string), string status = default(string), string weightUnit = default(string), double? weight = default(double?), string validationType = default(string), string type = default(string), double? volumetricWeight = default(double?), double? total = default(double?), double? subTotal = default(double?), double? subTotalWithTax = default(double?), double? subTotalDiscount = default(double?), double? subTotalDiscountWithTax = default(double?), double? shippingTotal = default(double?), double? shippingTotalWithTax = default(double?), double? shippingSubTotal = default(double?), double? shippingSubTotalWithTax = default(double?), double? shippingDiscountTotal = default(double?), double? shippingDiscountTotalWithTax = default(double?), double? paymentTotal = default(double?), double? paymentTotalWithTax = default(double?), double? paymentSubTotal = default(double?), double? paymentSubTotalWithTax = default(double?), double? paymentDiscountTotal = default(double?), double? paymentDiscountTotalWithTax = default(double?), double? handlingTotal = default(double?), double? handlingTotalWithTax = default(double?), double? discountAmount = default(double?), double? discountAmountWithTax = default(double?), double? discountTotal = default(double?), double? discountTotalWithTax = default(double?), double? fee = default(double?), double? feeWithTax = default(double?), double? feeTotal = default(double?), double? feeTotalWithTax = default(double?), IList<CartAddress> addresses = default(IList<CartAddress>), IList<CartLineItem> items = default(IList<CartLineItem>), IList<Payment> payments = default(IList<Payment>), IList<CartShipment> shipments = default(IList<CartShipment>), IList<string> coupons = default(IList<string>), string coupon = default(string), IList<Discount> discounts = default(IList<Discount>), string taxType = default(string), double? taxTotal = default(double?), double? taxPercentRate = default(double?), IList<TaxDetail> taxDetails = default(IList<TaxDetail>), string objectType = default(string), IList<DynamicObjectProperty> dynamicProperties = default(IList<DynamicObjectProperty>), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))
public ShoppingCart(string name = default(string), string storeId = default(string), string channelId = default(string), bool? isAnonymous = default(bool?), string customerId = default(string), string customerName = default(string), string organizationId = default(string), string currency = default(string), string languageCode = default(string), bool? taxIncluded = default(bool?), bool? isRecuring = default(bool?), string comment = default(string), string status = default(string), string purchaseOrderNumber = default(string), string weightUnit = default(string), double? weight = default(double?), string validationType = default(string), string type = default(string), double? volumetricWeight = default(double?), double? total = default(double?), double? subTotal = default(double?), double? subTotalWithTax = default(double?), double? subTotalDiscount = default(double?), double? subTotalDiscountWithTax = default(double?), double? shippingTotal = default(double?), double? shippingTotalWithTax = default(double?), double? shippingSubTotal = default(double?), double? shippingSubTotalWithTax = default(double?), double? shippingDiscountTotal = default(double?), double? shippingDiscountTotalWithTax = default(double?), double? paymentTotal = default(double?), double? paymentTotalWithTax = default(double?), double? paymentSubTotal = default(double?), double? paymentSubTotalWithTax = default(double?), double? paymentDiscountTotal = default(double?), double? paymentDiscountTotalWithTax = default(double?), double? handlingTotal = default(double?), double? handlingTotalWithTax = default(double?), double? discountAmount = default(double?), double? discountAmountWithTax = default(double?), double? discountTotal = default(double?), double? discountTotalWithTax = default(double?), double? fee = default(double?), double? feeWithTax = default(double?), double? feeTotal = default(double?), double? feeTotalWithTax = default(double?), IList<CartAddress> addresses = default(IList<CartAddress>), IList<CartLineItem> items = default(IList<CartLineItem>), IList<Payment> payments = default(IList<Payment>), IList<CartShipment> shipments = default(IList<CartShipment>), IList<string> coupons = default(IList<string>), string coupon = default(string), IList<Discount> discounts = default(IList<Discount>), string taxType = default(string), double? taxTotal = default(double?), double? taxPercentRate = default(double?), IList<TaxDetail> taxDetails = default(IList<TaxDetail>), string objectType = default(string), IList<DynamicObjectProperty> dynamicProperties = default(IList<DynamicObjectProperty>), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))
{
Name = name;
StoreId = storeId;
Expand All @@ -6725,6 +6725,7 @@ public ShoppingCart()
IsRecuring = isRecuring;
Comment = comment;
Status = status;
PurchaseOrderNumber = purchaseOrderNumber;
WeightUnit = weightUnit;
Weight = weight;
ValidationType = validationType;
Expand Down Expand Up @@ -6848,6 +6849,11 @@ public ShoppingCart()
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "purchaseOrderNumber")]
public string PurchaseOrderNumber { get; set; }

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "weightUnit")]
Expand Down
Loading