storesapp-rb 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest.txt CHANGED
@@ -5,13 +5,15 @@ lib/storesapp/resources/cart_item.rb
5
5
  lib/storesapp/resources/cart_item_property.rb
6
6
  lib/storesapp/resources/collection.rb
7
7
  lib/storesapp/resources/collection_product.rb
8
+ lib/storesapp/resources/order.rb
9
+ lib/storesapp/resources/order_item.rb
10
+ lib/storesapp/resources/order_item_property.rb
8
11
  lib/storesapp/resources/page.rb
9
12
  lib/storesapp/resources/product.rb
10
13
  lib/storesapp/resources/product_image.rb
11
14
  lib/storesapp/resources/product_property.rb
12
15
  lib/storesapp/resources/product_property_value.rb
13
16
  lib/storesapp/resources/product_variant.rb
14
- lib/storesapp/resources/user.rb
15
17
  lib/storesapp.rb
16
18
  LICENSE
17
19
  README.markdown
@@ -23,24 +23,8 @@ module StoresApp
23
23
  StoresApp::Resources::Product
24
24
  end
25
25
 
26
- def product_images
27
- StoresApp::Resources::ProductImage
28
- end
29
-
30
- def product_properties
31
- StoresApp::Resources::ProductProperty
32
- end
33
-
34
- def product_property_values
35
- StoresApp::Resources::ProductPropertyValue
36
- end
37
-
38
- def product_variants
39
- StoresApp::Resources::ProductVariant
40
- end
41
-
42
- def users
43
- StoresApp::Resources::User
26
+ def orders
27
+ StoresApp::Resources::Order
44
28
  end
45
29
 
46
30
  private
@@ -1,7 +1,7 @@
1
1
  # Allows headers in an ActiveResource::Base class
2
2
  # to be inherited by subclasses. Useful for setting
3
3
  # a User-Agent used by all resources.
4
- module Harvest
4
+ module StoresApp
5
5
  module Plugins
6
6
  module ActiveResourceInheritableHeaders
7
7
  module ClassMethods
@@ -0,0 +1,9 @@
1
+ module StoresApp
2
+ module Resources
3
+ class Order < StoresApp::StoresAppResource
4
+ def items
5
+ OrderItem.find(:all, :from => "/api/v1/orders/#{self.id}/items.xml")
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module StoresApp
2
+ module Resources
3
+ class OrderItem < StoresApp::StoresAppResource
4
+ def properties
5
+ OrderItemProperty.find(:all, :from => "/api/v1/order_items/#{self.id}/properties.xml", :params => {:order_id => self.order_id})
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,6 @@
1
+ module StoresApp
2
+ module Resources
3
+ class OrderItemProperty < StoresApp::StoresAppResource
4
+ end
5
+ end
6
+ end
@@ -1,5 +1,5 @@
1
1
  module StoresApp
2
2
  class StoresAppResource < ActiveResource::Base
3
- include Harvest::Plugins::ActiveResourceInheritableHeaders
3
+ include StoresApp::Plugins::ActiveResourceInheritableHeaders
4
4
  end
5
5
  end
data/lib/storesapp.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module StoresApp
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  ApiDomain = "storesapp.com"
4
4
 
5
5
  # Class method to load all ruby files from a given path.
@@ -23,7 +23,7 @@ StoresApp.load_all_ruby_files_from_path(PluginPath)
23
23
  require File.join(File.dirname(__FILE__), "storesapp", "base")
24
24
  require File.join(File.dirname(__FILE__), "storesapp", "stores_app_resource")
25
25
 
26
- # Shortcut for Harvest::Base.new
26
+ # Shortcut for StoresApp::Base.new
27
27
  #
28
28
  # Example:
29
29
  # StoresApp(:api_key => "asdf1234",
data/storesapp.gemspec CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "storesapp-rb"
6
- s.version = "0.1.0"
6
+ s.version = "0.1.1"
7
7
  s.authors = ["Next Feature"]
8
8
  s.summary = "A wrapper for the StoresApp Api. See http://api.storesapp.com for details."
9
9
  s.date = Date.today.to_s
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: storesapp-rb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Next Feature
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-05 00:00:00 -04:00
18
+ date: 2010-06-28 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -73,13 +73,15 @@ files:
73
73
  - lib/storesapp/resources/cart_item_property.rb
74
74
  - lib/storesapp/resources/collection.rb
75
75
  - lib/storesapp/resources/collection_product.rb
76
+ - lib/storesapp/resources/order.rb
77
+ - lib/storesapp/resources/order_item.rb
78
+ - lib/storesapp/resources/order_item_property.rb
76
79
  - lib/storesapp/resources/page.rb
77
80
  - lib/storesapp/resources/product.rb
78
81
  - lib/storesapp/resources/product_image.rb
79
82
  - lib/storesapp/resources/product_property.rb
80
83
  - lib/storesapp/resources/product_property_value.rb
81
84
  - lib/storesapp/resources/product_variant.rb
82
- - lib/storesapp/resources/user.rb
83
85
  - lib/storesapp/stores_app_resource.rb
84
86
  - storesapp.gemspec
85
87
  has_rdoc: true
@@ -1,6 +0,0 @@
1
- module StoresApp
2
- module Resources
3
- class User < StoresApp::StoresAppResource
4
- end
5
- end
6
- end