magentor 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/magento/order.rb +3 -3
- data/lib/magento/order_item.rb +4 -4
- data/magentor.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.9
|
data/lib/magento/order.rb
CHANGED
@@ -108,16 +108,16 @@ module Magento
|
|
108
108
|
|
109
109
|
def order_items
|
110
110
|
self.items.collect do |item|
|
111
|
-
OrderItem.new(item)
|
111
|
+
Magento::OrderItem.new(item)
|
112
112
|
end
|
113
113
|
end
|
114
114
|
|
115
115
|
def shipping_address
|
116
|
-
CustomerAddress.new(@attributes["shipping_address"])
|
116
|
+
Magento::CustomerAddress.new(@attributes["shipping_address"])
|
117
117
|
end
|
118
118
|
|
119
119
|
def billing_address
|
120
|
-
CustomerAddress.new(@attributes["billing_address"])
|
120
|
+
Magento::CustomerAddress.new(@attributes["billing_address"])
|
121
121
|
end
|
122
122
|
end
|
123
123
|
end
|
data/lib/magento/order_item.rb
CHANGED
@@ -2,14 +2,14 @@ module Magento
|
|
2
2
|
class OrderItem < Base
|
3
3
|
class << self
|
4
4
|
def find_by_id(id)
|
5
|
-
Order.list.each do |order|
|
5
|
+
Magento::Order.list.each do |order|
|
6
6
|
item = Order.find_by_increment_id(order.increment_id).order_items.select{ |i| i.id == id }
|
7
7
|
return item.first if item and item.first
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
11
11
|
def find_by_order_and_id(order_id, id)
|
12
|
-
Order.find_by_id(order_id).order_items.select{ |i| i.id == id }.first
|
12
|
+
Magento::Order.find_by_id(order_id).order_items.select{ |i| i.id == id }.first
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
@@ -18,11 +18,11 @@ module Magento
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def order
|
21
|
-
Order.find_by_id(self.order_id)
|
21
|
+
Magento::Order.find_by_id(self.order_id)
|
22
22
|
end
|
23
23
|
|
24
24
|
def product
|
25
|
-
Product.find_by_id_or_sku(self.product_id)
|
25
|
+
Magento::Product.find_by_id_or_sku(self.product_id)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
data/magentor.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: magentor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 5
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 9
|
10
|
+
version: 0.2.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Preston Stuteville
|