magentor 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.7
1
+ 0.1.8
data/lib/magento/order.rb CHANGED
@@ -84,6 +84,12 @@ module Magento
84
84
  commit('cancel', *args)
85
85
  end
86
86
 
87
+ def order_items
88
+ self.items.collect do |item|
89
+ OrderItem.new(item)
90
+ end
91
+ end
92
+
87
93
  def find_by_id(id)
88
94
  info(id)
89
95
  end
@@ -0,0 +1,13 @@
1
+ module Magento
2
+ class OrderItem < Base
3
+ class << self
4
+ def id
5
+ @attributes["item_id"]
6
+ end
7
+
8
+ def find_by_id(order_id, id)
9
+ Order.find_by_id(order_id).order_items.select{ |i| i.id == id }
10
+ end
11
+ end
12
+ end
13
+ end
data/magentor.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{magentor}
8
- s.version = "0.1.7"
8
+ s.version = "0.1.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Preston Stuteville"]
12
- s.date = %q{2010-10-06}
12
+ s.date = %q{2010-11-04}
13
13
  s.email = %q{preston.stuteville@gmail.com}
14
14
  s.extra_rdoc_files = [
15
15
  "README.rdoc"
@@ -32,6 +32,7 @@ Gem::Specification.new do |s|
32
32
  "lib/magento/inventory.rb",
33
33
  "lib/magento/invoice.rb",
34
34
  "lib/magento/order.rb",
35
+ "lib/magento/order_item.rb",
35
36
  "lib/magento/product.rb",
36
37
  "lib/magento/product_attribute.rb",
37
38
  "lib/magento/product_attribute_set.rb",
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: 21
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 7
10
- version: 0.1.7
9
+ - 8
10
+ version: 0.1.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Preston Stuteville
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-06 00:00:00 -07:00
18
+ date: 2010-11-04 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -45,6 +45,7 @@ files:
45
45
  - lib/magento/inventory.rb
46
46
  - lib/magento/invoice.rb
47
47
  - lib/magento/order.rb
48
+ - lib/magento/order_item.rb
48
49
  - lib/magento/product.rb
49
50
  - lib/magento/product_attribute.rb
50
51
  - lib/magento/product_attribute_set.rb