lib/moip2/order_api.rb in moip2-1.0.0 vs lib/moip2/order_api.rb in moip2-1.1.0
- old
+ new
@@ -16,16 +16,17 @@
def show(id)
Resource::Order.new client, client.get("#{base_path}/#{id}")
end
- def find_all(limit: nil, offset: nil, filters: nil)
+ def find_all(limit: nil, offset: nil, q: nil, filters: nil)
encoded_filters = Moip2::Util::FiltersEncoder.encode(filters)
# `URI.encode...` will accept nil params, but they will pollute the URI
params = {
limit: limit,
offset: offset,
+ q: q,
filters: encoded_filters,
}.reject { |_, value| value.nil? }
query_string = URI.encode_www_form(params)
path = "#{base_path}?#{query_string}"