Module: BigcommerceAPI::Countable

Included in:
Customer, Order, Product
Defined in:
lib/bigcommerce_api/modules/countable.rb

Instance Method Summary collapse

Instance Method Details

#count(params = {}) ⇒ Object



5
6
7
8
9
# File 'lib/bigcommerce_api/modules/countable.rb', line 5

def count(params = {})

  response = BigcommerceAPI::Resource.http_request(:get, "/#{resource}/count", :query => date_adjust(params))
  (response.success? and !response.nil?) ? response['count'] : nil
end