Skip to content

Instantly share code, notes, and snippets.

@railsbridge
Created July 21, 2009 20:44
Show Gist options
  • Save railsbridge/151566 to your computer and use it in GitHub Desktop.
Save railsbridge/151566 to your computer and use it in GitHub Desktop.
def get_receipt_call(start_date, end_date, options = {})
options = {
:use_sell_date => false,
:per_page => 50,
:current_page => 1,
:paginate => false
}.merge(options)
request = build_receipt_request(start_date, end_date, options)
response = post_xml(request)
receipts = Receipt.parse(response)
wrap_array_with_pagination(receipts, response, options[:current_page], options[:per_page]) if options[:paginate]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment