lib/jortt/client/customers.rb in jortt-4.1.0 vs lib/jortt/client/customers.rb in jortt-4.2.0

- old
+ new

@@ -17,9 +17,21 @@ password: config.api_key, ) end ## + # Returns all customers using the GET /customers/all endpoint. + # + # @example + # Jortt::Client.customers.all(page: 3, per_page: 10) + # + def all(page: 1, per_page: 50) + resource['all'].get(params: {page: page, per_page: per_page}) do |res| + JSON.parse(res.body) + end + end + + ## # Creates a Customer using the POST /customers endpoint. # See https://app.jortt.nl/api-documentatie#klant-aanmaken # # @example # Jortt::Client.customers.create(