Class: Myparcel::API::Tracktraces
- Defined in:
- lib/myparcel/api/tracktraces.rb
Overview
Class for managing tracktraces
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Myparcel::API::Base
Instance Method Details
#find(options = {}) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/myparcel/api/tracktraces.rb', line 5 def find( = {}) shipment_ids = .fetch(:shipment_ids, []) raise 'options[:shipment_ids] cannot be empty' if shipment_ids.empty? shipment_ids = shipment_ids.join(';') full_path = [path, shipment_ids].join('/') response = request :get, full_path, response['data']['tracktraces'] end |
#path ⇒ Object
14 15 16 |
# File 'lib/myparcel/api/tracktraces.rb', line 14 def path 'tracktraces' end |