Class: ShiprocketAPI::CourierServiceability

Inherits:
Base
  • Object
show all
Defined in:
lib/shiprocket_api/resources/courier_serviceability.rb

Defined Under Namespace

Classes: Collection

Class Method Summary collapse

Methods inherited from Base

clear_session, create_session, #initialize, set_prefix, temp_session

Constructor Details

This class inherits a constructor from ShiprocketAPI::Base

Class Method Details

.find_every(options) ⇒ Object



26
27
28
29
30
31
32
# File 'lib/shiprocket_api/resources/courier_serviceability.rb', line 26

def self.find_every(options)
  instantiate_collection(format.decode(connection.get(collection_path, headers, body: options[:params]).body) || [], options[:params])
rescue ActiveResource::ResourceNotFound
  # Swallowing ResourceNotFound exceptions and return nil - as per
  # ActiveRecord.
  nil
end