No commit activity in last 3 years
No release in over 3 years
ActiveRecord for Shipworks.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

ActiveRecord Shipworks

This gem allows you to read Shipworks data via ActiveRecord in a isolated namespace Shipworks.

Installation

Add this line to your application's Gemfile:

gem 'activerecord-shipworks'

And then execute:

$ bundle

ActiveRecord Shipworks uses the main database connection by default. However, in most of the cases, you want to connect to Shipworks as a second database connection. You could do that by setting ENV['SHIPWORKS_DATABASE_URL] by using a configuration file called config/shipworks_database.yml.

Usage

You may query Shipworks data as any other ActiveRecord class:

# Last 10 orders
Shipworks::Order.order(:OrderDate).last(10)

Available Models

  • Order
  • OrderItem
  • OrderItemAttribute
  • OrderCharge
  • Note
  • Shipment
  • Store
  • UpsPackage
  • User

ER Diagram

                     +---------+ +---------------+  +-------------------+
                     |         | |               |  |                   |
                     |  Store  | |  AmazonOrder  |  |  AmazonOrderItem  |
                     |         | |               |  |                   |
                     +-------+-+ +-+-------------+  +---+---------------+
                             |     |                    |
                             |     |                    |
                             |     |                    |
                            /|\    |                    |
+---------------+         +--+-----+--+       +---------+---+      +----------------------+
|               |\        |           |      /|             |     /|                      |
|  OrderCharge  +---------+   Order   +-------+  OrderItem  +------+  OrderItemAttribute  |
|               |/        |           |      \|             |     \|                      |
+---------------+         +-+-------+-+       +-------------+      +----------------------+
                            |       |
                            |       |
                            |       |
                           /|\     /|\
    +--------+       +------+-+   +-+----------+         +--------------+
    |        |      /|        |   |            |        /|              |
    |  User  +-------+  Note  |   |  Shipment  +---------+  UpsPackage  |
    |        |      \|        |   |            |        \|              |
    +--------+       +--------+   +------------+         +--------------+

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/dnswus/activerecord-shipworks.

License

The gem is available as open source under the terms of the MIT License.