Ejemplo n.º 1
0
        private void Connect()
        {
            OrganisationEndpoint = new OrganisationEndpoint(Client);

            Accounts           = new AccountsEndpoint(Client);
            Allocations        = new AllocationsEndpoint(Client);
            Attachments        = new AttachmentsEndpoint(Client);
            BankTransactions   = new BankTransactionsEndpoint(Client);
            BankTransfers      = new BankTransfersEndpoint(Client);
            BrandingThemes     = new BrandingThemesEndpoint(Client);
            Contacts           = new ContactsEndpoint(Client);
            ContactGroups      = new ContactGroupsEndpoint(Client);
            CreditNotes        = new CreditNotesEndpoint(Client);
            Currencies         = new CurrenciesEndpoint(Client);
            Employees          = new EmployeesEndpoint(Client);
            ExpenseClaims      = new ExpenseClaimsEndpoint(Client);
            Invoices           = new InvoicesEndpoint(Client);
            Items              = new ItemsEndpoint(Client);
            Journals           = new JournalsEndpoint(Client);
            ManualJournals     = new ManualJournalsEndpoint(Client);
            Payments           = new PaymentsEndpoint(Client);
            PdfFiles           = new PdfEndpoint(Client);
            Receipts           = new ReceiptsEndpoint(Client);
            RepeatingInvoices  = new RepeatingInvoicesEndpoint(Client);
            Reports            = new ReportsEndpoint(Client);
            Setup              = new SetupEndpoint(Client);
            TaxRates           = new TaxRatesEndpoint(Client);
            TrackingCategories = new TrackingCategoriesEndpoint(Client);
            Users              = new UsersEndpoint(Client);
        }
Ejemplo n.º 2
0
        public void ReturnsContactsFromDagobah()
        {
            var fromDagobah = new ContactManager(ContactsEndpoint.Find()).ContactsFromDagobah();

            Assert.True(fromDagobah.All(c => c.Addresses.First().Country == "Dagobah"));
            Assert.True(fromDagobah.First().Name == "Minch Yoda");
        }
Ejemplo n.º 3
0
        public void ReturnsContactsFromTatooine()
        {
            var fromTatooine = new ContactManager(ContactsEndpoint.Find()).ContactsFromTatooine();

            Assert.True(fromTatooine.All(c => c.Addresses.First().Country == "Tatooine"));
            Assert.True(fromTatooine.Count() == 2);
        }
Ejemplo n.º 4
0
        private void Connect()
        {
            OrganisationEndpoint = new OrganisationEndpoint(Client);

            Accounts = new AccountsEndpoint(Client);
            Allocations = new AllocationsEndpoint(Client);
            Attachments = new AttachmentsEndpoint(Client);
            BankTransactions = new BankTransactionsEndpoint(Client);
            BankTransfers = new BankTransfersEndpoint(Client);
            BrandingThemes = new BrandingThemesEndpoint(Client);
            Contacts = new ContactsEndpoint(Client);
            CreditNotes = new CreditNotesEndpoint(Client);
            Currencies = new CurrenciesEndpoint(Client);
            Employees = new EmployeesEndpoint(Client);
            ExpenseClaims = new ExpenseClaimsEndpoint(Client);
            Invoices = new InvoicesEndpoint(Client);
            Items = new ItemsEndpoint(Client);
            Journals = new JournalsEndpoint(Client);
            ManualJournals = new ManualJournalsEndpoint(Client);
            Payments = new PaymentsEndpoint(Client);
            PdfFiles = new PdfEndpoint(Client);
            Receipts = new ReceiptsEndpoint(Client);
            RepeatingInvoices = new RepeatingInvoicesEndpoint(Client);
            Reports = new ReportsEndpoint(Client);
            Setup = new SetupEndpoint(Client);
            TaxRates = new TaxRatesEndpoint(Client);
            TrackingCategories = new TrackingCategoriesEndpoint(Client);
            Users = new UsersEndpoint(Client);
        }
Ejemplo n.º 5
0
        private void Connect()
        {
            OrganisationEndpoint = new OrganisationEndpoint(Client);

            Accounts          = new AccountsEndpoint(Client);
            BankTransactions  = new BankTransactionsEndpoint(Client);
            BankTransfers     = new BankTransfersEndpoint(Client);
            BrandingThemes    = new BrandingThemesEndpoint(Client);
            Contacts          = new ContactsEndpoint(Client);
            CreditNotes       = new CreditNotesEndpoint(Client);
            Currencies        = new CurrenciesEndpoint(Client);
            Employees         = new EmployeesEndpoint(Client);
            ExpenseClaims     = new ExpenseClaimsEndpoint(Client);
            Invoices          = new InvoicesEndpoint(Client);
            Journals          = new JournalsEndpoint(Client);
            ManualJournals    = new ManualJournalsEndpoint(Client);
            Overpayments      = new OverpaymentsEndpoint(Client);
            Payments          = new PaymentsEndpoint(Client);
            PdfFiles          = new PdfEndpoint(Client);
            Prepayments       = new PrepaymentsEndpoint(Client);
            PurchaseOrders    = new PurchaseOrdersEndpoint(Client);
            Receipts          = new ReceiptsEndpoint(Client);
            RepeatingInvoices = new RepeatingInvoicesEndpoint(Client);
            TaxRates          = new TaxRatesEndpoint(Client);
            Users             = new UsersEndpoint(Client);
        }
Ejemplo n.º 6
0
        //in order to support V1 and V2 endpoints, needs both internal and external platform ids
        public IntegrationsWebAppClient(string url, string platformExternalId, string platformInternalId, bool useHttps = false)
        {
            Requester requester = new Requester($"{url}");

            //v1 endpoint
            Addresses          = new AddressesEndpoint(requester, $"/api/v1/{platformInternalId}/addresses", useHttps);
            PublishMerchandise = new PublishMerchandiseEndpoint(requester, $"/api/v1/{platformInternalId}/publishmerchandise", useHttps);
            PublishContent     = new PublishContentEndpoint(requester, $"/api/v1/{platformInternalId}/publishcontent", useHttps);
            Brands             = new BrandsEndpoint(requester, $"/api/v1/{platformInternalId}/brands", useHttps);
            Catalogs           = new CatalogsEndpoint(requester, $"/api/v1/{platformInternalId}/catalogs", useHttps);

            //V2 endpoint
            Products       = new ProductEndpoint(requester, $"/api/v2/platforms/{platformExternalId}/products", useHttps);
            Categories     = new CategoriesEndpoint(requester, $"/api/v2/platforms/{platformExternalId}/categories", useHttps);
            AccountMasters = new AccountMastersEndpoint(requester, $"/api/v2/platforms/{platformExternalId}/accountmasters", useHttps);
            PriceLists     = new PriceListsEndpoint(requester, $"/api/v2/platforms/{platformExternalId}/pricelists", useHttps);
            Offerings      = new OfferingsEndpoint(requester, $"/api/v2/platforms/{platformExternalId}/offerings", useHttps);
            Logins         = new LoginsEndpoint(requester, $"/api/v2/platforms/{platformExternalId}/logins", useHttps);
            Users          = new UsersEndpoint(requester, $"/api/v2/platforms/{platformExternalId}/users", useHttps);
            Contacts       = new ContactsEndpoint(requester, $"/api/v2/platforms/{platformExternalId}/contacts", useHttps);
        }
Ejemplo n.º 7
0
        private void Connect()
        {
            Organisations = new OrganisationEndpoint(Client);

            Accounts           = new AccountsEndpoint(Client);
            Allocations        = new AllocationsEndpoint(Client);
            Attachments        = new AttachmentsEndpoint(Client);
            BankTransactions   = new BankTransactionsEndpoint(Client);
            BankTransfers      = new BankTransfersEndpoint(Client);
            BatchPayments      = new BatchPaymentsEndpoint(Client);
            BrandingThemes     = new BrandingThemesEndpoint(Client);
            Contacts           = new ContactsEndpoint(Client);
            ContactGroups      = new ContactGroupsEndpoint(Client);
            CreditNotes        = new CreditNotesEndpoint(Client);
            Currencies         = new CurrenciesEndpoint(Client);
            Employees          = new EmployeesEndpoint(Client);
            ExpenseClaims      = new ExpenseClaimsEndpoint(Client);
            Files              = new FilesEndpoint(Client);
            Folders            = new FoldersEndpoint(Client);
            HistoryAndNotes    = new HistoryAndNotesEndpoint(Client);
            Inbox              = new InboxEndpoint(Client);
            Associations       = new AssociationsEndpoint(Client);
            Invoices           = new InvoicesEndpoint(Client);
            Items              = new ItemsEndpoint(Client);
            Journals           = new JournalsEndpoint(Client);
            LinkedTransactions = new LinkedTransactionsEndpoint(Client);
            ManualJournals     = new ManualJournalsEndpoint(Client);
            Overpayments       = new OverpaymentsEndpoint(Client);
            Payments           = new PaymentsEndpoint(Client);
            PdfFiles           = new PdfEndpoint(Client);
            Prepayments        = new PrepaymentsEndpoint(Client);
            PurchaseOrders     = new PurchaseOrdersEndpoint(Client);
            Receipts           = new ReceiptsEndpoint(Client);
            RepeatingInvoices  = new RepeatingInvoicesEndpoint(Client);
            Reports            = new ReportsEndpoint(Client);
            Setup              = new SetupEndpoint(Client);
            TaxRates           = new TaxRatesEndpoint(Client);
            TrackingCategories = new TrackingCategoriesEndpoint(Client);
            Users              = new UsersEndpoint(Client);
        }
Ejemplo n.º 8
0
        public Cin7Api(IUser user)
        {
            client = new Cin7ApiClient(new Cin7ApiSettings(), user, new RateLimiter());

            Contacts          = new ContactsEndpoint(client);
            Branches          = new BranchesEndpoint(client);
            ProductCategories = new ProductCategoriesEndpoint(client);
            Products          = new ProductsEndpoint(client);
            ProductOptions    = new ProductOptionsEndpoint(client);
            SerialNumbers     = new SerialNumbersEndpoint(client);
            SalesOrders       = new SalesOrdersEndpoint(client);
            Payments          = new PaymentsEndpoint(client);
            Quotes            = new QuotesEndpoint(client);
            PurchaseOrders    = new PurchaseOrdersEndpoint(client);
            Stock             = new StockEndpoint(client);
            BranchTransfers   = new BranchTransfersEndpoint(client);
            Adjustments       = new AdjustmentsEndpoint(client);
            Vouchers          = new VouchersEndpoint(client);
            CreditNotes       = new CreditNotesEndpoint(client);
            BomMasters        = new BomMastersEndpoint(client);
            ProductionJobs    = new ProductionJobsEndpoint(client);
            Users             = new UsersEndpoint(client);
        }