public static PurchaseAgreementLineV2 CreatePurchaseAgreementLineV2(string dataAreaId,
                                                                            string purchaseAgreementId,
                                                                            decimal lineNumber,
                                                                            global::System.DateTimeOffset expirationDate,
                                                                            decimal committedQuantity,
                                                                            decimal priceQuantity,
                                                                            decimal minimumReleaseAmount,
                                                                            decimal price,
                                                                            global::System.DateTimeOffset effectiveDate,
                                                                            decimal lineDiscountPercentage,
                                                                            decimal maximumReleaseAmount,
                                                                            decimal committedCatchWeightQuantity,
                                                                            decimal committedAmount,
                                                                            decimal lineDiscountAmount,
                                                                            global::Microsoft.Dynamics.DataEntities.PurchaseAgreementLinesFulfillment purchaseAgreementLineFulfillment)
        {
            PurchaseAgreementLineV2 purchaseAgreementLineV2 = new PurchaseAgreementLineV2();

            purchaseAgreementLineV2.dataAreaId           = dataAreaId;
            purchaseAgreementLineV2.PurchaseAgreementId  = purchaseAgreementId;
            purchaseAgreementLineV2.LineNumber           = lineNumber;
            purchaseAgreementLineV2.ExpirationDate       = expirationDate;
            purchaseAgreementLineV2.CommittedQuantity    = committedQuantity;
            purchaseAgreementLineV2.PriceQuantity        = priceQuantity;
            purchaseAgreementLineV2.MinimumReleaseAmount = minimumReleaseAmount;
            purchaseAgreementLineV2.Price                        = price;
            purchaseAgreementLineV2.EffectiveDate                = effectiveDate;
            purchaseAgreementLineV2.LineDiscountPercentage       = lineDiscountPercentage;
            purchaseAgreementLineV2.MaximumReleaseAmount         = maximumReleaseAmount;
            purchaseAgreementLineV2.CommittedCatchWeightQuantity = committedCatchWeightQuantity;
            purchaseAgreementLineV2.CommittedAmount              = committedAmount;
            purchaseAgreementLineV2.LineDiscountAmount           = lineDiscountAmount;
            if ((purchaseAgreementLineFulfillment == null))
            {
                throw new global::System.ArgumentNullException("purchaseAgreementLineFulfillment");
            }
            purchaseAgreementLineV2.PurchaseAgreementLineFulfillment = purchaseAgreementLineFulfillment;
            return(purchaseAgreementLineV2);
        }
 partial void OnPurchaseAgreementLineFulfillmentChanging(global::Microsoft.Dynamics.DataEntities.PurchaseAgreementLinesFulfillment value);