Sha256: fba9aa035776e2697fc28af3a30965cb17345c818d51309803bf1df1eb353301

Contents?: true

Size: 665 Bytes

Versions: 10

Compression:

Stored size: 665 Bytes

Contents

# frozen_string_literal: true

module Stripe
  module APIOperations
    module List
      def list(filters = {}, opts = {})
        opts = Util.normalize_opts(opts)

        resp, opts = request(:get, resource_url, filters, opts)
        obj = ListObject.construct_from(resp.data, opts)

        # set filters so that we can fetch the same limit, expansions, and
        # predicates when accessing the next and previous pages
        #
        # just for general cleanliness, remove any paging options
        obj.filters = filters.dup
        obj.filters.delete(:ending_before)
        obj.filters.delete(:starting_after)

        obj
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
stripe-5.6.0 lib/stripe/api_operations/list.rb
stripe-5.5.0 lib/stripe/api_operations/list.rb
stripe-5.4.1 lib/stripe/api_operations/list.rb
stripe-5.4.0 lib/stripe/api_operations/list.rb
stripe-5.3.0 lib/stripe/api_operations/list.rb
stripe-5.2.0 lib/stripe/api_operations/list.rb
stripe-5.1.1 lib/stripe/api_operations/list.rb
stripe-5.1.0 lib/stripe/api_operations/list.rb
stripe-5.0.1 lib/stripe/api_operations/list.rb
stripe-5.0.0 lib/stripe/api_operations/list.rb