Git Product home page Git Product logo

magentoaccess's Introduction

MagentoAccess is .NET wrapper around Magento API was created to simplify and speed up working with it.

Supported versions

MagentoAccess tested with these Magento versions.

Community Edition

  • 1.7.0.2
  • 1.8.1.0
  • 1.9.0.1
  • 1.9.1.0
  • 1.9.2.0
  • 1.9.2.1
  • 1.9.2.2
  • 1.9.2.3
  • 1.9.2.4
  • 1.9.3.1
  • 2.0.2
  • 2.0.4
  • 2.0.5
  • 2.0.6
  • 2.0.7
  • 2.0.8
  • 2.0.9
  • 2.0.10
  • 2.0.11
  • 2.0.13
  • 2.1.0
  • 2.1.1
  • 2.1.2
  • 2.1.3
  • 2.1.5

Enterprise Edition

  • 1.14.1.0

Getting Started

Install the NuGet package.

Create service and get products from Magento

For most of magento versions SoapApiUser, SoapApiKey, StoreUrl will be enough (set other parameters as empty strings). MagentoAccess interacts with store through SOAP ( REST supported only for Magento 2), WS-I compliance should be turned on.

			var servicesFactory = new MagentoFactory();

			var magentoService = servicesFactory.CreateService(new MagentoAuthenticatedUserCredentials( "n/a", "n/a", "https://www.youstore.com", "n/a", "n/a", "User", "Password", 4, 1800000, false ), new MagentoConfig() { EditionByDefault = "ce", VersionByDefault = "2.1.0.0", Protocol = MagentoDefaultProtocol.SoapOnly } ); // 2.1.0.0. used instead of 2.1.0 for back compatibility with magento 1.x.x.x

			// Call only if you are not sure about your magento store version specified in CreateService.
			// Here magentoService will try to determine your store version and configure itself to work with your store.
			// This may take few minutes.
			var magentoVersion = await magentoService.DetermineMagentoVersionAndSetupServiceAsync();

			var magentoInventory = await magentoService.GetProductsAsync();

Other methods to work with Magento

To work with magento store you should use public class MagentoService : IMagentoService. Here you can see all methods to work with store.

  public interface IMagentoService
  {
    MagentoService.SaveAccessToken AfterGettingToken { get; set; }

    TransmitVerificationCodeDelegate TransmitVerificationCode { get; set; }

    Func<string> AdditionalLogInfo { get; set; }

    Task<IEnumerable<Order>> GetOrdersAsync(DateTime dateFrom, DateTime dateTo);

    Task<IEnumerable<Order>> GetOrdersAsync();

    Task UpdateInventoryAsync(IEnumerable<Inventory> products);

    Task<IEnumerable<Product>> GetProductsSimpleAsync();

    Task<IEnumerable<Product>> GetProductsAsync(bool includeDetails = false);

    VerificationData RequestVerificationUri();

    void PopulateAccessTokenAndAccessTokenSecret(string verificationCode, string requestToken, string requestTokenSecret);

    Task<PingSoapInfo> PingSoapAsync(Mark mark = null);

    Task<PingRestInfo> PingRestAsync();

    Task UpdateInventoryBySkuAsync(IEnumerable<InventoryBySku> inventory);

    Task<IEnumerable<CreateProductModelResult>> CreateProductAsync(IEnumerable<CreateProductModel> models);

    Task<IEnumerable<DeleteProductModelResult>> DeleteProductAsync(IEnumerable<DeleteProductModel> models);

    Task<IEnumerable<CreateOrderModelResult>> CreateOrderAsync(IEnumerable<CreateOrderModel> models);

    Task<IEnumerable<Order>> GetOrdersAsync(IEnumerable<string> orderIds);

    Task<IEnumerable<Product>> FillProductsDetailsAsync(IEnumerable<Product> products);

    Task<IEnumerable<PingSoapInfo>> DetermineMagentoVersionAsync(Mark mark = null);

    Task<PingSoapInfo> DetermineMagentoVersionAndSetupServiceAsync(Mark mark = null);
  }

magentoaccess's People

Contributors

maximkitsenko avatar sshumer avatar slav avatar svines avatar chris-skuvault avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.