public static CustomerPaymentJournalFee CreateCustomerPaymentJournalFee(string dataAreaId,
                                                                                string sourceJournalBatchNumber,
                                                                                decimal sourceJournalLineNumber,
                                                                                string paymentFeeId,
                                                                                decimal amount,
                                                                                global::Microsoft.Dynamics.DataEntities.Currency currency,
                                                                                global::Microsoft.Dynamics.DataEntities.CustomerPaymentFee customerPaymentFee,
                                                                                global::Microsoft.Dynamics.DataEntities.CustomerPaymentJournalLine customerPaymentJournalLine)
        {
            CustomerPaymentJournalFee customerPaymentJournalFee = new CustomerPaymentJournalFee();

            customerPaymentJournalFee.dataAreaId = dataAreaId;
            customerPaymentJournalFee.SourceJournalBatchNumber = sourceJournalBatchNumber;
            customerPaymentJournalFee.SourceJournalLineNumber  = sourceJournalLineNumber;
            customerPaymentJournalFee.PaymentFeeId             = paymentFeeId;
            customerPaymentJournalFee.Amount = amount;
            if ((currency == null))
            {
                throw new global::System.ArgumentNullException("currency");
            }
            customerPaymentJournalFee.Currency = currency;
            if ((customerPaymentFee == null))
            {
                throw new global::System.ArgumentNullException("customerPaymentFee");
            }
            customerPaymentJournalFee.CustomerPaymentFee = customerPaymentFee;
            if ((customerPaymentJournalLine == null))
            {
                throw new global::System.ArgumentNullException("customerPaymentJournalLine");
            }
            customerPaymentJournalFee.CustomerPaymentJournalLine = customerPaymentJournalLine;
            return(customerPaymentJournalFee);
        }
 partial void OnCustomerPaymentFeeChanging(global::Microsoft.Dynamics.DataEntities.CustomerPaymentFee value);