class EasyPost::Services::CarrierMetadata
Public Instance Methods
Source
# File lib/easypost/services/carrier_metadata.rb, line 5 def retrieve(carriers = [], types = []) path = '/metadata/carriers?' params = {} if carriers.length.positive? params[:carriers] = carriers.join(',') end if types.length.positive? params[:types] = types.join(',') end path += URI.encode_www_form(params) response = @client.make_request(:get, path, params) EasyPost::InternalUtilities::Json.convert_json_to_object(response).carriers end
Retrieve metadata for carrier(s).