Module: Invoiced::Operations::List

Included in:
Contact, Customer, Event, Invoice, LineItem, Subscription, Transaction
Defined in:
lib/invoiced/operations/list.rb

Instance Method Summary collapse

Instance Method Details

#list(opts = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/invoiced/operations/list.rb', line 4

def list(opts={})
  response = @client.request(:get, self.endpoint(), opts)

  # build objects
  objects = Util.build_objects(self, response[:body])

        # store the metadata from the list operation
         = Invoiced::List.new(response[:headers][:link], response[:headers][:x_total_count])

  return objects, 
end