Module: Recharge::HTTPRequest::Count

Includes:
Recharge::HTTPRequest
Included in:
Charge, Customer, Discount, Metafield, Order, Product
Defined in:
lib/recharge/http_request.rb

Overview

Make a count request to the included/extended class' endpoint

Arguments

[options (Hash)] Optional arguments to filter the count on.

See the appropriate count call in ReCharge's documentation for valid options.

Returns

Fixnum of the resulting count

Errors

Recharge::ConnectionError, Recharge::RequestError

Instance Method Summary collapse

Instance Method Details

#count(options = nil) ⇒ Object



119
120
121
# File 'lib/recharge/http_request.rb', line 119

def count(options = nil)
  GET(join("count"), options)["count"]
end