module Shipcloud::Operations::Find::ClassMethods

Public Instance Methods

find(id, api_key: nil, affiliate_id: nil) click to toggle source

Finds a given object

@param [String] id The id of the object that should be found @param [String] optional api_key The api key. If no api key is given, Shipcloud.api_key will be used for the request @return [Shipcloud::Base] The found object

# File lib/shipcloud/operations/find.rb, line 13
def find(id, api_key: nil, affiliate_id: nil)
  response = Shipcloud.request(
    :get,
    "#{base_url}/#{id}",
    {},
    api_key: api_key,
    affiliate_id: affiliate_id,
  )
  new(response)
end