Module: Square::APIOperations::List

Included in:
BankAccount, Category, Discount, Fee, Inventory, Item, Payment, Refund, Settlement, Webhook
Defined in:
lib/square/api_operations/list.rb

Instance Method Summary collapse

Instance Method Details

#list(params = {}) ⇒ Square::ListResponse

List resource.

Parameters:

  • params (Hash) (defaults to: {})

    Hash of query params. Optional.

Returns:



9
10
11
12
13
14
15
16
17
18
# File 'lib/square/api_operations/list.rb', line 9

def list(params = {})
  # The list endpoint makes use of the ListResponse to handle paging.
  response = Square.make_request(
    method: 'GET',
    endpoint: self.generate_endpoint_url,
    params: params
  )

  Square::ListResponse.new(response, @data_type)
end