activerecord-shipworks 0.1.4 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e7e874df3cf5ae84ec5850101507851ec010c0fe7a1c8e212845099e8cbaad8
4
- data.tar.gz: dc1b3b8154af1efb5f8e92c3e030a107f7fa10282817dd0e609abb3ab66fb617
3
+ metadata.gz: 63acd83e8ed7e3e4dbce05b0141da6d86a43482373a12fc3f8d4f50610383e5f
4
+ data.tar.gz: b0b169a625baa98a9a761dbbc245a66d9ba4fc8a1fe372f5eed31ee6db4753e6
5
5
  SHA512:
6
- metadata.gz: 90ee44646ed1e8fcbffef7f826f9bdcc63cbec9e65d6db2b4f5c00016350047f7f4575f17f8951c446dcef71dd47c88547c43766dc1b15f1cd201a3ab27a4d72
7
- data.tar.gz: 29d7f3db9f76912fcf7f769fc2e7f0c95cdae2942231a6519d3c10a62cd484bfa76257ff3280615d341f4ea0ef86c666d04df676b62b0982131421a200f4cf07
6
+ metadata.gz: 218c89a1477c3d1342b2ca2c3bd1dc05806ba31484d18609fffd19e1f4f66ef7d7d270e6f9d98ffb0a88781ca6af3a565208438a7d2f2b1639a06f0a997faeed
7
+ data.tar.gz: 5bf693cb737860ff49c41e3204cdae2de6fbcefd82f77bca8a89747e64dd65973845e43064250f5ce506da2425a0360cc331b3086d33eb965cb74711ae6ba9cd
data/README.md CHANGED
@@ -22,6 +22,44 @@ You may query Shipworks data as any other ActiveRecord class:
22
22
  Shipworks::Order.order(:OrderDate).last(10)
23
23
  ```
24
24
 
25
+ ## Available Models
26
+ * Order
27
+ * OrderItem
28
+ * OrderItemAttribute
29
+ * OrderCharge
30
+ * Note
31
+ * Shipment
32
+ * Store
33
+ * UpsPackage
34
+ * User
35
+
36
+ ### ER Diagram
37
+ ```
38
+ +---------+
39
+ | |
40
+ | Store |
41
+ | |
42
+ +----+----+
43
+ |
44
+ |
45
+ |
46
+ /|\
47
+ +---------------+ +-----+-----+ +-------------+ +----------------------+
48
+ | |\ | | /| | /| |
49
+ | OrderCharge +---------+ Order +-------+ OrderItem +------+ OrderItemAttribute |
50
+ | |/ | | \| | \| |
51
+ +---------------+ +-+-------+-+ +-------------+ +----------------------+
52
+ | |
53
+ | |
54
+ | |
55
+ /|\ /|\
56
+ +--------+ +------+-+ +-+----------+ +--------------+
57
+ | | /| | | | /| |
58
+ | User +-------+ Note | | Shipment +---------+ UpsPackage |
59
+ | | \| | | | \| |
60
+ +--------+ +--------+ +------------+ +--------------+
61
+
62
+ ```
25
63
 
26
64
  ## Contributing
27
65
  Bug reports and pull requests are welcome on GitHub at https://github.com/dnswus/activerecord-shipworks.
@@ -1,5 +1,6 @@
1
1
  module Shipworks
2
2
  class Shipment < ShipworksRecord
3
3
  belongs_to :order, foreign_key: 'OrderID'
4
+ has_many :ups_packages, foreign_key: 'ShipmentID'
4
5
  end
5
6
  end
@@ -0,0 +1,5 @@
1
+ module Shipworks
2
+ class UpsPackage < ShipworksRecord
3
+ belongs_to :shipment, foreign_key: 'ShipmentID'
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module Shipworks
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-shipworks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Wu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-16 00:00:00.000000000 Z
11
+ date: 2018-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -56,6 +56,7 @@ files:
56
56
  - app/models/shipworks/shipment.rb
57
57
  - app/models/shipworks/shipworks_record.rb
58
58
  - app/models/shipworks/store.rb
59
+ - app/models/shipworks/ups_package.rb
59
60
  - app/models/shipworks/user.rb
60
61
  - lib/activerecord-shipworks.rb
61
62
  - lib/shipworks.rb