Sha256: f9cd621a0c1b6cc6bc3d39bdd00dbc00659ac3f809985a26d51ddda2df8b293c

Contents?: true

Size: 560 Bytes

Versions: 2

Compression:

Stored size: 560 Bytes

Contents

module Magento
  # http://www.magentocommerce.com/wiki/doc/webservices-api/api/directory_region
  class Region < Base
    class << self
      # directory_region.list
      # List of regions in specified country
      # 
      # Return: array
      # 
      # Arguments:
      # 
      # string $country - Country code in ISO2 or ISO3
      def list(*args)
        results = commit("list", *args)
        results.collect do |result|
          new(result)
        end
      end
      
      def find_by_country(iso)
        list(iso)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
magentor-0.1.2 lib/magento/region.rb
magentor-0.1.0 lib/magento/region.rb