public void VendorCreditDeleteTestUsingoAuth(ServiceContext qboContextoAuth) { //Creating the VendorCredit for Adding VendorCredit vendorCredit = QBOHelper.CreateVendorCredit(qboContextoAuth); //Adding the VendorCredit VendorCredit added = Helper.Add <VendorCredit>(qboContextoAuth, vendorCredit); //Delete the returned entity try { VendorCredit deleted = Helper.Delete <VendorCredit>(qboContextoAuth, added); } catch (IdsException ex) { } }
public void SalesReceiptBatchUsingoAuth(ServiceContext qboContextoAuth) { Dictionary <OperationEnum, object> batchEntries = new Dictionary <OperationEnum, object>(); SalesReceipt existing = Helper.FindOrAdd(qboContextoAuth, new SalesReceipt()); batchEntries.Add(OperationEnum.create, QBOHelper.CreateSalesReceipt(qboContextoAuth)); batchEntries.Add(OperationEnum.update, QBOHelper.UpdateSalesReceipt(qboContextoAuth, existing)); batchEntries.Add(OperationEnum.query, "select * from SalesReceipt"); batchEntries.Add(OperationEnum.delete, existing); ReadOnlyCollection <IntuitBatchResponse> batchResponses = Helper.Batch <SalesReceipt>(qboContextoAuth, batchEntries); }
public void SalesReceiptDeleteTestUsingoAuth(ServiceContext qboContextoAuth) { //Creating the SalesReceipt for Adding SalesReceipt salesReceipt = QBOHelper.CreateSalesReceipt(qboContextoAuth); //Adding the SalesReceipt SalesReceipt added = Helper.Add <SalesReceipt>(qboContextoAuth, salesReceipt); //Delete the returned entity try { SalesReceipt deleted = Helper.Delete <SalesReceipt>(qboContextoAuth, added); } catch (IdsException ex) { } }
public void PaymentMethodBatchUsingoAuth(ServiceContext qboContextoAuth) { Dictionary <OperationEnum, object> batchEntries = new Dictionary <OperationEnum, object>(); PaymentMethod existing = Helper.FindOrAddPaymentMethod(qboContextoAuth, "CREDIT_CARD"); batchEntries.Add(OperationEnum.create, QBOHelper.CreatePaymentMethod(qboContextoAuth)); batchEntries.Add(OperationEnum.update, QBOHelper.UpdatePaymentMethod(qboContextoAuth, existing)); batchEntries.Add(OperationEnum.query, "select * from PaymentMethod"); // batchEntries.Add(OperationEnum.delete, existing); ReadOnlyCollection <IntuitBatchResponse> batchResponses = Helper.Batch <PaymentMethod>(qboContextoAuth, batchEntries); }
public void TimeActivitySparseUpdatedAsyncTestsUsingoAuth() { //Creating the TimeActivity for Adding //TimeActivity entity = QBOHelper.CreateTimeActivity(qboContextoAuth); //Adding the TimeActivity //TimeActivity added = Helper.Add<TimeActivity>(qboContextoAuth, entity); TimeActivity added = Helper.FindOrAdd(qboContextoAuth, new TimeActivity()); //Update the TimeActivity TimeActivity updated = QBOHelper.UpdateTimeActivitySparse(qboContextoAuth, added.Id, added.SyncToken); //Call the service TimeActivity updatedReturned = Helper.UpdateAsync <TimeActivity>(qboContextoAuth, updated); //Verify updated TimeActivity QBOHelper.VerifyTimeActivitySparse(updated, updatedReturned); }
public void CompanyInfoSparseUpdateTestUsingoAuth() { ////Creating the CompanyInfo for Adding //CompanyInfo companyInfo = QBOHelper.CreateCompanyInfo(qboContextoAuth); ////Adding the CompanyInfo //CompanyInfo added = Helper.Add<CompanyInfo>(qboContextoAuth, companyInfo); List <CompanyInfo> found = Helper.FindAll <CompanyInfo>(qboContextoAuth, new CompanyInfo()); //Change the data of added entity CompanyInfo changed = QBOHelper.SparseUpdateCompanyInfo(qboContextoAuth, found[0].Id, found[0].SyncToken, found[0].CompanyName); //Update the returned entity data CompanyInfo updated = Helper.Update <CompanyInfo>(qboContextoAuth, changed);//Verify the updated CompanyInfo QBOHelper.VerifyCompanyInfoSparseUpdate(changed, updated); }
public void EstimateDeleteTestUsingoAuth(ServiceContext qboContextoAuth) { //Creating the Estimate for Adding Estimate estimate = QBOHelper.CreateEstimate(qboContextoAuth); //Adding the Estimate Estimate added = Helper.Add <Estimate>(qboContextoAuth, estimate); //Delete the returned entity try { Estimate deleted = Helper.Delete <Estimate>(qboContextoAuth, added); } catch (IdsException ex) { } }
public void CashPurchaseDeleteTestUsingoAuth(ServiceContext qboContextoAuth) { //Creating the Purchase for Adding Purchase purchase = QBOHelper.CreatePurchase(qboContextoAuth, PaymentTypeEnum.Cash); //Adding the Purchase Purchase added = Helper.Add <Purchase>(qboContextoAuth, purchase); //Delete the returned entity try { Purchase deleted = Helper.Delete <Purchase>(qboContextoAuth, added); } catch (IdsException ex) { } }
//check #endregion #region Batch public void JournalCodeBatchUsingoAuth(ServiceContext qboContextoAuth) { Dictionary <OperationEnum, object> batchEntries = new Dictionary <OperationEnum, object>(); JournalCode existing = Helper.FindOrAdd(qboContextoAuth, new JournalCode()); batchEntries.Add(OperationEnum.create, QBOHelper.CreateJournalCode(qboContextoAuth, JournalCodeTypeEnum.Expenses)); batchEntries.Add(OperationEnum.update, QBOHelper.UpdateJournalCode(qboContextoAuth, existing)); batchEntries.Add(OperationEnum.query, "select * from JournalCode"); ReadOnlyCollection <IntuitBatchResponse> batchResponses = Helper.Batch <JournalCode>(qboContextoAuth, batchEntries); }
public void PreferencesFindbyIdTestUsingoAuth() { //Creating the Preferences for Adding // Preferences preferences = QBOHelper.CreatePreferences(qboContextoAuth); //Adding the Preferences // Preferences added = Helper.Add<Preferences>(qboContextoAuth, preferences); List <Preferences> foundall = Helper.FindAll <Preferences>(qboContextoAuth, new Preferences()); Assert.IsTrue(foundall.Count > 0); foreach (Preferences found in foundall) { Preferences findbyId = Helper.FindById <Preferences>(qboContextoAuth, found); QBOHelper.VerifyPreferences(found, findbyId); } }
public void PurchaseBatchUsingoAuth(ServiceContext qboContextoAuth) { Dictionary <OperationEnum, object> batchEntries = new Dictionary <OperationEnum, object>(); Purchase existing = Helper.FindOrAdd(qboContextoAuth, new Purchase()); batchEntries.Add(OperationEnum.create, QBOHelper.CreatePurchase(qboContextoAuth, PaymentTypeEnum.Cash)); batchEntries.Add(OperationEnum.update, QBOHelper.UpdatePurchase(qboContextoAuth, existing)); batchEntries.Add(OperationEnum.query, "select * from Purchase"); batchEntries.Add(OperationEnum.delete, existing); ReadOnlyCollection <IntuitBatchResponse> batchResponses = Helper.Batch <Purchase>(qboContextoAuth, batchEntries); }
public void InvoiceVoidTestUsingoAuth(ServiceContext qboContextoAuth) { //Creating the Invoice for Adding Invoice invoice = QBOHelper.CreateInvoice(qboContextoAuth); //Adding the Invoice Invoice added = Helper.Add <Invoice>(qboContextoAuth, invoice); //Void the returned entity try { Invoice voided = Helper.Void <Invoice>(qboContextoAuth, added); } catch (IdsException ex) { } }
public void PurchaseOrderDeleteTestUsingoAuth(ServiceContext qboContextoAuth) { //Creating the PurchaseOrder for Adding PurchaseOrder purchaseOrder = QBOHelper.CreatePurchaseOrder(qboContextoAuth); //Adding the PurchaseOrder PurchaseOrder added = Helper.Add <PurchaseOrder>(qboContextoAuth, purchaseOrder); //Delete the returned entity try { PurchaseOrder deleted = Helper.Delete <PurchaseOrder>(qboContextoAuth, added); } catch (IdsException ex) { } }
public void CreditMemoDeleteTestUsingoAuth(ServiceContext qboContextoAuth) { //Creating the CreditMemo for Adding CreditMemo creditMemo = QBOHelper.CreateCreditMemo(qboContextoAuth); //Adding the CreditMemo CreditMemo added = Helper.Add <CreditMemo>(qboContextoAuth, creditMemo); //Delete the returned entity try { CreditMemo deleted = Helper.Delete <CreditMemo>(qboContextoAuth, added); } catch (IdsException ex) { } }
public void ItemDonotUpdatedaccAsyncTestsUsingoAuthFrance() { //Creating the Item for Adding Item entity = QBOHelper.CreateItemFrance(qboContextoAuth); //Adding the Item Item added = Helper.Add <Item>(qboContextoAuth, entity); //Update the Item // Item updated = QBOHelper.UpdateItem(qboContextoAuth, added); Item updated = QBOHelper.UpdateItemFrance(qboContextoAuth, added); //Call the service Item updatedReturned = Helper.DonotUpdateAccountOnTxnsAsyncFrance <Item>(qboContextoAuth, updated); //Verify updated Item QBOHelper.VerifyItemFrance(updated, updatedReturned); }
public void EstimateBatchUsingoAuth(ServiceContext qboContextoAuth) { Dictionary <OperationEnum, object> batchEntries = new Dictionary <OperationEnum, object>(); Estimate existing = Helper.FindOrAdd(qboContextoAuth, new Estimate()); batchEntries.Add(OperationEnum.create, QBOHelper.CreateEstimate(qboContextoAuth)); batchEntries.Add(OperationEnum.update, QBOHelper.UpdateEstimate(qboContextoAuth, existing)); batchEntries.Add(OperationEnum.query, "select * from Estimate"); batchEntries.Add(OperationEnum.delete, existing); ReadOnlyCollection <IntuitBatchResponse> batchResponses = Helper.Batch <Estimate>(qboContextoAuth, batchEntries); }
public void CustomerBatchUsingoAuth(ServiceContext qboContextoAuth) { Dictionary <OperationEnum, object> batchEntries = new Dictionary <OperationEnum, object>(); Customer existing = Helper.FindOrAdd(qboContextoAuth, new Customer()); batchEntries.Add(OperationEnum.create, QBOHelper.CreateCustomer(qboContextoAuth)); batchEntries.Add(OperationEnum.update, QBOHelper.UpdateCustomer(qboContextoAuth, existing)); batchEntries.Add(OperationEnum.query, "select * from Customer"); //batchEntries.Add(OperationEnum.delete, existing); ReadOnlyCollection <IntuitBatchResponse> batchResponses = Helper.Batch <Customer>(qboContextoAuth, batchEntries); }
public void TaxCodeSparseUpdateTestUsingoAuth() { //Creating the TaxCode for Adding //TaxCode taxCode = QBOHelper.CreateTaxCode(qboContextoAuth); //Adding the TaxCode TaxCode added = Helper.FindOrAdd <TaxCode>(qboContextoAuth, new TaxCode()); if (added != null) { //Change the data of added entity TaxCode changed = QBOHelper.SparseUpdateTaxCode(qboContextoAuth, added.Id, added.SyncToken); //Update the returned entity data TaxCode updated = Helper.Update <TaxCode>(qboContextoAuth, changed);//Verify the updated TaxCode QBOHelper.VerifyTaxCodeSparseUpdate(changed, updated); } }
public void TransferDeleteTestUsingoAuth(ServiceContext qboContextoAuth) { //Creating the Transfer for Adding Transfer transfer = QBOHelper.CreateTransfer(qboContextoAuth); //Adding the Transfer Transfer added = Helper.Add <Transfer>(qboContextoAuth, transfer); //Delete the returned entity try { Transfer deleted = Helper.Delete <Transfer>(qboContextoAuth, added); } catch (IdsException ex) { } }
public void PaymentVoidTestUsingoAuth() { //Creating the Payment for Adding Payment payment = QBOHelper.CreatePayment(qboContextoAuth); //Adding the Payment Payment added = Helper.Add <Payment>(qboContextoAuth, payment); try { Payment voided = Helper.Void <Payment>(qboContextoAuth, added); Assert.AreEqual(EntityStatusEnum.Voided, voided.status); } catch (IdsException ex) { Assert.Fail(); } }
public void TaxCodeUpdatedAsyncTestsUsingoAuth() { //Creating the TaxCode for Adding //TaxCode entity = QBOHelper.CreateTaxCode(qboContextoAuth); //Adding the TaxCode TaxCode added = Helper.FindOrAdd <TaxCode>(qboContextoAuth, new TaxCode()); if (added != null) { //Update the TaxCode TaxCode updated = QBOHelper.UpdateTaxCode(qboContextoAuth, added); //Call the service TaxCode updatedReturned = Helper.UpdateAsync <TaxCode>(qboContextoAuth, updated); //Verify updated TaxCode QBOHelper.VerifyTaxCode(updated, updatedReturned); } }
public void CustomerUpdateAccountOnTxnsAsyncTestUsingoAuthFrance() { //Creating the Customer for Adding Customer customer = QBOHelper.CreateCustomerFrance(qboContextoAuth); //Adding the Customer Customer added = Helper.Add <Customer>(qboContextoAuth, customer); //Change the data of added entity // Customer updated = QBOHelper.UpdateCustomer(qboContextoAuth, added); Customer updated = QBOHelper.UpdateCustomerFrance(qboContextoAuth, added); //Update the returned entity data // Customer updatedreturned = Helper.updateaccountontxnsAsync<Customer>(qboContextoAuth, updated); Customer updatedreturned = Helper.UpdateAccountOnTxnsAsyncFrance <Customer>(qboContextoAuth, updated); //Verify the updated Customer QBOHelper.VerifyCustomerFrance(updated, updatedreturned); }
public void CustomerAddTestsUsingoAuthInvalid() { try { IRequestValidator req = new OAuthRequestValidator("gjggdj", "hhh", "gjsgj", "mnv"); ServiceContext context = new ServiceContext("345", IntuitServicesType.QBO, req); //Creating the Customer for Add Customer customer = QBOHelper.CreateCustomer(context); Customer added = Helper.Add <Customer>(context, customer); Assert.Fail(); } catch (InvalidTokenException) { } }
public void CheckPurchaseAddDuplicateDocNumberGlobalTestUsingoAuth() { try { //Creating the Purchase for Add Purchase purchase = QBOHelper.CreatePurchase(qboContextoAuth, PaymentTypeEnum.Check); purchase.DocNumber = "DUPLICATE"; //Pass parameter to allow duplicate doc numbers qboContextoAuth.Include.Add("allowduplicatedocnum"); //Adding the Purchase Purchase added = Helper.Add <Purchase>(qboContextoAuth, purchase); Purchase addedDuplicate = Helper.Add <Purchase>(qboContextoAuth, purchase); //Verify the added Purchase QBOHelper.VerifyPurchase(purchase, added); } finally { qboContextoAuth.Include.Clear(); } }
[TestMethod][Ignore] //IgnoreReason: Not supported public void VendorCreditVoidTestUsingoAuth() { //Creating the VendorCredit for Adding VendorCredit vendorCredit = QBOHelper.CreateVendorCredit(qboContextoAuth); //Adding the VendorCredit VendorCredit added = Helper.Add <VendorCredit>(qboContextoAuth, vendorCredit); try { VendorCredit voided = Helper.Void <VendorCredit>(qboContextoAuth, added); Assert.AreEqual(EntityStatusEnum.Voided, voided.status); } catch (IdsException ex) { Assert.Fail(); } }
public void BillPaymentBatchUsingoAuth(ServiceContext qboContextoAuth) { Dictionary <OperationEnum, object> batchEntries = new Dictionary <OperationEnum, object>(); BillPayment entity = QBOHelper.CreateBillPaymentCheck(qboContextoAuth); BillPayment existing = Helper.Add <BillPayment>(qboContextoAuth, entity); batchEntries.Add(OperationEnum.create, QBOHelper.CreateBillPaymentCheck(qboContextoAuth)); batchEntries.Add(OperationEnum.update, QBOHelper.UpdateBillPayment(qboContextoAuth, existing)); //batchEntries.Add(OperationEnum.query, "select * from BillPayment"); //batchEntries.Add(OperationEnum.delete, existing); ReadOnlyCollection <IntuitBatchResponse> batchResponses = Helper.Batch <BillPayment>(qboContextoAuth, batchEntries); }
public void TimeActivityUpdateTestUsingoAuth() { /* * //Creating the TimeActivity for Adding * TimeActivity timeActivity = QBOHelper.CreateTimeActivity(qboContextoAuth); * //Adding the TimeActivity * TimeActivity added = Helper.Add<TimeActivity>(qboContextoAuth, timeActivity); */ TimeActivity added = Helper.FindOrAdd(qboContextoAuth, new TimeActivity()); //Change the data of added entity TimeActivity changed = QBOHelper.UpdateTimeActivity(qboContextoAuth, added); //Update the returned entity data TimeActivity updated = Helper.Update <TimeActivity>(qboContextoAuth, changed);//Verify the updated TimeActivity QBOHelper.VerifyTimeActivity(changed, updated); }
public void CompanyInfoUpdatedAsyncTestsUsingoAuth() { ////Creating the CompanyInfo for Adding //CompanyInfo companyInfo = QBOHelper.CreateCompanyInfo(qboContextoAuth); ////Adding the CompanyInfo //CompanyInfo added = Helper.Add<CompanyInfo>(qboContextoAuth, companyInfo); List <CompanyInfo> found = Helper.FindAll <CompanyInfo>(qboContextoAuth, new CompanyInfo()); //Change the data of added entity CompanyInfo changed = QBOHelper.UpdateCompanyInfo(qboContextoAuth, found[0]); //Update the returned entity data CompanyInfo updated = Helper.UpdateAsync <CompanyInfo>(qboContextoAuth, changed);//Verify the updated CompanyInfo QBOHelper.VerifyCompanyInfo(changed, updated); }
public void PriceLevelVoidTestUsingoAuth() { //Creating the entity for Adding PriceLevel entity = QBOHelper.CreatePriceLevel(qboContextoAuth); //Adding the entity PriceLevel added = Helper.Add <PriceLevel>(qboContextoAuth, entity); //Void the returned entity try { PriceLevel voided = Helper.Void <PriceLevel>(qboContextoAuth, added); Assert.AreEqual(EntityStatusEnum.Voided, voided.status); } catch (IdsException ex) { Assert.Fail(); } }
public void PriceLevelDeleteTestUsingoAuth() { //Creating the PriceLevel for Adding PriceLevel priceLevel = QBOHelper.CreatePriceLevel(qboContextoAuth); //Adding the PriceLevel PriceLevel added = Helper.Add <PriceLevel>(qboContextoAuth, priceLevel); //Delete the returned entity try { PriceLevel deleted = Helper.Delete <PriceLevel>(qboContextoAuth, added); Assert.AreEqual(EntityStatusEnum.Deleted, deleted.status); } catch (IdsException ex) { Assert.Fail(); } }