Update gateway.rb

update invoices method