Skip to content

Commit

Permalink
re-renamed namespace, better this way~
Browse files Browse the repository at this point in the history
  • Loading branch information
pstuteville committed Sep 24, 2010
1 parent e6aa25b commit f50244e
Show file tree
Hide file tree
Showing 23 changed files with 27 additions and 27 deletions.
8 changes: 4 additions & 4 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Magento api documentation: http://www.magentocommerce.com/support/magento_core_a
= Usage
Setup your connection to magento

Magentor::Base.connection = Magento::Connection.new({
Magento::Base.connection = Magento::Connection.new({
:username => 'username',
:api_key => 'api_key',
:host => 'magento.example.org',
Expand All @@ -17,9 +17,9 @@ Setup your connection to magento

Then get down to business

Magentor::Customer.list
Magentor::Product.info(1).sku
customer = Magentor::Customer.find(:first, {:email => 'example@magentor.ccc'})
Magento::Customer.list
Magento::Product.info(1).sku
customer = Magento::Customer.find(:first, {:email => 'example@magentor.ccc'})
customer.update_attributes({:firstname => 'duke', :lastname => 'magentor'})
customer.delete

Expand Down
2 changes: 1 addition & 1 deletion lib/magentor/base.rb → lib/magento/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# And the following instance attributes:
# * <tt>attributes</tt>: the attributes of the magento object
#
module Magentor
module Magento
class Base
attr_accessor :attributes
class << self; attr_accessor :connection end
Expand Down
2 changes: 1 addition & 1 deletion lib/magentor/category.rb → lib/magento/category.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Magentor
module Magento
# http://www.magentocommerce.com/wiki/doc/webservices-api/api/catalog_category
# 100 Requested store view not found.
# 101 Requested website not found.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Magentor
module Magento
# http://www.magentocommerce.com/wiki/doc/webservices-api/api/catalog_category_attribute
# 100 Requested store view not found.
# 101 Requested attribute not found.
Expand Down
2 changes: 1 addition & 1 deletion lib/magentor/connection.rb → lib/magento/connection.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Magentor
module Magento
class Connection
attr_accessor :client, :config, :logger
def initialize(config = {})
Expand Down
2 changes: 1 addition & 1 deletion lib/magentor/country.rb → lib/magento/country.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Magentor
module Magento
# http://www.magentocommerce.com/wiki/doc/webservices-api/api/directory_country
class Country < Base
class << self
Expand Down
2 changes: 1 addition & 1 deletion lib/magentor/customer.rb → lib/magento/customer.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Magentor
module Magento
# http://www.magentocommerce.com/wiki/doc/webservices-api/api/customer
# 100 Invalid customer data. Details in error message.
# 101 Invalid filters specified. Details in error message.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Magentor
module Magento
# http://www.magentocommerce.com/wiki/doc/webservices-api/api/customer_address
# 100 Invalid address data. Details in error message.
# 101 Customer not exists.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Magentor
module Magento
# http://www.magentocommerce.com/wiki/doc/webservices-api/api/customer_group
class CustomerGroup < Base
class << self
Expand Down
2 changes: 1 addition & 1 deletion lib/magentor/inventory.rb → lib/magento/inventory.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Magentor
module Magento
class Inventory < Base
end
end
2 changes: 1 addition & 1 deletion lib/magentor/invoice.rb → lib/magento/invoice.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Magentor
module Magento
# http://www.magentocommerce.com/wiki/doc/webservices-api/api/sales_order_invoice
# 100 Requested shipment does not exists.
# 101 Invalid filters given. Details in error message.
Expand Down
2 changes: 1 addition & 1 deletion lib/magentor/order.rb → lib/magento/order.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Magentor
module Magento
class Order < Base
# http://www.magentocommerce.com/wiki/doc/webservices-api/api/sales_order
# 100 Requested order not exists.
Expand Down
2 changes: 1 addition & 1 deletion lib/magentor/product.rb → lib/magento/product.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Magentor
module Magento
# http://www.magentocommerce.com/wiki/doc/webservices-api/api/catalog_product
# 100 Requested store view not found.
# 101 Product not exists.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Magentor
module Magento
# http://www.magentocommerce.com/wiki/doc/webservices-api/api/catalog_product_attribute
# 100 Requested store view not found.
# 101 Requested attribute not found.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Magentor
module Magento
# http://www.magentocommerce.com/wiki/doc/webservices-api/api/catalog_product_attribute_set
class ProductAttributeSet < Base
class << self
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Magentor
module Magento
# http://www.magentocommerce.com/wiki/doc/webservices-api/api/catalog_product_link
# 100 Given invalid link type.
# 101 Product not exists.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Magentor
module Magento
# http://www.magentocommerce.com/wiki/doc/webservices-api/api/catalog_product_attribute_media
# 100 Requested store view not found.
# 101 Product not exists.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Magentor
module Magento
# http://www.magentocommerce.com/wiki/doc/webservices-api/api/cataloginventory_stock_item
# 101 Product not exists.
# 102 Product inventory not updated. Details in error message.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Magentor
module Magento
# http://www.magentocommerce.com/wiki/doc/webservices-api/api/catalog_product_type
# 100 Product not exists.
# 101 Invalid data given. Details in error message.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Magentor
module Magento
# http://www.magentocommerce.com/wiki/doc/webservices-api/api/catalog_product_type
class ProductType < Base
class << self
Expand Down
2 changes: 1 addition & 1 deletion lib/magentor/region.rb → lib/magento/region.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Magentor
module Magento
# http://www.magentocommerce.com/wiki/doc/webservices-api/api/directory_region
class Region < Base
class << self
Expand Down
2 changes: 1 addition & 1 deletion lib/magentor/shipment.rb → lib/magento/shipment.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Magentor
module Magento
# http://www.magentocommerce.com/wiki/doc/webservices-api/api/sales_order_shipment
# 100 Requested shipment not exists.
# 101 Invalid filters given. Details in error message.
Expand Down
4 changes: 2 additions & 2 deletions lib/magentor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
#
# Inspiration from the Magento plugin from Tim Matheson (http://github.com/timmatheson/Magento)

require 'magentor/connection'
require 'magento/connection'

#require 'xmlrpc'
require 'xmlrpc/client'

require 'magentor/base'
require 'magento/base'

XMLRPC::Config::ENABLE_NIL_PARSER = true
XMLRPC::Config::ENABLE_NIL_CREATE = true

0 comments on commit f50244e

Please sign in to comment.