예제 #1
0
        /// <summary>
        /// Map from Eagle's TransactionModel to settlement service transaction model
        /// </summary>
        /// <param name="transactionModel"></param>
        /// <returns></returns>
        public static SettlementServiceContract.Transaction MapToServiceTransaction(TransactionModel transactionModel)
        {
            SettlementService.Transaction transaction = new SettlementServiceContract.Transaction()
                       {
                           Customer = CreateServiceContractCustomer(transactionModel),
                           CurrencyCode = transactionModel.CurrencyCode,
                           MerchantID = transactionModel.MerchantId,
                           MerchantShortname = transactionModel.MerchantShortname,
                           MerchantReferenceCode = transactionModel.MerchantReferenceCode,
                           ServerTransactionID = transactionModel.ServerTransactionId,
                           StartDate = transactionModel.StartDate,
                           EndDate = transactionModel.EndDate,
                           BusinessAccountType = transactionModel.BusinessAccountType,
                           FinancialDetails = CreateFinancialDetails(transactionModel),
                           PartnerOrderNumber = transactionModel.PartnerOrderNumber,
                           BookingReferenceNumber = transactionModel.BookingReferenceNumber,
                           ReservationID = transactionModel.ReservationId,
                           TransactonDate = transactionModel.TransactonDate,
                           ID = transactionModel.Id,
                           MovedStartDate = transactionModel.MovedStartDate,
                           MovedEndDate = transactionModel.MovedEndDate,
                           ScenarioType = MapToSettlementServiceContractScenarioTypes(transactionModel.ScenarioType),
                           ProviderReferenceCode = transactionModel.ProviderReferenceCode,
                           ProviderShortname = transactionModel.ProviderShortname,
                           DistributorShortName = transactionModel.DistributorShortName,
                           SupplyPartnerReferenceCode = transactionModel.SupplyPartnerReferenceCode,
                           DistributorReferenceCode = transactionModel.DistributorReferenceCode,
                           CardType = transactionModel.CardType,
                           PayPalApplied = transactionModel.PayPalApplied,
                           ReservationStatus = MapToSettlementServiceContractReservationStatusTypes(transactionModel.ReservationStatus),
                           ReservedProducts = CreateServiceContractReservedProducts(transactionModel.ReservedProducts),
                           TransactionLineItems = CreateServiceContractTransactionLineItems(transactionModel.TransactionLineItems)
                       };

            // only set if it has a date, otherwise empty cancel line will show up in settlement
            if (transactionModel.CancellationDate.HasValue)
            {
                transaction.CancellationDate = transactionModel.CancellationDate.Value;
            }

            return transaction;
        }
예제 #2
0
파일: Reference.cs 프로젝트: ognjenm/egle
 public bool StoreTransactions(Transaction[] transactions, string progressNotes) {
     object[] results = this.Invoke("StoreTransactions", new object[] {
                 transactions,
                 progressNotes});
     return ((bool)(results[0]));
 }
예제 #3
0
파일: Reference.cs 프로젝트: ognjenm/egle
 /// <remarks/>
 public void StoreTransactionsAsync(Transaction[] transactions, string progressNotes, object userState) {
     if ((this.StoreTransactionsOperationCompleted == null)) {
         this.StoreTransactionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnStoreTransactionsOperationCompleted);
     }
     this.InvokeAsync("StoreTransactions", new object[] {
                 transactions,
                 progressNotes}, this.StoreTransactionsOperationCompleted, userState);
 }
예제 #4
0
파일: Reference.cs 프로젝트: ognjenm/egle
 /// <remarks/>
 public void StoreTransactionsAsync(Transaction[] transactions, string progressNotes) {
     this.StoreTransactionsAsync(transactions, progressNotes, null);
 }
예제 #5
0
 /// <summary>
 /// Push to Settlement Service updated eagle's transaction information
 /// </summary>
 /// <param name="transactionModel">BusinessModel.Settlement.TransactionModel</param>
 /// <returns>True if call succeeds, false otherwise</returns>
 public bool StoreTransaction(BusinessModel.Settlement.TransactionModel transactionModel)
 {
     var transactions = new SettlementServiceContract.Transaction[] { SettlementMapper.MapToServiceTransaction(transactionModel) };
     return serviceReplicatorProxy.StoreTransactions(transactions, PROGRESS_NOTES);
 }