lib/pin_up/charge.rb in pin_up-0.4.2 vs lib/pin_up/charge.rb in pin_up-0.5.0

- old
+ new

@@ -2,13 +2,18 @@ ## # This class models Pin's Charges API class Charges < Base ## # Lists all of the charges for your account + # args: page (Fixnum), pagination (Boolean) # returns: a collection of charge objects + # + # if pagination is passed, access the response hash with [:response] + # and the pagination hash with [:pagination] + # # https://pin.net.au/docs/api/charges#get-charges - def self.all - build_response(auth_get('charges')) + def self.all(page=nil, pagination=false) + build_collection_response(auth_get("charges?page=#{page}"),pagination) end ## # Find a charge for your account given a token # args: token (String) \ No newline at end of file