Giter Club home page Giter Club logo

hon's Introduction

Lightspeed POS <> Orodoro

Components

  • Ruby on Rails API 6.1
  • Postgres DB
  • Heroku Scheduler

Running Locally

Pre Reqs:

Rails 6.1, Bundler 2+, Postgres, ruby 2.6.6

Steps

  1. git clone repository
  2. bundle install
  3. rails db:create
  4. rails db:migrate
  5. rails s (not needed or recommended, unless for Postman debugging)

SET Lightspeed POS API and Orodoro accounts

Access admin panel using /admin Create multiple Lightspeed POS API and Orodoro accounts from admin panel Link Lightspeed POS API accounts properly with the Orodoro account

Running tasks

  1. lib/tasks/seed.rake (compiled listing of the ones that helped me build the application)

Purpose

For V1 of this application we are polling purchase orders in Lightspeed POS and then pushing the purchase orders into Orodoro. I have written out quite a bit for the Lightspeed POS API, so that model is chunky from carrying it over to other projects where inevitably a V2 will come into the picture.

The rest is self explanatory, except for the starting point, which is Heroku scheduler. Have a look at scheduler.rake, and you will find the polling mechanism, which is the starting line for the processing of the orders. We make a subsequent read with expanding to extra params, and then sanitize the line items into an array to post to Orodoro. Orodoro needs all parameters in OroApi.sanitize_order_lines(lightspeed_order_lines).

This is the extent of the needed functionality in V1.

Heroku

  1. Get added to team account
  2. https://devcenter.heroku.com/articles/heroku-cli#download-and-install

heroku logs --tail heroku logs -n 1000 heroku run rails c heroku run rails db:migrate git push heroku master

hon's People

Contributors

shahidjutt72 avatar sergeychernyakov avatar

Watchers

 avatar  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.