module Shipcloud::Operations::All::ClassMethods
Public Instance Methods
all(filter = {}, api_key: nil, affiliate_id: nil)
click to toggle source
Loads all Objects of the resource @param [Hash] optional filter Filter the shipments list using one or more filter creteria @param [String] optional api_key The api key. If no api key is given, Shipcloud.api_key
will be used for the request
# File lib/shipcloud/operations/all.rb, line 12 def all(filter = {}, api_key: nil, affiliate_id: nil) response = Shipcloud.request( :get, base_url, filter, api_key: api_key, affiliate_id: affiliate_id, ) if index_response_root response = response.fetch(index_response_root, []) end response.map { |hash| new(hash) } end